Kaydet (Commit) c764a3d9 authored tarafından Armin Le Grand's avatar Armin Le Grand Kaydeden (comit) Caolán McNamara

Resolves: #i124703# adapt coordinate range from ms relative...

control points to our relative control points

(cherry picked from commit 8625253d)

Conflicts:
	oox/source/drawingml/customshapeproperties.cxx

Change-Id: I356a44fdbdcc22630811467e706bcb60c41dbc2c
üst d19af82e
......@@ -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;
......
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