cui/source/dialogs/screenshotannotationdlg.cxx          |    2 +-
 dbaccess/source/core/dataaccess/ModelImpl.cxx           |    4 ++--
 dbaccess/source/core/inc/ModelImpl.hxx                  |    6 +++---
 dbaccess/source/ui/control/RelationControl.cxx          |    2 +-
 dbaccess/source/ui/dlg/TablesSingleDlg.cxx              |    2 +-
 dbaccess/source/ui/inc/QueryViewSwitch.hxx              |    2 +-
 dbaccess/source/ui/inc/RelationControl.hxx              |    2 +-
 dbaccess/source/ui/inc/TableController.hxx              |    2 +-
 dbaccess/source/ui/inc/TableWindow.hxx                  |    6 +++---
 dbaccess/source/ui/inc/TablesSingleDlg.hxx              |    2 +-
 dbaccess/source/ui/inc/WCopyTable.hxx                   |    2 +-
 dbaccess/source/ui/inc/charsets.hxx                     |    2 +-
 dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx    |    2 +-
 dbaccess/source/ui/querydesign/QTableConnectionData.cxx |    2 +-
 dbaccess/source/ui/querydesign/QTableConnectionData.hxx |    2 +-
 dbaccess/source/ui/querydesign/QTableWindow.hxx         |    2 +-
 dbaccess/source/ui/querydesign/QTableWindowData.hxx     |    2 +-
 dbaccess/source/ui/querydesign/QueryViewSwitch.cxx      |    2 +-
 include/dbaccess/dbsubcomponentcontroller.hxx           |    2 +-
 19 files changed, 24 insertions(+), 24 deletions(-)

New commits:
commit b7cb509d38fc7183bc6f695f3f6390a10dfd70c7
Author: Noel Grandin <noel.gran...@collabora.co.uk>
Date:   Sat Dec 30 14:36:04 2017 +0200

    loplugin:passstuffbyref improved return in cui,dbaccess
    
    Change-Id: I1193ff91ccd548acf9492d9701b6411a24d6763e
    Reviewed-on: https://gerrit.libreoffice.org/47194
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/cui/source/dialogs/screenshotannotationdlg.cxx 
b/cui/source/dialogs/screenshotannotationdlg.cxx
index f8f0377bd00b..b8010a8ef1be 100644
--- a/cui/source/dialogs/screenshotannotationdlg.cxx
+++ b/cui/source/dialogs/screenshotannotationdlg.cxx
@@ -116,7 +116,7 @@ public:
         return maB2IRange;
     }
 
-    const OString GetHelpId() const { return mrControl.GetHelpId(); }
+    OString const & GetHelpId() const { return mrControl.GetHelpId(); }
 
 private:
     const vcl::Window&  mrControl;
diff --git a/dbaccess/source/core/dataaccess/ModelImpl.cxx 
b/dbaccess/source/core/dataaccess/ModelImpl.cxx
index ce9a76b6f5e9..ac9dadd77f9d 100644
--- a/dbaccess/source/core/dataaccess/ModelImpl.cxx
+++ b/dbaccess/source/core/dataaccess/ModelImpl.cxx
@@ -774,7 +774,7 @@ void ODatabaseModelImpl::commitRootStorage()
         "ODatabaseModelImpl::commitRootStorage: could not commit the 
storage!");
 }
 
-Reference< XStorage > ODatabaseModelImpl::getOrCreateRootStorage()
+Reference< XStorage > const & ODatabaseModelImpl::getOrCreateRootStorage()
 {
     if ( !m_xDocumentStorage.is() )
     {
@@ -1171,7 +1171,7 @@ namespace
     }
 }
 
-Reference< XStorage > ODatabaseModelImpl::impl_switchToStorage_throw( const 
Reference< XStorage >& _rxNewRootStorage )
+Reference< XStorage > const & ODatabaseModelImpl::impl_switchToStorage_throw( 
const Reference< XStorage >& _rxNewRootStorage )
 {
     // stop listening for modifications at the old storage
     lcl_modifyListening( *this, m_xDocumentStorage.getTyped(), 
m_pStorageModifyListener, Application::GetSolarMutex(), false );
diff --git a/dbaccess/source/core/inc/ModelImpl.hxx 
b/dbaccess/source/core/inc/ModelImpl.hxx
index 880c11f81bb7..93c25b1c77b3 100644
--- a/dbaccess/source/core/inc/ModelImpl.hxx
+++ b/dbaccess/source/core/inc/ModelImpl.hxx
@@ -305,8 +305,8 @@ public:
 
     void clearConnections();
 
-            css::uno::Reference< css::embed::XStorage > 
getOrCreateRootStorage();
-    css::uno::Reference< css::embed::XStorage > getRootStorage() const { 
return m_xDocumentStorage.getTyped(); }
+    css::uno::Reference< css::embed::XStorage > const & 
getOrCreateRootStorage();
+    css::uno::Reference< css::embed::XStorage > const & getRootStorage() const 
{ return m_xDocumentStorage.getTyped(); }
     void resetRootStorage() { impl_switchToStorage_throw( nullptr ); }
 
     /** returns the data source. If it doesn't exist it will be created
@@ -452,7 +452,7 @@ public:
 
 private:
     void    impl_construct_nothrow();
-    css::uno::Reference< css::embed::XStorage >
+    css::uno::Reference< css::embed::XStorage > const &
             impl_switchToStorage_throw( const css::uno::Reference< 
css::embed::XStorage >& _rxNewRootStorage );
 
     /** switches to the given document URL, which denotes the logical URL of 
the document, not necessarily the
diff --git a/dbaccess/source/ui/control/RelationControl.cxx 
b/dbaccess/source/ui/control/RelationControl.cxx
index 1129015ac905..6f0465d45410 100644
--- a/dbaccess/source/ui/control/RelationControl.cxx
+++ b/dbaccess/source/ui/control/RelationControl.cxx
@@ -682,7 +682,7 @@ namespace dbaui
         m_pRC_Tables->SaveModified();
     }
 
-    TTableWindowData::value_type OTableListBoxControl::getReferencingTable()   
 const
+    TTableWindowData::value_type const & 
OTableListBoxControl::getReferencingTable()    const
     {
         return m_pRC_Tables->getData()->getReferencingTable();
     }
diff --git a/dbaccess/source/ui/dlg/TablesSingleDlg.cxx 
b/dbaccess/source/ui/dlg/TablesSingleDlg.cxx
index 5056f95d809c..fc586101bea6 100644
--- a/dbaccess/source/ui/dlg/TablesSingleDlg.cxx
+++ b/dbaccess/source/ui/dlg/TablesSingleDlg.cxx
@@ -105,7 +105,7 @@ OUString OTableSubscriptionDialog::getConnectionURL() const
     return m_pImpl->getConnectionURL();
 }
 
-Reference< XPropertySet > OTableSubscriptionDialog::getCurrentDataSource()
+Reference< XPropertySet > const & 
OTableSubscriptionDialog::getCurrentDataSource()
 {
     return m_pImpl->getCurrentDataSource();
 }
diff --git a/dbaccess/source/ui/inc/QueryViewSwitch.hxx 
b/dbaccess/source/ui/inc/QueryViewSwitch.hxx
index f6e08ee88edc..2be9eefe1991 100644
--- a/dbaccess/source/ui/inc/QueryViewSwitch.hxx
+++ b/dbaccess/source/ui/inc/QueryViewSwitch.hxx
@@ -82,7 +82,7 @@ namespace dbaui
         OQueryContainerWindow*  getContainer() const;
 
         void SetPosSizePixel( Point _rPt,Size _rSize);
-        css::uno::Reference< css::uno::XComponentContext > getORB() const;
+        css::uno::Reference< css::uno::XComponentContext > const & getORB() 
const;
 
     private:
         void    impl_forceSQLView();
diff --git a/dbaccess/source/ui/inc/RelationControl.hxx 
b/dbaccess/source/ui/inc/RelationControl.hxx
index 8fe8ed176584..1a9e359f1689 100644
--- a/dbaccess/source/ui/inc/RelationControl.hxx
+++ b/dbaccess/source/ui/inc/RelationControl.hxx
@@ -79,7 +79,7 @@ namespace dbaui
 
         void SaveModified();
 
-        TTableWindowData::value_type getReferencingTable()  const;
+        TTableWindowData::value_type const & getReferencingTable()  const;
 
         /** getContainer returns the container interface
             @return the interface of the container
diff --git a/dbaccess/source/ui/inc/TableController.hxx 
b/dbaccess/source/ui/inc/TableController.hxx
index 355d49f9e277..46703a419063 100644
--- a/dbaccess/source/ui/inc/TableController.hxx
+++ b/dbaccess/source/ui/inc/TableController.hxx
@@ -105,7 +105,7 @@ namespace dbaui
 
         const OTypeInfoMap&          getTypeInfo() const { return m_aTypeInfo; 
}
 
-        TOTypeInfoSP                 getTypeInfo(sal_Int32 _nPos) const { 
return m_aTypeInfoIndex[_nPos]->second; }
+        TOTypeInfoSP const &                getTypeInfo(sal_Int32 _nPos) const 
{ return m_aTypeInfoIndex[_nPos]->second; }
         TOTypeInfoSP                        getTypeInfoByType(sal_Int32 
_nDataType) const;
 
         const TOTypeInfoSP&                 getTypeInfoFallBack() const { 
return m_pTypeInfo; }
diff --git a/dbaccess/source/ui/inc/TableWindow.hxx 
b/dbaccess/source/ui/inc/TableWindow.hxx
index d348d362cb2b..a83a54832015 100644
--- a/dbaccess/source/ui/inc/TableWindow.hxx
+++ b/dbaccess/source/ui/inc/TableWindow.hxx
@@ -146,9 +146,9 @@ namespace dbaui
 
         void                        Remove();
 
-        OUString             GetTableName() const { return 
m_pData->GetTableName(); }
-        OUString             GetWinName() const { return 
m_pData->GetWinName(); }
-        OUString             GetComposedName() const { return 
m_pData->GetComposedName(); }
+        OUString const &    GetTableName() const { return 
m_pData->GetTableName(); }
+        OUString const &    GetWinName() const { return m_pData->GetWinName(); 
}
+        OUString const &    GetComposedName() const { return 
m_pData->GetComposedName(); }
         const VclPtr<OTableWindowListBox>&  GetListBox() const { return 
m_xListBox; }
         const TTableWindowData::value_type& GetData() const { return m_pData; }
         const VclPtr<OTableWindowTitle>&    GetTitleCtrl() { return m_xTitle; }
diff --git a/dbaccess/source/ui/inc/TablesSingleDlg.hxx 
b/dbaccess/source/ui/inc/TablesSingleDlg.hxx
index 0ae8d9e15daa..b0ee3e4e30a1 100644
--- a/dbaccess/source/ui/inc/TablesSingleDlg.hxx
+++ b/dbaccess/source/ui/inc/TablesSingleDlg.hxx
@@ -61,7 +61,7 @@ class ODbDataSourceAdministrationHelper;
         bool        getCurrentSettings(css::uno::Sequence< 
css::beans::PropertyValue >& _rDriverParams);
         void        clearPassword();
         OUString    getConnectionURL() const;
-        css::uno::Reference< css::beans::XPropertySet >   
getCurrentDataSource();
+        css::uno::Reference< css::beans::XPropertySet > const & 
getCurrentDataSource();
         void endExecution() { m_bStopExecution = true; }
 
         virtual const SfxItemSet* getOutputSet() const override;
diff --git a/dbaccess/source/ui/inc/WCopyTable.hxx 
b/dbaccess/source/ui/inc/WCopyTable.hxx
index b6d77f199be7..2bd96a013a20 100644
--- a/dbaccess/source/ui/inc/WCopyTable.hxx
+++ b/dbaccess/source/ui/inc/WCopyTable.hxx
@@ -368,7 +368,7 @@ namespace dbaui
 
         const OTypeInfoMap& getTypeInfo()                       const { return 
m_aTypeInfo; }
 
-        TOTypeInfoSP        getDestTypeInfo(sal_Int32 _nPos)    const { return 
m_aDestTypeInfoIndex[_nPos]->second; }
+        TOTypeInfoSP const & getDestTypeInfo(sal_Int32 _nPos)    const { 
return m_aDestTypeInfoIndex[_nPos]->second; }
         const OTypeInfoMap& getDestTypeInfo()                   const { return 
m_aDestTypeInfo; }
 
         const css::lang::Locale&  GetLocale() const { return m_aLocale; }
diff --git a/dbaccess/source/ui/inc/charsets.hxx 
b/dbaccess/source/ui/inc/charsets.hxx
index 04f7515afef4..490dcb8162c1 100644
--- a/dbaccess/source/ui/inc/charsets.hxx
+++ b/dbaccess/source/ui/inc/charsets.hxx
@@ -70,7 +70,7 @@ namespace dbaui
     public:
         CharsetDisplayDerefHelper(const CharsetDisplayDerefHelper& _rSource);
 
-        OUString        getIanaName() const         { return 
CharsetDisplayDerefHelper_Base::getIanaName(); }
+        OUString const & getIanaName() const         { return 
CharsetDisplayDerefHelper_Base::getIanaName(); }
         const OUString& getDisplayName() const      { return m_sDisplayName; }
 
     private:
diff --git a/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx 
b/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx
index c4b776365f8c..8171442361fb 100644
--- a/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx
+++ b/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx
@@ -514,7 +514,7 @@ namespace dbaui
         return Reference< XModel >( 
m_pImpl->m_aDataSource.getDatabaseDocument(), UNO_QUERY );
     }
 
-    Reference< XNumberFormatter > 
DBSubComponentController::getNumberFormatter() const
+    Reference< XNumberFormatter > const & 
DBSubComponentController::getNumberFormatter() const
     {
         return m_pImpl->m_xFormatter;
     }
diff --git a/dbaccess/source/ui/querydesign/QTableConnectionData.cxx 
b/dbaccess/source/ui/querydesign/QTableConnectionData.cxx
index d7e8ad467b9c..c7de9ce6acb0 100644
--- a/dbaccess/source/ui/querydesign/QTableConnectionData.cxx
+++ b/dbaccess/source/ui/querydesign/QTableConnectionData.cxx
@@ -83,7 +83,7 @@ OQueryTableConnectionData& 
OQueryTableConnectionData::operator=(const OQueryTabl
     return *this;
 }
 
-OUString OQueryTableConnectionData::GetAliasName(EConnectionSide nWhich) const
+OUString const & OQueryTableConnectionData::GetAliasName(EConnectionSide 
nWhich) const
 {
     return nWhich == JTCS_FROM ? m_pReferencingTable->GetWinName() : 
m_pReferencedTable->GetWinName();
 }
diff --git a/dbaccess/source/ui/querydesign/QTableConnectionData.hxx 
b/dbaccess/source/ui/querydesign/QTableConnectionData.hxx
index ee24068f94f5..f28974dceea0 100644
--- a/dbaccess/source/ui/querydesign/QTableConnectionData.hxx
+++ b/dbaccess/source/ui/querydesign/QTableConnectionData.hxx
@@ -52,7 +52,7 @@ namespace dbaui
         */
         virtual bool Update() override;
 
-        OUString GetAliasName(EConnectionSide nWhich) const;
+        OUString const & GetAliasName(EConnectionSide nWhich) const;
 
         sal_Int32       GetFieldIndex(EConnectionSide nWhich) const { return 
nWhich==JTCS_TO ? m_nDestEntryIndex : m_nFromEntryIndex; }
         void            SetFieldIndex(EConnectionSide nWhich, sal_Int32 nVal) 
{ if (nWhich==JTCS_TO) m_nDestEntryIndex=nVal; else m_nFromEntryIndex=nVal; }
diff --git a/dbaccess/source/ui/querydesign/QTableWindow.hxx 
b/dbaccess/source/ui/querydesign/QTableWindow.hxx
index a13145b267f5..e64fd2e85b7a 100644
--- a/dbaccess/source/ui/querydesign/QTableWindow.hxx
+++ b/dbaccess/source/ui/querydesign/QTableWindow.hxx
@@ -32,7 +32,7 @@ namespace dbaui
     public:
         OQueryTableWindow( vcl::Window* pParent, const 
TTableWindowData::value_type& pTabWinData );
 
-        OUString GetAliasName() const
+        OUString const & GetAliasName() const
         {
             return 
static_cast<OQueryTableWindowData*>(GetData().get())->GetAliasName();
         }
diff --git a/dbaccess/source/ui/querydesign/QTableWindowData.hxx 
b/dbaccess/source/ui/querydesign/QTableWindowData.hxx
index 401a9a0fdd52..ac74a39a7508 100644
--- a/dbaccess/source/ui/querydesign/QTableWindowData.hxx
+++ b/dbaccess/source/ui/querydesign/QTableWindowData.hxx
@@ -33,7 +33,7 @@ namespace dbaui
         explicit OQueryTableWindowData(const OUString& _rComposedName, const 
OUString& rTableName, const OUString& rTableAlias);
         virtual ~OQueryTableWindowData() override;
 
-        OUString GetAliasName() { return GetWinName(); }
+        OUString const & GetAliasName() { return GetWinName(); }
         void SetAliasName(const OUString& rNewAlias) { SetWinName(rNewAlias); }
     };
 }
diff --git a/dbaccess/source/ui/querydesign/QueryViewSwitch.cxx 
b/dbaccess/source/ui/querydesign/QueryViewSwitch.cxx
index 9904e70fe3ca..ecef58f3bc9a 100644
--- a/dbaccess/source/ui/querydesign/QueryViewSwitch.cxx
+++ b/dbaccess/source/ui/querydesign/QueryViewSwitch.cxx
@@ -272,7 +272,7 @@ void OQueryViewSwitch::SetPosSizePixel( Point _rPt,Size 
_rSize)
     m_pTextView->SetPosSizePixel( _rPt,_rSize);
 }
 
-Reference< XComponentContext > OQueryViewSwitch::getORB() const
+Reference< XComponentContext > const & OQueryViewSwitch::getORB() const
 {
     return m_pDesignView->getORB();
 }
diff --git a/include/dbaccess/dbsubcomponentcontroller.hxx 
b/include/dbaccess/dbsubcomponentcontroller.hxx
index f4d84f12b99e..2044e1ab6b91 100644
--- a/include/dbaccess/dbsubcomponentcontroller.hxx
+++ b/include/dbaccess/dbsubcomponentcontroller.hxx
@@ -149,7 +149,7 @@ namespace dbaui
 
         /** returns the number formatter
         */
-        css::uno::Reference< css::util::XNumberFormatter >    
getNumberFormatter() const;
+        css::uno::Reference< css::util::XNumberFormatter > const & 
getNumberFormatter() const;
 
         // css::frame::XController
         virtual sal_Bool SAL_CALL suspend(sal_Bool bSuspend) override;
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to