From 83c30743eaf44d8eded4a73e3ac2585b5bdbaffc Mon Sep 17 00:00:00 2001 From: Regényi Balázs Date: Mon, 7 Sep 2020 19:54:19 +0200 Subject: tdf#77236 DOCX shape export: fix missing solidFill MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (resulting for example, invisible shapes). Co-authored-by: Szabolcs Tóth Change-Id: I328514022f4a594c374d5a97db39d1cf3a954e02 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102195 Tested-by: László Németh Reviewed-by: László Németh --- .../ooxmlexport/data/tdf77236_MissingSolidFill.docx | Bin 0 -> 21999 bytes sw/qa/extras/ooxmlexport/ooxmlexport10.cxx | 9 +++++++++ sw/qa/extras/ooxmlexport/ooxmlexport6.cxx | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 sw/qa/extras/ooxmlexport/data/tdf77236_MissingSolidFill.docx (limited to 'sw/qa/extras') diff --git a/sw/qa/extras/ooxmlexport/data/tdf77236_MissingSolidFill.docx b/sw/qa/extras/ooxmlexport/data/tdf77236_MissingSolidFill.docx new file mode 100644 index 000000000000..2bb2c097838d Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf77236_MissingSolidFill.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx index da998b01bb5f..4f77681d2eaf 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx @@ -1338,6 +1338,15 @@ DECLARE_OOXMLEXPORT_TEST( testTdf107359, "tdf107359-char-pitch.docx" ) CPPUNIT_ASSERT_EQUAL( sal_Int32(convertTwipToMm100(24 * 20)), nBaseWidth ); } +DECLARE_OOXMLEXPORT_TEST(testTdf77236_MissingSolidFill, "tdf77236_MissingSolidFill.docx") +{ + // tdf#77236: solidFill of VML shape was not exported if the colors of line and style were the same + xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml"); + if (!pXmlDoc) + return; + assertXPath(pXmlDoc, "//mc:Choice/w:drawing/wp:inline/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:ln/a:solidFill", 1); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx index d1091c949bb6..eafdf88ea788 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx @@ -783,7 +783,7 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testShapeThemePreservation, "shape-theme-pre 0); assertXPath(pXmlDocument, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:ln/a:solidFill", - 0); + 1); // check direct theme assignments have been preserved assertXPath(pXmlDocument, -- cgit