diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2020-12-23 13:16:31 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2020-12-26 14:51:15 +0100 |
commit | a3d0091d185f39eddabf4d372ebe0ac3061dbb89 (patch) | |
tree | 4d70cedc274972ccc21b6b8e7105f042090cf5d6 /vbahelper | |
parent | af791fb775e35c11ad01c42a7085dd121ab9c7a6 (diff) |
New loplugin:stringliteralvar
See the comment at the top of compilerplugins/clang/stringliteralvar.cxx for
details.
(Turned some affected variables in included files into inline variables, to
avoid GCC warnings about unused variables.)
Change-Id: Ie77219e6adfdaaceaa8b4e590b08971f2f04c83a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108239
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'vbahelper')
-rw-r--r-- | vbahelper/source/vbahelper/vbacommandbarhelper.hxx | 10 | ||||
-rw-r--r-- | vbahelper/source/vbahelper/vbahelper.cxx | 8 |
2 files changed, 9 insertions, 9 deletions
diff --git a/vbahelper/source/vbahelper/vbacommandbarhelper.hxx b/vbahelper/source/vbahelper/vbacommandbarhelper.hxx index 536d4f6a3d0e..ff515561b23f 100644 --- a/vbahelper/source/vbahelper/vbacommandbarhelper.hxx +++ b/vbahelper/source/vbahelper/vbacommandbarhelper.hxx @@ -29,13 +29,13 @@ const char ITEM_DESCRIPTOR_COMMANDURL[] = "CommandURL"; const char ITEM_DESCRIPTOR_HELPURL[] = "HelpURL"; -const char ITEM_DESCRIPTOR_CONTAINER[] = "ItemDescriptorContainer"; -const char ITEM_DESCRIPTOR_LABEL[] = "Label"; +inline const OUStringLiteral ITEM_DESCRIPTOR_CONTAINER = u"ItemDescriptorContainer"; +inline const OUStringLiteral ITEM_DESCRIPTOR_LABEL = u"Label"; const char ITEM_DESCRIPTOR_TYPE[] = "Type"; const char ITEM_DESCRIPTOR_STYLE[] = "Style"; -const char ITEM_DESCRIPTOR_ISVISIBLE[] = "IsVisible"; -const char ITEM_DESCRIPTOR_UINAME[] = "UIName"; -const char ITEM_DESCRIPTOR_ENABLED[] = "Enabled"; +inline const OUStringLiteral ITEM_DESCRIPTOR_ISVISIBLE = u"IsVisible"; +inline const OUStringLiteral ITEM_DESCRIPTOR_UINAME = u"UIName"; +inline const OUStringLiteral ITEM_DESCRIPTOR_ENABLED = u"Enabled"; const char ITEM_MENUBAR_URL[] = "private:resource/menubar/menubar"; constexpr char16_t ITEM_TOOLBAR_URL[] = u"private:resource/toolbar/"; diff --git a/vbahelper/source/vbahelper/vbahelper.cxx b/vbahelper/source/vbahelper/vbahelper.cxx index d47dbb01bdd6..7ae94d465bfa 100644 --- a/vbahelper/source/vbahelper/vbahelper.cxx +++ b/vbahelper/source/vbahelper/vbahelper.cxx @@ -851,10 +851,10 @@ double UserFormGeometryHelper::getOffsetY() const } -const char saPosXName[] = "PositionX"; -const char saPosYName[] = "PositionY"; -const char saWidthName[] = "Width"; -const char saHeightName[] = "Height"; +const OUStringLiteral saPosXName = u"PositionX"; +const OUStringLiteral saPosYName = u"PositionY"; +const OUStringLiteral saWidthName = u"Width"; +const OUStringLiteral saHeightName = u"Height"; double UserFormGeometryHelper::implGetPos( bool bPosY ) const { |