diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-12-30 14:36:04 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-12-30 20:16:38 +0100 |
commit | b7cb509d38fc7183bc6f695f3f6390a10dfd70c7 (patch) | |
tree | a396f0a4d95bd7239162f5a88e0ed4b3a557f9a5 /dbaccess/source/ui | |
parent | e33dbe2c8383cb55748753c68d551050a5c424ff (diff) |
loplugin:passstuffbyref improved return in cui,dbaccess
Change-Id: I1193ff91ccd548acf9492d9701b6411a24d6763e
Reviewed-on: https://gerrit.libreoffice.org/47194
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'dbaccess/source/ui')
-rw-r--r-- | dbaccess/source/ui/control/RelationControl.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/TablesSingleDlg.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/inc/QueryViewSwitch.hxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/inc/RelationControl.hxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/inc/TableController.hxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/inc/TableWindow.hxx | 6 | ||||
-rw-r--r-- | dbaccess/source/ui/inc/TablesSingleDlg.hxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/inc/WCopyTable.hxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/inc/charsets.hxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/querydesign/QTableConnectionData.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/querydesign/QTableConnectionData.hxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/querydesign/QTableWindow.hxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/querydesign/QTableWindowData.hxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/querydesign/QueryViewSwitch.cxx | 2 |
15 files changed, 17 insertions, 17 deletions
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(); } |