diff options
author | Attila Bakos (NISZ) <bakos.attilakaroly@nisz.hu> | 2021-06-24 10:03:28 +0200 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2021-07-02 11:03:17 +0200 |
commit | a871b36c3ba92e289367096aa0b44416b605d7e8 (patch) | |
tree | c055457aba197f50265c87e560ec674b4196a235 /sw | |
parent | f4d6a3a7142f2f11e8c58b9fb32d05f66fa69685 (diff) |
tdf#143028 DOCX: fix corrupt export of shape "bracePair" etc.
Regression from commit 63cd67e5e18f01aca303131e148c80398a181a41
(tdf#92525 tdf#142398: fix export of simple custom shapes)
Missing property in the shape export property list
caused an exception. The return value false led to writing
the shape transformation again, resulting a corrupt DOCX file.
Optional values have been introduced and if one of the
required value is unset, writing of the transformation
happens only once.
Thanks to Regina Henschel for reporting the problem.
(cherry-picked from commit 99a459dfdfd9f82ed3506708e131dd52a1a62384
"tdf#143028 DOCX: fix corrupt export of shape "bracePair" etc."
and commit e190196f255b7d0147d61fd967a2b2a61a932185
"tdf#143028 DOCX export: fix RangeY regression of preset shapes")
Change-Id: Ifcb81a5df9dc568f8f21c39e072d58009ed04237
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118232
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/fail_bracePair.odt | bin | 0 -> 9394 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport15.cxx | 10 |
2 files changed, 10 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/fail_bracePair.odt b/sw/qa/extras/ooxmlexport/data/fail_bracePair.odt Binary files differnew file mode 100644 index 000000000000..adab115eb0ac --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/fail_bracePair.odt diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx index f97f1837a0c5..bcf763ab4a0c 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx @@ -919,6 +919,16 @@ DECLARE_OOXMLEXPORT_TEST(TestTdf132483, "tdf132483.docx") text::RelOrientation::PAGE_FRAME , nHRelPos); } +DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(TestTdf143028, "fail_bracePair.odt") +{ + auto pExportXml = parseExport(); + + CPPUNIT_ASSERT_EQUAL(1, getXPathNode( + pExportXml, "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/" + "a:graphic/a:graphicData/wps:wsp/wps:spPr/a:xfrm")->nodesetval->nodeNr); + +} + DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testRelativeAnchorHeightFromBottomMarginNoFooter, "tdf133070_testRelativeAnchorHeightFromBottomMarginNoFooter.docx") { |