office-gobmx/oox/qa/unit/data/tdf141786_PolylineConnectorInGroup.odt
Regina Henschel b33634a5c0 tdf#141786 correct position of child elements in group
...in export to docx.

Rotated child elements need a correction to the position values,
because LO uses left/top of snap rectangle as position, but Word uses
left/top of unrotated shape. For the group itself it is done in
DocxSdrExport::startDMLAnchorInline. But child elements' position
is exported in DrawingML::WriteShapeTransformation. And there this
correction was missing.

Position is relative to anchor in Writer and relative to group in
Word. The adaption is contained in WriteShapeTransformation. But
PolyPolygon and Connector have no explicit rotation and therefore they
do not use DrawingML::WriteShapeTransformation but call directly
DrawingML::WriteTransformation. So they missed this adaption. I have
added the adapation directly to these shapes.

Unittest testDmlTextshapeB in sw-ooxmlexport6: I have adapted the
values. The position of the connectors relative to the group is better
now. You see this, if you compare it with a screenshot of the original
file in Word. The handles of the connectors are still wrong and the
whole group is still shifted.

The patch does not fix the wrong position of rotated legacy ovals,
because that error exists independent of groups.

Change-Id: Iaf843dcf04bac596427dd35ccfa6cd20e3a4cdc8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118748
Tested-by: Jenkins
Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
2021-07-13 10:56:31 +02:00

9.9 KiB