summaryrefslogtreecommitdiff
path: root/sw/qa/extras
diff options
context:
space:
mode:
Diffstat (limited to 'sw/qa/extras')
-rw-r--r--sw/qa/extras/odfexport/data/tdf124470TableAndEmbeddedUsedFonts.odtbin0 -> 10880 bytes
-rw-r--r--sw/qa/extras/odfexport/odfexport.cxx18
2 files changed, 18 insertions, 0 deletions
diff --git a/sw/qa/extras/odfexport/data/tdf124470TableAndEmbeddedUsedFonts.odt b/sw/qa/extras/odfexport/data/tdf124470TableAndEmbeddedUsedFonts.odt
new file mode 100644
index 000000000000..21969e9e5485
--- /dev/null
+++ b/sw/qa/extras/odfexport/data/tdf124470TableAndEmbeddedUsedFonts.odt
Binary files differ
diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx
index 443492c4b42b..293252176a05 100644
--- a/sw/qa/extras/odfexport/odfexport.cxx
+++ b/sw/qa/extras/odfexport/odfexport.cxx
@@ -2539,5 +2539,23 @@ DECLARE_ODFEXPORT_TEST(testPageContentBottom, "page-content-bottom.odt")
CPPUNIT_ASSERT_EQUAL(nExpected, getProperty<sal_Int16>(xShape, "VertOrientRelation"));
}
+DECLARE_ODFEXPORT_TEST(tdf124470, "tdf124470TableAndEmbeddedUsedFonts.odt")
+{
+ // Table styles were exported out of place, inside font-face-decls.
+ // Without the fix in place, this will fail already in ODF validation:
+ // "content.xml[2,2150]: Error: tag name "style:style" is not allowed. Possible tag names are: <font-face>"
+
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+
+ xmlDocUniquePtr pXmlDoc = parseExport("content.xml");
+ if (!pXmlDoc)
+ return;
+
+ assertXPath(pXmlDoc, "/office:document-content/office:font-face-decls/style:style", 0);
+ assertXPath(pXmlDoc, "/office:document-content/office:automatic-styles/style:style[@style:family='table']", 1);
+ assertXPath(pXmlDoc, "/office:document-content/office:automatic-styles/style:style[@style:family='table-column']", 2);
+ assertXPath(pXmlDoc, "/office:document-content/office:automatic-styles/style:style[@style:family='paragraph']", 1);
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */