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 /forms | |
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 'forms')
-rw-r--r-- | forms/source/component/DatabaseForm.cxx | 2 | ||||
-rw-r--r-- | forms/source/component/FormattedField.cxx | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx index 97c76efb5eff..11b8bd14d352 100644 --- a/forms/source/component/DatabaseForm.cxx +++ b/forms/source/component/DatabaseForm.cxx @@ -1943,7 +1943,7 @@ void ODatabaseForm::reset_impl(bool _bApproveByListeners) if ( xColProps.is() ) xPSI = xColProps->getPropertySetInfo( ); - static const char PROPERTY_CONTROLDEFAULT[] = "ControlDefault"; + static const OUStringLiteral PROPERTY_CONTROLDEFAULT = u"ControlDefault"; if ( xPSI.is() && xPSI->hasPropertyByName( PROPERTY_CONTROLDEFAULT ) ) { Any aDefault = xColProps->getPropertyValue( PROPERTY_CONTROLDEFAULT ); diff --git a/forms/source/component/FormattedField.cxx b/forms/source/component/FormattedField.cxx index 18cb21882d6a..1e201c7b3858 100644 --- a/forms/source/component/FormattedField.cxx +++ b/forms/source/component/FormattedField.cxx @@ -649,7 +649,7 @@ void OFormattedModel::write(const Reference<XObjectOutputStream>& _rxOutStream) Reference<XNumberFormats> xFormats = xSupplier->getNumberFormats(); OUString sFormatDescription; LanguageType eFormatLanguage = LANGUAGE_DONTKNOW; - static const char s_aLocaleProp[] = "Locale"; + static const OUStringLiteral s_aLocaleProp = u"Locale"; Reference<css::beans::XPropertySet> xFormat = xFormats->getByKey(nKey); if (hasProperty(s_aLocaleProp, xFormat)) { @@ -660,7 +660,7 @@ void OFormattedModel::write(const Reference<XObjectOutputStream>& _rxOutStream) eFormatLanguage = LanguageTag::convertToLanguageType( *pLocale, false); } } - static const char s_aFormatStringProp[] = "FormatString"; + static const OUStringLiteral s_aFormatStringProp = u"FormatString"; if (hasProperty(s_aFormatStringProp, xFormat)) xFormat->getPropertyValue(s_aFormatStringProp) >>= sFormatDescription; _rxOutStream->writeUTF(sFormatDescription); |