summaryrefslogtreecommitdiffstats
path: root/include/connectivity
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-12-19 16:10:51 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-12-21 08:26:15 +0100
commitd425658bd9fd8e315e4931afb544bc845da0360e (patch)
treea35679686a7df2a504b9088ba6807b60c52067fc /include/connectivity
parentloplugin:unnecessaryvirtual (diff)
downloadcore-d425658bd9fd8e315e4931afb544bc845da0360e.tar.gz
core-d425658bd9fd8e315e4931afb544bc845da0360e.zip
pass OSQLParseNode around by unique_ptr
Change-Id: I8ffb9e04614472c3645d24bebdc88f91059d12ad Reviewed-on: https://gerrit.libreoffice.org/65436 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/connectivity')
-rw-r--r--include/connectivity/predicateinput.hxx4
-rw-r--r--include/connectivity/sqlparse.hxx6
2 files changed, 5 insertions, 5 deletions
diff --git a/include/connectivity/predicateinput.hxx b/include/connectivity/predicateinput.hxx
index 16ace17d9108..1e83d4ac43a5 100644
--- a/include/connectivity/predicateinput.hxx
+++ b/include/connectivity/predicateinput.hxx
@@ -103,7 +103,7 @@ namespace dbtools
) const;
private:
- ::connectivity::OSQLParseNode* implPredicateTree(
+ std::unique_ptr<::connectivity::OSQLParseNode> implPredicateTree(
OUString& _rErrorMessage,
const OUString& _rStatement,
const css::uno::Reference< css::beans::XPropertySet > & _rxField
@@ -115,7 +115,7 @@ namespace dbtools
sal_Unicode& _rThdSep
) const;
- css::uno::Any implParseNode(::connectivity::OSQLParseNode* pParseNode, bool _bForStatementUse) const;
+ css::uno::Any implParseNode(std::unique_ptr<::connectivity::OSQLParseNode> pParseNode, bool _bForStatementUse) const;
};
diff --git a/include/connectivity/sqlparse.hxx b/include/connectivity/sqlparse.hxx
index 7dda08c4bca7..cdb92064997e 100644
--- a/include/connectivity/sqlparse.hxx
+++ b/include/connectivity/sqlparse.hxx
@@ -136,7 +136,7 @@ namespace connectivity
// information on the current parse action
const IParseContext* m_pContext;
- OSQLParseNode* m_pParseTree; // result from parsing
+ std::unique_ptr<OSQLParseNode> m_pParseTree; // result from parsing
::std::unique_ptr< OSQLParser_Data >
m_pData;
OUString m_sFieldName; // current field name for a predicate
@@ -171,14 +171,14 @@ namespace connectivity
~OSQLParser();
// Parsing an SQLStatement
- OSQLParseNode* parseTree(OUString& rErrorMessage,
+ std::unique_ptr<OSQLParseNode> parseTree(OUString& rErrorMessage,
const OUString& rStatement,
bool bInternational = false);
// Check a Predicate
// set bUseRealName to false if you pass a xField that comes from where you got that field,
// as opposed from to from yourself.
- OSQLParseNode* predicateTree(OUString& rErrorMessage, const OUString& rStatement,
+ std::unique_ptr<OSQLParseNode> predicateTree(OUString& rErrorMessage, const OUString& rStatement,
const css::uno::Reference< css::util::XNumberFormatter > & xFormatter,
const css::uno::Reference< css::beans::XPropertySet > & xField,
bool bUseRealName = true);