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>
This commit is contained in:
Noel Grandin
2017-12-28 13:48:31 +02:00
parent 38f5e768b0
commit 31f71635a1
11 changed files with 21 additions and 21 deletions

View File

@@ -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_* // TODO(Q1): Check if a combination of the RTL_UNICODETOTEXT_FLAGS_*
// gives better conversion robustness here (we might want to map space // gives better conversion robustness here (we might want to map space

View File

@@ -594,27 +594,27 @@ OUString OTableHelper::getTypeCreatePattern() const
return OUString(); return OUString();
} }
Reference< XConnection> OTableHelper::getConnection() const Reference< XConnection> const & OTableHelper::getConnection() const
{ {
return m_pImpl->m_xConnection; 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; 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; 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; 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; return m_pImpl->m_xIndexAlter;
} }

View File

@@ -266,7 +266,7 @@ namespace dbtools
} }
Reference< XSingleSelectQueryComposer > StatementComposer::getComposer() Reference< XSingleSelectQueryComposer > const & StatementComposer::getComposer()
{ {
lcl_ensureUpToDateComposer_nothrow( *m_pData ); lcl_ensureUpToDateComposer_nothrow( *m_pData );
return m_pData->xComposer; return m_pData->xComposer;

View File

@@ -97,7 +97,7 @@ public:
@return the generated function object. @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: private:
// disabled constructor/destructor, since this is // disabled constructor/destructor, since this is

View File

@@ -136,7 +136,7 @@ namespace connectivity
); );
virtual css::uno::Reference< css::sdbc::XDatabaseMetaData> getMetaData() const override; 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 // XRename
virtual void SAL_CALL rename( const OUString& newName ) override; virtual void SAL_CALL rename( const OUString& newName ) override;
@@ -152,10 +152,10 @@ namespace connectivity
virtual OUString getTypeCreatePattern() const; virtual OUString getTypeCreatePattern() const;
css::uno::Reference< css::sdb::tools::XTableRename> getRenameService() const; css::uno::Reference< css::sdb::tools::XTableRename> const & getRenameService() const;
css::uno::Reference< css::sdb::tools::XTableAlteration> getAlterService() const; css::uno::Reference< css::sdb::tools::XTableAlteration> const & getAlterService() const;
css::uno::Reference< css::sdb::tools::XKeyAlteration> getKeyService() const; css::uno::Reference< css::sdb::tools::XKeyAlteration> const & getKeyService() const;
css::uno::Reference< css::sdb::tools::XIndexAlteration> getIndexService() const; css::uno::Reference< css::sdb::tools::XIndexAlteration> const & getIndexService() const;
}; };
} }
#endif // INCLUDED_CONNECTIVITY_TTABLEHELPER_HXX #endif // INCLUDED_CONNECTIVITY_TTABLEHELPER_HXX

View File

@@ -72,7 +72,7 @@ namespace dbtools
@throws css::sdbc::SQLException @throws css::sdbc::SQLException
if such an exception occurs while creating the composer if such an exception occurs while creating the composer
*/ */
css::uno::Reference< css::sdb::XSingleSelectQueryComposer > css::uno::Reference< css::sdb::XSingleSelectQueryComposer > const &
getComposer(); getComposer();
/** returns the composer statement /** returns the composer statement

View File

@@ -69,7 +69,7 @@ namespace {
awt::Rectangle RemoveBorder ( awt::Rectangle RemoveBorder (
const awt::Rectangle& rBox, const awt::Rectangle& rBox,
drawing::framework::BorderType eBorderType) const; drawing::framework::BorderType eBorderType) const;
const Reference<rendering::XCanvasFont> GetFont ( Reference<rendering::XCanvasFont> const & GetFont (
const Reference<rendering::XCanvas>& rxCanvas) const; const Reference<rendering::XCanvas>& rxCanvas) const;
SharedBitmapDescriptor mpTopLeft; SharedBitmapDescriptor mpTopLeft;
@@ -873,7 +873,7 @@ awt::Rectangle RendererPaneStyle::RemoveBorder (
rBox.Height - pBorderSize->mnTop - pBorderSize->mnBottom); rBox.Height - pBorderSize->mnTop - pBorderSize->mnBottom);
} }
const Reference<rendering::XCanvasFont> RendererPaneStyle::GetFont ( Reference<rendering::XCanvasFont> const & RendererPaneStyle::GetFont (
const Reference<rendering::XCanvas>& rxCanvas) const const Reference<rendering::XCanvas>& rxCanvas) const
{ {
if (mpFont.get() != nullptr) if (mpFont.get() != nullptr)

View File

@@ -289,7 +289,7 @@ const Any& CachedContentResultSet::CCRS_Cache
return (*rRow)[nColumnIndex-1]; return (*rRow)[nColumnIndex-1];
} }
OUString CachedContentResultSet::CCRS_Cache OUString const & CachedContentResultSet::CCRS_Cache
::getContentIdentifierString( sal_Int32 nRow ) ::getContentIdentifierString( sal_Int32 nRow )
{ {
try try

View File

@@ -98,7 +98,7 @@ class CachedContentResultSet
getAny( sal_Int32 nRow, sal_Int32 nColumnIndex ); getAny( sal_Int32 nRow, sal_Int32 nColumnIndex );
/// @throws css::uno::RuntimeException /// @throws css::uno::RuntimeException
OUString OUString const &
getContentIdentifierString( sal_Int32 nRow ); getContentIdentifierString( sal_Int32 nRow );
/// @throws css::uno::RuntimeException /// @throws css::uno::RuntimeException

View File

@@ -46,10 +46,10 @@ public:
const css::uno::Reference< css::ucb::XContentProvider >& getProvider() const const css::uno::Reference< css::ucb::XContentProvider >& getProvider() const
{ return m_xProvider; } { 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 ProviderListEntry_Impl::getResolvedProvider() const
{ {
return m_xResolvedProvider.is() ? m_xResolvedProvider : resolveProvider(); return m_xResolvedProvider.is() ? m_xResolvedProvider : resolveProvider();

View File

@@ -197,7 +197,7 @@ public:
const OUString & getHostName() const { return m_aHostName; } const OUString & getHostName() const { return m_aHostName; }
const ::uno::Reference< ::uno::XComponentContext > getComponentContext() ::uno::Reference< ::uno::XComponentContext > const & getComponentContext()
{ return m_xFactory->getComponentContext(); } { return m_xFactory->getComponentContext(); }
const void * getRequestData() const { return m_pRequestData; } const void * getRequestData() const { return m_pRequestData; }