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_*
// gives better conversion robustness here (we might want to map space

View File

@ -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;
}

View File

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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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();

View File

@ -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; }