diff options
author | Szabolcs Toth <toth.szabolcs@nisz.hu> | 2020-10-28 09:50:00 +0100 |
---|---|---|
committer | Balazs Varga <varga.balazs3@nisz.hu> | 2020-10-30 11:53:40 +0100 |
commit | 799522882159b839cc7aeec2fbc48f767507a30c (patch) | |
tree | 53026582651de46eb683c5f5fb5a72164d85142a /sw/qa | |
parent | dadda916d42b94936a01a7f66b5c6c63e1e00f8f (diff) |
tdf#137642 VML shape import: fix alignment from top margin
Use the new define PAGE_PRINT_AREA_TOP at import.
Everything else is handled in the previous patches.
Change-Id: Ie801ab71a33a657551dbc5bfb63d1491aaa73abd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104923
Tested-by: Jenkins
Reviewed-by: Balazs Varga <varga.balazs3@nisz.hu>
Diffstat (limited to 'sw/qa')
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/tdf137642_Vertical_Alignment_toppage.docx | bin | 0 -> 13163 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport9.cxx | 34 |
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 Binary files differnew file mode 100644 index 000000000000..fbe8b264bbc4 --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/tdf137642_Vertical_Alignment_toppage.docx 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: */ |