summaryrefslogtreecommitdiffstats
path: root/framework/source/layoutmanager
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2021-09-22 23:25:16 +0200
committerStephan Bergmann <sbergman@redhat.com>2021-09-23 07:25:40 +0200
commitcb3058aa4e3155d97d47d1444b808da7297b5794 (patch)
tree2e712390eccca93e5e19d87a429ed6214d840a4b /framework/source/layoutmanager
parentFix typos (diff)
downloadcore-cb3058aa4e3155d97d47d1444b808da7297b5794.tar.gz
core-cb3058aa4e3155d97d47d1444b808da7297b5794.zip
Extend loplugin:stringviewparam to starts/endsWith: framework
Change-Id: Idc92058e7d2ff63d55e97e6b2fee83314fc0334c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122498 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'framework/source/layoutmanager')
-rw-r--r--framework/source/layoutmanager/toolbarlayoutmanager.cxx5
-rw-r--r--framework/source/layoutmanager/toolbarlayoutmanager.hxx3
2 files changed, 5 insertions, 3 deletions
diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
index 6ad7939ccb8f..97e8e75e5b29 100644
--- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx
+++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
@@ -34,6 +34,7 @@
#include <com/sun/star/ui/XUIFunctionListener.hpp>
#include <cppuhelper/queryinterface.hxx>
+#include <o3tl/string_view.hxx>
#include <unotools/cmdoptions.hxx>
#include <toolkit/helper/vclunohelper.hxx>
#include <toolkit/helper/convert.hxx>
@@ -558,14 +559,14 @@ bool ToolbarLayoutManager::createToolbar( const OUString& rResourceURL )
return bNotify;
}
-bool ToolbarLayoutManager::destroyToolbar( const OUString& rResourceURL )
+bool ToolbarLayoutManager::destroyToolbar( std::u16string_view rResourceURL )
{
uno::Reference< lang::XComponent > xComponent;
bool bNotify( false );
bool bMustBeSorted( false );
bool bMustLayouted( false );
- bool bMustBeDestroyed( !rResourceURL.startsWith("private:resource/toolbar/addon_") );
+ bool bMustBeDestroyed( !o3tl::starts_with(rResourceURL, u"private:resource/toolbar/addon_") );
{
SolarMutexGuard aWriteLock;
diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.hxx b/framework/source/layoutmanager/toolbarlayoutmanager.hxx
index d91938a55d47..b826b1e8cd34 100644
--- a/framework/source/layoutmanager/toolbarlayoutmanager.hxx
+++ b/framework/source/layoutmanager/toolbarlayoutmanager.hxx
@@ -21,6 +21,7 @@
#include <sal/config.h>
+#include <string_view>
#include <vector>
#include <uiconfiguration/globalsettings.hxx>
@@ -86,7 +87,7 @@ class ToolbarLayoutManager : public ::cppu::WeakImplHelper< css::awt::XDockableW
bool requestToolbar( const OUString& rResourceURL );
bool createToolbar( const OUString& rResourceURL );
- bool destroyToolbar( const OUString& rResourceURL );
+ bool destroyToolbar( std::u16string_view rResourceURL );
// visibility
bool showToolbar( std::u16string_view rResourceURL );