[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - sc/qa
Dennis Francis (via logerrit)
logerrit at kemper.freedesktop.org
Wed Aug 18 11:55:59 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 561fabd9429157451c815454daeb7e07da47be32
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 13:55:21 2021 +0200
unit test for escaped unicode chars in strings import
Change-Id: I4c4190538bdcb3292546d6d5884eb7900807060c
Signed-off-by: Dennis Francis <dennis.francis at collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120623
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
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 0d2f55dcd184..9ca62e64f1e3 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -254,6 +254,7 @@ public:
void testAutoheight2Rows();
void testXLSDefColWidth();
void testPreviewMissingObjLink();
+ void testEscapedUnicodeXLSX();
CPPUNIT_TEST_SUITE(ScFiltersTest);
CPPUNIT_TEST(testBooleanFormatXLSX);
@@ -397,6 +398,7 @@ public:
CPPUNIT_TEST(testAutoheight2Rows);
CPPUNIT_TEST(testXLSDefColWidth);
CPPUNIT_TEST(testPreviewMissingObjLink);
+ CPPUNIT_TEST(testEscapedUnicodeXLSX);
CPPUNIT_TEST_SUITE_END();
@@ -4370,6 +4372,17 @@ void ScFiltersTest::testPreviewMissingObjLink()
xDocSh->DoClose();
}
+void ScFiltersTest::testEscapedUnicodeXLSX()
+{
+ ScDocShellRef xDocSh = loadDoc("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