diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2021-04-19 20:27:32 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2021-04-20 09:01:27 +0200 |
commit | 4cb71fefc61d9015a0142f3a4fdafc5250913f2c (patch) | |
tree | 48f608e87c63c6dffc941842eb4269c098db8bd0 /sw | |
parent | 028f47cc490374264a6648a7682ff6234195b380 (diff) |
tdf#122962 DOCX drawingML export: fix polygon shape in group shape
Regression from commit cfb5b20cdc230320ff9f864d1cfd81aaea221da0
(DocxAttributeOutput::OutputFlyFrame_Impl: enable DML export by default,
2013-12-18), there were two problems here.
First, <a:chOff> and <a:chExt> was not written for docx group shapes.
This can be done for toplevel shapes just by writing what would be the
shape position and size (but for docx, we don't write the size).
Second, (poly)polygon shapes used the bounding rectangle of their points
as size, which doesn't necessarily match the shape size. Given that the
group shape is meant to simply contain its children in LibreOffice (and
not have an own size), switch to using the UNO API for polygon shapes as
well, that way the two sizes will always match.
Change-Id: I4406ddefe5f6105aa2fc74d805359add452936bb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114305
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport6.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx index ecc9198caa1c..7639e995b86a 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx @@ -126,11 +126,11 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testDmlTextshapeB, "dml-textshapeB.docx") uno::Reference<drawing::XShape> xShape(xGroup->getByIndex(3), uno::UNO_QUERY); // Connector was incorrectly shifted towards the top left corner, X was 192, Y was -5743. CPPUNIT_ASSERT_EQUAL(sal_Int32(3778), xShape->getPosition().X); - CPPUNIT_ASSERT_EQUAL(sal_Int32(-5064), xShape->getPosition().Y); + CPPUNIT_ASSERT_EQUAL(sal_Int32(-5066), xShape->getPosition().Y); xShape.set(xGroup->getByIndex(5), uno::UNO_QUERY); // This was incorrectly shifted towards the top of the page, Y was -5011. - CPPUNIT_ASSERT_EQUAL(sal_Int32(-4713), xShape->getPosition().Y); + CPPUNIT_ASSERT_EQUAL(sal_Int32(-4715), xShape->getPosition().Y); } DECLARE_OOXMLEXPORT_TEST(testDMLSolidfillAlpha, "dml-solidfill-alpha.docx") |