summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2017-09-06 16:33:31 +0200
committerJan Holesovsky <kendy@collabora.com>2017-09-06 16:56:55 +0200
commit3595090d6a64de78a40f7d45c0088359d9d49f7b (patch)
tree6244f6ef9b2d44ccccb4ab7582015b4d8974e8a6 /oox
parent9d43654080fcc5942610f57cbfec9827b9da2102 (diff)
Revert "tdf#111798 Fix deformed export of flipped custom shapes to pptx"
This work is incomplete, rather I'll fix my conflicts. This reverts commit 9c0387ef602d84d0079828f0ad4b53ada7ab1d8a. Change-Id: I20961cee4a5c28fc5486ca385974e9fcd5827dbe Reviewed-on: https://gerrit.libreoffice.org/42012 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
Diffstat (limited to 'oox')
-rw-r--r--oox/source/export/drawingml.cxx10
-rw-r--r--oox/source/export/shapes.cxx6
2 files changed, 3 insertions, 13 deletions
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index cbf3abb513d7..c8d148aeb1c2 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -1165,7 +1165,7 @@ void DrawingML::WriteTransformation( const Rectangle& rRect,
mpFS->endElementNS( nXmlNamespace, XML_xfrm );
}
-void DrawingML::WriteShapeTransformation( const Reference< XShape >& rXShape, sal_Int32 nXmlNamespace, bool bFlipH, bool bFlipV, bool bSuppressRotation, bool bSuppressFlipping )
+void DrawingML::WriteShapeTransformation( const Reference< XShape >& rXShape, sal_Int32 nXmlNamespace, bool bFlipH, bool bFlipV, bool bSuppressRotation )
{
SAL_INFO("oox.shape", "write shape transformation");
@@ -1202,14 +1202,6 @@ void DrawingML::WriteShapeTransformation( const Reference< XShape >& rXShape, sa
if (xPropertySetInfo->hasPropertyByName("RotateAngle"))
xPropertySet->getPropertyValue("RotateAngle") >>= nRotation;
}
-
- // OOXML flips shapes before rotating them.
- if(bFlipH != bFlipV)
- nRotation = nRotation * -1 + 36000;
-
- if(bSuppressFlipping)
- bFlipH = bFlipV = false;
-
WriteTransformation( Rectangle( Point( aPos.X, aPos.Y ), Size( aSize.Width, aSize.Height ) ), nXmlNamespace, bFlipH, bFlipV, OOX_DRAWINGML_EXPORT_ROTATE_CLOCKWISIFY(nRotation) );
}
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index c4edcf07f1bb..1d4f4a20a217 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -827,7 +827,7 @@ ShapeExport& ShapeExport::WriteCustomShape( const Reference< XShape >& xShape )
if (bHasHandles && bCustGeom && pShape)
{
- WriteShapeTransformation( xShape, XML_a, bFlipH, bFlipV, false, true );// do not flip, polypolygon coordinates are flipped already
+ WriteShapeTransformation( xShape, XML_a ); // do not flip, polypolygon coordinates are flipped already
tools::PolyPolygon aPolyPolygon( pShape->GetLineGeometry(true) );
sal_Int32 nRotation = 0;
// The RotateAngle property's value is independent from any flipping, and that's exactly what we need here.
@@ -835,10 +835,8 @@ ShapeExport& ShapeExport::WriteCustomShape( const Reference< XShape >& xShape )
uno::Reference<beans::XPropertySetInfo> xPropertySetInfo = xPropertySet->getPropertySetInfo();
if (xPropertySetInfo->hasPropertyByName("RotateAngle"))
xPropertySet->getPropertyValue("RotateAngle") >>= nRotation;
- // Remove rotation
- bool bInvertRotation = bFlipH != bFlipV;
if (nRotation != 0)
- aPolyPolygon.Rotate(Point(0,0), static_cast<sal_uInt16>(bInvertRotation ? nRotation/10 : 3600-nRotation/10));
+ aPolyPolygon.Rotate(Point(0,0), static_cast<sal_uInt16>(3600-nRotation/10));
WritePolyPolygon( aPolyPolygon );
}
else if (bCustGeom)