summaryrefslogtreecommitdiff
path: root/sw/qa/extras
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2021-06-18 15:13:24 +0200
committerStephan Bergmann <sbergman@redhat.com>2021-06-18 22:15:51 +0200
commit568fba4a439f39aadeeb1bcd3603ef4efe9700da (patch)
tree88b9dc2ca5840f760b2e83864048a2865d43ad92 /sw/qa/extras
parent25ba5f75a273540ce5e21fc0f14ea1a7b997888d (diff)
Simplify some OUString construction in test code
Change-Id: I1891f5e676818b5657b7ee7a7563f217a1af65cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117457 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sw/qa/extras')
-rw-r--r--sw/qa/extras/odfexport/odfexport.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx
index 4f6e3b21c2e0..c117591d9ad8 100644
--- a/sw/qa/extras/odfexport/odfexport.cxx
+++ b/sw/qa/extras/odfexport/odfexport.cxx
@@ -2694,9 +2694,9 @@ DECLARE_ODFEXPORT_TEST(testReferenceLanguage, "referencelanguage.odt")
CPPUNIT_ASSERT_EQUAL(2, getPages());
// Test loext:reference-language attribute of reference fields
// (used from LibreOffice 6.1, and proposed for next ODF)
- const char* aFieldTexts[] = { "A 2", "Az Isten", "Az 50-esek",
+ OUString const aFieldTexts[] = { "A 2", "Az Isten", "Az 50-esek",
"A 2018-asok", "Az egyebek", "A fejezetek",
- reinterpret_cast<char const *>(u8"Az „Őseinket...”"), "a 2",
+ u"Az „Őseinket...”", "a 2",
"Az v", "az 1", "Az e", "az 1",
"Az (5)", "az 1", "A 2", "az 1" };
uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
@@ -2718,7 +2718,7 @@ DECLARE_ODFEXPORT_TEST(testReferenceLanguage, "referencelanguage.odt")
uno::Any aLang = xPropertySet->getPropertyValue("ReferenceFieldLanguage");
CPPUNIT_ASSERT_EQUAL(true, aLang == aHu || aLang == ahu);
uno::Reference<text::XTextContent> xField(aField, uno::UNO_QUERY);
- CPPUNIT_ASSERT_EQUAL(OUString::fromUtf8(aFieldTexts[i]), xField->getAnchor()->getString());
+ CPPUNIT_ASSERT_EQUAL(aFieldTexts[i], xField->getAnchor()->getString());
}
}
}
@@ -2804,9 +2804,9 @@ DECLARE_ODFEXPORT_TEST(testSpellOutNumberingTypes, "spellout-numberingtypes.odt"
{
CPPUNIT_ASSERT_EQUAL(1, getPages());
// ordinal indicator, ordinal and cardinal number numbering styles (from LibreOffice 6.1)
- static const char* const aFieldTexts[] = { "1st", "Erste", "Eins", "1.", "Premier", "Un", "1ᵉʳ", "First", "One" };
+ OUString const aFieldTexts[] = { "1st", "Erste", "Eins", "1.", "Premier", "Un", u"1ᵉʳ", "First", "One" };
// fallback for old platforms without std::codecvt and std::regex supports
- static const char* const aFieldTextFallbacks[] = { "Ordinal-number 1", "Ordinal 1", "1" };
+ OUString const aFieldTextFallbacks[] = { "Ordinal-number 1", "Ordinal 1", "1" };
uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
// update text field content
uno::Reference<util::XRefreshable>(xTextFieldsSupplier->getTextFields(), uno::UNO_QUERY_THROW)->refresh();
@@ -2821,8 +2821,8 @@ DECLARE_ODFEXPORT_TEST(testSpellOutNumberingTypes, "spellout-numberingtypes.odt"
if (xServiceInfo->supportsService("com.sun.star.text.textfield.PageNumber"))
{
uno::Reference<text::XTextContent> xField(aField, uno::UNO_QUERY);
- CPPUNIT_ASSERT_EQUAL(true, OUString::fromUtf8(aFieldTexts[i]).equals(xField->getAnchor()->getString()) ||
- OUString::fromUtf8(aFieldTextFallbacks[i%3]).equals(xField->getAnchor()->getString()));
+ CPPUNIT_ASSERT_EQUAL(true, aFieldTexts[i].equals(xField->getAnchor()->getString()) ||
+ aFieldTextFallbacks[i%3].equals(xField->getAnchor()->getString()));
}
}
}