[Libreoffice-commits] core.git: sd/qa sw/qa vcl/qa

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Wed Dec 9 15:19:54 UTC 2020


 sd/qa/unit/import-tests-smartart.cxx       |    6 +++---
 sw/qa/extras/ooxmlexport/ooxmlexport11.cxx |    2 +-
 sw/qa/extras/ww8export/ww8export2.cxx      |    2 +-
 vcl/qa/cppunit/complextext.cxx             |    2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 6292e49355fff22f1ca549b4b81b20d495735734
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Wed Dec 9 14:19:27 2020 +0100
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Wed Dec 9 16:19:13 2020 +0100

    Some OUString::fromUtf(u8"...") simplifications
    
    Change-Id: I2b23d115c4df23ef99d162a02fa8f560f9a3a825
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107471
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/sd/qa/unit/import-tests-smartart.cxx b/sd/qa/unit/import-tests-smartart.cxx
index 2a3dcda08983..369e51ae83f3 100644
--- a/sd/qa/unit/import-tests-smartart.cxx
+++ b/sd/qa/unit/import-tests-smartart.cxx
@@ -753,7 +753,7 @@ void SdImportTestSmartArt::testAccentProcess()
         uno::Reference<container::XIndexAccess> xRules(xPara->getPropertyValue("NumberingRules"),
                                                        uno::UNO_QUERY);
         comphelper::SequenceAsHashMap aRule(xRules->getByIndex(0));
-        CPPUNIT_ASSERT_EQUAL(OUString::fromUtf8(u8"•"), aRule["BulletChar"].get<OUString>());
+        CPPUNIT_ASSERT_EQUAL(OUString(u"•"), aRule["BulletChar"].get<OUString>());
     }
 
     int nFirstChildTop = xFirstChild->getPosition().Y;
@@ -1376,13 +1376,13 @@ void SdImportTestSmartArt::testBulletList()
     uno::Reference<container::XIndexAccess> xRules1(xPara1->getPropertyValue("NumberingRules"),
                                                     uno::UNO_QUERY);
     comphelper::SequenceAsHashMap aRule1(xRules1->getByIndex(1));
-    CPPUNIT_ASSERT_EQUAL(OUString::fromUtf8(u8"•"), aRule1["BulletChar"].get<OUString>());
+    CPPUNIT_ASSERT_EQUAL(OUString(u"•"), aRule1["BulletChar"].get<OUString>());
 
     uno::Reference<beans::XPropertySet> xPara2(xParas->nextElement(), uno::UNO_QUERY);
     uno::Reference<container::XIndexAccess> xRules2(xPara2->getPropertyValue("NumberingRules"),
                                                     uno::UNO_QUERY);
     comphelper::SequenceAsHashMap aRule2(xRules2->getByIndex(2));
-    CPPUNIT_ASSERT_EQUAL(OUString::fromUtf8(u8"•"), aRule2["BulletChar"].get<OUString>());
+    CPPUNIT_ASSERT_EQUAL(OUString(u"•"), aRule2["BulletChar"].get<OUString>());
 
     xDocShRef->DoClose();
 }
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
index f26d7570d38a..8569a93b29cd 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
@@ -307,7 +307,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf67207_MERGEFIELD, "mailmerge.docx")
     CPPUNIT_ASSERT(xServiceInfo->supportsService("com.sun.star.text.TextField.Database"));
     OUString sValue;
     xTextField->getPropertyValue("Content") >>= sValue;
-    CPPUNIT_ASSERT_EQUAL(OUString::fromUtf8(u8"«Name»"), sValue);
+    CPPUNIT_ASSERT_EQUAL(OUString(u"«Name»"), sValue);
 
     uno::Reference<beans::XPropertySet> xFiledMaster = xDependent->getTextFieldMaster();
     uno::Reference<lang::XServiceInfo> xFiledMasterServiceInfo(xFiledMaster, uno::UNO_QUERY_THROW);
diff --git a/sw/qa/extras/ww8export/ww8export2.cxx b/sw/qa/extras/ww8export/ww8export2.cxx
index 004451247cdf..5b60fb1b87be 100644
--- a/sw/qa/extras/ww8export/ww8export2.cxx
+++ b/sw/qa/extras/ww8export/ww8export2.cxx
@@ -538,7 +538,7 @@ DECLARE_WW8EXPORT_TEST(testTdf67207_MERGEFIELD, "mailmerge.doc")
     CPPUNIT_ASSERT(xServiceInfo->supportsService("com.sun.star.text.TextField.Database"));
     OUString sValue;
     xTextField->getPropertyValue("Content") >>= sValue;
-    CPPUNIT_ASSERT_EQUAL(OUString::fromUtf8(u8"«Name»"), sValue);
+    CPPUNIT_ASSERT_EQUAL(OUString(u"«Name»"), sValue);
 
     uno::Reference<beans::XPropertySet> xFiledMaster = xDependent->getTextFieldMaster();
     uno::Reference<lang::XServiceInfo> xFiledMasterServiceInfo(xFiledMaster, uno::UNO_QUERY_THROW);
diff --git a/vcl/qa/cppunit/complextext.cxx b/vcl/qa/cppunit/complextext.cxx
index ad8f645b3b6f..6cb8aceb6618 100644
--- a/vcl/qa/cppunit/complextext.cxx
+++ b/vcl/qa/cppunit/complextext.cxx
@@ -125,7 +125,7 @@ void VclComplexTextTest::testKashida()
     // Cache the glyph list of some Arabic text.
     ScopedVclPtrInstance<VirtualDevice> pOutputDevice;
     auto aText
-        = OUString::fromUtf8(u8"ﻊﻨﺻﺭ ﺎﻠﻓﻮﺴﻓﻭﺭ ﻊﻨﺻﺭ ﻒﻟﺰﻳ ﺺﻠﺑ. ﺖﺘﻛﻮﻧ ﺎﻟﺩﻭﺭﺓ ﺎﻟﺭﺎﺒﻋﺓ ﻢﻧ ١٥ ﻊﻨﺻﺭﺍ.");
+        = OUString(u"ﻊﻨﺻﺭ ﺎﻠﻓﻮﺴﻓﻭﺭ ﻊﻨﺻﺭ ﻒﻟﺰﻳ ﺺﻠﺑ. ﺖﺘﻛﻮﻧ ﺎﻟﺩﻭﺭﺓ ﺎﻟﺭﺎﺒﻋﺓ ﻢﻧ ١٥ ﻊﻨﺻﺭﺍ.");
     std::unique_ptr<SalLayout> pLayout = pOutputDevice->ImplLayout(
         aText, 0, aText.getLength(), Point(0, 0), 0, nullptr, SalLayoutFlags::GlyphItemsOnly);
     const SalLayoutGlyphs* pGlyphs = pLayout->GetGlyphs();


More information about the Libreoffice-commits mailing list