Kaydet (Commit) b45de3ce authored tarafından Miklos Vajna's avatar Miklos Vajna

Use oox::drawingml::EMU_PER_HMM

Change-Id: I2034f862b5e15ffaa2ba370ae0249628677c587d
üst 1253b909
...@@ -401,7 +401,7 @@ Reference< XShape > Shape::createAndInsert( ...@@ -401,7 +401,7 @@ Reference< XShape > Shape::createAndInsert(
bool bIsEmbMedia = false; bool bIsEmbMedia = false;
SAL_INFO("oox.drawingml", OSL_THIS_FUNC << " id: " << msId); SAL_INFO("oox.drawingml", OSL_THIS_FUNC << " id: " << msId);
awt::Rectangle aShapeRectHmm( maPosition.X / 360, maPosition.Y / 360, maSize.Width / 360, maSize.Height / 360 ); awt::Rectangle aShapeRectHmm( maPosition.X / EMU_PER_HMM, maPosition.Y / EMU_PER_HMM, maSize.Width / EMU_PER_HMM, maSize.Height / EMU_PER_HMM );
OUString aServiceName; OUString aServiceName;
if( rServiceName == "com.sun.star.drawing.GraphicObjectShape" && if( rServiceName == "com.sun.star.drawing.GraphicObjectShape" &&
...@@ -461,14 +461,14 @@ Reference< XShape > Shape::createAndInsert( ...@@ -461,14 +461,14 @@ Reference< XShape > Shape::createAndInsert(
{ {
// if global position is used, add it to transformation // if global position is used, add it to transformation
if (mbWps && aParentTransformation.isIdentity()) if (mbWps && aParentTransformation.isIdentity())
aTransformation.translate( maPosition.X * 360, maPosition.Y * 360); aTransformation.translate( maPosition.X * EMU_PER_HMM, maPosition.Y * EMU_PER_HMM);
else else
aTransformation.translate( maPosition.X, maPosition.Y ); aTransformation.translate( maPosition.X, maPosition.Y );
} }
aTransformation = aParentTransformation*aTransformation; aTransformation = aParentTransformation*aTransformation;
aParentTransformation = aTransformation; aParentTransformation = aTransformation;
aTransformation.scale(1/360.0, 1/360.0); aTransformation.scale(1/double(EMU_PER_HMM), 1/double(EMU_PER_HMM));
// special for lineshape // special for lineshape
if ( aServiceName == "com.sun.star.drawing.LineShape" ) if ( aServiceName == "com.sun.star.drawing.LineShape" )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment