summaryrefslogtreecommitdiff
path: root/sc/qa
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-05-17 05:14:34 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-05-18 20:45:31 +0000
commited4410850af1e62a27db10d5f15ad98c50dedce5 (patch)
tree308a568b34509677252b8db3e11a859f91e76c48 /sc/qa
parentfc29ace3438eea09afe3ddbb5118458cbb531b06 (diff)
add test for tdf#88657
Change-Id: Iaa1fdac2afd17a9ef5fc67bc8bdde6f4690a04fc Reviewed-on: https://gerrit.libreoffice.org/25115 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'sc/qa')
-rw-r--r--sc/qa/unit/data/ods/tdf88657.odsbin0 -> 7214 bytes
-rw-r--r--sc/qa/unit/subsequent_export-test.cxx18
2 files changed, 17 insertions, 1 deletions
diff --git a/sc/qa/unit/data/ods/tdf88657.ods b/sc/qa/unit/data/ods/tdf88657.ods
new file mode 100644
index 000000000000..7bf4612bdfe5
--- /dev/null
+++ b/sc/qa/unit/data/ods/tdf88657.ods
Binary files differ
diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx
index 58d468154197..73bd06341942 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -167,6 +167,8 @@ public:
void testRefStringUnspecified();
void testHeaderImage();
+ void testTdf88657();
+
CPPUNIT_TEST_SUITE(ScExportTest);
CPPUNIT_TEST(test);
#if !defined(MACOSX) && !defined(DRAGONFLY)
@@ -239,6 +241,8 @@ public:
CPPUNIT_TEST(testRefStringUnspecified);
CPPUNIT_TEST(testHeaderImage);
+ CPPUNIT_TEST(testTdf88657);
+
CPPUNIT_TEST_SUITE_END();
private:
@@ -267,7 +271,8 @@ void ScExportTest::registerNamespaces(xmlXPathContextPtr& pXmlXPathCtx)
{ BAD_CAST("xlink"), BAD_CAST("http://www.w3c.org/1999/xlink") },
{ BAD_CAST("xdr"), BAD_CAST("http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing") },
{ BAD_CAST("x"), BAD_CAST("http://schemas.openxmlformats.org/spreadsheetml/2006/main") },
- { BAD_CAST("r"), BAD_CAST("http://schemas.openxmlformats.org/package/2006/relationships") }
+ { BAD_CAST("r"), BAD_CAST("http://schemas.openxmlformats.org/package/2006/relationships") },
+ { BAD_CAST("number"), BAD_CAST("urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0") }
};
for(size_t i = 0; i < SAL_N_ELEMENTS(aNamespaces); ++i)
{
@@ -3275,6 +3280,17 @@ void ScExportTest::testTextDirection()
assertXPath(pDoc, "/x:styleSheet/x:cellXfs/x:xf[3]/x:alignment", "readingOrder", "2");//RTL
}
+void ScExportTest::testTdf88657()
+{
+ ScDocShellRef xDocSh = loadDoc("tdf88657.", FORMAT_ODS);
+ CPPUNIT_ASSERT(xDocSh.Is());
+
+ xmlDocPtr pDoc = XPathHelper::parseExport(*xDocSh, m_xSFactory, "styles.xml", FORMAT_ODS);
+ CPPUNIT_ASSERT(pDoc);
+
+ assertXPath(pDoc, "//number:fraction", "min-denominator-digits", "3");
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(ScExportTest);
CPPUNIT_PLUGIN_IMPLEMENT();