summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
Diffstat (limited to 'oox')
-rw-r--r--oox/source/drawingml/shape.cxx11
-rw-r--r--oox/source/export/drawingml.cxx6
2 files changed, 14 insertions, 3 deletions
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index 1276c9743a33..534317298501 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -418,7 +418,9 @@ Reference< XShape > Shape::createAndInsert(
aServiceName == "com.sun.star.drawing.ConnectorShape" );
bool bUseRotationTransform = ( !mbWps ||
aServiceName == "com.sun.star.drawing.LineShape" ||
- aServiceName == "com.sun.star.drawing.GroupShape" );
+ aServiceName == "com.sun.star.drawing.GroupShape" ||
+ mbFlipH ||
+ mbFlipV );
basegfx::B2DHomMatrix aTransformation;
@@ -458,7 +460,10 @@ Reference< XShape > Shape::createAndInsert(
if( maPosition.X != 0 || maPosition.Y != 0)
{
// if global position is used, add it to transformation
- aTransformation.translate( maPosition.X, maPosition.Y );
+ if (mbWps && aParentTransformation.isIdentity())
+ aTransformation.translate( maPosition.X * 360, maPosition.Y * 360);
+ else
+ aTransformation.translate( maPosition.X, maPosition.Y );
}
aTransformation = aParentTransformation*aTransformation;
@@ -986,7 +991,7 @@ Reference< XShape > Shape::createAndInsert(
// These can have a custom geometry, so position should be set here,
// after creation but before custom shape handling, using the position
// we got from the caller.
- if (mbWps && aServiceName != "com.sun.star.text.TextFrame")
+ if (mbWps && aServiceName == "com.sun.star.drawing.LineShape")
mxShape->setPosition(maPosition);
if( bIsCustomShape )
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 0ca30540dc0e..066049858a4b 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -1169,7 +1169,13 @@ void DrawingML::WriteShapeTransformation( Reference< XShape > rXShape, sal_Int32
}
if (!bSuppressRotation)
{
+ // See SdrObjCustomShape::NbcRotate().
+ int nSwap = 0;
+ if (bFlipH)
+ nSwap ^= 1;
if (bFlipV)
+ nSwap ^= 1;
+ if (nSwap)
{
nRotation=(nRotation+18000)%36000;
}