summaryrefslogtreecommitdiff
path: root/cui/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-10-13 08:47:47 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-10-14 08:26:14 +0200
commit9b5dad13b56bdde7c40970351af3da3a2c3c9350 (patch)
treeabfd4b02743a0e6a93c51c026f4c53f0e21100bc /cui/source
parentfa71320329999c968feb16ff65be328b5b8ff5e4 (diff)
loplugin:stringadd look for unnecessary temporaries
which defeat the *StringConcat optimisation. Also make StringConcat conversions treat a nullptr as an empty string, to match the O*String(char*) constructors. Change-Id: If45f5b4b6a535c97bfeeacd9ec472a7603a52e5b Reviewed-on: https://gerrit.libreoffice.org/80724 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cui/source')
-rw-r--r--cui/source/dialogs/FontFeaturesDialog.cxx3
-rw-r--r--cui/source/dialogs/about.cxx2
2 files changed, 3 insertions, 2 deletions
diff --git a/cui/source/dialogs/FontFeaturesDialog.cxx b/cui/source/dialogs/FontFeaturesDialog.cxx
index 957a2c8e1228..6e9831561ce0 100644
--- a/cui/source/dialogs/FontFeaturesDialog.cxx
+++ b/cui/source/dialogs/FontFeaturesDialog.cxx
@@ -206,7 +206,8 @@ OUString FontFeaturesDialog::createFontNameWithFeatures()
}
sResultFontName = vcl::font::trimFontNameFeatures(m_sFontName);
if (!sNameSuffix.isEmpty())
- sResultFontName += OUString(vcl::font::FeaturePrefix) + sNameSuffix.makeStringAndClear();
+ sResultFontName
+ += OUStringLiteral1(vcl::font::FeaturePrefix) + sNameSuffix.makeStringAndClear();
return sResultFontName;
}
diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx
index 0dc219df8156..06ead113ddb8 100644
--- a/cui/source/dialogs/about.cxx
+++ b/cui/source/dialogs/about.cxx
@@ -224,7 +224,7 @@ OUString AboutDialog::GetLocaleString()
if ( pLocale && pLocale->Language )
{
if (pLocale->Country && rtl_uString_getLength( pLocale->Country) > 0)
- aLocaleStr = OUString(pLocale->Language) + "_" + OUString(pLocale->Country);
+ aLocaleStr = OUString::unacquired(&pLocale->Language) + "_" + OUString::unacquired(&pLocale->Country);
else
aLocaleStr = OUString(pLocale->Language);
if (pLocale->Variant && rtl_uString_getLength( pLocale->Variant) > 0)