summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-04-15 09:39:14 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-04-15 13:54:53 +0200
commit46ce0d28b4c765076c7871358375c4e85e44534b (patch)
treeb17378d5258a51185001eac455a764897e6dda11 /framework
parent00f7309fb786efcc0bbca04fb29de80f275a16ba (diff)
loplugin:stringliteralvar look for assignments
to O[U]String from char array literals, we can convert the char literals to O[U]StringLiteral and avoid a runtime allocation Change-Id: I15d8dddb2cd428b90740e39f20daf98e0941aa6d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114125 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'framework')
-rw-r--r--framework/source/dispatch/closedispatcher.cxx4
-rw-r--r--framework/source/fwe/xml/statusbardocumenthandler.cxx12
2 files changed, 8 insertions, 8 deletions
diff --git a/framework/source/dispatch/closedispatcher.cxx b/framework/source/dispatch/closedispatcher.cxx
index 2dc4795abdc4..d4fa824c11e0 100644
--- a/framework/source/dispatch/closedispatcher.cxx
+++ b/framework/source/dispatch/closedispatcher.cxx
@@ -50,8 +50,8 @@ namespace framework{
#endif
namespace fpf = ::framework::pattern::frame;
-const char URL_CLOSEDOC[] = ".uno:CloseDoc";
-const char URL_CLOSEWIN[] = ".uno:CloseWin";
+constexpr OUStringLiteral URL_CLOSEDOC = u".uno:CloseDoc";
+constexpr OUStringLiteral URL_CLOSEWIN = u".uno:CloseWin";
const char URL_CLOSEFRAME[] = ".uno:CloseFrame";
CloseDispatcher::CloseDispatcher(const css::uno::Reference< css::uno::XComponentContext >& rxContext ,
diff --git a/framework/source/fwe/xml/statusbardocumenthandler.cxx b/framework/source/fwe/xml/statusbardocumenthandler.cxx
index a6f157ba21b9..f75bd1e720c0 100644
--- a/framework/source/fwe/xml/statusbardocumenthandler.cxx
+++ b/framework/source/fwe/xml/statusbardocumenthandler.cxx
@@ -83,12 +83,12 @@ namespace framework
{
// Property names of a menu/menu item ItemDescriptor
-const char ITEM_DESCRIPTOR_COMMANDURL[] = "CommandURL";
-const char ITEM_DESCRIPTOR_HELPURL[] = "HelpURL";
-const char ITEM_DESCRIPTOR_OFFSET[] = "Offset";
-const char ITEM_DESCRIPTOR_STYLE[] = "Style";
-const char ITEM_DESCRIPTOR_WIDTH[] = "Width";
-const char ITEM_DESCRIPTOR_TYPE[] = "Type";
+constexpr OUStringLiteral ITEM_DESCRIPTOR_COMMANDURL = u"CommandURL";
+constexpr OUStringLiteral ITEM_DESCRIPTOR_HELPURL = u"HelpURL";
+constexpr OUStringLiteral ITEM_DESCRIPTOR_OFFSET = u"Offset";
+constexpr OUStringLiteral ITEM_DESCRIPTOR_STYLE = u"Style";
+constexpr OUStringLiteral ITEM_DESCRIPTOR_WIDTH = u"Width";
+constexpr OUStringLiteral ITEM_DESCRIPTOR_TYPE = u"Type";
static void ExtractStatusbarItemParameters(
const Sequence< PropertyValue >& rProp,