[Libreoffice-commits] core.git: sc/qa
Dennis Francis (via logerrit)
logerrit at kemper.freedesktop.org
Wed Aug 18 18:29:23 UTC 2021
sc/qa/unit/data/xlsx/escape-unicode.xlsx |binary
sc/qa/unit/subsequent_filters-test.cxx | 13 +++++++++++++
2 files changed, 13 insertions(+)
New commits:
commit d1d6c1535e51ef364a71d3d4c5bd331af88fce32
Author: Dennis Francis <dennis.francis at collabora.com>
AuthorDate: Wed Aug 18 11:51:07 2021 +0530
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Wed Aug 18 20:28:46 2021 +0200
tdf#118470: unit test for escaped unicode chars in strings import
Conflicts:
sc/qa/unit/subsequent_filters-test.cxx
Change-Id: I4c4190538bdcb3292546d6d5884eb7900807060c
Signed-off-by: Dennis Francis <dennis.francis at collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120666
Tested-by: Jenkins
Reviewed-by: Andras Timar <andras.timar at collabora.com>
diff --git a/sc/qa/unit/data/xlsx/escape-unicode.xlsx b/sc/qa/unit/data/xlsx/escape-unicode.xlsx
new file mode 100644
index 000000000000..ec43688b74b8
Binary files /dev/null and b/sc/qa/unit/data/xlsx/escape-unicode.xlsx differ
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
index c98f6ca0a439..cc7fe47271be 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -216,6 +216,7 @@ public:
void testTdf139782();
void testTdf129681();
void testTdf111974XLSM();
+ void testEscapedUnicodeXLSX();
CPPUNIT_TEST_SUITE(ScFiltersTest);
CPPUNIT_TEST(testCondFormatOperatorsSameRangeXLSX);
@@ -318,6 +319,7 @@ public:
CPPUNIT_TEST(testTdf139782);
CPPUNIT_TEST(testTdf129681);
CPPUNIT_TEST(testTdf111974XLSM);
+ CPPUNIT_TEST(testEscapedUnicodeXLSX);
CPPUNIT_TEST_SUITE_END();
@@ -3125,6 +3127,17 @@ void ScFiltersTest::testTdf129681()
void ScFiltersTest::testTdf111974XLSM() { testImportCrash(u"tdf111974.", FORMAT_XLSM); }
+void ScFiltersTest::testEscapedUnicodeXLSX()
+{
+ ScDocShellRef xDocSh = loadDoc(u"escape-unicode.", FORMAT_XLSX);
+ ScDocument& rDoc = xDocSh->GetDocument();
+
+ // Without the fix, there would be "_x000D_" after every new-line char.
+ CPPUNIT_ASSERT_EQUAL(OUString("Line 1\nLine 2\nLine 3\nLine 4"), rDoc.GetString(1, 1, 0));
+
+ xDocSh->DoClose();
+}
+
ScFiltersTest::ScFiltersTest()
: ScBootstrapFixture( "sc/qa/unit/data" )
{
More information about the Libreoffice-commits
mailing list