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 /sc/source/filter/ftools/ftools.cxx | |
parent | fa71320329999c968feb16ff65be328b5b8ff5e4 (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 'sc/source/filter/ftools/ftools.cxx')
-rw-r--r-- | sc/source/filter/ftools/ftools.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sc/source/filter/ftools/ftools.cxx b/sc/source/filter/ftools/ftools.cxx index c34c446ea482..a116d448d971 100644 --- a/sc/source/filter/ftools/ftools.cxx +++ b/sc/source/filter/ftools/ftools.cxx @@ -117,10 +117,10 @@ rtl_TextEncoding ScfTools::GetSystemTextEncoding() OUString ScfTools::GetHexStr( sal_uInt16 nValue ) { const sal_Char pHex[] = "0123456789ABCDEF"; - OUString aStr = OUString( pHex[ nValue >> 12 ] ) - + OUString( pHex[ (nValue >> 8) & 0x000F ] ) - + OUString( pHex[ (nValue >> 4) & 0x000F ] ) - + OUString( pHex[ nValue & 0x000F ] ); + OUString aStr = OUStringLiteral1( pHex[ nValue >> 12 ] ) + + OUStringLiteral1( pHex[ (nValue >> 8) & 0x000F ] ) + + OUStringLiteral1( pHex[ (nValue >> 4) & 0x000F ] ) + + OUStringLiteral1( pHex[ nValue & 0x000F ] ); return aStr; } |