[Libreoffice-commits] core.git: oox/source

Miklos Vajna vmiklos at collabora.co.uk
Sat Sep 27 11:06:30 PDT 2014


 oox/source/drawingml/shape.cxx |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit b45de3ceabe258a087c55ff3f031e1d4b2d3e14c
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Sat Sep 27 14:52:21 2014 +0200

    Use oox::drawingml::EMU_PER_HMM
    
    Change-Id: I2034f862b5e15ffaa2ba370ae0249628677c587d

diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index 5343172..96b9129 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -401,7 +401,7 @@ Reference< XShape > Shape::createAndInsert(
     bool bIsEmbMedia = false;
     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;
     if( rServiceName == "com.sun.star.drawing.GraphicObjectShape" &&
@@ -461,14 +461,14 @@ Reference< XShape > Shape::createAndInsert(
     {
         // if global position is used, add it to transformation
         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
             aTransformation.translate( maPosition.X, maPosition.Y );
     }
 
     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
     if ( aServiceName == "com.sun.star.drawing.LineShape" )


More information about the Libreoffice-commits mailing list