[Libreoffice-commits] core.git: sc/qa
Xisco Fauli (via logerrit)
logerrit at kemper.freedesktop.org
Fri Apr 16 10:29:01 UTC 2021
sc/qa/unit/data/xlsx/tdf120168.xlsx |binary
sc/qa/unit/subsequent_export-test.cxx | 19 +++++++++++++++++++
2 files changed, 19 insertions(+)
New commits:
commit 691aaa442f0c41cedf230d71fc10802c0c5508b8
Author: Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Fri Apr 16 11:19:31 2021 +0200
Commit: Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Fri Apr 16 12:28:24 2021 +0200
tdf#120168: sc_subsequent_export: Add unittest
Change-Id: I8a8cf9355fd4be0d7f22dbef3d701ede4b209623
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114200
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>
diff --git a/sc/qa/unit/data/xlsx/tdf120168.xlsx b/sc/qa/unit/data/xlsx/tdf120168.xlsx
new file mode 100644
index 000000000000..362b30595460
Binary files /dev/null and b/sc/qa/unit/data/xlsx/tdf120168.xlsx differ
diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx
index 1c17b2f527c1..138555180f41 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -202,6 +202,7 @@ public:
void testPreserveTextWhitespaceXLSX();
void testPreserveTextWhitespace2XLSX();
void testTextDirectionXLSX();
+ void testTdf120168();
void testTdf66668();
void testTdf130108();
void testTdf76949();
@@ -389,6 +390,7 @@ public:
CPPUNIT_TEST(testMoveCellAnchoredShapesODS);
CPPUNIT_TEST(testMatrixMultiplicationXLSX);
CPPUNIT_TEST(testTextDirectionXLSX);
+ CPPUNIT_TEST(testTdf120168);
CPPUNIT_TEST(testTdf66668);
CPPUNIT_TEST(testTdf130108);
CPPUNIT_TEST(testTdf76949);
@@ -4392,6 +4394,23 @@ void ScExportTest::testTextDirectionXLSX()
xDocSh->DoClose();
}
+void ScExportTest::testTdf120168()
+{
+ ScDocShellRef xDocSh = loadDoc(u"tdf120168.", FORMAT_XLSX);
+ CPPUNIT_ASSERT(xDocSh.is());
+
+ xmlDocUniquePtr pDoc = XPathHelper::parseExport2(*this, *xDocSh, m_xSFactory, "xl/styles.xml", FORMAT_XLSX);
+ CPPUNIT_ASSERT(pDoc);
+
+ // Without the fix in place, this test would have failed with
+ // - Expected: left
+ // - Actual : general
+ assertXPath(pDoc, "/x:styleSheet/x:cellXfs/x:xf[2]/x:alignment", "horizontal", "left");
+ assertXPath(pDoc, "/x:styleSheet/x:cellXfs/x:xf[3]/x:alignment", "horizontal", "right");
+
+ xDocSh->DoClose();
+}
+
void ScExportTest::testTdf66668()
{
// Would hang on exporting without the fix in place
More information about the Libreoffice-commits
mailing list