diff options
author | Attila Bakos <bakos.attilakaroly@nisz.hu> | 2020-05-14 15:48:21 +0200 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2020-06-10 11:12:16 +0200 |
commit | 4bdff3c731a9f8ef11ffdae804a99a47f119ee50 (patch) | |
tree | 18a31830751129f5b7fd1b40bf966056b358703b /sw/qa | |
parent | a977df3015f84506a3636d278b981cb2bd12083b (diff) |
tdf#133065 tdf#133602 DOCX export: fix OLE wrap regression
caused by commit 2150fdc7d0f63288ac56c33cb898589512057642
(tdf#131539 DOCX export: fix position of OLE objects).
The wrap setting of the anchored OLE object were
not preserved.
Note: It needs also z-order export for background mode.
Co-authored-by: Tibor Nagy
Change-Id: I7f8c48019157dda00bcc97a490c5f582eccf1b22
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94220
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sw/qa')
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/tdf133065.odt | bin | 0 -> 64161 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport14.cxx | 28 | ||||
-rw-r--r-- | sw/qa/inc/swmodeltestbase.hxx | 1 |
3 files changed, 29 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf133065.odt b/sw/qa/extras/ooxmlexport/data/tdf133065.odt Binary files differnew file mode 100644 index 000000000000..a5e1b3587a5d --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/tdf133065.odt diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx index 43cdd62d5b20..e2c5f0dbf9b6 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx @@ -114,6 +114,34 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf123873, "tdf123873.docx") p_XmlDoc, "/w:document/w:body/w:p[2]/w:r[2]/w:drawing/wp:anchor/wp:wrapTopAndBottom"); } +DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(Tdf133065, "tdf133065.odt") +{ + auto pxmldoc = parseExport("word/document.xml"); + CPPUNIT_ASSERT(pxmldoc); + OUString aVal; + + aVal = getXPath(pxmldoc, "/w:document/w:body/w:p[3]/w:r[2]/w:object/v:shape/w10:wrap", "type"); + CPPUNIT_ASSERT(aVal.indexOf("square") > -1); + aVal = getXPath(pxmldoc, "/w:document/w:body/w:p[3]/w:r[2]/w:object/v:shape/w10:wrap", "side"); + CPPUNIT_ASSERT(aVal.indexOf("left") > -1); + + aVal = getXPath(pxmldoc, "/w:document/w:body/w:p[8]/w:r[2]/w:object/v:shape/w10:wrap", "type"); + CPPUNIT_ASSERT(aVal.indexOf("square") > -1); + aVal = getXPath(pxmldoc, "/w:document/w:body/w:p[8]/w:r[2]/w:object/v:shape/w10:wrap", "side"); + CPPUNIT_ASSERT(aVal.indexOf("right") > -1); + + aVal = getXPath(pxmldoc, "/w:document/w:body/w:p[12]/w:r[2]/w:object/v:shape/w10:wrap", "type"); + CPPUNIT_ASSERT(aVal.indexOf("square") > -1); + aVal = getXPath(pxmldoc, "/w:document/w:body/w:p[12]/w:r[2]/w:object/v:shape/w10:wrap", "side"); + CPPUNIT_ASSERT(aVal.indexOf("largest") > -1); + + aVal = getXPath(pxmldoc, "/w:document/w:body/w:p[20]/w:r[2]/w:object/v:shape/w10:wrap", "type"); + CPPUNIT_ASSERT(aVal.indexOf("topAndBottom") > -1); + + aVal = getXPath(pxmldoc, "/w:document/w:body/w:p[24]/w:r[2]/w:object/v:shape/w10:wrap", "type"); + CPPUNIT_ASSERT(aVal.indexOf("square") > -1); +} + DECLARE_OOXMLEXPORT_TEST(testTdf130814model, "tdf130814.docx") { CPPUNIT_ASSERT_EQUAL(sal_Int32(0x1F497D), getProperty<sal_Int32>(getRun(getParagraph(2), 1), "CharColor")); diff --git a/sw/qa/inc/swmodeltestbase.hxx b/sw/qa/inc/swmodeltestbase.hxx index 32db863d5d3d..8265801f36f8 100644 --- a/sw/qa/inc/swmodeltestbase.hxx +++ b/sw/qa/inc/swmodeltestbase.hxx @@ -989,6 +989,7 @@ protected: xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("a14"), BAD_CAST("http://schemas.microsoft.com/office/drawing/2010/main")); xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("c"), BAD_CAST("http://schemas.openxmlformats.org/drawingml/2006/chart")); xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("o"), BAD_CAST("urn:schemas-microsoft-com:office:office")); + xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("w10"), BAD_CAST("urn:schemas-microsoft-com:office:word")); // odt xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("office"), BAD_CAST("urn:oasis:names:tc:opendocument:xmlns:office:1.0")); xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("style"), BAD_CAST("urn:oasis:names:tc:opendocument:xmlns:style:1.0")); |