sc/qa/unit/subsequent_export_test2.cxx  |    9 ++-------
 sc/qa/unit/subsequent_filters_test2.cxx |    3 +--
 sc/qa/unit/ucalc.cxx                    |    4 ++--
 3 files changed, 5 insertions(+), 11 deletions(-)

New commits:
commit 2a1ea77eebed14c86b170c0845f0eb5330fd6a0c
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Wed Oct 12 18:18:57 2022 +0200
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Wed Oct 12 20:22:43 2022 +0200

    sc: qa: avoid OUStringChar for better readability
    
    Change-Id: Idf730e05d2ebec9003a2a4700b43b8658d858b03
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141265
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/sc/qa/unit/subsequent_export_test2.cxx 
b/sc/qa/unit/subsequent_export_test2.cxx
index 17e5da80eabb..71466d7ee720 100644
--- a/sc/qa/unit/subsequent_export_test2.cxx
+++ b/sc/qa/unit/subsequent_export_test2.cxx
@@ -909,20 +909,15 @@ void ScExportTest2::testEscapeCharInNumberFormatXLSX()
         = XPathHelper::parseExport2(*this, *xDocSh, m_xSFactory, 
"xl/styles.xml", FORMAT_XLSX);
     CPPUNIT_ASSERT(pDoc);
 
-    const sal_Unicode cEuro(8364); // € symbol
     assertXPath(pDoc, "/x:styleSheet/x:numFmts/x:numFmt[2]", "formatCode",
                 "00\\ 00\\ 00\\ 00\\ 00");
     assertXPath(pDoc, "/x:styleSheet/x:numFmts/x:numFmt[3]", "formatCode",
                 "00\\.00\\.00\\.000\\.0"); // tdf#81939
     // "_-* #,##0\ _€_-;\-* #,##0\ _€_-;_-* "- "_€_-;_-@_-" // tdf#81222
-    OUString rFormatStrExpected("_-* #,##0\\ _" + OUStringChar(cEuro) + 
"_-;\\-* #,##0\\ _"
-                                + OUStringChar(cEuro) + "_-;_-* \"- \"_" + 
OUStringChar(cEuro)
-                                + "_-;_-@_-");
+    OUString rFormatStrExpected(u"_-* #,##0\\ _€_-;\\-* #,##0\\ _€_-;_-* \"- 
\"_€_-;_-@_-");
     assertXPath(pDoc, "/x:styleSheet/x:numFmts/x:numFmt[4]", "formatCode", 
rFormatStrExpected);
     // "_-* #,##0" €"_-;\-* #,##0" €"_-;_-* "- €"_-;_-@_-");
-    rFormatStrExpected = "_-* #,##0\" " + OUStringChar(cEuro) + "\"_-;\\-* 
#,##0\" "
-                         + OUStringChar(cEuro) + "\"_-;_-* \"- " + 
OUStringChar(cEuro)
-                         + "\"_-;_-@_-";
+    rFormatStrExpected = u"_-* #,##0\" €\"_-;\\-* #,##0\" €\"_-;_-* \"- 
€\"_-;_-@_-";
     assertXPath(pDoc, "/x:styleSheet/x:numFmts/x:numFmt[5]", "formatCode", 
rFormatStrExpected);
     // remove escape char in fraction
     assertXPath(pDoc, "/x:styleSheet/x:numFmts/x:numFmt[6]", "formatCode",
diff --git a/sc/qa/unit/subsequent_filters_test2.cxx 
b/sc/qa/unit/subsequent_filters_test2.cxx
index 8c77721cc790..2a7bdb65f843 100644
--- a/sc/qa/unit/subsequent_filters_test2.cxx
+++ b/sc/qa/unit/subsequent_filters_test2.cxx
@@ -2323,8 +2323,7 @@ void ScFiltersTest2::testTdf70455()
     // Without the fix in place, this test would have failed with
     // - Expected: €780.00
     // - Actual  : Err:509
-    CPPUNIT_ASSERT_EQUAL(OUString(OUStringChar(u'\x20AC') + "780.00"),
-                         rDoc.GetString(ScAddress(7, 7, 0)));
+    CPPUNIT_ASSERT_EQUAL(OUString(u"€780.00"), rDoc.GetString(ScAddress(7, 7, 
0)));
     xDocSh->DoClose();
 }
 
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index d821a146eef8..18a7be1af068 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -693,14 +693,14 @@ void Test::testTdf114406()
 void Test::testTdf93951()
 {
     CPPUNIT_ASSERT(m_pDoc->InsertTab (0, "Test"));
-    m_pDoc->SetString(ScAddress(0,0,0), "=2*" + OUStringChar(u'\x00A7') + 
"*2");
+    m_pDoc->SetString(ScAddress(0,0,0), u"=2*§*2");
 
     OUString aFormula = m_pDoc->GetFormula(0,0,0);
 
     // Without the fix in place, this test would have failed with
     // - Expected: =2*§*2
     // - Actual  : =2*
-    CPPUNIT_ASSERT_EQUAL(OUString("=2*" + OUStringChar(u'\x00A7') + "*2"), 
aFormula);
+    CPPUNIT_ASSERT_EQUAL(OUString(u"=2*§*2"), aFormula);
 
     m_pDoc->DeleteTab(0);
 }

Reply via email to