summaryrefslogtreecommitdiff
path: root/scripting
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-09-30 15:11:41 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-10-01 08:26:52 +0200
commit6eb7870aa10144281ccbc4702770d8ce1ceb3e9a (patch)
treea61b9bc4685c8fa4797a7b00660838937ec62e9a /scripting
parent03516c505eced337149782a67b2ad98c246929b3 (diff)
loplugin:stringadd in sc
Change-Id: Idab16f785ca5e8954f8e50132938f6329106c927 Reviewed-on: https://gerrit.libreoffice.org/79891 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'scripting')
-rw-r--r--scripting/source/dlgprov/dlgevtatt.cxx4
-rw-r--r--scripting/source/stringresource/stringresource.cxx9
2 files changed, 4 insertions, 9 deletions
diff --git a/scripting/source/dlgprov/dlgevtatt.cxx b/scripting/source/dlgprov/dlgevtatt.cxx
index 5ec4f6fb4d8b..5523881fd59f 100644
--- a/scripting/source/dlgprov/dlgevtatt.cxx
+++ b/scripting/source/dlgprov/dlgevtatt.cxx
@@ -613,9 +613,7 @@ namespace dlgprov
OUString aOUFinal;
aOUFinal += aRes.copy( 0, nIndex );
- aOUFinal += aQuoteChar;
- aOUFinal += aMethodName;
- aOUFinal += aQuoteChar;
+ aOUFinal += aQuoteChar + aMethodName + aQuoteChar;
aOUFinal += aRes.copy( nIndex + 2 );
std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(nullptr,
diff --git a/scripting/source/stringresource/stringresource.cxx b/scripting/source/stringresource/stringresource.cxx
index 0387890474fa..58a4bf3da3dd 100644
--- a/scripting/source/stringresource/stringresource.cxx
+++ b/scripting/source/stringresource/stringresource.cxx
@@ -1628,21 +1628,18 @@ static OUString implGetNameScemeForLocaleItem( const LocaleItem* pLocaleItem )
"StringResourcePersistenceImpl::implGetNameScemeForLocaleItem(): pLocaleItem == NULL" );
Locale aLocale = pLocaleItem->m_locale;
- OUString aRetStr = aUnder;
- aRetStr += aLocale.Language;
+ OUString aRetStr = aUnder + aLocale.Language;
OUString aCountry = aLocale.Country;
if( !aCountry.isEmpty() )
{
- aRetStr += aUnder;
- aRetStr += aCountry;
+ aRetStr += aUnder + aCountry;
}
OUString aVariant = aLocale.Variant;
if( !aVariant.isEmpty() )
{
- aRetStr += aUnder;
- aRetStr += aVariant;
+ aRetStr += aUnder + aVariant;
}
return aRetStr;
}