include/tools/urlobj.hxx | 2 +- include/unotools/eventcfg.hxx | 2 +- tools/source/fsys/urlobj.cxx | 2 +- unotools/source/config/eventcfg.cxx | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-)
New commits: commit 54a91f287ff75d2f66e547181961f7b25728a9b9 Author: Noel Grandin <[email protected]> AuthorDate: Tue Nov 5 13:34:35 2024 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Wed Nov 6 09:25:37 2024 +0100 loplugin:passstuffbyref in tools Change-Id: Id902f711d14eb21dc14366e8fe8fc5a96c0afec4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176055 Tested-by: Jenkins Reviewed-by: Noel Grandin <[email protected]> diff --git a/include/tools/urlobj.hxx b/include/tools/urlobj.hxx index 96f21676d51b..33af8104dc0f 100644 --- a/include/tools/urlobj.hxx +++ b/include/tools/urlobj.hxx @@ -396,7 +396,7 @@ public: @return The 'prefix' of URLs of the given scheme. */ - static OUString GetScheme(INetProtocol eTheScheme); + static const OUString & GetScheme(INetProtocol eTheScheme); /** Return the human-readable name for a given scheme. diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx index 34d761d11e66..5e200867a5cc 100644 --- a/tools/source/fsys/urlobj.cxx +++ b/tools/source/fsys/urlobj.cxx @@ -4006,7 +4006,7 @@ bool INetURLObject::isAnyKnownWebDAVScheme() const { } // static -OUString INetURLObject::GetScheme(INetProtocol eTheScheme) +const OUString & INetURLObject::GetScheme(INetProtocol eTheScheme) { return getSchemeInfo(eTheScheme).m_aPrefix; } commit 69f4abaffd92233ccb32a01f1c297036a792b274 Author: Noel Grandin <[email protected]> AuthorDate: Tue Nov 5 13:32:36 2024 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Wed Nov 6 09:25:28 2024 +0100 loplugin:passstuffbyref in unotools Change-Id: I0a63fc95f76664408a7ec3ee53a8d025eb5f560d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176054 Tested-by: Jenkins Reviewed-by: Noel Grandin <[email protected]> diff --git a/include/unotools/eventcfg.hxx b/include/unotools/eventcfg.hxx index 7ddca4a96be0..1acbeb7bba6f 100644 --- a/include/unotools/eventcfg.hxx +++ b/include/unotools/eventcfg.hxx @@ -74,7 +74,7 @@ class UNOTOOLS_DLLPUBLIC GlobalEventConfig final : sal_Bool SAL_CALL hasByName( const OUString& aName ) override; css::uno::Type SAL_CALL getElementType( ) override; sal_Bool SAL_CALL hasElements( ) override; - static OUString GetEventName( GlobalEventId nID ); + static const OUString & GetEventName( GlobalEventId nID ); css::uno::Sequence < css::beans::PropertyValue > getByName2( const OUString& aName ); diff --git a/unotools/source/config/eventcfg.cxx b/unotools/source/config/eventcfg.cxx index 0b54b3c9a672..3649ae69a6cd 100644 --- a/unotools/source/config/eventcfg.cxx +++ b/unotools/source/config/eventcfg.cxx @@ -369,10 +369,10 @@ sal_Bool SAL_CALL GlobalEventConfig::hasElements( ) return m_pImpl->hasElements( ); } -OUString GlobalEventConfig::GetEventName( GlobalEventId nIndex ) +const OUString & GlobalEventConfig::GetEventName( GlobalEventId nIndex ) { if (comphelper::IsFuzzing()) - return OUString(); + return EMPTY_OUSTRING; static rtl::Reference<GlobalEventConfig> createImpl(new GlobalEventConfig); return GlobalEventConfig::m_pImpl->GetEventName( nIndex ); }
