summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-11-05 11:11:45 +0100
committerAndras Timar <andras.timar@collabora.com>2014-11-12 09:02:15 +0100
commitf597199442bac978c38704705a15af4cb0ab6af2 (patch)
treebd232c78728c20dc84d60a3bd0a944d3178c7e43 /oox
parentd2a617aac6466e246de6209731791c1ce835ee62 (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')
-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)
{