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 /include | |
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 'include')
-rw-r--r-- | include/sfx2/classificationhelper.hxx | 8 | ||||
-rw-r--r-- | include/sfx2/docfile.hxx | 10 | ||||
-rw-r--r-- | include/sfx2/fcontnr.hxx | 2 | ||||
-rw-r--r-- | include/sfx2/filedlghelper.hxx | 2 | ||||
-rw-r--r-- | include/sfx2/objsh.hxx | 4 | ||||
-rw-r--r-- | include/sfx2/opengrf.hxx | 2 | ||||
-rw-r--r-- | include/sfx2/sidebar/Deck.hxx | 2 | ||||
-rw-r--r-- | include/sfx2/sidebar/Panel.hxx | 2 | ||||
-rw-r--r-- | include/sfx2/sidebar/Theme.hxx | 2 | ||||
-rw-r--r-- | include/sfx2/thumbnailviewitem.hxx | 2 | ||||
-rw-r--r-- | include/sfx2/watermarkitem.hxx | 4 | ||||
-rw-r--r-- | include/xmloff/txtimp.hxx | 2 | ||||
-rw-r--r-- | include/xmloff/xmlexp.hxx | 8 | ||||
-rw-r--r-- | include/xmloff/xmlimp.hxx | 6 |
14 files changed, 28 insertions, 28 deletions
diff --git a/include/sfx2/classificationhelper.hxx b/include/sfx2/classificationhelper.hxx index dada1dcafc82..2be662aa1a9c 100644 --- a/include/sfx2/classificationhelper.hxx +++ b/include/sfx2/classificationhelper.hxx @@ -89,9 +89,9 @@ public: bool HasDocumentFooter(); void UpdateInfobar(SfxViewFrame& rViewFrame); - const std::vector<OUString> GetMarkings(); - const std::vector<OUString> GetIntellectualPropertyParts(); - const std::vector<OUString> GetIntellectualPropertyPartNumbers(); + std::vector<OUString> const & GetMarkings(); + std::vector<OUString> const & GetIntellectualPropertyParts(); + std::vector<OUString> const & GetIntellectualPropertyPartNumbers(); /// Does a best-effort conversion of rType to SfxClassificationPolicyType. static SfxClassificationPolicyType stringToPolicyType(const OUString& rType); @@ -130,7 +130,7 @@ private: sal_Int32 m_nIPPartNumber; sal_Int32 m_nMarkingNumber; - OUString getPolicyKey() const + OUString const & getPolicyKey() const { return m_sPolicy; } diff --git a/include/sfx2/docfile.hxx b/include/sfx2/docfile.hxx index 9fd18fda2782..ecf023278235 100644 --- a/include/sfx2/docfile.hxx +++ b/include/sfx2/docfile.hxx @@ -132,7 +132,7 @@ public: void CheckFileDate( const css::util::DateTime& aInitDate ); SAL_WARN_UNUSED_RESULT bool DocNeedsFileDateCheck() const; - css::util::DateTime GetInitFileDate( bool bIgnoreOldValue ); + css::util::DateTime const & GetInitFileDate( bool bIgnoreOldValue ); css::uno::Reference< css::ucb::XContent > GetContent() const; const OUString& GetPhysicalName() const; @@ -144,7 +144,7 @@ public: ErrCode GetErrorCode() const; ErrCode GetError() const { return GetErrorCode().IgnoreWarning(); } - ErrCode GetLastStorageCreationState(); + ErrCode const & GetLastStorageCreationState(); void SetError(ErrCode nError); @@ -191,7 +191,7 @@ public: // independent of later changes via SetOpenMode; used for SID_RELOAD: SAL_WARN_UNUSED_RESULT bool IsOriginallyLoadedReadOnly() const; - css::uno::Reference< css::io::XInputStream > GetInputStream(); + css::uno::Reference< css::io::XInputStream > const & GetInputStream(); void CreateTempFile( bool bReplace = true ); void CreateTempFileNoCopy(); @@ -207,9 +207,9 @@ public: SAL_DLLPRIVATE bool HasStorage_Impl() const; SAL_DLLPRIVATE void StorageBackup_Impl(); - SAL_DLLPRIVATE OUString GetBackup_Impl(); + SAL_DLLPRIVATE OUString const & GetBackup_Impl(); - SAL_DLLPRIVATE css::uno::Reference< css::embed::XStorage > GetZipStorageToSign_Impl( bool bReadOnly = true ); + SAL_DLLPRIVATE css::uno::Reference< css::embed::XStorage > const & GetZipStorageToSign_Impl( bool bReadOnly = true ); SAL_DLLPRIVATE void CloseZipStorage_Impl(); // the storage that will be returned by the medium on GetStorage request diff --git a/include/sfx2/fcontnr.hxx b/include/sfx2/fcontnr.hxx index a08f014eea61..17aff3c148b5 100644 --- a/include/sfx2/fcontnr.hxx +++ b/include/sfx2/fcontnr.hxx @@ -51,7 +51,7 @@ public: ~SfxFilterContainer(); - const OUString GetName() const; + OUString const & GetName() const; std::shared_ptr<const SfxFilter> GetAnyFilter( SfxFilterFlags nMust = SfxFilterFlags::IMPORT, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const; std::shared_ptr<const SfxFilter> GetFilter4EA( const OUString& rEA, SfxFilterFlags nMust = SfxFilterFlags::IMPORT, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const; diff --git a/include/sfx2/filedlghelper.hxx b/include/sfx2/filedlghelper.hxx index 9e589693ad00..2ea5579ebe0c 100644 --- a/include/sfx2/filedlghelper.hxx +++ b/include/sfx2/filedlghelper.hxx @@ -137,7 +137,7 @@ public: ErrCode Execute(); void StartExecuteModal( const Link<FileDialogHelper*,void>& rEndDialogHdl ); - ErrCode GetError() const { return m_nError; } + ErrCode const & GetError() const { return m_nError; } sal_Int16 GetDialogType() const; bool IsPasswordEnabled() const; OUString GetRealFilter() const; diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx index 51f7363e619c..a8a630259431 100644 --- a/include/sfx2/objsh.hxx +++ b/include/sfx2/objsh.hxx @@ -592,9 +592,9 @@ public: const css::uno::Reference< css::embed::XStorage >& xStorage, sal_Int32 nVersion, bool bTemplate, bool bChart = false ) const; - css::uno::Reference< css::embed::XStorage > GetStorage(); + css::uno::Reference< css::embed::XStorage > const & GetStorage(); - SvGlobalName GetClassName() const; + SvGlobalName const & GetClassName() const; // comphelper::IEmbeddedHelper virtual css::uno::Reference< css::task::XInteractionHandler > getInteractionHandler() const override; diff --git a/include/sfx2/opengrf.hxx b/include/sfx2/opengrf.hxx index fbf3c573e15f..21c01426e3ca 100644 --- a/include/sfx2/opengrf.hxx +++ b/include/sfx2/opengrf.hxx @@ -47,7 +47,7 @@ public: void SetCurrentFilter(const OUString&); //what was subsequently found to be the format - OUString GetDetectedFilter() const; + OUString const & GetDetectedFilter() const; void SetDetectedFilter(const OUString&); private: diff --git a/include/sfx2/sidebar/Deck.hxx b/include/sfx2/sidebar/Deck.hxx index b1edcf942fcf..c8273c568742 100644 --- a/include/sfx2/sidebar/Deck.hxx +++ b/include/sfx2/sidebar/Deck.hxx @@ -46,7 +46,7 @@ public: const OUString& GetId() const { return msId; } - VclPtr<DeckTitleBar> GetTitleBar() const; + VclPtr<DeckTitleBar> const & GetTitleBar() const; tools::Rectangle GetContentArea() const; void ResetPanels (const SharedPanelContainer& rPanels); const SharedPanelContainer& GetPanels() const { return maPanels; } diff --git a/include/sfx2/sidebar/Panel.hxx b/include/sfx2/sidebar/Panel.hxx index 4d65467cd051..119843cc6c4e 100644 --- a/include/sfx2/sidebar/Panel.hxx +++ b/include/sfx2/sidebar/Panel.hxx @@ -47,7 +47,7 @@ public: virtual ~Panel() override; virtual void dispose() override; - VclPtr<PanelTitleBar> GetTitleBar() const; + VclPtr<PanelTitleBar> const & GetTitleBar() const; bool IsTitleBarOptional() const { return mbIsTitleBarOptional;} void SetUIElement (const css::uno::Reference<css::ui::XUIElement>& rxElement); const css::uno::Reference<css::ui::XSidebarPanel>& GetPanelComponent() const { return mxPanelComponent;} diff --git a/include/sfx2/sidebar/Theme.hxx b/include/sfx2/sidebar/Theme.hxx index 31e9a3f3c4a1..5064742c2a8b 100644 --- a/include/sfx2/sidebar/Theme.hxx +++ b/include/sfx2/sidebar/Theme.hxx @@ -217,7 +217,7 @@ private: void SetupPropertyMaps(); void UpdateTheme(); static PropertyType GetPropertyType (const ThemeItem eItem); - static css::uno::Type GetCppuType (const PropertyType eType); + static css::uno::Type const & GetCppuType (const PropertyType eType); static sal_Int32 GetIndex ( const ThemeItem eItem, const PropertyType eType); diff --git a/include/sfx2/thumbnailviewitem.hxx b/include/sfx2/thumbnailviewitem.hxx index cf58e18bcad9..dc7f7c84cb68 100644 --- a/include/sfx2/thumbnailviewitem.hxx +++ b/include/sfx2/thumbnailviewitem.hxx @@ -104,7 +104,7 @@ public: void setHelpText (const OUString &sText) { maHelpText = sText; } virtual OUString getHelpText() const { return maHelpText; }; - OUString getTitle() const { return maTitle; }; + OUString const & getTitle() const { return maTitle; }; void setTitle (const OUString& rTitle); diff --git a/include/sfx2/watermarkitem.hxx b/include/sfx2/watermarkitem.hxx index 104c330e0a4b..43abdfeec081 100644 --- a/include/sfx2/watermarkitem.hxx +++ b/include/sfx2/watermarkitem.hxx @@ -22,9 +22,9 @@ public: virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override; virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override; - const OUString GetText() const { return m_aText; } + OUString const & GetText() const { return m_aText; } void SetText(const OUString& aText) { m_aText = aText; } - const OUString GetFont() const { return m_aFont; } + OUString const & GetFont() const { return m_aFont; } void SetFont(const OUString& aFont) { m_aFont = aFont; } sal_Int16 GetAngle() const { return m_nAngle; } void SetAngle(const sal_Int16 nAngle) { m_nAngle = nAngle; } diff --git a/include/xmloff/txtimp.hxx b/include/xmloff/txtimp.hxx index 921ef4afe120..287413ba7f5c 100644 --- a/include/xmloff/txtimp.hxx +++ b/include/xmloff/txtimp.hxx @@ -683,7 +683,7 @@ public: const css::uno::Sequence<sal_Int8> & rProtectionKey ); /// get the last open redline ID - OUString GetOpenRedlineId(); + OUString const & GetOpenRedlineId(); /// modify the last open redline ID void SetOpenRedlineId( OUString const & rId); /// reset the last open redline ID diff --git a/include/xmloff/xmlexp.hxx b/include/xmloff/xmlexp.hxx index 0812bc66448e..ad934e1f612a 100644 --- a/include/xmloff/xmlexp.hxx +++ b/include/xmloff/xmlexp.hxx @@ -215,8 +215,8 @@ protected: /// Override this method to export the content of <office:body>. virtual void ExportContent_() = 0; - OUString GetSourceShellID() const; - OUString GetDestinationShellID() const; + OUString const & GetSourceShellID() const; + OUString const & GetDestinationShellID() const; // save linked sections? (may be false in global documents) bool mbSaveLinkedSections; @@ -533,7 +533,7 @@ public: // Written OpenDocument file format doesn't fit to the created text document (#i69627#) bool writeOutlineStyleAsNormalListStyle() const; - css::uno::Reference< css::embed::XStorage > GetTargetStorage(); + css::uno::Reference< css::embed::XStorage > const & GetTargetStorage(); /// returns the currently configured default version for odf export SvtSaveOptions::ODFDefaultVersion getDefaultVersion() const; @@ -559,7 +559,7 @@ public: bool SetNullDateOnUnitConverter(); /// Get clamped mimetype for image export (empty if none) - OUString GetImageFilterName() const; + OUString const & GetImageFilterName() const; }; inline rtl::Reference< XMLTextParagraphExport > const & SvXMLExport::GetTextParagraphExport() diff --git a/include/xmloff/xmlimp.hxx b/include/xmloff/xmlimp.hxx index 483a1a36b660..7cc0d76f5c90 100644 --- a/include/xmloff/xmlimp.hxx +++ b/include/xmloff/xmlimp.hxx @@ -416,7 +416,7 @@ public: OUString ResolveEmbeddedObjectURLFromBase64(); // get source storage we're importing from (if available) - css::uno::Reference< css::embed::XStorage > + css::uno::Reference< css::embed::XStorage > const & GetSourceStorage(); void AddStyleDisplayName( sal_uInt16 nFamily, @@ -450,7 +450,7 @@ public: bool IsTableShapeSupported() const { return mbIsTableShapeSupported; } - OUString GetODFVersion() const; + OUString const & GetODFVersion() const; bool IsOOoXML() const; // legacy non-ODF format? /** @@ -481,7 +481,7 @@ public: ::comphelper::UnoInterfaceToUniqueIdentifierMapper& getInterfaceToIdentifierMapper(); - css::uno::Reference< css::uno::XComponentContext > + css::uno::Reference< css::uno::XComponentContext > const & GetComponentContext() const; // Convert drawing object positions from OOo file format to OASIS file format and vice versa (#i28749#) |