Kaydet (Commit) 31f71635 authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:passstuffbyref improved return in ucb,connectivity

Change-Id: Ib2590648c9dced87693a58a506cb62d04e37b18d
Reviewed-on: https://gerrit.libreoffice.org/47149Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 38f5e768
...@@ -400,7 +400,7 @@ const ParserContextSharedPtr& getParserContext() ...@@ -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
......
...@@ -594,27 +594,27 @@ OUString OTableHelper::getTypeCreatePattern() const ...@@ -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;
} }
......
...@@ -266,7 +266,7 @@ namespace dbtools ...@@ -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;
......
...@@ -97,7 +97,7 @@ public: ...@@ -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
......
...@@ -136,7 +136,7 @@ namespace connectivity ...@@ -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 ...@@ -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
......
...@@ -72,7 +72,7 @@ namespace dbtools ...@@ -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
......
...@@ -69,7 +69,7 @@ namespace { ...@@ -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 ( ...@@ -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)
......
...@@ -289,7 +289,7 @@ const Any& CachedContentResultSet::CCRS_Cache ...@@ -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
......
...@@ -98,7 +98,7 @@ class CachedContentResultSet ...@@ -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
......
...@@ -46,10 +46,10 @@ public: ...@@ -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();
......
...@@ -197,7 +197,7 @@ public: ...@@ -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; }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment