diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-12-27 12:39:11 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-12-27 15:39:29 +0100 |
commit | a967c8f6847cf9cbd6e0f4b9f58f2023e1f92ae5 (patch) | |
tree | a00a7d73a3aa5d6d972c8a66e9357637edf62f9b /sfx2 | |
parent | 33bd6c3e3512bf96376534e116d6f9f60d157be9 (diff) |
loplugin:passstuffbyref improved return in xmloff,sfx2
Change-Id: I7161dfca77f944027bd20614616e22d6acfa27cd
Reviewed-on: https://gerrit.libreoffice.org/47081
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/appl/newhelp.hxx | 4 | ||||
-rw-r--r-- | sfx2/source/appl/opengrf.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/bastyp/fltfnc.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/dialog/templdlg.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/doc/docfile.cxx | 10 | ||||
-rw-r--r-- | sfx2/source/doc/objstor.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/doc/oleprops.cxx | 8 | ||||
-rw-r--r-- | sfx2/source/doc/oleprops.hxx | 10 | ||||
-rw-r--r-- | sfx2/source/inc/templdgi.hxx | 2 | ||||
-rw-r--r-- | sfx2/source/sidebar/Deck.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/sidebar/Panel.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/sidebar/Theme.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/view/classificationhelper.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/view/ipclient.cxx | 4 |
14 files changed, 30 insertions, 30 deletions
diff --git a/sfx2/source/appl/newhelp.hxx b/sfx2/source/appl/newhelp.hxx index 9b8af00a3d51..b5388a3af315 100644 --- a/sfx2/source/appl/newhelp.hxx +++ b/sfx2/source/appl/newhelp.hxx @@ -337,7 +337,7 @@ public: void SetDoubleClickHdl( const Link<Control*,bool>& rLink ); void SetSelectFactoryHdl( const Link<SfxHelpIndexWindow_Impl*,void>& rLink ) { aSelectFactoryLink = rLink; } void SetFactory( const OUString& rFactory, bool bActive ); - OUString GetFactory() const { return pIPage->GetFactory(); } + OUString const & GetFactory() const { return pIPage->GetFactory(); } OUString GetSelectedEntry() const; void AddBookmarks( const OUString& rTitle, const OUString& rURL ); bool IsValidFactory( const OUString& _rFactory ); @@ -538,7 +538,7 @@ public: virtual bool PreNotify( NotifyEvent& rNEvt ) override; void setContainerWindow( const css::uno::Reference < css::awt::XWindow >& xWin ); - css::uno::Reference < css::frame::XFrame2 > + css::uno::Reference < css::frame::XFrame2 > const & getTextFrame() const { return pTextWin->getFrame(); } void SetFactory( const OUString& rFactory ); diff --git a/sfx2/source/appl/opengrf.cxx b/sfx2/source/appl/opengrf.cxx index 9407c88dd96c..ad779ac66f71 100644 --- a/sfx2/source/appl/opengrf.cxx +++ b/sfx2/source/appl/opengrf.cxx @@ -254,7 +254,7 @@ OUString SvxOpenGraphicDialog::GetCurrentFilter() const return mpImpl->aFileDlg.GetCurrentFilter(); } -OUString SvxOpenGraphicDialog::GetDetectedFilter() const +OUString const & SvxOpenGraphicDialog::GetDetectedFilter() const { return mpImpl->sDetectedFilter; } diff --git a/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx index 11ee26436345..2899d4f66558 100644 --- a/sfx2/source/bastyp/fltfnc.cxx +++ b/sfx2/source/bastyp/fltfnc.cxx @@ -172,7 +172,7 @@ SfxFilterContainer::~SfxFilterContainer() } -const OUString SfxFilterContainer::GetName() const +OUString const & SfxFilterContainer::GetName() const { return pImpl->aName; } diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index 0e3f8e54a92b..d6e883afeff3 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -2130,7 +2130,7 @@ void SfxCommonTemplateDialog_Impl::EnableExample_Impl(sal_uInt16 nId, bool bEnab EnableItem(nId, bEnable); } -VclPtr<PopupMenu> SfxCommonTemplateDialog_Impl::CreateContextMenu() +VclPtr<PopupMenu> const & SfxCommonTemplateDialog_Impl::CreateContextMenu() { if ( bBindingUpdate ) { diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx index 757336c6ac1c..48d69a264510 100644 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -302,7 +302,7 @@ void SfxMedium::ResetError() pImpl->m_pOutStream->ResetError(); } -ErrCode SfxMedium::GetLastStorageCreationState() +ErrCode const & SfxMedium::GetLastStorageCreationState() { return pImpl->nLastStorageError; } @@ -365,7 +365,7 @@ bool SfxMedium::DocNeedsFileDateCheck() const GetURLObject().isAnyKnownWebDAVScheme() ) ); } -util::DateTime SfxMedium::GetInitFileDate( bool bIgnoreOldValue ) +util::DateTime const & SfxMedium::GetInitFileDate( bool bIgnoreOldValue ) { if ( ( bIgnoreOldValue || !pImpl->m_bGotDateTime ) && !pImpl->m_aLogicName.isEmpty() ) { @@ -749,7 +749,7 @@ void SfxMedium::StorageBackup_Impl() } -OUString SfxMedium::GetBackup_Impl() +OUString const & SfxMedium::GetBackup_Impl() { if ( pImpl->m_aBackupURL.isEmpty() ) StorageBackup_Impl(); @@ -1484,7 +1484,7 @@ uno::Reference < embed::XStorage > SfxMedium::GetStorage( bool bCreateTempIfNo ) } -uno::Reference< embed::XStorage > SfxMedium::GetZipStorageToSign_Impl( bool bReadOnly ) +uno::Reference< embed::XStorage > const & SfxMedium::GetZipStorageToSign_Impl( bool bReadOnly ) { if ( !GetError() && !pImpl->m_xZipStorage.is() ) { @@ -3191,7 +3191,7 @@ SvKeyValueIterator* SfxMedium::GetHeaderAttributes_Impl() return pImpl->xAttributes.get(); } -css::uno::Reference< css::io::XInputStream > SfxMedium::GetInputStream() +css::uno::Reference< css::io::XInputStream > const & SfxMedium::GetInputStream() { if ( !pImpl->xInputStream.is() ) GetMedium_Impl(); diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index 68730d317740..e50fdfcffc82 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -289,7 +289,7 @@ OUString SfxObjectShell::CreateTempCopyOfStorage_Impl( const uno::Reference< emb } -SvGlobalName SfxObjectShell::GetClassName() const +SvGlobalName const & SfxObjectShell::GetClassName() const { return GetFactory().GetClassId(); } @@ -3009,7 +3009,7 @@ bool SfxObjectShell::SaveAsOwnFormat( SfxMedium& rMedium ) else return false; } -uno::Reference< embed::XStorage > SfxObjectShell::GetStorage() +uno::Reference< embed::XStorage > const & SfxObjectShell::GetStorage() { if ( !pImpl->m_xDocStorage.is() ) { diff --git a/sfx2/source/doc/oleprops.cxx b/sfx2/source/doc/oleprops.cxx index 73af67e2a872..f69d0ab219f2 100644 --- a/sfx2/source/doc/oleprops.cxx +++ b/sfx2/source/doc/oleprops.cxx @@ -334,7 +334,7 @@ SfxOleObjectBase::~SfxOleObjectBase() { } -ErrCode SfxOleObjectBase::Load( SvStream& rStrm ) +ErrCode const & SfxOleObjectBase::Load( SvStream& rStrm ) { mnErrCode = ERRCODE_NONE; ImplLoad( rStrm ); @@ -342,7 +342,7 @@ ErrCode SfxOleObjectBase::Load( SvStream& rStrm ) return GetError(); } -ErrCode SfxOleObjectBase::Save( SvStream& rStrm ) +ErrCode const & SfxOleObjectBase::Save( SvStream& rStrm ) { mnErrCode = ERRCODE_NONE; ImplSave( rStrm ); @@ -1090,7 +1090,7 @@ void SfxOleSection::SaveProperty( SvStream& rStrm, SfxOlePropertyBase& rProp, sa } -ErrCode SfxOlePropertySet::LoadPropertySet( SotStorage* pStrg, const OUString& rStrmName ) +ErrCode const & SfxOlePropertySet::LoadPropertySet( SotStorage* pStrg, const OUString& rStrmName ) { if( pStrg ) { @@ -1108,7 +1108,7 @@ ErrCode SfxOlePropertySet::LoadPropertySet( SotStorage* pStrg, const OUString& r return GetError(); } -ErrCode SfxOlePropertySet::SavePropertySet( SotStorage* pStrg, const OUString& rStrmName ) +ErrCode const & SfxOlePropertySet::SavePropertySet( SotStorage* pStrg, const OUString& rStrmName ) { if( pStrg ) { diff --git a/sfx2/source/doc/oleprops.hxx b/sfx2/source/doc/oleprops.hxx index 3ca0ddddeb42..84940350ac67 100644 --- a/sfx2/source/doc/oleprops.hxx +++ b/sfx2/source/doc/oleprops.hxx @@ -170,12 +170,12 @@ public: virtual ~SfxOleObjectBase(); /** Returns the current error code. */ - ErrCode GetError() const { return mnErrCode; } + ErrCode const & GetError() const { return mnErrCode; } /** Loads this object from the passed stream. Calls virtual ImplLoad(). */ - ErrCode Load( SvStream& rStrm ); + ErrCode const & Load( SvStream& rStrm ); /** Saves this object to the passed stream. Calls virtual ImplSave(). */ - ErrCode Save( SvStream& rStrm ); + ErrCode const & Save( SvStream& rStrm ); protected: /** Sets the passed error code. Will be returned by Load() and Save() functions. @@ -359,9 +359,9 @@ public: explicit SfxOlePropertySet() {} /** Loads this object from the passed storage. */ - ErrCode LoadPropertySet( SotStorage* pStrg, const OUString& rStrmName ); + ErrCode const & LoadPropertySet( SotStorage* pStrg, const OUString& rStrmName ); /** Saves this object to the passed storage. */ - ErrCode SavePropertySet( SotStorage* pStrg, const OUString& rStrmName ); + ErrCode const & SavePropertySet( SotStorage* pStrg, const OUString& rStrmName ); /** Returns the specified section, or an empty reference, if nothing found. */ SfxOleSectionRef GetSection( SfxOleSectionType eSection ) const; diff --git a/sfx2/source/inc/templdgi.hxx b/sfx2/source/inc/templdgi.hxx index 6ede99258587..4a911d292003 100644 --- a/sfx2/source/inc/templdgi.hxx +++ b/sfx2/source/inc/templdgi.hxx @@ -327,7 +327,7 @@ public: } // normally for derivates from SvTreeListBoxes, but in this case the dialog handles context menus - VclPtr<PopupMenu> CreateContextMenu(); + VclPtr<PopupMenu> const & CreateContextMenu(); }; class DropToolBox_Impl : public ToolBox, public DropTargetHelper diff --git a/sfx2/source/sidebar/Deck.cxx b/sfx2/source/sidebar/Deck.cxx index 90bbe1ed8b0b..f1396cb38bea 100644 --- a/sfx2/source/sidebar/Deck.cxx +++ b/sfx2/source/sidebar/Deck.cxx @@ -92,7 +92,7 @@ void Deck::dispose() vcl::Window::dispose(); } -VclPtr<DeckTitleBar> Deck::GetTitleBar() const +VclPtr<DeckTitleBar> const & Deck::GetTitleBar() const { return mpTitleBar; } diff --git a/sfx2/source/sidebar/Panel.cxx b/sfx2/source/sidebar/Panel.cxx index be3da21b4ca9..a8671c13f459 100644 --- a/sfx2/source/sidebar/Panel.cxx +++ b/sfx2/source/sidebar/Panel.cxx @@ -100,7 +100,7 @@ void Panel::dispose() vcl::Window::dispose(); } -VclPtr<PanelTitleBar> Panel::GetTitleBar() const +VclPtr<PanelTitleBar> const & Panel::GetTitleBar() const { return mpTitleBar; } diff --git a/sfx2/source/sidebar/Theme.cxx b/sfx2/source/sidebar/Theme.cxx index 315bf057d21c..44bff100e34d 100644 --- a/sfx2/source/sidebar/Theme.cxx +++ b/sfx2/source/sidebar/Theme.cxx @@ -840,7 +840,7 @@ Theme::PropertyType Theme::GetPropertyType (const ThemeItem eItem) } } -css::uno::Type Theme::GetCppuType (const PropertyType eType) +css::uno::Type const & Theme::GetCppuType (const PropertyType eType) { switch(eType) { diff --git a/sfx2/source/view/classificationhelper.cxx b/sfx2/source/view/classificationhelper.cxx index 1d7c0e94b4d3..f167dc8428a8 100644 --- a/sfx2/source/view/classificationhelper.cxx +++ b/sfx2/source/view/classificationhelper.cxx @@ -582,17 +582,17 @@ SfxClassificationHelper::SfxClassificationHelper(const uno::Reference<document:: SfxClassificationHelper::~SfxClassificationHelper() = default; -const std::vector<OUString> SfxClassificationHelper::GetMarkings() +std::vector<OUString> const & SfxClassificationHelper::GetMarkings() { return m_pImpl->m_aMarkings; } -const std::vector<OUString> SfxClassificationHelper::GetIntellectualPropertyParts() +std::vector<OUString> const & SfxClassificationHelper::GetIntellectualPropertyParts() { return m_pImpl->m_aIPParts; } -const std::vector<OUString> SfxClassificationHelper::GetIntellectualPropertyPartNumbers() +std::vector<OUString> const & SfxClassificationHelper::GetIntellectualPropertyPartNumbers() { return m_pImpl->m_aIPPartNumbers; } diff --git a/sfx2/source/view/ipclient.cxx b/sfx2/source/view/ipclient.cxx index 1150ecc8e609..cd1a4ec77656 100644 --- a/sfx2/source/view/ipclient.cxx +++ b/sfx2/source/view/ipclient.cxx @@ -125,7 +125,7 @@ public: void SizeHasChanged(); DECL_LINK(TimerHdl, Timer *, void); - uno::Reference < frame::XFrame > GetFrame() const; + uno::Reference < frame::XFrame > const & GetFrame() const; // XEmbeddedClient virtual void SAL_CALL saveObject() override; @@ -201,7 +201,7 @@ void SAL_CALL SfxInPlaceClient_Impl::disposing( const css::lang::EventObject& /* // XEmbeddedClient -uno::Reference < frame::XFrame > SfxInPlaceClient_Impl::GetFrame() const +uno::Reference < frame::XFrame > const & SfxInPlaceClient_Impl::GetFrame() const { if ( !m_pClient ) throw uno::RuntimeException(); |