[Libreoffice-commits] core.git: sc/qa
Xisco Fauli (via logerrit)
logerrit at kemper.freedesktop.org
Mon May 4 16:17:22 UTC 2020
sc/qa/unit/data/ods/tdf130108.ods |binary
sc/qa/unit/subsequent_export-test.cxx | 18 ++++++++++++++++++
2 files changed, 18 insertions(+)
New commits:
commit 0eac1549c9b6d84142238e62f629bd58321da727
Author: Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Mon May 4 12:56:46 2020 +0200
Commit: Xisco Faulí <xiscofauli at libreoffice.org>
CommitDate: Mon May 4 18:16:46 2020 +0200
related: tdf#130108: sc: Add unittest
The issue per se can't be tested in ScExportTest
because it's not happening when using the commandline, but the gui.
See: https://bugs.documentfoundation.org/show_bug.cgi?id=130108#c13
Still, there is no existing test for x:dxfs elements so I think
this test is still useful
Change-Id: I5fc650aedfa06416732941367b31cc18199e2cc3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93411
Tested-by: Jenkins
Reviewed-by: Xisco Faulí <xiscofauli at libreoffice.org>
diff --git a/sc/qa/unit/data/ods/tdf130108.ods b/sc/qa/unit/data/ods/tdf130108.ods
new file mode 100644
index 000000000000..7cb563e2696d
Binary files /dev/null and b/sc/qa/unit/data/ods/tdf130108.ods differ
diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx
index de4344afbb2f..260a353884d1 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -195,6 +195,7 @@ public:
void testPreserveTextWhitespace2XLSX();
void testTextDirectionXLSX();
void testTdf66668();
+ void testTdf130108();
void testTdf55417();
void testTdf129985();
void testTdf73063();
@@ -338,6 +339,7 @@ public:
CPPUNIT_TEST(testMatrixMultiplicationXLSX);
CPPUNIT_TEST(testTextDirectionXLSX);
CPPUNIT_TEST(testTdf66668);
+ CPPUNIT_TEST(testTdf130108);
CPPUNIT_TEST(testTdf55417);
CPPUNIT_TEST(testTdf129985);
CPPUNIT_TEST(testTdf73063);
@@ -4030,6 +4032,22 @@ void ScExportTest::testTdf66668()
xmlDocPtr pDoc = XPathHelper::parseExport2(*this, *xDocSh, m_xSFactory, "xl/styles.xml", FORMAT_XLSX);
CPPUNIT_ASSERT(pDoc);
+ xDocSh->DoClose();
+}
+
+void ScExportTest::testTdf130108()
+{
+ ScDocShellRef xDocSh = loadDoc("tdf130108.", FORMAT_ODS);
+ CPPUNIT_ASSERT(xDocSh.is());
+
+ xmlDocPtr pDoc = XPathHelper::parseExport2(*this, *xDocSh, m_xSFactory, "xl/styles.xml", FORMAT_XLSX);
+ CPPUNIT_ASSERT(pDoc);
+
+ assertXPath(pDoc, "/x:styleSheet/x:dxfs/x:dxf/x:font/x:b", "val", "1");
+ assertXPath(pDoc, "/x:styleSheet/x:dxfs/x:dxf/x:font/x:i", "val", "0");
+ assertXPath(pDoc, "/x:styleSheet/x:dxfs/x:dxf/x:font/x:color", "rgb", "FFFFFFFF");
+ assertXPath(pDoc, "/x:styleSheet/x:dxfs/x:dxf/x:font/x:sz", "val", "10");
+ assertXPath(pDoc, "/x:styleSheet/x:dxfs/x:dxf/x:fill/x:patternFill/x:bgColor", "rgb", "FFCC0000");
xDocSh->DoClose();
}
More information about the Libreoffice-commits
mailing list