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

loplugin:passstuffbyref improved return in cui,dbaccess

Change-Id: I1193ff91ccd548acf9492d9701b6411a24d6763e
Reviewed-on: https://gerrit.libreoffice.org/47194Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst e33dbe2c
......@@ -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;
......
......@@ -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 );
......
......@@ -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
......
......@@ -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();
}
......
......@@ -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();
}
......
......@@ -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();
......
......@@ -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
......
......@@ -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; }
......
......@@ -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; }
......
......@@ -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;
......
......@@ -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; }
......
......@@ -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:
......
......@@ -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;
}
......
......@@ -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();
}
......
......@@ -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; }
......
......@@ -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();
}
......
......@@ -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); }
};
}
......
......@@ -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();
}
......
......@@ -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;
......
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