diff options
author | Armin Le Grand <alg@apache.org> | 2013-11-08 12:44:22 +0000 |
---|---|---|
committer | Armin Le Grand <alg@apache.org> | 2013-11-08 12:44:22 +0000 |
commit | 66c81c1a26d6d09c75c8b8ced44e4a0cf43819ee (patch) | |
tree | b27b53d8823ebe7fe61e6f41eba5cbe17ca2caa3 /svx/source | |
parent | b3173c16043dd8469f3f94939a32ad1697cd7550 (diff) |
i123616 be more flexible regarding the data type for polygon data
Notes
merged as: 050d2ceb534f17f3e865f5f8118bb95a4749de9c
Diffstat (limited to 'svx/source')
-rw-r--r-- | svx/source/unodraw/unoshape.cxx | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx index e2bb6c333fbd..582929c0b80a 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -92,6 +92,7 @@ #include <editeng/outlobj.hxx> #include <basegfx/matrix/b2dhommatrix.hxx> #include <basegfx/matrix/b2dhommatrixtools.hxx> +#include <basegfx/polygon/b2dpolypolygontools.hxx> #include <vector> @@ -2405,10 +2406,24 @@ bool SvxShape::setPropertyValueImpl( const ::rtl::OUString&, const SfxItemProper } case OWN_ATTR_EDGE_POLYPOLYGONBEZIER: { - drawing::PolyPolygonBezierCoords aPolyPoly; - if ( rValue >>= aPolyPoly ) + basegfx::B2DPolyPolygon aNewPolyPolygon; + + // #123616# be a little bit more flexible regardin gthe data type used + if( rValue.getValueType() == ::getCppuType(( const drawing::PointSequenceSequence*)0)) + { + // get polygpon data from PointSequenceSequence + aNewPolyPolygon = basegfx::tools::UnoPointSequenceSequenceToB2DPolyPolygon( + *(const drawing::PointSequenceSequence*)rValue.getValue()); + } + else if( rValue.getValueType() == ::getCppuType(( const drawing::PolyPolygonBezierCoords*)0)) + { + // get polygpon data from PolyPolygonBezierCoords + aNewPolyPolygon = basegfx::tools::UnoPolyPolygonBezierCoordsToB2DPolyPolygon( + *(const drawing::PolyPolygonBezierCoords*)rValue.getValue()); + } + + if(aNewPolyPolygon.count()) { - basegfx::B2DPolyPolygon aNewPolyPolygon( SvxConvertPolyPolygonBezierToB2DPolyPolygon( &aPolyPoly ) ); // --> OD 2010-02-19 #i108851# - reintroduction of fix for issue i59051 ForceMetricToItemPoolMetric( aNewPolyPolygon ); // <-- |