summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.com>2014-02-28 14:25:27 +0100
committerTomaž Vajngerl <tomaz.vajngerl@collabora.com>2014-02-28 20:24:39 +0100
commit79341203763b5cbcd8fee675588a0788b06af2fd (patch)
tree327ab2be3527bf61467ead9800edc6dbfd87ddc6
parenta783421ef0ecb53b7f4240f5a5e4116d3e9963b3 (diff)
ooxml: rountrip test for w:compatSettings and mc:Ignorable
Change-Id: I69a602f3a5eb83f116113b1dbe8bb9f208bd5e5d
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport.cxx38
1 files changed, 38 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index 69311caa963d..06b6fa5193e8 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -2881,6 +2881,44 @@ DECLARE_OOXMLEXPORT_TEST(testW14TextEffects_StylisticSets_CntxtAlts, "TextEffect
}
+DECLARE_OOXMLEXPORT_TEST(testMcIgnorable, "TextEffects_StylisticSets_CntxtAlts.docx")
+{
+ xmlDocPtr pXmlDoc = parseExport("word/document.xml");
+ if (!pXmlDoc)
+ return;
+
+ assertXPath(pXmlDoc, "/w:document", "Ignorable", "w14 wp14");
+}
+
+DECLARE_OOXMLEXPORT_TEST(testCompatSettingsForW14, "TextEffects_StylisticSets_CntxtAlts.docx")
+{
+ xmlDocPtr pXmlDoc = parseExport("word/settings.xml");
+ if (!pXmlDoc)
+ return;
+
+ assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting", 5);
+
+ assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[1]", "name", "compatibilityMode");
+ assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[1]", "uri", "http://schemas.microsoft.com/office/word");
+ assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[1]", "val", "15"); // document was made with Word2013 -> 15
+
+ assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[2]", "name", "overrideTableStyleFontSizeAndJustification");
+ assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[2]", "uri", "http://schemas.microsoft.com/office/word");
+ assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[2]", "val", "1");
+
+ assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[3]", "name", "enableOpenTypeFeatures");
+ assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[3]", "uri", "http://schemas.microsoft.com/office/word");
+ assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[3]", "val", "1");
+
+ assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[4]", "name", "doNotFlipMirrorIndents");
+ assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[4]", "uri", "http://schemas.microsoft.com/office/word");
+ assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[4]", "val", "1");
+
+ assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[5]", "name", "differentiateMultirowTableHeaders");
+ assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[5]", "uri", "http://schemas.microsoft.com/office/word");
+ assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[5]", "val", "1");
+}
+
#endif
CPPUNIT_PLUGIN_IMPLEMENT();