oox/source/drawingml/customshapeproperties.cxx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
New commits: commit c764a3d978beb2e6197a8d3f7df53d81ebf72467 Author: Armin Le Grand <a...@apache.org> Date: Fri Apr 25 12:56:19 2014 +0000 Resolves: #i124703# adapt coordinate range from ms relative... control points to our relative control points (cherry picked from commit 8625253da753153838554fef459ae603ca8d3ecc) Conflicts: oox/source/drawingml/customshapeproperties.cxx Change-Id: I356a44fdbdcc22630811467e706bcb60c41dbc2c diff --git a/oox/source/drawingml/customshapeproperties.cxx b/oox/source/drawingml/customshapeproperties.cxx index 276d5bb..0496dc3 100644 --- a/oox/source/drawingml/customshapeproperties.cxx +++ b/oox/source/drawingml/customshapeproperties.cxx @@ -30,6 +30,7 @@ #include <com/sun/star/drawing/XShape.hpp> #include <com/sun/star/drawing/XEnhancedCustomShapeDefaulter.hpp> #include <com/sun/star/drawing/EnhancedCustomShapeTextFrame.hpp> +#include <basegfx/numeric/ftools.hxx> using namespace ::oox::core; using namespace ::com::sun::star; @@ -185,7 +186,15 @@ void CustomShapeProperties::pushToPropSet( const ::oox::core::FilterBase& /* rFi } } else if ( aAdjustmentSeq.getLength() > 0 ) { EnhancedCustomShapeAdjustmentValue aAdjustmentVal; - aAdjustmentVal.Value <<= (*aIter).maFormula.toInt32(); + + sal_Int32 nValue((*aIter).maFormula.toInt32()); + + // #i124703# The ms control point coordinates are relative to the + // object center in the range [-50000 .. 50000] while our customshapes + // use a range from [0 .. 21600], so adapt the value as needed + nValue = basegfx::fround((double(nValue) + 50000.0) * (21600.0 / 100000.0)); + + aAdjustmentVal.Value <<= nValue; aAdjustmentVal.State = PropertyState_DIRECT_VALUE; aAdjustmentVal.Name = (*aIter).maName; aAdjustmentSeq[ nIndex++ ] = aAdjustmentVal; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits