summaryrefslogtreecommitdiff
path: root/sw/qa
diff options
context:
space:
mode:
Diffstat (limited to 'sw/qa')
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf137642_Vertical_Alignment_toppage.docxbin0 -> 13163 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport9.cxx34
2 files changed, 33 insertions, 1 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf137642_Vertical_Alignment_toppage.docx b/sw/qa/extras/ooxmlexport/data/tdf137642_Vertical_Alignment_toppage.docx
new file mode 100644
index 000000000000..fbe8b264bbc4
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf137642_Vertical_Alignment_toppage.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
index 4c0dfbf9ebbb..b9f01391e3f2 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
@@ -1560,8 +1560,9 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf115557, "tdf115557.docx")
assertXPath(pXmlDoc, "//w:footnote/w:p/w:r/w:drawing", 1);
}
-DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testAlignmentRelativeFromTopMargin, "tdf137641_RelativeFromTopMargin.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testAlignmentRelativeFromTopMarginDML, "tdf137641_RelativeFromTopMargin.docx")
{
+ // Import as DML.
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
assertXPath(pXmlDoc,
@@ -1590,6 +1591,37 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testAlignmentRelativeFromTopMargin, "tdf1376
"center");
}
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testAlignmentRelativeFromTopMarginVML, "tdf137642_Vertical_Alignment_toppage.docx")
+{
+ // Import as VML.
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ assertXPath(pXmlDoc,
+ "/w:document/w:body/w:p/w:r/mc:AlternateContent[1]/mc:Choice/w:drawing/"
+ "wp:anchor/wp:positionV",
+ "relativeFrom", "topMargin");
+ assertXPathContent(pXmlDoc,
+ "/w:document/w:body/w:p/w:r/mc:AlternateContent[1]/mc:Choice/w:drawing/"
+ "wp:anchor/wp:positionV/wp:align",
+ "top");
+ assertXPath(pXmlDoc,
+ "/w:document/w:body/w:p/w:r/mc:AlternateContent[2]/mc:Choice/w:drawing/"
+ "wp:anchor/wp:positionV",
+ "relativeFrom", "topMargin");
+ assertXPathContent(pXmlDoc,
+ "/w:document/w:body/w:p/w:r/mc:AlternateContent[2]/mc:Choice/w:drawing/"
+ "wp:anchor/wp:positionV/wp:align",
+ "bottom");
+ assertXPath(pXmlDoc,
+ "/w:document/w:body/w:p/w:r/mc:AlternateContent[3]/mc:Choice/w:drawing/"
+ "wp:anchor/wp:positionV",
+ "relativeFrom", "topMargin");
+ assertXPathContent(pXmlDoc,
+ "/w:document/w:body/w:p/w:r/mc:AlternateContent[3]/mc:Choice/w:drawing/"
+ "wp:anchor/wp:positionV/wp:align",
+ "center");
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */