summaryrefslogtreecommitdiff
path: root/sw/qa/extras/ooxmlexport
diff options
context:
space:
mode:
Diffstat (limited to 'sw/qa/extras/ooxmlexport')
-rw-r--r--sw/qa/extras/ooxmlexport/data/hello.docmbin0 -> 12709 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport9.cxx33
2 files changed, 33 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/hello.docm b/sw/qa/extras/ooxmlexport/data/hello.docm
new file mode 100644
index 000000000000..a00aa58e7ba5
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/hello.docm
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
index 8e263e2c9f3d..9d1a5e161fcc 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
@@ -39,6 +39,15 @@ protected:
}
};
+class DocmTest : public SwModelTestBase
+{
+public:
+ DocmTest()
+ : SwModelTestBase("/sw/qa/extras/ooxmlexport/data/", "MS Word 2007 XML VBA")
+ {
+ }
+};
+
DECLARE_OOXMLEXPORT_TEST(testFdo55381, "fdo55381.docx")
{
uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY);
@@ -49,6 +58,30 @@ DECLARE_OOXMLEXPORT_TEST(testFdo55381, "fdo55381.docx")
//TODO: frames not located on the correct pages
}
+DECLARE_OOXMLEXPORT_TEST(testDocm, "hello.docm")
+{
+ // Make sure that we check the name of the export filter.
+ // This was application/vnd.ms-word.document.macroEnabled.main+xml when the
+ // name of the import filter was checked.
+ if (xmlDocPtr pXmlDoc = parseExport("[Content_Types].xml"))
+ assertXPath(pXmlDoc,
+ "/ContentType:Types/ContentType:Override[@PartName='/word/document.xml']",
+ "ContentType",
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml");
+}
+
+DECLARE_SW_ROUNDTRIP_TEST(testDocmSave, "hello.docm", nullptr, DocmTest)
+{
+ // This was
+ // application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml,
+ // we used the wrong content type for .docm files.
+ if (xmlDocPtr pXmlDoc = parseExport("[Content_Types].xml"))
+ assertXPath(pXmlDoc,
+ "/ContentType:Types/ContentType:Override[@PartName='/word/document.xml']",
+ "ContentType",
+ "application/vnd.ms-word.document.macroEnabled.main+xml");
+}
+
DECLARE_OOXMLEXPORT_TEST(testTdf92045, "tdf92045.docx")
{
// This was true, <w:effect w:val="none"/> resulted in setting the blinking font effect.