diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2020-12-28 17:56:40 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2020-12-29 16:42:33 +0100 |
commit | 042033f1e6da22616cb76c8d950c20c9efecbad5 (patch) | |
tree | 26b3f1f42d067506f44550b410f3fb9640616a5b /sfx2/source/view/lokhelper.cxx | |
parent | ccfd8e9d09f9ac0a0ea92d0f378391006faaf934 (diff) |
loplugin:stringviewparam: operator +
Change-Id: I044dd21b63d7eb03224675584fa143009c6b6008
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108418
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sfx2/source/view/lokhelper.cxx')
-rw-r--r-- | sfx2/source/view/lokhelper.cxx | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx index 44af64e02016..42e0d60b3382 100644 --- a/sfx2/source/view/lokhelper.cxx +++ b/sfx2/source/view/lokhelper.cxx @@ -7,6 +7,10 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include <sal/config.h> + +#include <string_view> + #include <sfx2/lokhelper.hxx> #include <com/sun/star/frame/Desktop.hpp> @@ -331,7 +335,7 @@ static OString lcl_generateJSON(const SfxViewShell* pView, const boost::property return OString(aString.c_str(), aString.size()).trim(); } -static inline OString lcl_generateJSON(const SfxViewShell* pView, const OString& rKey, +static inline OString lcl_generateJSON(const SfxViewShell* pView, std::string_view rKey, const OString& rPayload) { assert(pView != nullptr && "pView must be valid"); @@ -341,7 +345,7 @@ static inline OString lcl_generateJSON(const SfxViewShell* pView, const OString& } void SfxLokHelper::notifyOtherView(const SfxViewShell* pThisView, SfxViewShell const* pOtherView, - int nType, const OString& rKey, const OString& rPayload) + int nType, std::string_view rKey, const OString& rPayload) { assert(pThisView != nullptr && "pThisView must be valid"); if (DisableCallbacks::disabled()) @@ -361,7 +365,7 @@ void SfxLokHelper::notifyOtherView(const SfxViewShell* pThisView, SfxViewShell c pOtherView->libreOfficeKitViewCallback(nType, lcl_generateJSON(pThisView, rTree).getStr()); } -void SfxLokHelper::notifyOtherViews(const SfxViewShell* pThisView, int nType, const OString& rKey, +void SfxLokHelper::notifyOtherViews(const SfxViewShell* pThisView, int nType, std::string_view rKey, const OString& rPayload) { assert(pThisView != nullptr && "pThisView must be valid"); |