summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-08-28 16:05:56 +0200
committerStephan Bergmann <sbergman@redhat.com>2020-08-29 08:12:33 +0200
commita1570b6052ae9c9349282027c9007b071589bce6 (patch)
treea9dac1f01e6dd7e23772d020294efaab33eb762d /svtools
parent927fad8d2407e6ffd34b843549271140c3abd1b2 (diff)
Make the OUString ConstCharArrayDetector::TypeUtf16 overloads are actually used
0c8fa58a2d73702770687ed15b98822d09f96ac3 "Support ConstCharArrayDetector also for UTF-16 arrays" had introduced those LIBO_INTERNAL_ONLY ctor and operator == overloads, but they never got called because the existing 'sal_Unicode const *' overloads always won. (The other function overloads introduced with 0c8fa58a2d73702770687ed15b98822d09f96ac3 should be unproblematic, as they do not have any 'sal_Unicode const *' overload counterparts.) Also fix the resulting loplugin:elidestringvar and loplugin:stringconstant fallout. For one, those plugins look at the actual ctor overloads being used, so had missed those cases that accidentally had used an unexpected overload. And for another, the heuristic the plugins used to detect the ConstCharArrayDetector overloads turned out to be too simplistic now and would have started to cause false positives. Change-Id: I4426890979fb832d53f391c7e1b62bc1ad501a65 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101582 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/misc/sampletext.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/svtools/source/misc/sampletext.cxx b/svtools/source/misc/sampletext.cxx
index b87c1250a4eb..b1638d0907d6 100644
--- a/svtools/source/misc/sampletext.cxx
+++ b/svtools/source/misc/sampletext.cxx
@@ -162,14 +162,14 @@ OUString makeShortRepresentativeSymbolTextForSelectedFont(OutputDevice const &rD
{
static const sal_Unicode aImplAppleSymbolText[] = {
0x03BC, 0x2202, 0x2211, 0x220F, 0x03C0, 0x222B, 0x03A9, 0x221A, 0};
- OUString sSampleText(aImplAppleSymbolText);
- bool bHasSampleTextGlyphs = (-1 == rDevice.HasGlyphs(rDevice.GetFont(), sSampleText));
+ bool bHasSampleTextGlyphs
+ = (-1 == rDevice.HasGlyphs(rDevice.GetFont(), aImplAppleSymbolText));
//It's the Apple version
if (bHasSampleTextGlyphs)
- return OUString(aImplAppleSymbolText);
+ return aImplAppleSymbolText;
static const sal_Unicode aImplAdobeSymbolText[] = {
0xF06D, 0xF0B6, 0xF0E5, 0xF0D5, 0xF070, 0xF0F2, 0xF057, 0xF0D6, 0};
- return OUString(aImplAdobeSymbolText);
+ return aImplAdobeSymbolText;
}
const bool bOpenSymbol = IsStarSymbol(rDevice.GetFont().GetFamilyName());