diff options
author | Regényi Balázs <regenyi.balazs@nisz.hu> | 2020-10-12 09:58:35 +0200 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2020-10-13 15:19:57 +0200 |
commit | 9310e47e2ce71348a16e5412131946348833f4b2 (patch) | |
tree | 773c629522862d5382789325f78a46a12a042046 /sw | |
parent | c35db66435cfecaa957b469d96ca70a31187a224 (diff) |
tdf#101122 DOCX custom shape export: remove bad fill
of (simplified export) of not filled custom shapes by
adding missing fill="none" to a:path.
Note: in OpenDocument, unfilled shape path is defined
by draw:enhanced-path command "F", see section 19.145
in ODF v1.2.
Co-authored-by: Szabolcs Tóth
Change-Id: I0be2aada3deb06828216e0441c91c389a673f87c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104205
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/tdf101122_noFillForCustomShape.odt | bin | 0 -> 15232 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport11.cxx | 16 |
2 files changed, 16 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf101122_noFillForCustomShape.odt b/sw/qa/extras/ooxmlexport/data/tdf101122_noFillForCustomShape.odt Binary files differnew file mode 100644 index 000000000000..8cc2a13f85e8 --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/tdf101122_noFillForCustomShape.odt diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx index 6e4560493d87..f26d7570d38a 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx @@ -1380,6 +1380,22 @@ DECLARE_OOXMLEXPORT_TEST(testTdf67207_MERGEFIELD_DATABASE, "tdf67207.docx") CPPUNIT_ASSERT_EQUAL(OUString("com.sun.star.text.fieldmaster.DataBase.database.Sheet1.c1"), sValue); } +DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf101122_noFillForCustomShape, "tdf101122_noFillForCustomShape.odt") +{ + // tdf#101122 check whether the "F" (noFill) option has been exported to docx + 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/" + "a:graphic/a:graphicData/wps:wsp/wps:spPr/a:custGeom/a:pathLst/a:path", + "fill", "none"); + assertXPathNoAttribute( + pXmlDoc, + "/w:document/w:body/w:p/w:r/mc:AlternateContent[2]/mc:Choice/w:drawing/wp:anchor/a:graphic/" + "a:graphicData/wps:wsp/wps:spPr/a:custGeom/a:pathLst/a:path", + "fill"); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |