[Libreoffice-commits] core.git: accessibility/inc basctl/source binaryurp/source bridges/inc configmgr/source cppcanvas/source desktop/source embeddedobj/source extensions/source forms/source fpicker/source idlc/inc l10ntools/inc l10ntools/source lingucomponent/source linguistic/source mysqlc/source package/inc package/source pyuno/source rsc/inc scripting/source starmath/inc starmath/source stoc/source svgio/inc UnoControls/inc unotools/source uui/source xmlhelp/source xmlscript/source xmlsecurity/source

Noel Grandin noel at peralex.com
Thu Apr 14 08:25:14 UTC 2016


 UnoControls/inc/basecontrol.hxx                                        |    8 ++---
 accessibility/inc/accessibility/extended/textwindowaccessibility.hxx   |    2 -
 accessibility/inc/accessibility/standard/vclxaccessibletoolboxitem.hxx |    2 -
 basctl/source/inc/basidesh.hxx                                         |    2 -
 basctl/source/inc/dlged.hxx                                            |    2 -
 basctl/source/inc/localizationmgr.hxx                                  |    2 -
 binaryurp/source/bridge.cxx                                            |    2 -
 binaryurp/source/bridge.hxx                                            |    4 +-
 binaryurp/source/proxy.hxx                                             |    4 +-
 bridges/inc/bridges/cpp_uno/shared/cppinterfaceproxy.hxx               |    2 -
 configmgr/source/localizedvaluenode.hxx                                |    2 -
 configmgr/source/rootaccess.hxx                                        |    2 -
 cppcanvas/source/inc/canvasgraphichelper.hxx                           |    4 +-
 cppcanvas/source/mtfrenderer/implrenderer.cxx                          |    2 -
 cppcanvas/source/wrapper/implspritecanvas.hxx                          |    2 -
 desktop/source/app/cmdlineargs.hxx                                     |   14 ++++----
 desktop/source/deployment/gui/dp_gui_theextmgr.hxx                     |    4 +-
 desktop/source/deployment/gui/dp_gui_updateinstalldialog.hxx           |    2 -
 desktop/source/deployment/misc/dp_descriptioninfoset.cxx               |    2 -
 desktop/source/deployment/registry/inc/dp_backend.h                    |    2 -
 desktop/source/deployment/registry/sfwk/dp_parceldesc.hxx              |    2 -
 embeddedobj/source/inc/commonembobj.hxx                                |    4 +-
 embeddedobj/source/inc/docholder.hxx                                   |    2 -
 extensions/source/bibliography/datman.hxx                              |    4 +-
 extensions/source/bibliography/general.hxx                             |    2 -
 extensions/source/bibliography/toolbar.hxx                             |    2 -
 extensions/source/dbpilots/controlwizard.hxx                           |    2 -
 extensions/source/logging/loghandler.hxx                               |    2 -
 extensions/source/propctrlr/commoncontrol.hxx                          |    2 -
 forms/source/component/GroupManager.hxx                                |    2 -
 forms/source/inc/limitedformats.hxx                                    |    2 -
 forms/source/xforms/computedexpression.hxx                             |    4 +-
 forms/source/xforms/mip.hxx                                            |    4 +-
 forms/source/xforms/pathexpression.hxx                                 |    2 -
 forms/source/xforms/xpathlib/extension.hxx                             |    4 +-
 fpicker/source/office/OfficeFilePicker.cxx                             |    4 +-
 fpicker/source/office/PlacesListBox.hxx                                |    6 +--
 idlc/inc/idlc/inheritedinterface.hxx                                   |    2 -
 l10ntools/inc/xmlparse.hxx                                             |   16 +++++-----
 l10ntools/inc/xrmmerge.hxx                                             |    2 -
 l10ntools/source/po.cxx                                                |    8 ++---
 lingucomponent/source/languageguessing/guess.hxx                       |    4 +-
 linguistic/source/lngopt.hxx                                           |    2 -
 mysqlc/source/mysqlc_driver.hxx                                        |    2 -
 package/inc/ZipOutputEntry.hxx                                         |    2 -
 package/inc/ZipOutputStream.hxx                                        |    2 -
 package/inc/ZipPackageBuffer.hxx                                       |    2 -
 package/source/zipapi/ZipOutputStream.cxx                              |    2 -
 pyuno/source/module/pyuno_impl.hxx                                     |    4 +-
 rsc/inc/rscclobj.hxx                                                   |    2 -
 rsc/inc/rscdb.hxx                                                      |    2 -
 rsc/inc/rsctree.hxx                                                    |    2 -
 scripting/source/provider/MasterScriptProvider.hxx                     |    4 +-
 scripting/source/stringresource/stringresource.cxx                     |    2 -
 starmath/inc/ElementsDockingWindow.hxx                                 |    6 +--
 starmath/inc/cursor.hxx                                                |    2 -
 starmath/inc/document.hxx                                              |    2 -
 starmath/inc/parse.hxx                                                 |    2 -
 starmath/inc/visitors.hxx                                              |    2 -
 starmath/source/ElementsDockingWindow.cxx                              |    2 -
 starmath/source/mathmlimport.hxx                                       |    2 -
 stoc/source/uriproc/UriReference.hxx                                   |    2 -
 svgio/inc/svgio/svgreader/svggradientstopnode.hxx                      |    2 -
 unotools/source/config/bootstrap.cxx                                   |    2 -
 unotools/source/config/moduleoptions.cxx                               |    8 ++---
 unotools/source/config/securityoptions.cxx                             |    6 +--
 uui/source/iahndl.cxx                                                  |    4 +-
 uui/source/iahndl.hxx                                                  |    6 +--
 uui/source/nameclashdlg.hxx                                            |    2 -
 uui/source/sslwarndlg.hxx                                              |    2 -
 uui/source/unknownauthdlg.hxx                                          |    2 -
 xmlhelp/source/cxxhelp/provider/databases.hxx                          |   10 +++---
 xmlhelp/source/cxxhelp/provider/urlparameter.hxx                       |   14 ++++----
 xmlscript/source/xmldlg_imexp/imp_share.hxx                            |    4 +-
 xmlsecurity/source/framework/buffernode.hxx                            |    2 -
 75 files changed, 130 insertions(+), 130 deletions(-)

New commits:
commit b8eb2946511ce617323b13dffe2b1d9704e0be60
Author: Noel Grandin <noel at peralex.com>
Date:   Thu Apr 14 10:20:52 2016 +0200

    loplugin:passstuffbyref in various
    
    Change-Id: I80070c83204e531c2f599f8a56193d6ffe0e5022

diff --git a/UnoControls/inc/basecontrol.hxx b/UnoControls/inc/basecontrol.hxx
index 1ecd6a8..6ea4bd1 100644
--- a/UnoControls/inc/basecontrol.hxx
+++ b/UnoControls/inc/basecontrol.hxx
@@ -361,11 +361,11 @@ public:
 protected:
     using OComponentHelper::disposing;
 
-    const css::uno::Reference< css::uno::XComponentContext > impl_getComponentContext() { return m_xComponentContext;}
+    const css::uno::Reference< css::uno::XComponentContext >& impl_getComponentContext() { return m_xComponentContext;}
 
-    const css::uno::Reference< css::awt::XWindow > impl_getPeerWindow() { return m_xPeerWindow;}
+    const css::uno::Reference< css::awt::XWindow >& impl_getPeerWindow() { return m_xPeerWindow;}
 
-    const css::uno::Reference< css::awt::XGraphics > impl_getGraphicsPeer() { return m_xGraphicsPeer;}
+    const css::uno::Reference< css::awt::XGraphics >& impl_getGraphicsPeer() { return m_xGraphicsPeer;}
 
     const sal_Int32& impl_getWidth() { return m_nWidth;}
 
@@ -381,7 +381,7 @@ protected:
 
     virtual void impl_recalcLayout( const css::awt::WindowEvent& aEvent );
 
-    css::uno::Reference< css::uno::XInterface > impl_getDelegator() { return m_xDelegator;}
+    const css::uno::Reference< css::uno::XInterface >& impl_getDelegator() { return m_xDelegator;}
 
 private:
 
diff --git a/accessibility/inc/accessibility/extended/textwindowaccessibility.hxx b/accessibility/inc/accessibility/extended/textwindowaccessibility.hxx
index ace9adc..6d10161 100644
--- a/accessibility/inc/accessibility/extended/textwindowaccessibility.hxx
+++ b/accessibility/inc/accessibility/extended/textwindowaccessibility.hxx
@@ -392,7 +392,7 @@ public:
     Document(::VCLXWindow * pVclXWindow, ::TextEngine & rEngine,
              ::TextView & rView);
 
-    inline css::uno::Reference< css::accessibility::XAccessible >
+    const css::uno::Reference< css::accessibility::XAccessible >&
     getAccessible() { return m_xAccessible; }
 
     // Must be called only after init has been called.
diff --git a/accessibility/inc/accessibility/standard/vclxaccessibletoolboxitem.hxx b/accessibility/inc/accessibility/standard/vclxaccessibletoolboxitem.hxx
index a5cda26..714d458 100644
--- a/accessibility/inc/accessibility/standard/vclxaccessibletoolboxitem.hxx
+++ b/accessibility/inc/accessibility/standard/vclxaccessibletoolboxitem.hxx
@@ -87,7 +87,7 @@ public:
     inline void         ReleaseToolBox() { m_pToolBox = nullptr; }
     void                NameChanged();
     void                SetChild( const css::uno::Reference< css::accessibility::XAccessible >& _xChild );
-    css::uno::Reference< css::accessibility::XAccessible >
+    const css::uno::Reference< css::accessibility::XAccessible >&
                         GetChild() const { return m_xChild; }
     void                NotifyChildEvent( const css::uno::Reference< css::accessibility::XAccessible >& _xChild, bool _bShow );
 
diff --git a/basctl/source/inc/basidesh.hxx b/basctl/source/inc/basidesh.hxx
index 1fb6dd8..7db8828 100644
--- a/basctl/source/inc/basidesh.hxx
+++ b/basctl/source/inc/basidesh.hxx
@@ -156,7 +156,7 @@ public:
     BaseWindow*      GetCurWindow() const    { return pCurWin; }
     ScriptDocument const& GetCurDocument() const { return m_aCurDocument; }
     OUString const&  GetCurLibName() const { return m_aCurLibName; }
-    std::shared_ptr<LocalizationMgr> GetCurLocalizationMgr() const { return m_pCurLocalizationMgr; }
+    const std::shared_ptr<LocalizationMgr>& GetCurLocalizationMgr() const { return m_pCurLocalizationMgr; }
 
     TabBar&             GetTabBar()             { return *pTabBar; }
     WindowTable&        GetWindowTable()        { return aWindowTable; }
diff --git a/basctl/source/inc/dlged.hxx b/basctl/source/inc/dlged.hxx
index ba1427a..82ad353 100644
--- a/basctl/source/inc/dlged.hxx
+++ b/basctl/source/inc/dlged.hxx
@@ -161,7 +161,7 @@ public:
 
     void            SetDialog (const css::uno::Reference<css::container::XNameContainer>& xUnoControlDialogModel);
     void            ResetDialog ();
-    css::uno::Reference< css::container::XNameContainer > GetDialog() const
+    const css::uno::Reference< css::container::XNameContainer >& GetDialog() const
                         {return m_xUnoControlDialogModel;}
 
     css::uno::Reference< css::util::XNumberFormatsSupplier > const & GetNumberFormatsSupplier();
diff --git a/basctl/source/inc/localizationmgr.hxx b/basctl/source/inc/localizationmgr.hxx
index ed1e6c7..15f9bac 100644
--- a/basctl/source/inc/localizationmgr.hxx
+++ b/basctl/source/inc/localizationmgr.hxx
@@ -72,7 +72,7 @@ public:
     LocalizationMgr(Shell*, ScriptDocument const&, OUString const& aLibName,
         const css::uno::Reference < css::resource::XStringResourceManager >& xStringResourceManager );
 
-    css::uno::Reference< css::resource::XStringResourceManager >getStringResourceManager()
+    const css::uno::Reference< css::resource::XStringResourceManager >& getStringResourceManager()
     {
         return m_xStringResourceManager;
     }
diff --git a/binaryurp/source/bridge.cxx b/binaryurp/source/bridge.cxx
index 6298351..1bfdd17 100644
--- a/binaryurp/source/bridge.cxx
+++ b/binaryurp/source/bridge.cxx
@@ -104,7 +104,7 @@ public:
 
     ~AttachThread();
 
-    rtl::ByteSequence getTid() throw () { return tid_;}
+    const rtl::ByteSequence& getTid() throw () { return tid_;}
 
 private:
     AttachThread(const AttachThread&) = delete;
diff --git a/binaryurp/source/bridge.hxx b/binaryurp/source/bridge.hxx
index c89e85b..7c14875 100644
--- a/binaryurp/source/bridge.hxx
+++ b/binaryurp/source/bridge.hxx
@@ -88,10 +88,10 @@ public:
     // thread:
     void terminate(bool final);
 
-    com::sun::star::uno::Reference< com::sun::star::connection::XConnection >
+    const com::sun::star::uno::Reference< com::sun::star::connection::XConnection >&
     getConnection() const { return connection_;}
 
-    com::sun::star::uno::Reference< com::sun::star::bridge::XInstanceProvider >
+    const com::sun::star::uno::Reference< com::sun::star::bridge::XInstanceProvider >&
     getProvider() const { return provider_;}
 
     com::sun::star::uno::Mapping & getCppToBinaryMapping() { return cppToBinaryMapping_;}
diff --git a/binaryurp/source/proxy.hxx b/binaryurp/source/proxy.hxx
index 7f90f11..5ad8cee 100644
--- a/binaryurp/source/proxy.hxx
+++ b/binaryurp/source/proxy.hxx
@@ -43,9 +43,9 @@ public:
         rtl::Reference< Bridge > const & bridge, OUString const & oid,
         com::sun::star::uno::TypeDescription const & type);
 
-    OUString getOid() const { return oid_;}
+    const OUString& getOid() const { return oid_;}
 
-    com::sun::star::uno::TypeDescription getType() const { return type_;}
+    const com::sun::star::uno::TypeDescription& getType() const { return type_;}
 
     void do_acquire();
 
diff --git a/bridges/inc/bridges/cpp_uno/shared/cppinterfaceproxy.hxx b/bridges/inc/bridges/cpp_uno/shared/cppinterfaceproxy.hxx
index 4546dbe..4002af6 100644
--- a/bridges/inc/bridges/cpp_uno/shared/cppinterfaceproxy.hxx
+++ b/bridges/inc/bridges/cpp_uno/shared/cppinterfaceproxy.hxx
@@ -57,7 +57,7 @@ public:
     Bridge * getBridge() { return pBridge; }
     uno_Interface * getUnoI() { return pUnoI; }
     typelib_InterfaceTypeDescription * getTypeDescr() { return pTypeDescr; }
-    OUString getOid() { return oid; }
+    const OUString& getOid() { return oid; }
 
     // non virtual methods called on incoming vtable calls #1, #2
     void acquireProxy();
diff --git a/configmgr/source/localizedvaluenode.hxx b/configmgr/source/localizedvaluenode.hxx
index f4300e9..e3055ae 100644
--- a/configmgr/source/localizedvaluenode.hxx
+++ b/configmgr/source/localizedvaluenode.hxx
@@ -39,7 +39,7 @@ public:
 
     virtual OUString getTemplateName() const override;
 
-    css::uno::Any  getValue() const { return value_;}
+    const css::uno::Any&  getValue() const { return value_;}
     css::uno::Any *getValuePtr(int layer)
     {
         setLayer(layer);
diff --git a/configmgr/source/rootaccess.hxx b/configmgr/source/rootaccess.hxx
index 4c16a29..a308ef5 100644
--- a/configmgr/source/rootaccess.hxx
+++ b/configmgr/source/rootaccess.hxx
@@ -72,7 +72,7 @@ public:
 
     OUString getAbsolutePathRepresentation();
 
-    OUString getLocale() const { return locale_;}
+    const OUString& getLocale() const { return locale_;}
 
     bool isUpdate() const { return update_;}
 
diff --git a/cppcanvas/source/inc/canvasgraphichelper.hxx b/cppcanvas/source/inc/canvasgraphichelper.hxx
index 076ce24..b992b1d 100644
--- a/cppcanvas/source/inc/canvasgraphichelper.hxx
+++ b/cppcanvas/source/inc/canvasgraphichelper.hxx
@@ -55,8 +55,8 @@ namespace cppcanvas
         protected:
             // for our clients
             // ===============
-            CanvasSharedPtr                                                      getCanvas() const {  return mpCanvas; }
-            css::uno::Reference< css::rendering::XGraphicDevice >                getGraphicDevice() const {  return mxGraphicDevice; }
+            const CanvasSharedPtr&                                               getCanvas() const {  return mpCanvas; }
+            const css::uno::Reference< css::rendering::XGraphicDevice >&         getGraphicDevice() const {  return mxGraphicDevice; }
             const css::rendering::RenderState&                                   getRenderState() const;
 
         private:
diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx
index 4afe3f9..bc716ba 100644
--- a/cppcanvas/source/mtfrenderer/implrenderer.cxx
+++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx
@@ -2698,7 +2698,7 @@ namespace cppcanvas
                                                                   rSubset ) );
                 }
 
-                ::basegfx::B2DRange getBounds() const
+                const ::basegfx::B2DRange& getBounds() const
                 {
                     return maBounds;
                 }
diff --git a/cppcanvas/source/wrapper/implspritecanvas.hxx b/cppcanvas/source/wrapper/implspritecanvas.hxx
index 4a54396..89b0fc3 100644
--- a/cppcanvas/source/wrapper/implspritecanvas.hxx
+++ b/cppcanvas/source/wrapper/implspritecanvas.hxx
@@ -64,7 +64,7 @@ namespace cppcanvas
                 TransformationArbiter();
 
                 void                        setTransformation( const ::basegfx::B2DHomMatrix& rViewTransform );
-                ::basegfx::B2DHomMatrix     getTransformation() const {  return maTransformation; }
+                const ::basegfx::B2DHomMatrix& getTransformation() const {  return maTransformation; }
 
             private:
                 ::basegfx::B2DHomMatrix     maTransformation;
diff --git a/desktop/source/app/cmdlineargs.hxx b/desktop/source/app/cmdlineargs.hxx
index f110567..9464855 100644
--- a/desktop/source/app/cmdlineargs.hxx
+++ b/desktop/source/app/cmdlineargs.hxx
@@ -55,7 +55,7 @@ class CommandLineArgs
         CommandLineArgs(const CommandLineArgs&) = delete;
         const CommandLineArgs& operator=(const CommandLineArgs&) = delete;
 
-        boost::optional< OUString > getCwdUrl() const { return m_cwdUrl; }
+        const boost::optional< OUString >& getCwdUrl() const { return m_cwdUrl; }
 
         // Access to bool parameters
         bool                IsMinimized() const { return m_minimized;}
@@ -93,7 +93,7 @@ class CommandLineArgs
         bool                WantsToLoadDocument() const { return m_bDocumentArgs;}
         bool                IsTextCat() const { return m_textcat;}
 
-        OUString            GetUnknown() const { return m_unknown;}
+        const OUString&     GetUnknown() const { return m_unknown;}
 
         // Access to string parameters
         bool                    HasSplashPipe() const { return m_splashpipe;}
@@ -106,13 +106,13 @@ class CommandLineArgs
         std::vector< OUString > GetForceNewList() const;
         std::vector< OUString > GetPrintList() const;
         std::vector< OUString > GetPrintToList() const;
-        OUString       GetPrinterName() const { return m_printername;}
-        OUString       GetLanguage() const { return m_language;}
+        const OUString&         GetPrinterName() const { return m_printername;}
+        const OUString&         GetLanguage() const { return m_language;}
         std::vector< OUString > const & GetInFilter() const { return m_infilter;}
         std::vector< OUString > GetConversionList() const;
-        OUString       GetConversionParams() const { return m_conversionparams;}
-        OUString       GetConversionOut() const;
-        OUString       GetPidfileName() const { return m_pidfile;}
+        const OUString&         GetConversionParams() const { return m_conversionparams;}
+        OUString                GetConversionOut() const;
+        const OUString&         GetPidfileName() const { return m_pidfile;}
 
         // Special analyzed states (does not match directly to a command line parameter!)
         bool IsEmpty() const { return m_bEmpty;}
diff --git a/desktop/source/deployment/gui/dp_gui_theextmgr.hxx b/desktop/source/deployment/gui/dp_gui_theextmgr.hxx
index 263fe20..756c0e9 100644
--- a/desktop/source/deployment/gui/dp_gui_theextmgr.hxx
+++ b/desktop/source/deployment/gui/dp_gui_theextmgr.hxx
@@ -100,8 +100,8 @@ public:
     // Tools
     bool supportsOptions( const css::uno::Reference< css::deployment::XPackage > &xPackage ) const;
     static PackageState getPackageState( const css::uno::Reference< css::deployment::XPackage > &xPackage );
-    css::uno::Reference< css::uno::XComponentContext > getContext() const { return m_xContext; }
-    css::uno::Reference< css::deployment::XExtensionManager > getExtensionManager() const { return m_xExtensionManager; }
+    const css::uno::Reference< css::uno::XComponentContext >& getContext() const { return m_xContext; }
+    const css::uno::Reference< css::deployment::XExtensionManager >& getExtensionManager() const { return m_xExtensionManager; }
     bool isReadOnly( const css::uno::Reference< css::deployment::XPackage > &xPackage ) const;
 
 
diff --git a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.hxx b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.hxx
index 026693e..040a9f7 100644
--- a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.hxx
+++ b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.hxx
@@ -86,7 +86,7 @@ private:
     };
     void setError(INSTALL_ERROR err, OUString const & sExtension, OUString const & exceptionMessage);
     void setError(OUString const & exceptionMessage);
-    css::uno::Reference< css::deployment::XExtensionManager > getExtensionManager() const
+    const css::uno::Reference< css::deployment::XExtensionManager >& getExtensionManager() const
             { return m_xExtensionManager; }
 
     rtl::Reference< Thread > m_thread;
diff --git a/desktop/source/deployment/misc/dp_descriptioninfoset.cxx b/desktop/source/deployment/misc/dp_descriptioninfoset.cxx
index 1e05633..bfb2fd6 100644
--- a/desktop/source/deployment/misc/dp_descriptioninfoset.cxx
+++ b/desktop/source/deployment/misc/dp_descriptioninfoset.cxx
@@ -124,7 +124,7 @@ public:
 
     ~ExtensionDescription();
 
-    css::uno::Reference<css::xml::dom::XNode> getRootElement() const
+    const css::uno::Reference<css::xml::dom::XNode>& getRootElement() const
     {
         return m_xRoot;
     }
diff --git a/desktop/source/deployment/registry/inc/dp_backend.h b/desktop/source/deployment/registry/inc/dp_backend.h
index d5c29ea..cb7b8fc 100644
--- a/desktop/source/deployment/registry/inc/dp_backend.h
+++ b/desktop/source/deployment/registry/inc/dp_backend.h
@@ -346,7 +346,7 @@ public:
     inline OUString const & getCachePath() const { return m_cachePath; }
     inline bool transientMode() const { return m_cachePath.isEmpty(); }
 
-    inline OUString getContext() const {return m_context; }
+    const OUString& getContext() const {return m_context; }
 
     // XEventListener
     virtual void SAL_CALL disposing( css::lang::EventObject const & evt )
diff --git a/desktop/source/deployment/registry/sfwk/dp_parceldesc.hxx b/desktop/source/deployment/registry/sfwk/dp_parceldesc.hxx
index 0c7459d..d637116 100644
--- a/desktop/source/deployment/registry/sfwk/dp_parceldesc.hxx
+++ b/desktop/source/deployment/registry/sfwk/dp_parceldesc.hxx
@@ -45,7 +45,7 @@ private:
     sal_Int32 skipIndex;
 public:
     ParcelDescDocHandler():m_bIsParsed( false ), skipIndex( 0 ){}
-    OUString getParcelLanguage() { return m_sLang; }
+    const OUString& getParcelLanguage() { return m_sLang; }
     bool isParsed() { return m_bIsParsed; }
     // XDocumentHandler
     virtual void SAL_CALL startDocument()
diff --git a/embeddedobj/source/inc/commonembobj.hxx b/embeddedobj/source/inc/commonembobj.hxx
index f98c033..b3f4524 100644
--- a/embeddedobj/source/inc/commonembobj.hxx
+++ b/embeddedobj/source/inc/commonembobj.hxx
@@ -170,8 +170,8 @@ private:
                 const css::uno::Reference< css::embed::XStorage >& xNewParentStorage,
                 const OUString& aNewName );
 
-    OUString GetDocumentServiceName() const { return m_aDocServiceName; }
-    OUString GetPresetFilterName() const { return m_aPresetFilterName; }
+    const OUString& GetDocumentServiceName() const { return m_aDocServiceName; }
+    const OUString& GetPresetFilterName() const { return m_aPresetFilterName; }
 
     css::uno::Reference< css::io::XInputStream >
         StoreDocumentToTempStream_Impl( sal_Int32 nStorageFormat,
diff --git a/embeddedobj/source/inc/docholder.hxx b/embeddedobj/source/inc/docholder.hxx
index e47e958..10a9b57 100644
--- a/embeddedobj/source/inc/docholder.hxx
+++ b/embeddedobj/source/inc/docholder.hxx
@@ -164,7 +164,7 @@ public:
         m_xOutplaceInterceptor = xOutplaceInterceptor;
     }
 
-    css::uno::Reference< css::util::XCloseable > GetComponent() { return m_xComponent; }
+    const css::uno::Reference< css::util::XCloseable >& GetComponent() { return m_xComponent; }
 
 // XEventListener
     virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) throw (css::uno::RuntimeException, std::exception) override;
diff --git a/extensions/source/bibliography/datman.hxx b/extensions/source/bibliography/datman.hxx
index 782cdc8..66728a7 100644
--- a/extensions/source/bibliography/datman.hxx
+++ b/extensions/source/bibliography/datman.hxx
@@ -138,10 +138,10 @@ public:
 
         css::uno::Sequence< OUString>           getDataSources();
 
-        OUString                    getActiveDataSource() {return aDataSourceURL;}
+        const OUString&             getActiveDataSource() {return aDataSourceURL;}
         void                        setActiveDataSource(const OUString& rURL);
 
-        OUString                    getActiveDataTable() { return aActiveDataTable;}
+        const OUString&             getActiveDataTable() { return aActiveDataTable;}
         void                        setActiveDataTable(const OUString& rTable);
 
         void                        setFilter(const OUString& rQuery);
diff --git a/extensions/source/bibliography/general.hxx b/extensions/source/bibliography/general.hxx
index 5d2c0ab..ed2047d 100644
--- a/extensions/source/bibliography/general.hxx
+++ b/extensions/source/bibliography/general.hxx
@@ -161,7 +161,7 @@ public:
 
     virtual bool                HandleShortCutKey( const KeyEvent& rKeyEvent ) override; // returns true, if key was handled
 
-    inline rtl::Reference<BibGeneralPageFocusListener> GetFocusListener() { return mxBibGeneralPageFocusListener; }
+    const rtl::Reference<BibGeneralPageFocusListener>& GetFocusListener() { return mxBibGeneralPageFocusListener; }
 
     void focusGained(const css::awt::FocusEvent& rEvent) throw( css::uno::RuntimeException, std::exception );
     void focusLost(const css::awt::FocusEvent& rEvent) throw( css::uno::RuntimeException, std::exception );
diff --git a/extensions/source/bibliography/toolbar.hxx b/extensions/source/bibliography/toolbar.hxx
index 1b7187a..9743e28 100644
--- a/extensions/source/bibliography/toolbar.hxx
+++ b/extensions/source/bibliography/toolbar.hxx
@@ -51,7 +51,7 @@ public:
     BibToolBarListener(BibToolBar *pTB, const OUString& aStr, sal_uInt16 nId);
     virtual ~BibToolBarListener();
 
-    OUString           GetCommand() const { return aCommand;}
+    const OUString&          GetCommand() const { return aCommand;}
 
     // css::lang::XEventListener
     // we do not hold References to dispatches, so there is nothing to do on disposal
diff --git a/extensions/source/dbpilots/controlwizard.hxx b/extensions/source/dbpilots/controlwizard.hxx
index 3f2e44d..b445dbf 100644
--- a/extensions/source/dbpilots/controlwizard.hxx
+++ b/extensions/source/dbpilots/controlwizard.hxx
@@ -107,7 +107,7 @@ namespace dbp
         bool    travelNext() { return OControlWizard_Base::travelNext(); }
 
     public:
-        css::uno::Reference< css::uno::XComponentContext >
+        const css::uno::Reference< css::uno::XComponentContext >&
             getComponentContext() const { return m_xContext; }
 
         const OControlWizardContext&    getContext() const { return m_aContext; }
diff --git a/extensions/source/logging/loghandler.hxx b/extensions/source/logging/loghandler.hxx
index c87d505..d41b80b 100644
--- a/extensions/source/logging/loghandler.hxx
+++ b/extensions/source/logging/loghandler.hxx
@@ -65,7 +65,7 @@ namespace logging
         inline  rtl_TextEncoding
                 getTextEncoding() const { return m_eEncoding; }
 
-        inline  css::uno::Reference< css::logging::XLogFormatter >
+        const css::uno::Reference< css::logging::XLogFormatter >&
                 getFormatter() const { return m_xFormatter; }
         inline  void
                 setFormatter( const css::uno::Reference< css::logging::XLogFormatter >& _rxFormatter )
diff --git a/extensions/source/propctrlr/commoncontrol.hxx b/extensions/source/propctrlr/commoncontrol.hxx
index 5fe2e99..4b16127 100644
--- a/extensions/source/propctrlr/commoncontrol.hxx
+++ b/extensions/source/propctrlr/commoncontrol.hxx
@@ -74,7 +74,7 @@ namespace pcr
 
         // XPropertyControl
         ::sal_Int16 SAL_CALL getControlType() throw (css::uno::RuntimeException) { return m_nControlType; }
-        css::uno::Reference< css::inspection::XPropertyControlContext > SAL_CALL getControlContext() throw (css::uno::RuntimeException) { return m_xContext; }
+        const css::uno::Reference< css::inspection::XPropertyControlContext >& SAL_CALL getControlContext() throw (css::uno::RuntimeException) { return m_xContext; }
         void SAL_CALL setControlContext( const css::uno::Reference< css::inspection::XPropertyControlContext >& _controlcontext ) throw (css::uno::RuntimeException);
         bool SAL_CALL isModified(  ) throw (css::uno::RuntimeException) { return m_bModified; }
         void SAL_CALL notifyModifiedValue(  ) throw (css::uno::RuntimeException);
diff --git a/forms/source/component/GroupManager.hxx b/forms/source/component/GroupManager.hxx
index 2ea5ff5..8567ebb 100644
--- a/forms/source/component/GroupManager.hxx
+++ b/forms/source/component/GroupManager.hxx
@@ -145,7 +145,7 @@ public:
     explicit OGroup(const OUString& rGroupName);
     virtual ~OGroup();
 
-    OUString GetGroupName() const { return m_aGroupName; }
+    const OUString& GetGroupName() const { return m_aGroupName; }
     css::uno::Sequence< css::uno::Reference< css::awt::XControlModel>  > GetControlModels() const;
 
     void InsertComponent( const css::uno::Reference< css::beans::XPropertySet>& rxElement );
diff --git a/forms/source/inc/limitedformats.hxx b/forms/source/inc/limitedformats.hxx
index e1c922a..5922fd6 100644
--- a/forms/source/inc/limitedformats.hxx
+++ b/forms/source/inc/limitedformats.hxx
@@ -77,7 +77,7 @@ namespace frm
         void        setFormatKeyPropertyValue( const css::uno::Any& _rNewValue );
         // setFormatKeyPropertyValue should only be called with a value got from convertFormatKeyPropertyValue!
 
-        css::uno::Reference< css::util::XNumberFormatsSupplier >
+        const css::uno::Reference< css::util::XNumberFormatsSupplier >&
                     getFormatsSupplier() const { return s_xStandardFormats; }
 
     private:
diff --git a/forms/source/xforms/computedexpression.hxx b/forms/source/xforms/computedexpression.hxx
index 169cd66..30b9581 100644
--- a/forms/source/xforms/computedexpression.hxx
+++ b/forms/source/xforms/computedexpression.hxx
@@ -66,7 +66,7 @@ protected:
 
     /// allow manipulation of the expression before it is evaluated
     // the default implementation is to do nothing...
-    const OUString _getExpressionForEvaluation() const { return msExpression; }
+    const OUString& _getExpressionForEvaluation() const { return msExpression; }
 
     /// obtain a (suitable) XPathAPI implementation
     static css::uno::Reference<css::xml::xpath::XXPathAPI> _getXPathAPI(const xforms::EvaluationContext& aContext);
@@ -82,7 +82,7 @@ public:
 
 
     /// get the expression string
-    OUString getExpression() const { return msExpression;}
+    const OUString& getExpression() const { return msExpression;}
 
     /// set a new expression string
     void setExpression( const OUString& rExpression );
diff --git a/forms/source/xforms/mip.hxx b/forms/source/xforms/mip.hxx
index cd0a5f9..5db986d 100644
--- a/forms/source/xforms/mip.hxx
+++ b/forms/source/xforms/mip.hxx
@@ -64,7 +64,7 @@ public:
     // - type (static; default: xsd:string)
     //        (currently default implemented as empty string)
     bool hasTypeName() const { return mbHasTypeName; }
-    OUString getTypeName() const { return msTypeName; }
+    const OUString& getTypeName() const { return msTypeName; }
     void setTypeName( const OUString& );
     void resetTypeName();
 
@@ -94,7 +94,7 @@ public:
 
     // explain _why_ a constraint failed
     void setConstraintExplanation( const OUString& );
-    OUString getConstraintExplanation() const { return msConstraintExplanation; }
+    const OUString& getConstraintExplanation() const { return msConstraintExplanation; }
 
     // - calculate (computed XPath; default: has none (false))
     //   (for calculate, we only store whether a calculate MIP is present;
diff --git a/forms/source/xforms/pathexpression.hxx b/forms/source/xforms/pathexpression.hxx
index 220800e..4204bfe 100644
--- a/forms/source/xforms/pathexpression.hxx
+++ b/forms/source/xforms/pathexpression.hxx
@@ -69,7 +69,7 @@ public:
 
     // get the result of this expression as node/node list/...
     css::uno::Reference<css::xml::dom::XNode> getNode() const;
-    const NodeVector_t getNodeList() const { return maNodes;}
+    const NodeVector_t& getNodeList() const { return maNodes;}
     css::uno::Reference<css::xml::dom::XNodeList> getXNodeList() const;
 
 };
diff --git a/forms/source/xforms/xpathlib/extension.hxx b/forms/source/xforms/xpathlib/extension.hxx
index a25f608..b364a9b 100644
--- a/forms/source/xforms/xpathlib/extension.hxx
+++ b/forms/source/xforms/xpathlib/extension.hxx
@@ -46,8 +46,8 @@ private:
 public:
     CLibxml2XFormsExtension() {}
 
-    css::uno::Reference< css::xforms::XModel > getModel() { return m_aModel;}
-    css::uno::Reference< css::xml::dom::XNode > getContextNode() { return m_aContextNode;}
+    const css::uno::Reference< css::xforms::XModel >& getModel() { return m_aModel;}
+    const css::uno::Reference< css::xml::dom::XNode >& getContextNode() { return m_aContextNode;}
 
     virtual css::xml::xpath::Libxml2ExtensionHandle SAL_CALL getLibxml2ExtensionHandle() throw (css::uno::RuntimeException, std::exception) override;
     virtual void SAL_CALL initialize(const css::uno::Sequence< css::uno::Any >& aSequence) throw (css::uno::RuntimeException, std::exception) override;
diff --git a/fpicker/source/office/OfficeFilePicker.cxx b/fpicker/source/office/OfficeFilePicker.cxx
index b361807..8f531d0 100644
--- a/fpicker/source/office/OfficeFilePicker.cxx
+++ b/fpicker/source/office/OfficeFilePicker.cxx
@@ -70,8 +70,8 @@ public:
 
     FilterEntry( const OUString& _rTitle, const UnoFilterList& _rSubFilters );
 
-    OUString     getTitle() const { return m_sTitle; }
-    OUString     getFilter() const { return m_sFilter; }
+    const OUString& getTitle() const { return m_sTitle; }
+    const OUString& getFilter() const { return m_sFilter; }
 
     /// determines if the filter has sub filter (i.e., the filter is a filter group in real)
     bool            hasSubFilters( ) const;
diff --git a/fpicker/source/office/PlacesListBox.hxx b/fpicker/source/office/PlacesListBox.hxx
index e7a9a7a..5f4f21e 100644
--- a/fpicker/source/office/PlacesListBox.hxx
+++ b/fpicker/source/office/PlacesListBox.hxx
@@ -66,9 +66,9 @@ class PlacesListBox : public Control
         void SetSizePixel( const Size& rNewSize ) override;
         void updateView( );
 
-        VclPtr<PushButton> GetAddButton() const { return mpAddBtn; }
-        VclPtr<PushButton> GetDeleteButton() const { return mpDelBtn; }
-        VclPtr<PlacesListBox_Impl> GetPlacesListBox() const { return mpImpl; }
+        const VclPtr<PushButton>& GetAddButton() const { return mpAddBtn; }
+        const VclPtr<PushButton>& GetDeleteButton() const { return mpDelBtn; }
+        const VclPtr<PlacesListBox_Impl>& GetPlacesListBox() const { return mpImpl; }
 
         virtual bool Notify( NotifyEvent& rNEvt ) override;
 
diff --git a/idlc/inc/idlc/inheritedinterface.hxx b/idlc/inc/idlc/inheritedinterface.hxx
index 8065e48..afe0c99 100644
--- a/idlc/inc/idlc/inheritedinterface.hxx
+++ b/idlc/inc/idlc/inheritedinterface.hxx
@@ -42,7 +42,7 @@ public:
 
     bool isOptional() const { return optional; }
 
-    OUString getDocumentation() const { return documentation; }
+    const OUString& getDocumentation() const { return documentation; }
 
 private:
     AstType const * interface;
diff --git a/l10ntools/inc/xmlparse.hxx b/l10ntools/inc/xmlparse.hxx
index 54bba22..7b0daae 100644
--- a/l10ntools/inc/xmlparse.hxx
+++ b/l10ntools/inc/xmlparse.hxx
@@ -62,8 +62,8 @@ public:
     )
     : m_sName( rName ), m_sValue( rValue ) {}
 
-    OString GetName() const { return m_sName; }
-    OString GetValue() const { return m_sValue; }
+    const OString& GetName() const { return m_sName; }
+    const OString& GetValue() const { return m_sValue; }
 
     void setValue( const OString &rValue ){ m_sValue = rValue; }
 };
@@ -171,7 +171,7 @@ public:
     virtual XMLNodeType GetNodeType() const override { return XMLNodeType::XFILE; }
 
     /// returns file name
-    OString GetName() const { return m_sFileName; }
+    const OString& GetName() const { return m_sFileName; }
     void SetName( const OString &rFilename ) { m_sFileName = rFilename; }
     const std::vector<OString>& getOrder() const { return m_vOrder; }
 
@@ -229,7 +229,7 @@ public:
     virtual XMLNodeType GetNodeType() const override { return XMLNodeType::ELEMENT; }
 
     /// returns element name
-    OString GetName() const { return m_sElementName; }
+    const OString& GetName() const { return m_sElementName; }
 
     /// returns list of attributes of this element
     XMLAttributeList *GetAttributeList() { return m_pAttributes.get(); }
@@ -247,7 +247,7 @@ public:
     void SetPos             ( int nPos )                    { m_nPos = nPos; }
     void SetOldRef          ( OString const & sOldRef )     { m_sOldRef = sOldRef; }
 
-    OString GetOldref() const       { return m_sOldRef;      }
+    const OString& GetOldref() const       { return m_sOldRef;      }
 };
 
 /** Holds character data
@@ -270,7 +270,7 @@ public:
     virtual XMLNodeType GetNodeType() const override { return XMLNodeType::DATA; }
 
     /// returns the data
-    OString GetData() const { return m_sData; }
+    const OString& GetData() const { return m_sData; }
 
     /// adds new character data to the existing one
     void AddData( const OString &rData ) { m_sData += rData; }
@@ -296,7 +296,7 @@ public:
     virtual XMLNodeType GetNodeType() const override { return XMLNodeType::COMMENT; }
 
     /// returns the comment
-    OString GetComment() const { return m_sComment; }
+    const OString& GetComment() const { return m_sComment; }
 };
 
 /** Holds additional file content like those for which no handler exists
@@ -319,7 +319,7 @@ public:
     virtual XMLNodeType GetNodeType() const override { return XMLNodeType::DEFAULT; }
 
     /// returns the comment
-    OString GetDefault() const { return m_sDefault; }
+    const OString& GetDefault() const { return m_sDefault; }
 };
 
 /** struct for error information, used by class SimpleXMLParser
diff --git a/l10ntools/inc/xrmmerge.hxx b/l10ntools/inc/xrmmerge.hxx
index 45b3e2f..7646299 100644
--- a/l10ntools/inc/xrmmerge.hxx
+++ b/l10ntools/inc/xrmmerge.hxx
@@ -55,7 +55,7 @@ protected:
         const OString &rCloseTag
     )=0;
 
-    OString GetGID() { return sGID; }
+    const OString& GetGID() { return sGID; }
 
 public:
     XRMResParser();
diff --git a/l10ntools/source/po.cxx b/l10ntools/source/po.cxx
index 7881be3..176ce1d 100644
--- a/l10ntools/source/po.cxx
+++ b/l10ntools/source/po.cxx
@@ -49,10 +49,10 @@ public:
     virtual             ~GenPoEntry();
                         // Default copy constructor and copy operator work well
 
-    OString     getReference() const    { return m_sReference; }
-    OString     getMsgCtxt() const      { return m_sMsgCtxt; }
-    OString     getMsgId() const        { return m_sMsgId; }
-    OString     getMsgStr() const       { return m_sMsgStr; }
+    const OString& getReference() const    { return m_sReference; }
+    const OString& getMsgCtxt() const      { return m_sMsgCtxt; }
+    const OString& getMsgId() const        { return m_sMsgId; }
+    const OString& getMsgStr() const       { return m_sMsgStr; }
     bool        isFuzzy() const         { return m_bFuzzy; }
     bool        isNull() const          { return m_bNull; }
 
diff --git a/lingucomponent/source/languageguessing/guess.hxx b/lingucomponent/source/languageguessing/guess.hxx
index efe61a0..7af5f38 100644
--- a/lingucomponent/source/languageguessing/guess.hxx
+++ b/lingucomponent/source/languageguessing/guess.hxx
@@ -48,8 +48,8 @@ class Guess{
 
         ~Guess();
 
-        string GetLanguage() { return language_str;}
-        string GetCountry() { return country_str;}
+        const string& GetLanguage() { return language_str;}
+        const string& GetCountry() { return country_str;}
 
     protected:
         string language_str;
diff --git a/linguistic/source/lngopt.hxx b/linguistic/source/lngopt.hxx
index f594c10..c9caab9 100644
--- a/linguistic/source/lngopt.hxx
+++ b/linguistic/source/lngopt.hxx
@@ -59,7 +59,7 @@ public:
 
     static OUString    GetName( sal_Int32 nWID );
 
-    const css::uno::Sequence< OUString >
+    const css::uno::Sequence< OUString >&
             GetActiveDics() const   { return pData->aActiveDics; }
 };
 
diff --git a/mysqlc/source/mysqlc_driver.hxx b/mysqlc/source/mysqlc_driver.hxx
index 0d1f3a3..ca10b2e 100644
--- a/mysqlc/source/mysqlc_driver.hxx
+++ b/mysqlc/source/mysqlc_driver.hxx
@@ -100,7 +100,7 @@ namespace connectivity
             sal_Int32 SAL_CALL getMajorVersion()                            throw(RuntimeException, std::exception) SAL_OVERRIDE;
             sal_Int32 SAL_CALL getMinorVersion()                            throw(RuntimeException, std::exception) SAL_OVERRIDE;
 
-            inline Reference< css::lang::XMultiServiceFactory > getFactory() const { return m_xFactory; }
+            const Reference< css::lang::XMultiServiceFactory >& getFactory() const { return m_xFactory; }
 
             static rtl_TextEncoding getDefaultEncoding() { return RTL_TEXTENCODING_UTF8; }
 
diff --git a/package/inc/ZipOutputEntry.hxx b/package/inc/ZipOutputEntry.hxx
index cac0c2f..14882be 100644
--- a/package/inc/ZipOutputEntry.hxx
+++ b/package/inc/ZipOutputEntry.hxx
@@ -72,7 +72,7 @@ public:
     void createBufferFile();
     void setParallelDeflateException(const ::css::uno::Any &rAny) { m_aParallelDeflateException = rAny; }
     css::uno::Reference< css::io::XInputStream > getData() const;
-    ::css::uno::Any getParallelDeflateException() const { return m_aParallelDeflateException; }
+    const css::uno::Any& getParallelDeflateException() const { return m_aParallelDeflateException; }
     void closeBufferFile();
     void deleteBufferFile();
 
diff --git a/package/inc/ZipOutputStream.hxx b/package/inc/ZipOutputStream.hxx
index f995469..26d7715 100644
--- a/package/inc/ZipOutputStream.hxx
+++ b/package/inc/ZipOutputStream.hxx
@@ -57,7 +57,7 @@ public:
 
     void finish()
         throw(css::io::IOException, css::uno::RuntimeException);
-    css::uno::Reference< css::io::XOutputStream > getStream();
+    const css::uno::Reference< css::io::XOutputStream >& getStream();
 
     static sal_uInt32 getCurrentDosTime();
     static void setEntry( ZipEntry *pEntry );
diff --git a/package/inc/ZipPackageBuffer.hxx b/package/inc/ZipPackageBuffer.hxx
index aba3f29..8278b3d 100644
--- a/package/inc/ZipPackageBuffer.hxx
+++ b/package/inc/ZipPackageBuffer.hxx
@@ -40,7 +40,7 @@ public:
     virtual ~ZipPackageBuffer();
 
     inline void realloc ( sal_Int32 nSize ) { m_aBuffer.realloc ( nSize ); }
-    inline const css::uno::Sequence < sal_Int8> getSequence () const { return m_aBuffer; }
+    const css::uno::Sequence < sal_Int8>& getSequence () const { return m_aBuffer; }
 
     // XInputStream
     virtual sal_Int32 SAL_CALL readBytes( css::uno::Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead )
diff --git a/package/source/zipapi/ZipOutputStream.cxx b/package/source/zipapi/ZipOutputStream.cxx
index 8cd8b90..c5307ce 100644
--- a/package/source/zipapi/ZipOutputStream.cxx
+++ b/package/source/zipapi/ZipOutputStream.cxx
@@ -189,7 +189,7 @@ void ZipOutputStream::finish()
     m_aZipList.clear();
 }
 
-css::uno::Reference< css::io::XOutputStream > ZipOutputStream::getStream()
+const css::uno::Reference< css::io::XOutputStream >& ZipOutputStream::getStream()
 {
     return m_xStream;
 }
diff --git a/pyuno/source/module/pyuno_impl.hxx b/pyuno/source/module/pyuno_impl.hxx
index ca618ed..e1cf3b2 100644
--- a/pyuno/source/module/pyuno_impl.hxx
+++ b/pyuno/source/module/pyuno_impl.hxx
@@ -351,8 +351,8 @@ public:
              const css::uno::Sequence< css::uno::Type > & types );
 
     static css::uno::Sequence< sal_Int8 > getUnoTunnelImplementationId();
-    PyRef getWrappedObject() { return mWrappedObject; }
-    css::uno::Sequence< css::uno::Type > getWrappedTypes() { return mTypes; }
+    const PyRef& getWrappedObject() const { return mWrappedObject; }
+    const css::uno::Sequence< css::uno::Type >& getWrappedTypes() const { return mTypes; }
     virtual ~Adapter();
 
     // XInvocation
diff --git a/rsc/inc/rscclobj.hxx b/rsc/inc/rscclobj.hxx
index 46aa383..eeb694f 100644
--- a/rsc/inc/rscclobj.hxx
+++ b/rsc/inc/rscclobj.hxx
@@ -38,7 +38,7 @@ public:
                 ObjNode( const RscId & rId, CLASS_DATA pData, sal_uLong lKey );
     ObjNode *   DelObjNode( RscTop * pClass, sal_uLong lFileKey );
     sal_uInt32  GetId() const override;
-    RscId       GetRscId() const { return aRscId; }
+    const RscId& GetRscId() const { return aRscId; }
     sal_uLong   GetFileKey() const { return lFileKey; };
     ObjNode*    Search( const RscId &rName ) const //< search the index in the b-tree
                     {
diff --git a/rsc/inc/rscdb.hxx b/rsc/inc/rscdb.hxx
index fc04f97..4f76a14 100644
--- a/rsc/inc/rscdb.hxx
+++ b/rsc/inc/rscdb.hxx
@@ -266,7 +266,7 @@ public:
                           {
                               nSourceCharSet = aCharSet;
                           }
-    OString           GetSearchPath() const { return aSearchPath; }
+    const OString&    GetSearchPath() const { return aSearchPath; }
     void              SetSysSearchPath( const OString& rStr ) { aSysSearchPath = rStr; }
     void              InsertType( RscTop * pType )
                           {
diff --git a/rsc/inc/rsctree.hxx b/rsc/inc/rsctree.hxx
index 2fbd365..b569198 100644
--- a/rsc/inc/rsctree.hxx
+++ b/rsc/inc/rsctree.hxx
@@ -86,7 +86,7 @@ public:
     StringNode(const OString& rStr) { m_aName = rStr; }
 
     StringNode*     Search( const char * ) const;
-    OString    GetName() const { return m_aName; }
+    const OString&  GetName() const { return m_aName; }
 };
 
 #endif // INCLUDED_RSC_INC_RSCTREE_HXX
diff --git a/scripting/source/provider/MasterScriptProvider.hxx b/scripting/source/provider/MasterScriptProvider.hxx
index 5309955..fc0a6b3 100644
--- a/scripting/source/provider/MasterScriptProvider.hxx
+++ b/scripting/source/provider/MasterScriptProvider.hxx
@@ -107,9 +107,9 @@ public:
         getAllProviders() throw ( css::uno::RuntimeException );
 
     bool isPkgProvider() { return m_bIsPkgMSP; }
-    css::uno::Reference< css::script::provider::XScriptProvider > getPkgProvider() { return m_xMSPPkg; }
+    const css::uno::Reference< css::script::provider::XScriptProvider >& getPkgProvider() { return m_xMSPPkg; }
     // returns context string for this provider, eg
-    OUString getContextString() { return m_sCtxString; }
+    const OUString& getContextString() { return m_sCtxString; }
 
 private:
     static OUString parseLocationName( const OUString& location );
diff --git a/scripting/source/stringresource/stringresource.cxx b/scripting/source/stringresource/stringresource.cxx
index e4a86f3..cd04d67 100644
--- a/scripting/source/stringresource/stringresource.cxx
+++ b/scripting/source/stringresource/stringresource.cxx
@@ -1217,7 +1217,7 @@ class BinaryOutput
 public:
     explicit BinaryOutput( Reference< XComponentContext > xContext );
 
-    Reference< io::XOutputStream > getOutputStream() const
+    const Reference< io::XOutputStream >& getOutputStream() const
         { return m_xOutputStream; }
 
     Sequence< ::sal_Int8 > closeAndGetData();
diff --git a/starmath/inc/ElementsDockingWindow.hxx b/starmath/inc/ElementsDockingWindow.hxx
index 6518326..2e32787 100644
--- a/starmath/inc/ElementsDockingWindow.hxx
+++ b/starmath/inc/ElementsDockingWindow.hxx
@@ -40,13 +40,13 @@ public:
     SmElement(SmNodePointer pNode, const OUString& aText, const OUString& aHelpText);
     virtual ~SmElement();
 
-    SmNodePointer getNode();
-    OUString      getText()
+    const SmNodePointer& getNode();
+    const OUString& getText()
     {
         return maText;
     }
 
-    OUString getHelpText()
+    const OUString& getHelpText()
     {
         return maHelpText;
     }
diff --git a/starmath/inc/cursor.hxx b/starmath/inc/cursor.hxx
index 0c0adbb0..3f5c3df 100644
--- a/starmath/inc/cursor.hxx
+++ b/starmath/inc/cursor.hxx
@@ -98,7 +98,7 @@ public:
     }
 
     /** Get position */
-    SmCaretPos GetPosition() const { return mpPosition->CaretPos; }
+    const SmCaretPos& GetPosition() const { return mpPosition->CaretPos; }
 
     /** True, if the cursor has a selection */
     bool HasSelection() { return mpAnchor != mpPosition; }
diff --git a/starmath/inc/document.hxx b/starmath/inc/document.hxx
index 1eb676c..4b8d35f 100644
--- a/starmath/inc/document.hxx
+++ b/starmath/inc/document.hxx
@@ -179,7 +179,7 @@ public:
 
     void        UpdateText();
     void        SetText(const OUString& rBuffer);
-    OUString    GetText() { return aText; }
+    const OUString&  GetText() { return aText; }
     void        SetFormat(SmFormat& rFormat);
     const SmFormat&  GetFormat() { return aFormat; }
 
diff --git a/starmath/inc/parse.hxx b/starmath/inc/parse.hxx
index 130fbd7..7dbd397 100644
--- a/starmath/inc/parse.hxx
+++ b/starmath/inc/parse.hxx
@@ -118,7 +118,7 @@ public:
     const SmErrorDesc*  PrevError();
     const SmErrorDesc*  GetError(size_t i);
     static const SmTokenTableEntry* GetTokenTableEntry( const OUString &rName );
-    std::set< OUString >   GetUsedSymbols() const      { return m_aUsedSymbols; }
+    const std::set< OUString >&   GetUsedSymbols() const      { return m_aUsedSymbols; }
 };
 
 
diff --git a/starmath/inc/visitors.hxx b/starmath/inc/visitors.hxx
index f51b961..bbb2ff3 100644
--- a/starmath/inc/visitors.hxx
+++ b/starmath/inc/visitors.hxx
@@ -145,7 +145,7 @@ public:
     virtual ~SmCaretPos2LineVisitor() {}
     void Visit( SmTextNode* pNode ) override;
     using SmDefaultingVisitor::Visit;
-    SmCaretLine GetResult( ){
+    const SmCaretLine& GetResult( ) {
         return maLine;
     }
 private:
diff --git a/starmath/source/ElementsDockingWindow.cxx b/starmath/source/ElementsDockingWindow.cxx
index 3f03ba8..cd7d2c4 100644
--- a/starmath/source/ElementsDockingWindow.cxx
+++ b/starmath/source/ElementsDockingWindow.cxx
@@ -40,7 +40,7 @@ SmElement::SmElement(SmNodePointer pNode, const OUString& aText, const OUString&
 SmElement::~SmElement()
 {}
 
-SmNodePointer SmElement::getNode()
+const SmNodePointer& SmElement::getNode()
 {
     return mpNode;
 }
diff --git a/starmath/source/mathmlimport.hxx b/starmath/source/mathmlimport.hxx
index 7c26518..5745ae0 100644
--- a/starmath/source/mathmlimport.hxx
+++ b/starmath/source/mathmlimport.hxx
@@ -244,7 +244,7 @@ public:
     }
 
     bool GetSuccess()              { return bSuccess; }
-    SAL_WARN_UNUSED_RESULT OUString GetText() { return aText; }
+    SAL_WARN_UNUSED_RESULT const OUString& GetText() { return aText; }
     void SetText(const OUString &rStr) { aText = rStr; }
 
     virtual void SetViewSettings(const css::uno::Sequence<css::beans::PropertyValue>& aViewProps) override;
diff --git a/stoc/source/uriproc/UriReference.hxx b/stoc/source/uriproc/UriReference.hxx
index 81eb4a5..d134334 100644
--- a/stoc/source/uriproc/UriReference.hxx
+++ b/stoc/source/uriproc/UriReference.hxx
@@ -42,7 +42,7 @@ public:
 
     bool isAbsolute() throw (css::uno::RuntimeException);
 
-    OUString getScheme() throw (css::uno::RuntimeException) { return m_scheme;}
+    const OUString& getScheme() throw (css::uno::RuntimeException) { return m_scheme;}
 
     OUString getSchemeSpecificPart()
         throw (css::uno::RuntimeException);
diff --git a/svgio/inc/svgio/svgreader/svggradientstopnode.hxx b/svgio/inc/svgio/svgreader/svggradientstopnode.hxx
index 5bd60db..055b47b 100644
--- a/svgio/inc/svgio/svgreader/svggradientstopnode.hxx
+++ b/svgio/inc/svgio/svgreader/svggradientstopnode.hxx
@@ -46,7 +46,7 @@ namespace svgio
             virtual void parseAttribute(const OUString& rTokenName, SVGToken aSVGToken, const OUString& aContent) override;
 
             /// offset content
-            const SvgNumber getOffset() const { return maOffset; }
+            const SvgNumber& getOffset() const { return maOffset; }
             void setOffset(const SvgNumber& rOffset = SvgNumber()) { maOffset = rOffset; }
         };
     } // end of namespace svgreader
diff --git a/unotools/source/config/bootstrap.cxx b/unotools/source/config/bootstrap.cxx
index d25d129..42a3081 100644
--- a/unotools/source/config/bootstrap.cxx
+++ b/unotools/source/config/bootstrap.cxx
@@ -109,7 +109,7 @@ namespace utl
         OUString getBootstrapValue(OUString const& _sName, OUString const& _sDefault) const;
         static bool getVersionValue(OUString const& _sName, OUString& _rValue, OUString const& _sDefault);
 
-        OUString getImplName() const { return m_aImplName; }
+        const OUString& getImplName() const { return m_aImplName; }
 
     private: // implementation
         bool initBaseInstallationData(rtl::Bootstrap& _rData);
diff --git a/unotools/source/config/moduleoptions.cxx b/unotools/source/config/moduleoptions.cxx
index 7170389..4f47629 100644
--- a/unotools/source/config/moduleoptions.cxx
+++ b/unotools/source/config/moduleoptions.cxx
@@ -187,11 +187,11 @@ struct FactoryInfo
         // That's why we can't make our member public. We must use get/set/init methods
         // to control access on it!
         bool            getInstalled        () const { return bInstalled;         };
-        OUString     getFactory          () const { return sFactory;           };
-        OUString     getTemplateFile     () const { return sTemplateFile;      };
-        OUString     getDefaultFilter    () const { return sDefaultFilter;     };
+        const OUString& getFactory          () const { return sFactory;           };
+        const OUString& getTemplateFile     () const { return sTemplateFile;      };
+        const OUString& getDefaultFilter    () const { return sDefaultFilter;     };
         bool            isDefaultFilterReadonly() const { return bDefaultFilterReadonly; }
-        sal_Int32           getIcon             () const { return nIcon;              };
+        sal_Int32       getIcon             () const { return nIcon;              };
 
         // If you call set-methods - we check for changes of values and mark it.
         // But if you wish to set it without that... you must initialize it!
diff --git a/unotools/source/config/securityoptions.cxx b/unotools/source/config/securityoptions.cxx
index 59de838..d048db0 100644
--- a/unotools/source/config/securityoptions.cxx
+++ b/unotools/source/config/securityoptions.cxx
@@ -131,14 +131,14 @@ class SvtSecurityOptions_Impl : public ConfigItem
 
         bool                IsReadOnly      ( SvtSecurityOptions::EOption eOption                   ) const;
 
-        Sequence< OUString >    GetSecureURLs   (                                                       ) const { return m_seqSecureURLs;}
-        void                    SetSecureURLs   (   const   Sequence< OUString >&   seqURLList          );
+        const Sequence< OUString >& GetSecureURLs(                                                       ) const { return m_seqSecureURLs;}
+        void                    SetSecureURLs    (   const   Sequence< OUString >&   seqURLList          );
         inline sal_Int32        GetMacroSecurityLevel   (                                               ) const;
         void                    SetMacroSecurityLevel   ( sal_Int32 _nLevel                             );
 
         inline bool         IsMacroDisabled         (                                               ) const;
 
-        Sequence< SvtSecurityOptions::Certificate > GetTrustedAuthors       (                                                                                       ) const { return m_seqTrustedAuthors;}
+        const Sequence< SvtSecurityOptions::Certificate >& GetTrustedAuthors(                                                                                       ) const { return m_seqTrustedAuthors;}
         void                                        SetTrustedAuthors       ( const Sequence< SvtSecurityOptions::Certificate >& rAuthors                           );
 
         bool                IsOptionSet     ( SvtSecurityOptions::EOption eOption                   ) const;
diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx
index c8e0601..3af4acc 100644
--- a/uui/source/iahndl.cxx
+++ b/uui/source/iahndl.cxx
@@ -973,13 +973,13 @@ UUIInteractionHelper::getParentProperty()
     return nullptr;
 }
 
-uno::Reference< awt::XWindow>
+const uno::Reference< awt::XWindow>&
 UUIInteractionHelper::getParentXWindow() const
 {
     return m_xWindowParam;
 }
 
-OUString
+const OUString&
 UUIInteractionHelper::getContextProperty()
 {
     return m_aContextParam;
diff --git a/uui/source/iahndl.hxx b/uui/source/iahndl.hxx
index 36a8fb4..48fac4e 100644
--- a/uui/source/iahndl.hxx
+++ b/uui/source/iahndl.hxx
@@ -109,7 +109,7 @@ public:
             const OUString& aMessage,
             std::vector< OUString > const & rArguments );
 
-    css::uno::Reference< css::uno::XComponentContext >
+    const css::uno::Reference< css::uno::XComponentContext >&
     getORB() const
     { return m_xContext; }
 private:
@@ -131,10 +131,10 @@ private:
     vcl::Window *
     getParentProperty();
 
-    css::uno::Reference< css::awt::XWindow>
+    const css::uno::Reference< css::awt::XWindow>&
     getParentXWindow() const;
 
-    OUString
+    const OUString&
     getContextProperty();
 
     css::uno::Reference< css::task::XInteractionHandler2 >
diff --git a/uui/source/nameclashdlg.hxx b/uui/source/nameclashdlg.hxx
index 2c850d5..0ddde55 100644
--- a/uui/source/nameclashdlg.hxx
+++ b/uui/source/nameclashdlg.hxx
@@ -49,7 +49,7 @@ public:
                      bool bAllowOverwrite );
     virtual ~NameClashDialog();
     virtual void dispose() override;
-    OUString getNewName() const { return maNewName; }
+    const OUString& getNewName() const { return maNewName; }
 };
 
 #endif // UUI_COOKIEDG_HXX
diff --git a/uui/source/sslwarndlg.hxx b/uui/source/sslwarndlg.hxx
index 0067957..436dfdc 100644
--- a/uui/source/sslwarndlg.hxx
+++ b/uui/source/sslwarndlg.hxx
@@ -42,7 +42,7 @@ public:
         const css::uno::Reference< css::security::XCertificate >& rXCert,
         const css::uno::Reference< css::uno::XComponentContext >& xContext );
 
-    css::uno::Reference< css::security::XCertificate > getCert() { return m_rXCert; }
+    const css::uno::Reference< css::security::XCertificate >& getCert() { return m_rXCert; }
 
     virtual void response(short nResponseId) override;
 
diff --git a/uui/source/unknownauthdlg.hxx b/uui/source/unknownauthdlg.hxx
index 02631e7..090f162d 100644
--- a/uui/source/unknownauthdlg.hxx
+++ b/uui/source/unknownauthdlg.hxx
@@ -49,7 +49,7 @@ public:
     virtual ~UnknownAuthDialog();
     virtual void dispose() override;
 
-    css::uno::Reference< css::security::XCertificate > getCert()
+    const css::uno::Reference< css::security::XCertificate >& getCert()
     {
         return m_rXCert;
     }
diff --git a/xmlhelp/source/cxxhelp/provider/databases.hxx b/xmlhelp/source/cxxhelp/provider/databases.hxx
index d6efc19..5b8626d 100644
--- a/xmlhelp/source/cxxhelp/provider/databases.hxx
+++ b/xmlhelp/source/cxxhelp/provider/databases.hxx
@@ -76,9 +76,9 @@ namespace chelp {
 
         ~StaticModuleInformation() { }
 
-        OUString get_title() const { return m_aTitle; }
-        OUString get_id() const { return m_aStartId; }
-        OUString get_program() const { return m_aProgramSwitch; }
+        const OUString& get_title() const { return m_aTitle; }
+        const OUString& get_id() const { return m_aStartId; }
+        const OUString& get_program() const { return m_aProgramSwitch; }
         int get_order() const { return m_nOrder; }
     };  // end class StaticModuleInformation
 
@@ -226,8 +226,8 @@ namespace chelp {
 
         void replaceName( OUString& oustring ) const;
 
-        OUString getProductName() const { return m_vReplacement[0]; }
-        OUString getProductVersion() const { return m_vReplacement[1]; }
+        const OUString& getProductName() const { return m_vReplacement[0]; }
+        const OUString& getProductVersion() const { return m_vReplacement[1]; }
 
         OUString expandURL( const OUString& aURL );
 
diff --git a/xmlhelp/source/cxxhelp/provider/urlparameter.hxx b/xmlhelp/source/cxxhelp/provider/urlparameter.hxx
index 044b922..3d48807 100644
--- a/xmlhelp/source/cxxhelp/provider/urlparameter.hxx
+++ b/xmlhelp/source/cxxhelp/provider/urlparameter.hxx
@@ -129,15 +129,15 @@ namespace chelp {
 
         OUString get_path()   { return get_the_path(); }
 
-        OUString get_eid() const   { return m_aEid; }
+        const OUString& get_eid() const   { return m_aEid; }
 
         OUString get_title();
 
         OUString get_jar()      { return get_the_jar(); }
 
-        OUString get_ExtensionRegistryPath() const { return m_aExtensionRegistryPath; }
+        const OUString& get_ExtensionRegistryPath() const { return m_aExtensionRegistryPath; }
 
-        OUString get_module() const { return m_aModule; }
+        const OUString& get_module() const { return m_aModule; }
 
         OUString get_dbpar() const
         {
@@ -147,17 +147,17 @@ namespace chelp {
                 return m_aModule;
         }
 
-        OUString get_prefix() const { return m_aPrefix; }
+        const OUString& get_prefix() const { return m_aPrefix; }
 
         OUString get_language();
 
         OUString get_program();
 
-        OUString get_query() const { return m_aQuery; }
+        const OUString& get_query() const { return m_aQuery; }
 
-        OUString get_scope() const { return m_aScope; }
+        const OUString& get_scope() const { return m_aScope; }
 
-        OUString get_system() const { return m_aSystem; }
+        const OUString& get_system() const { return m_aSystem; }
 
         sal_Int32     get_hitCount() const { return m_nHitCount; }
 
diff --git a/xmlscript/source/xmldlg_imexp/imp_share.hxx b/xmlscript/source/xmldlg_imexp/imp_share.hxx
index 48bc18b..30f8ffd 100644
--- a/xmlscript/source/xmldlg_imexp/imp_share.hxx
+++ b/xmlscript/source/xmldlg_imexp/imp_share.hxx
@@ -176,7 +176,7 @@ public:
 
     virtual ~DialogImport();
 
-    inline css::uno::Reference< css::frame::XModel > getDocOwner() { return _xDoc; }
+    const css::uno::Reference< css::frame::XModel >& getDocOwner() { return _xDoc; }
 
     // XRoot
     virtual void SAL_CALL startDocument(
@@ -394,7 +394,7 @@ public:
           _aId( id )
         { OSL_ASSERT( _xControlModel.is() ); }
 
-    inline css::uno::Reference< css::beans::XPropertySet > getControlModel() const
+    const css::uno::Reference< css::beans::XPropertySet >& getControlModel() const
         { return _xControlModel; }
 
     void importScollableSettings( css::uno::Reference< css::xml::input::XAttributes > const & xAttributes );
diff --git a/xmlsecurity/source/framework/buffernode.hxx b/xmlsecurity/source/framework/buffernode.hxx
index 9d82014..34cd10c 100644
--- a/xmlsecurity/source/framework/buffernode.hxx
+++ b/xmlsecurity/source/framework/buffernode.hxx
@@ -102,7 +102,7 @@ public:
     const BufferNode* isAncestor(const BufferNode* pDescendant) const;
     bool isPrevious(const BufferNode* pFollowing) const;
     const BufferNode* getNextNodeByTreeOrder() const;
-    css::uno::Reference< css::xml::wrapper::XXMLElementWrapper > getXMLElement() const { return m_xXMLElement;}
+    const css::uno::Reference< css::xml::wrapper::XXMLElementWrapper >& getXMLElement() const { return m_xXMLElement;}
     void setXMLElement(const css::uno::Reference<
         css::xml::wrapper::XXMLElementWrapper >& xXMLElement);
     void notifyBranch();


More information about the Libreoffice-commits mailing list