summaryrefslogtreecommitdiff
path: root/svx
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 /svx
parent526387b96e9bc2c04b0dc26744bf6b88ea7c0521 (diff)
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 'svx')
-rw-r--r--svx/source/fmcomp/gridcell.cxx2
-rw-r--r--svx/source/form/filtnav.cxx2
-rw-r--r--svx/source/form/sqlparserclient.cxx4
-rw-r--r--svx/source/inc/sqlparserclient.hxx2
4 files changed, 5 insertions, 5 deletions
diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx
index 18d105fc5b1d..ae61518d539d 100644
--- a/svx/source/fmcomp/gridcell.cxx
+++ b/svx/source/fmcomp/gridcell.cxx
@@ -2890,7 +2890,7 @@ bool DbFilterField::commitControl()
OUString aErrorMsg;
Reference< XNumberFormatter > xNumberFormatter(m_rColumn.GetParent().getNumberFormatter());
- std::shared_ptr< OSQLParseNode > pParseNode = predicateTree(aErrorMsg, aNewText,xNumberFormatter, m_rColumn.GetField());
+ std::unique_ptr< OSQLParseNode > pParseNode = predicateTree(aErrorMsg, aNewText,xNumberFormatter, m_rColumn.GetField());
if (pParseNode != nullptr)
{
OUString aPreparedText;
diff --git a/svx/source/form/filtnav.cxx b/svx/source/form/filtnav.cxx
index 97e414984b12..a99b6e215613 100644
--- a/svx/source/form/filtnav.cxx
+++ b/svx/source/form/filtnav.cxx
@@ -805,7 +805,7 @@ bool FmFilterModel::ValidateText(FmFilterItem const * pItem, OUString& rText, OU
// parse the given text as filter predicate
OUString aErr, aTxt( rText );
- std::shared_ptr< OSQLParseNode > pParseNode = predicateTree( aErr, aTxt, xFormatter, xField );
+ std::unique_ptr< OSQLParseNode > pParseNode = predicateTree( aErr, aTxt, xFormatter, xField );
rErrorMsg = aErr;
rText = aTxt;
if ( pParseNode != nullptr )
diff --git a/svx/source/form/sqlparserclient.cxx b/svx/source/form/sqlparserclient.cxx
index 2664229ef55c..6bc957270b92 100644
--- a/svx/source/form/sqlparserclient.cxx
+++ b/svx/source/form/sqlparserclient.cxx
@@ -37,14 +37,14 @@ namespace svxform
m_xContext = rxContext;
}
- std::shared_ptr< ::connectivity::OSQLParseNode > OSQLParserClient::predicateTree(
+ std::unique_ptr< ::connectivity::OSQLParseNode > OSQLParserClient::predicateTree(
OUString& _rErrorMessage,
const OUString& _rStatement,
const css::uno::Reference< css::util::XNumberFormatter >& _rxFormatter,
const css::uno::Reference< css::beans::XPropertySet >& _rxField
) const
{
- return std::shared_ptr< OSQLParseNode >(m_pParser->predicateTree(_rErrorMessage, _rStatement, _rxFormatter, _rxField));
+ return m_pParser->predicateTree(_rErrorMessage, _rStatement, _rxFormatter, _rxField);
}
}
diff --git a/svx/source/inc/sqlparserclient.hxx b/svx/source/inc/sqlparserclient.hxx
index 06341d76120b..7873c41bbf99 100644
--- a/svx/source/inc/sqlparserclient.hxx
+++ b/svx/source/inc/sqlparserclient.hxx
@@ -50,7 +50,7 @@ namespace svxform
OSQLParserClient(
const css::uno::Reference< css::uno::XComponentContext >& rxContext);
- std::shared_ptr< ::connectivity::OSQLParseNode > predicateTree(
+ std::unique_ptr< ::connectivity::OSQLParseNode > predicateTree(
OUString& _rErrorMessage,
const OUString& _rStatement,
const css::uno::Reference< css::util::XNumberFormatter >& _rxFormatter,