diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2020-08-28 16:05:56 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2020-08-29 08:12:33 +0200 |
commit | a1570b6052ae9c9349282027c9007b071589bce6 (patch) | |
tree | a9dac1f01e6dd7e23772d020294efaab33eb762d /sw/qa/extras/rtfimport | |
parent | 927fad8d2407e6ffd34b843549271140c3abd1b2 (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 'sw/qa/extras/rtfimport')
-rw-r--r-- | sw/qa/extras/rtfimport/rtfimport.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx index c3fc3df4f15b..3c6e6cb370e4 100644 --- a/sw/qa/extras/rtfimport/rtfimport.cxx +++ b/sw/qa/extras/rtfimport/rtfimport.cxx @@ -266,8 +266,8 @@ CPPUNIT_TEST_FIXTURE(Test, testFdo45182) uno::Reference<container::XIndexAccess> xFootnotes = xFootnotesSupplier->getFootnotes(); uno::Reference<text::XTextRange> xTextRange(xFootnotes->getByIndex(0), uno::UNO_QUERY); // Encoding in the footnote was wrong. - OUString aExpected(u"\u017Eivnost\u00ED" SAL_NEWLINE_STRING); - CPPUNIT_ASSERT_EQUAL(aExpected, xTextRange->getString()); + CPPUNIT_ASSERT_EQUAL(OUString(u"\u017Eivnost\u00ED" SAL_NEWLINE_STRING), + xTextRange->getString()); } CPPUNIT_TEST_FIXTURE(Test, testFdo85812) @@ -841,8 +841,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf105511) DefaultLocale::set("ru-RU", batch); batch->commit(); load(mpTestDocumentPath, "tdf105511.rtf"); - OUString aExpected(u"\u0418\u043C\u044F"); - getParagraph(1, aExpected); + getParagraph(1, u"\u0418\u043C\u044F"); } CPPUNIT_TEST_FIXTURE(Test, testContSectionPageBreak) |