From d425658bd9fd8e315e4931afb544bc845da0360e Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 19 Dec 2018 16:10:51 +0200 Subject: pass OSQLParseNode around by unique_ptr Change-Id: I8ffb9e04614472c3645d24bebdc88f91059d12ad Reviewed-on: https://gerrit.libreoffice.org/65436 Tested-by: Jenkins Reviewed-by: Noel Grandin --- svx/source/fmcomp/gridcell.cxx | 2 +- svx/source/form/filtnav.cxx | 2 +- svx/source/form/sqlparserclient.cxx | 4 ++-- svx/source/inc/sqlparserclient.hxx | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) (limited to 'svx/source') 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, -- cgit