diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-11-05 11:11:45 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2014-11-23 14:32:20 +0100 |
commit | 1ba2cf706fad300a54fc933381adf3fa560e69a6 (patch) | |
tree | 3fc630a190c6336defc518f510b3334852e8c4b6 /oox/source | |
parent | 1333983411dcd3a752de823030f317db68805234 (diff) |
fdo#79731 fdo#85813 drawingML export: fix handling of impress tables
(cherry picked from commit 02e52b15908a6d89b4aeb3c349e7414240eb9563)
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Conflicts:
oox/source/export/drawingml.cxx
sd/qa/unit/export-tests.cxx
Change-Id: Ia17b14c4b27e808ceab388aa33602875e67433a5
Diffstat (limited to 'oox/source')
-rw-r--r-- | oox/source/export/drawingml.cxx | 13 |
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) { |