diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-11-26 11:31:44 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-11-26 14:29:58 +0100 |
commit | 95bd1f66f879caa13484c408b05d05d1e42075ca (patch) | |
tree | 05a1696dd33d5770fe3d56026ad7ef286740437b /svx/source/tbxctrls/grafctrl.cxx | |
parent | d9796e597329849a6d360f205c5d36f7838884d8 (diff) |
loplugin:stringliteraldefine in svx
Change-Id: I2375ebfe9791c43063ffbc8ddbe1bd365499a576
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125868
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source/tbxctrls/grafctrl.cxx')
-rw-r--r-- | svx/source/tbxctrls/grafctrl.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/svx/source/tbxctrls/grafctrl.cxx b/svx/source/tbxctrls/grafctrl.cxx index 02fb3d540ba8..7f644be79052 100644 --- a/svx/source/tbxctrls/grafctrl.cxx +++ b/svx/source/tbxctrls/grafctrl.cxx @@ -156,13 +156,14 @@ namespace { struct CommandToRID { const char* pCommand; - const char* sResId; + rtl::OUStringConstExpr sResId; }; } static OUString ImplGetRID( const OUString& aCommand ) { + static constexpr OUStringLiteral EMPTY = u""; static const CommandToRID aImplCommandToResMap[] = { { ".uno:GrafRed", RID_SVXBMP_GRAF_RED }, @@ -172,7 +173,7 @@ static OUString ImplGetRID( const OUString& aCommand ) { ".uno:GrafContrast", RID_SVXBMP_GRAF_CONTRAST }, { ".uno:GrafGamma", RID_SVXBMP_GRAF_GAMMA }, { ".uno:GrafTransparence", RID_SVXBMP_GRAF_TRANSPARENCE }, - { nullptr, "" } + { nullptr, EMPTY } }; OUString sRID; @@ -182,7 +183,7 @@ static OUString ImplGetRID( const OUString& aCommand ) { if ( aCommand.equalsAscii( aImplCommandToResMap[ i ].pCommand )) { - sRID = OUString::createFromAscii(aImplCommandToResMap[i].sResId); + sRID = aImplCommandToResMap[i].sResId; break; } ++i; |