summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorRegina Henschel <rb.henschel@t-online.de>2021-04-11 13:03:27 +0200
committerMiklos Vajna <vmiklos@collabora.com>2021-04-22 10:12:32 +0200
commit2a70cfb09c4d89154d229b6a95cf076e8bd76798 (patch)
tree1b77568a3a80390046a685e794fce267ec35835d /oox
parent1b1a9c6c12ebe4cac19e34ff5e4818998bbb2537 (diff)
tdf#141540 fix docx import of group or line with rotation
... and fix case wrap 'Square' and 'in Line' with them. Non-uniform scaling of a rotated shape might produce skew. Such had happened, when setting group or line to the size contained in GraphicImport. Avoid it. Writer has special rules for shape position and marging in case of wrap 'Square' and 'in Line', depending on rotation angle. The patch adds the needed margins. The patch changes some unit tests where we now get slightly different values. The patch fixes the wrong skew in sample document of tdf#73022. Change-Id: Ic743790c3fc8b8b10a4324d9e0184ad945cdceb6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114193 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'oox')
-rw-r--r--oox/source/drawingml/shape.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index 729fb3c3712f..49f82a6fd137 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -982,6 +982,10 @@ Reference< XShape > const & Shape::createAndInsert(
// TODO: use ph color when applying effect properties
//sal_Int32 nEffectPhClr = -1;
+ // dmapper needs the original rotation angle for calculating square wrap. This angle is not
+ // available as property there, so store it in InteropGrabBag.
+ putPropertyToGrabBag("mso-rotation-angle", Any(mnRotation));
+
if( pTheme )
{
if( const ShapeStyleRef* pLineRef = getShapeStyleRef( XML_lnRef ) )