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 /toolkit/source/controls | |
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 'toolkit/source/controls')
-rw-r--r-- | toolkit/source/controls/stdtabcontroller.cxx | 2 | ||||
-rw-r--r-- | toolkit/source/controls/tabpagemodel.cxx | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/toolkit/source/controls/stdtabcontroller.cxx b/toolkit/source/controls/stdtabcontroller.cxx index c0173e822c75..32c2e6e63c82 100644 --- a/toolkit/source/controls/stdtabcontroller.cxx +++ b/toolkit/source/controls/stdtabcontroller.cxx @@ -111,7 +111,7 @@ bool StdTabController::ImplCreateComponentSequence( if ( pTabs ) { // opt: Constant String for TabStop name - static const char aTabStopName[] = "Tabstop"; + static const OUStringLiteral aTabStopName = u"Tabstop"; Reference< XPropertySet > xPSet( xCtrl->getModel(), UNO_QUERY ); Reference< XPropertySetInfo > xInfo = xPSet->getPropertySetInfo(); diff --git a/toolkit/source/controls/tabpagemodel.cxx b/toolkit/source/controls/tabpagemodel.cxx index 30f45d9258bd..498e8329ffdf 100644 --- a/toolkit/source/controls/tabpagemodel.cxx +++ b/toolkit/source/controls/tabpagemodel.cxx @@ -141,7 +141,7 @@ void SAL_CALL UnoControlTabPageModel::initialize (const Sequence<Any>& rArgument Reference<XPropertySet> xDialogProp(xDialogModel,UNO_QUERY); if ( xDialogProp.is() ) { - static const char s_sResourceResolver[] = "ResourceResolver"; + static const OUStringLiteral s_sResourceResolver = u"ResourceResolver"; Reference<XPropertySet> xThis(*this,UNO_QUERY); xThis->setPropertyValue(s_sResourceResolver,xDialogProp->getPropertyValue(s_sResourceResolver)); xThis->setPropertyValue(GetPropertyName(BASEPROPERTY_TITLE),xDialogProp->getPropertyValue(GetPropertyName(BASEPROPERTY_TITLE))); |