summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-04-14 10:20:52 +0200
committerNoel Grandin <noel@peralex.com>2016-04-14 10:24:47 +0200
commitb8eb2946511ce617323b13dffe2b1d9704e0be60 (patch)
treed5aa4f91e75d654a1cdfcd75f26dd4b813a73ff7
parentd8644c8edb405abd9d71e62e43e898c1d2a28fd2 (diff)
loplugin:passstuffbyref in various
Change-Id: I80070c83204e531c2f599f8a56193d6ffe0e5022
-rw-r--r--UnoControls/inc/basecontrol.hxx8
-rw-r--r--accessibility/inc/accessibility/extended/textwindowaccessibility.hxx2
-rw-r--r--accessibility/inc/accessibility/standard/vclxaccessibletoolboxitem.hxx2
-rw-r--r--basctl/source/inc/basidesh.hxx2
-rw-r--r--basctl/source/inc/dlged.hxx2
-rw-r--r--basctl/source/inc/localizationmgr.hxx2
-rw-r--r--binaryurp/source/bridge.cxx2
-rw-r--r--binaryurp/source/bridge.hxx4
-rw-r--r--binaryurp/source/proxy.hxx4
-rw-r--r--bridges/inc/bridges/cpp_uno/shared/cppinterfaceproxy.hxx2
-rw-r--r--configmgr/source/localizedvaluenode.hxx2
-rw-r--r--configmgr/source/rootaccess.hxx2
-rw-r--r--cppcanvas/source/inc/canvasgraphichelper.hxx4
-rw-r--r--cppcanvas/source/mtfrenderer/implrenderer.cxx2
-rw-r--r--cppcanvas/source/wrapper/implspritecanvas.hxx2
-rw-r--r--desktop/source/app/cmdlineargs.hxx14
-rw-r--r--desktop/source/deployment/gui/dp_gui_theextmgr.hxx4
-rw-r--r--desktop/source/deployment/gui/dp_gui_updateinstalldialog.hxx2
-rw-r--r--desktop/source/deployment/misc/dp_descriptioninfoset.cxx2
-rw-r--r--desktop/source/deployment/registry/inc/dp_backend.h2
-rw-r--r--desktop/source/deployment/registry/sfwk/dp_parceldesc.hxx2
-rw-r--r--embeddedobj/source/inc/commonembobj.hxx4
-rw-r--r--embeddedobj/source/inc/docholder.hxx2
-rw-r--r--extensions/source/bibliography/datman.hxx4
-rw-r--r--extensions/source/bibliography/general.hxx2
-rw-r--r--extensions/source/bibliography/toolbar.hxx2
-rw-r--r--extensions/source/dbpilots/controlwizard.hxx2
-rw-r--r--extensions/source/logging/loghandler.hxx2
-rw-r--r--extensions/source/propctrlr/commoncontrol.hxx2
-rw-r--r--forms/source/component/GroupManager.hxx2
-rw-r--r--forms/source/inc/limitedformats.hxx2
-rw-r--r--forms/source/xforms/computedexpression.hxx4
-rw-r--r--forms/source/xforms/mip.hxx4
-rw-r--r--forms/source/xforms/pathexpression.hxx2
-rw-r--r--forms/source/xforms/xpathlib/extension.hxx4
-rw-r--r--fpicker/source/office/OfficeFilePicker.cxx4
-rw-r--r--fpicker/source/office/PlacesListBox.hxx6
-rw-r--r--idlc/inc/idlc/inheritedinterface.hxx2
-rw-r--r--l10ntools/inc/xmlparse.hxx16
-rw-r--r--l10ntools/inc/xrmmerge.hxx2
-rw-r--r--l10ntools/source/po.cxx8
-rw-r--r--lingucomponent/source/languageguessing/guess.hxx4
-rw-r--r--linguistic/source/lngopt.hxx2
-rw-r--r--mysqlc/source/mysqlc_driver.hxx2
-rw-r--r--package/inc/ZipOutputEntry.hxx2
-rw-r--r--package/inc/ZipOutputStream.hxx2
-rw-r--r--package/inc/ZipPackageBuffer.hxx2
-rw-r--r--package/source/zipapi/ZipOutputStream.cxx2
-rw-r--r--pyuno/source/module/pyuno_impl.hxx4
-rw-r--r--rsc/inc/rscclobj.hxx2
-rw-r--r--rsc/inc/rscdb.hxx2
-rw-r--r--rsc/inc/rsctree.hxx2
-rw-r--r--scripting/source/provider/MasterScriptProvider.hxx4
-rw-r--r--scripting/source/stringresource/stringresource.cxx2
-rw-r--r--starmath/inc/ElementsDockingWindow.hxx6
-rw-r--r--starmath/inc/cursor.hxx2
-rw-r--r--starmath/inc/document.hxx2
-rw-r--r--starmath/inc/parse.hxx2
-rw-r--r--starmath/inc/visitors.hxx2
-rw-r--r--starmath/source/ElementsDockingWindow.cxx2
-rw-r--r--starmath/source/mathmlimport.hxx2
-rw-r--r--stoc/source/uriproc/UriReference.hxx2
-rw-r--r--svgio/inc/svgio/svgreader/svggradientstopnode.hxx2
-rw-r--r--unotools/source/config/bootstrap.cxx2
-rw-r--r--unotools/source/config/moduleoptions.cxx8
-rw-r--r--unotools/source/config/securityoptions.cxx6
-rw-r--r--uui/source/iahndl.cxx4
-rw-r--r--uui/source/iahndl.hxx6
-rw-r--r--uui/source/nameclashdlg.hxx2
-rw-r--r--uui/source/sslwarndlg.hxx2
-rw-r--r--uui/source/unknownauthdlg.hxx2
-rw-r--r--xmlhelp/source/cxxhelp/provider/databases.hxx10
-rw-r--r--xmlhelp/source/cxxhelp/provider/urlparameter.hxx14
-rw-r--r--xmlscript/source/xmldlg_imexp/imp_share.hxx4
-rw-r--r--xmlsecurity/source/framework/buffernode.hxx2
75 files changed, 130 insertions, 130 deletions
diff --git a/UnoControls/inc/basecontrol.hxx b/UnoControls/inc/basecontrol.hxx
index 1ecd6a840df7..6ea4bd12ac63 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 ace9adc5ebbc..6d101612f54f 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 a5cda263d93f..714d4588495c 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 1fb6dd8e884b..7db88289ed64 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 ba1427a03706..82ad3530debe 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 ed1e6c7824e0..15f9bace2f36 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 6298351bdab0..1bfdd17def98 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 c89e85b0919a..7c148756704d 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 7f90f116c137..5ad8cee120dc 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 4546dbe33b7a..4002af6395b3 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 f4300e977b04..e3055aecf9f3 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 4c16a2932ea4..a308ef59b223 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 076ce246b5e5..b992b1d409b0 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 4afe3f925025..bc716ba9786b 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 4a5439699ef6..89b0fc300a8e 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 f110567b42e1..94648558ad94 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 263fe20cab57..756c0e9303fa 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 026693eb2c9c..040a9f790863 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 1e0563378b20..bfb2fd68e7da 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 d5c29eade70d..cb7b8fcbe026 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 0c7459d42d0b..d637116fefae 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 f98c033809e4..b3f4524bbc30 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 e47e95872c1a..10a9b57cac30 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 782cdc810e0a..66728a735ef1 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 5d2c0ab033b5..ed2047d7823e 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 1b7187aa11c7..9743e2848cd5 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 3f2e44daa090..b445dbf96251 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 c87d50504a24..d41b80b4c69a 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 5fe2e994074a..4b1612795ed4 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 2ea5ff51ea22..8567ebb1e02d 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 e1c922a15293..5922fd6db8f1 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 169cd6606077..30b9581c5f4b 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 cd0a5f919d17..5db986d9cf55 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 220800e86228..4204bfe5223b 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 a25f60837256..b364a9be1f5b 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 b3618075e881..8f531d0c01d5 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 e7a9a7ac80cf..5f4f21eb69b8 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 8065e4891e49..afe0c99b9207 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 54bba22b8eaa..7b0daae041e0 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 45b3e2f6efe5..764629963c7e 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 7881be384ebf..176ce1d813b1 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 efe61a025df2..7af5f38c70a7 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 f594c10323a5..c9caab9e7578 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 0d1f3a301388..ca10b2ee3b4b 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 cac0c2ffa584..14882bef9cdc 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 f995469b29e6..26d7715c05b9 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 aba3f29bd519..8278b3db7e2e 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 8cd8b9056989..c5307cea1c10 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 ca618ed01003..e1cf3b242ad3 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 46aa38348cfe..eeb694f25cb7 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 fc04f9798abc..4f76a146fe1d 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 2fbd36575583..b5691980db94 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 5309955c9bdc..fc0a6b3ad0aa 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 e4a86f38cbee..cd04d67d4b57 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 6518326ed693..2e32787da859 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 0c0adbb0d2de..3f5c3df35fb0 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 1eb676c45205..4b8d35ff280c 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 130fbd71a938..7dbd3977fb5e 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 f51b961d3629..bbb2ff32dd0f 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 3f03ba877731..cd7d2c4a1163 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 7c265182cdd0..5745ae08db84 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 81eb4a5524ba..d134334619c6 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 5bd60db1749b..055b47b0e5cd 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 d25d12981d20..42a3081efbec 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 71703899d50f..4f476294d78a 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 59de838a005d..d048db008bab 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 c8e0601fa034..3af4acc797d4 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 36a8fb46bf7c..48fac4ed2968 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 2c850d5b0cc7..0ddde55c4f32 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 006795705431..436dfdc4f350 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 02631e7bd508..090f162d6ae1 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 d6efc1915d4f..5b8626d74e39 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 044b92206c40..3d48807b0fc7 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 48bc18b70ceb..30f8ffdba28b 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 9d82014adda5..34cd10c87f83 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();