From 050d2ceb534f17f3e865f5f8118bb95a4749de9c Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Fri, 8 Nov 2013 12:44:22 +0000 Subject: [PATCH] Resolves: #i123616# be more flexible regarding the data type for polygon data (cherry picked from commit 66c81c1a26d6d09c75c8b8ced44e4a0cf43819ee) Conflicts: svx/source/unodraw/unoshape.cxx Change-Id: I5ebb7b39a083bb6e007853f205bb39d434eb94ad --- svx/source/unodraw/unoshape.cxx | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx index e580014b9743..77fa691f2988 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -82,6 +82,7 @@ #include #include #include +#include #include #include "shapeimpl.hxx" #include @@ -2330,10 +2331,24 @@ bool SvxShape::setPropertyValueImpl( const OUString&, const SfxItemPropertySimpl } 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( basegfx::unotools::polyPolygonBezierToB2DPolyPolygon( aPolyPoly ) ); // Reintroduction of fix for issue i59051 (#i108851#) ForceMetricToItemPoolMetric( aNewPolyPolygon ); if( mpModel->IsWriter() )