diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-10-13 08:47:47 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-10-14 08:26:14 +0200 |
commit | 9b5dad13b56bdde7c40970351af3da3a2c3c9350 (patch) | |
tree | abfd4b02743a0e6a93c51c026f4c53f0e21100bc /filter | |
parent | Fix numbering of font tables in sft.hxx (vcl) (diff) | |
download | core-9b5dad13b56bdde7c40970351af3da3a2c3c9350.tar.gz core-9b5dad13b56bdde7c40970351af3da3a2c3c9350.zip |
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 'filter')
-rw-r--r-- | filter/source/msfilter/rtfutil.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/filter/source/msfilter/rtfutil.cxx b/filter/source/msfilter/rtfutil.cxx index 358502b196ce..7b650e69c1e9 100644 --- a/filter/source/msfilter/rtfutil.cxx +++ b/filter/source/msfilter/rtfutil.cxx @@ -171,7 +171,7 @@ static bool TryOutString(const OUString& rStr, rtl_TextEncoding eDestEnc) OString OutStringUpr(const sal_Char* pToken, const OUString& rStr, rtl_TextEncoding eDestEnc) { if (TryOutString(rStr, eDestEnc)) - return OString("{") + pToken + " " + OutString(rStr, eDestEnc) + "}"; + return OStringLiteral("{") + pToken + " " + OutString(rStr, eDestEnc) + "}"; OStringBuffer aRet; aRet.append("{" OOO_STRING_SVTOOLS_RTF_UPR "{"); |