summaryrefslogtreecommitdiff
path: root/svx/source/unodraw
diff options
context:
space:
mode:
authorArmin Le Grand <alg@apache.org>2013-11-08 12:44:22 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-11-08 17:18:29 +0000
commit050d2ceb534f17f3e865f5f8118bb95a4749de9c (patch)
tree4b7346ed8348f2765d18e1034d8f0c72e893c722 /svx/source/unodraw
parent7af7023a42aee17c4be0966117b389d1b4319ceb (diff)
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
Diffstat (limited to 'svx/source/unodraw')
-rw-r--r--svx/source/unodraw/unoshape.cxx21
1 files 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 <editeng/outlobj.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <basegfx/matrix/b2dhommatrixtools.hxx>
+#include <basegfx/polygon/b2dpolypolygontools.hxx>
#include <basegfx/tools/unotools.hxx>
#include "shapeimpl.hxx"
#include <sal/log.hxx>
@@ -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() )