summaryrefslogtreecommitdiff
path: root/oox/source/export/drawingml.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'oox/source/export/drawingml.cxx')
-rw-r--r--oox/source/export/drawingml.cxx13
1 files changed, 8 insertions, 5 deletions
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 641cb4daec84..96c90c589634 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -1088,10 +1088,12 @@ void DrawingML::WriteShapeTransformation( Reference< XShape > rXShape, sal_Int32
aPos.X-=(1-faccos*cos(nRotation*F_PI18000))*aSize.Width/2-facsin*sin(nRotation*F_PI18000)*aSize.Height/2;
aPos.Y-=(1-faccos*cos(nRotation*F_PI18000))*aSize.Height/2+facsin*sin(nRotation*F_PI18000)*aSize.Width/2;
}
- }
- if (!bSuppressRotation)
- {
- if (bFlipV) {nRotation=(nRotation+18000)%36000;}
+
+ // The RotateAngle property's value is independent from any flipping, and that's exactly what we need here.
+ uno::Reference<beans::XPropertySet> xPropertySet(rXShape, uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySetInfo> xPropertySetInfo = xPropertySet->getPropertySetInfo();
+ if (xPropertySetInfo->hasPropertyByName("RotateAngle"))
+ xPropertySet->getPropertyValue("RotateAngle") >>= nRotation;
}
WriteTransformation( Rectangle( Point( aPos.X, aPos.Y ), Size( aSize.Width, aSize.Height ) ), nXmlNamespace, bFlipH, bFlipV, PPTX_EXPORT_ROTATE_CLOCKWISIFY(nRotation) );
}
@@ -1791,7 +1793,8 @@ void DrawingML::WriteText( Reference< XInterface > rXIface, bool bBodyPr, bool b
if( !enumeration.is() )
return;
- SdrObject* pSdrObject = GetSdrObjectFromXShape(uno::Reference<drawing::XShape>(rXIface, uno::UNO_QUERY_THROW));
+ uno::Reference<drawing::XShape> xShape(rXIface, uno::UNO_QUERY);
+ SdrObject* pSdrObject = xShape.is() ? GetSdrObjectFromXShape(xShape) : 0;
const SdrTextObj* pTxtObj = PTR_CAST(SdrTextObj, pSdrObject);
if (pTxtObj && mpTextExport)
{