diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2021-04-19 20:27:32 +0200 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2021-04-21 11:58:37 +0200 |
commit | 7b3ea547bddd08e483c49ed5b3ff822f782a0aae (patch) | |
tree | ae5582c99189b8f702f7046cea8666847d99500a /sw | |
parent | 054d0f8f5e6791d03081be7be19abeaad8aab918 (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>
(cherry picked from commit 4cb71fefc61d9015a0142f3a4fdafc5250913f2c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114279
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
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 d7bdc09c0c34..a8477c523e53 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") |