diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-12-28 13:48:31 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-12-29 08:00:29 +0100 |
commit | 31f71635a136daf36d554e0c20db9ae0d1686c23 (patch) | |
tree | ba4150e1c999a15362faa18863a4a5105bd5a8d7 | |
parent | 38f5e768b0f858f8f990a8f297396821c75d45dc (diff) |
loplugin:passstuffbyref improved return in ucb,connectivity
Change-Id: Ib2590648c9dced87693a58a506cb62d04e37b18d
Reviewed-on: https://gerrit.libreoffice.org/47149
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | connectivity/source/commontools/RowFunctionParser.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/commontools/TTableHelper.cxx | 10 | ||||
-rw-r--r-- | connectivity/source/commontools/statementcomposer.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/inc/RowFunctionParser.hxx | 2 | ||||
-rw-r--r-- | include/connectivity/TTableHelper.hxx | 10 | ||||
-rw-r--r-- | include/connectivity/statementcomposer.hxx | 2 | ||||
-rw-r--r-- | sdext/source/presenter/PresenterPaneBorderPainter.cxx | 4 | ||||
-rw-r--r-- | ucb/source/cacher/cachedcontentresultset.cxx | 2 | ||||
-rw-r--r-- | ucb/source/cacher/cachedcontentresultset.hxx | 2 | ||||
-rw-r--r-- | ucb/source/core/providermap.hxx | 4 | ||||
-rw-r--r-- | ucb/source/ucp/webdav-neon/NeonSession.hxx | 2 |
11 files changed, 21 insertions, 21 deletions
diff --git a/connectivity/source/commontools/RowFunctionParser.cxx b/connectivity/source/commontools/RowFunctionParser.cxx index 2b3fa75b324c..afdbac9c9a52 100644 --- a/connectivity/source/commontools/RowFunctionParser.cxx +++ b/connectivity/source/commontools/RowFunctionParser.cxx @@ -400,7 +400,7 @@ const ParserContextSharedPtr& getParserContext() } -std::shared_ptr<ExpressionNode> FunctionParser::parseFunction( const OUString& _sFunction) +std::shared_ptr<ExpressionNode> const & FunctionParser::parseFunction( const OUString& _sFunction) { // TODO(Q1): Check if a combination of the RTL_UNICODETOTEXT_FLAGS_* // gives better conversion robustness here (we might want to map space diff --git a/connectivity/source/commontools/TTableHelper.cxx b/connectivity/source/commontools/TTableHelper.cxx index a30a19985394..2124e3366b08 100644 --- a/connectivity/source/commontools/TTableHelper.cxx +++ b/connectivity/source/commontools/TTableHelper.cxx @@ -594,27 +594,27 @@ OUString OTableHelper::getTypeCreatePattern() const return OUString(); } -Reference< XConnection> OTableHelper::getConnection() const +Reference< XConnection> const & OTableHelper::getConnection() const { return m_pImpl->m_xConnection; } -Reference< css::sdb::tools::XTableRename> OTableHelper::getRenameService() const +Reference< css::sdb::tools::XTableRename> const & OTableHelper::getRenameService() const { return m_pImpl->m_xRename; } -Reference< css::sdb::tools::XTableAlteration> OTableHelper::getAlterService() const +Reference< css::sdb::tools::XTableAlteration> const & OTableHelper::getAlterService() const { return m_pImpl->m_xAlter; } -Reference< css::sdb::tools::XKeyAlteration> OTableHelper::getKeyService() const +Reference< css::sdb::tools::XKeyAlteration> const & OTableHelper::getKeyService() const { return m_pImpl->m_xKeyAlter; } -Reference< css::sdb::tools::XIndexAlteration> OTableHelper::getIndexService() const +Reference< css::sdb::tools::XIndexAlteration> const & OTableHelper::getIndexService() const { return m_pImpl->m_xIndexAlter; } diff --git a/connectivity/source/commontools/statementcomposer.cxx b/connectivity/source/commontools/statementcomposer.cxx index f72afe40f2c1..499e7f167e39 100644 --- a/connectivity/source/commontools/statementcomposer.cxx +++ b/connectivity/source/commontools/statementcomposer.cxx @@ -266,7 +266,7 @@ namespace dbtools } - Reference< XSingleSelectQueryComposer > StatementComposer::getComposer() + Reference< XSingleSelectQueryComposer > const & StatementComposer::getComposer() { lcl_ensureUpToDateComposer_nothrow( *m_pData ); return m_pData->xComposer; diff --git a/connectivity/source/inc/RowFunctionParser.hxx b/connectivity/source/inc/RowFunctionParser.hxx index df2c7ba2bf4e..b338d34e2cfe 100644 --- a/connectivity/source/inc/RowFunctionParser.hxx +++ b/connectivity/source/inc/RowFunctionParser.hxx @@ -97,7 +97,7 @@ public: @return the generated function object. */ - static std::shared_ptr<ExpressionNode> parseFunction( const OUString& _sFunction); + static std::shared_ptr<ExpressionNode> const & parseFunction( const OUString& _sFunction); private: // disabled constructor/destructor, since this is diff --git a/include/connectivity/TTableHelper.hxx b/include/connectivity/TTableHelper.hxx index aa462dd50fc3..54d941421860 100644 --- a/include/connectivity/TTableHelper.hxx +++ b/include/connectivity/TTableHelper.hxx @@ -136,7 +136,7 @@ namespace connectivity ); virtual css::uno::Reference< css::sdbc::XDatabaseMetaData> getMetaData() const override; - css::uno::Reference< css::sdbc::XConnection> getConnection() const; + css::uno::Reference< css::sdbc::XConnection> const & getConnection() const; // XRename virtual void SAL_CALL rename( const OUString& newName ) override; @@ -152,10 +152,10 @@ namespace connectivity virtual OUString getTypeCreatePattern() const; - css::uno::Reference< css::sdb::tools::XTableRename> getRenameService() const; - css::uno::Reference< css::sdb::tools::XTableAlteration> getAlterService() const; - css::uno::Reference< css::sdb::tools::XKeyAlteration> getKeyService() const; - css::uno::Reference< css::sdb::tools::XIndexAlteration> getIndexService() const; + css::uno::Reference< css::sdb::tools::XTableRename> const & getRenameService() const; + css::uno::Reference< css::sdb::tools::XTableAlteration> const & getAlterService() const; + css::uno::Reference< css::sdb::tools::XKeyAlteration> const & getKeyService() const; + css::uno::Reference< css::sdb::tools::XIndexAlteration> const & getIndexService() const; }; } #endif // INCLUDED_CONNECTIVITY_TTABLEHELPER_HXX diff --git a/include/connectivity/statementcomposer.hxx b/include/connectivity/statementcomposer.hxx index e1cb17af49d3..e94d95a1a11b 100644 --- a/include/connectivity/statementcomposer.hxx +++ b/include/connectivity/statementcomposer.hxx @@ -72,7 +72,7 @@ namespace dbtools @throws css::sdbc::SQLException if such an exception occurs while creating the composer */ - css::uno::Reference< css::sdb::XSingleSelectQueryComposer > + css::uno::Reference< css::sdb::XSingleSelectQueryComposer > const & getComposer(); /** returns the composer statement diff --git a/sdext/source/presenter/PresenterPaneBorderPainter.cxx b/sdext/source/presenter/PresenterPaneBorderPainter.cxx index 764c7dc0560c..30e303337478 100644 --- a/sdext/source/presenter/PresenterPaneBorderPainter.cxx +++ b/sdext/source/presenter/PresenterPaneBorderPainter.cxx @@ -69,7 +69,7 @@ namespace { awt::Rectangle RemoveBorder ( const awt::Rectangle& rBox, drawing::framework::BorderType eBorderType) const; - const Reference<rendering::XCanvasFont> GetFont ( + Reference<rendering::XCanvasFont> const & GetFont ( const Reference<rendering::XCanvas>& rxCanvas) const; SharedBitmapDescriptor mpTopLeft; @@ -873,7 +873,7 @@ awt::Rectangle RendererPaneStyle::RemoveBorder ( rBox.Height - pBorderSize->mnTop - pBorderSize->mnBottom); } -const Reference<rendering::XCanvasFont> RendererPaneStyle::GetFont ( +Reference<rendering::XCanvasFont> const & RendererPaneStyle::GetFont ( const Reference<rendering::XCanvas>& rxCanvas) const { if (mpFont.get() != nullptr) diff --git a/ucb/source/cacher/cachedcontentresultset.cxx b/ucb/source/cacher/cachedcontentresultset.cxx index 73f0c5a8b256..54c1d112ea2e 100644 --- a/ucb/source/cacher/cachedcontentresultset.cxx +++ b/ucb/source/cacher/cachedcontentresultset.cxx @@ -289,7 +289,7 @@ const Any& CachedContentResultSet::CCRS_Cache return (*rRow)[nColumnIndex-1]; } -OUString CachedContentResultSet::CCRS_Cache +OUString const & CachedContentResultSet::CCRS_Cache ::getContentIdentifierString( sal_Int32 nRow ) { try diff --git a/ucb/source/cacher/cachedcontentresultset.hxx b/ucb/source/cacher/cachedcontentresultset.hxx index bdd8837362e7..51e73b1317bd 100644 --- a/ucb/source/cacher/cachedcontentresultset.hxx +++ b/ucb/source/cacher/cachedcontentresultset.hxx @@ -98,7 +98,7 @@ class CachedContentResultSet getAny( sal_Int32 nRow, sal_Int32 nColumnIndex ); /// @throws css::uno::RuntimeException - OUString + OUString const & getContentIdentifierString( sal_Int32 nRow ); /// @throws css::uno::RuntimeException diff --git a/ucb/source/core/providermap.hxx b/ucb/source/core/providermap.hxx index c1b50e058820..1a253f405f3a 100644 --- a/ucb/source/core/providermap.hxx +++ b/ucb/source/core/providermap.hxx @@ -46,10 +46,10 @@ public: const css::uno::Reference< css::ucb::XContentProvider >& getProvider() const { return m_xProvider; } - inline css::uno::Reference< css::ucb::XContentProvider > getResolvedProvider() const; + inline css::uno::Reference< css::ucb::XContentProvider > const & getResolvedProvider() const; }; -inline css::uno::Reference< css::ucb::XContentProvider > +inline css::uno::Reference< css::ucb::XContentProvider > const & ProviderListEntry_Impl::getResolvedProvider() const { return m_xResolvedProvider.is() ? m_xResolvedProvider : resolveProvider(); diff --git a/ucb/source/ucp/webdav-neon/NeonSession.hxx b/ucb/source/ucp/webdav-neon/NeonSession.hxx index 28b23678326c..ec080f1f0473 100644 --- a/ucb/source/ucp/webdav-neon/NeonSession.hxx +++ b/ucb/source/ucp/webdav-neon/NeonSession.hxx @@ -197,7 +197,7 @@ public: const OUString & getHostName() const { return m_aHostName; } - const ::uno::Reference< ::uno::XComponentContext > getComponentContext() + ::uno::Reference< ::uno::XComponentContext > const & getComponentContext() { return m_xFactory->getComponentContext(); } const void * getRequestData() const { return m_pRequestData; } |