diff options
author | Paul Trojahn <paul.trojahn@gmail.com> | 2017-08-01 15:56:48 +0200 |
---|---|---|
committer | Tamás Zolnai <tamas.zolnai@collabora.com> | 2017-08-10 17:38:20 +0200 |
commit | 3e33a2551532806b99f6c8ca415136cd3f2f9256 (patch) | |
tree | bbb764d93b878d215b2c1e7fae12ea34789f9d58 /oox/source/export | |
parent | 93a3739bf47ada4549b3c139c55a9b039c1db1ee (diff) |
tdf#109317 Fix incorrect rotation of flipped custom OOXML shapes
The shape wasn't imported correctly because IsPostRotateAngle wasn't
set. As a result the shape was flipped after it was rotated instead
of before. This commit removes 1c44b263 and converts the rotation to
the internal format instead. This also fixes that ooxml preset shapes
can't be exported to odf correctly and that ooxml preset shapes rotate
in the wrong direction when rotated in LO.
Change-Id: I9691902fdfb2cfecc8fe50d6eb66ac3880ddd4e8
Reviewed-on: https://gerrit.libreoffice.org/40789
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Diffstat (limited to 'oox/source/export')
-rw-r--r-- | oox/source/export/drawingml.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index f04c0f3273d8..0110f4c24875 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -1157,6 +1157,12 @@ void DrawingML::WriteStretch( const css::uno::Reference< css::beans::XPropertySe void DrawingML::WriteTransformation( const tools::Rectangle& rRect, sal_Int32 nXmlNamespace, bool bFlipH, bool bFlipV, sal_Int32 nRotation ) { + //OOXML flips shapes before rotating them. + if(bFlipH) + nRotation = nRotation * -1 + 60000*360; + if(bFlipV) + nRotation = nRotation * -1 + 60000*360; + mpFS->startElementNS( nXmlNamespace, XML_xfrm, XML_flipH, bFlipH ? "1" : nullptr, XML_flipV, bFlipV ? "1" : nullptr, |