diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-04-15 09:39:14 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-04-15 13:54:53 +0200 |
commit | 46ce0d28b4c765076c7871358375c4e85e44534b (patch) | |
tree | b17378d5258a51185001eac455a764897e6dda11 /framework/source/fwe | |
parent | 00f7309fb786efcc0bbca04fb29de80f275a16ba (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/source/fwe')
-rw-r--r-- | framework/source/fwe/xml/statusbardocumenthandler.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
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, |