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

Resolves: #i123616# be more flexible regarding the data type for polygon data

(cherry picked from commit 66c81c1a)

Conflicts:
	svx/source/unodraw/unoshape.cxx

Change-Id: I5ebb7b39a083bb6e007853f205bb39d434eb94ad
üst 7af7023a
...@@ -82,6 +82,7 @@ ...@@ -82,6 +82,7 @@
#include <editeng/outlobj.hxx> #include <editeng/outlobj.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx> #include <basegfx/matrix/b2dhommatrix.hxx>
#include <basegfx/matrix/b2dhommatrixtools.hxx> #include <basegfx/matrix/b2dhommatrixtools.hxx>
#include <basegfx/polygon/b2dpolypolygontools.hxx>
#include <basegfx/tools/unotools.hxx> #include <basegfx/tools/unotools.hxx>
#include "shapeimpl.hxx" #include "shapeimpl.hxx"
#include <sal/log.hxx> #include <sal/log.hxx>
...@@ -2330,10 +2331,24 @@ bool SvxShape::setPropertyValueImpl( const OUString&, const SfxItemPropertySimpl ...@@ -2330,10 +2331,24 @@ bool SvxShape::setPropertyValueImpl( const OUString&, const SfxItemPropertySimpl
} }
case OWN_ATTR_EDGE_POLYPOLYGONBEZIER: case OWN_ATTR_EDGE_POLYPOLYGONBEZIER:
{ {
drawing::PolyPolygonBezierCoords aPolyPoly; basegfx::B2DPolyPolygon aNewPolyPolygon;
if ( rValue >>= aPolyPoly )
// #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#) // Reintroduction of fix for issue i59051 (#i108851#)
ForceMetricToItemPoolMetric( aNewPolyPolygon ); ForceMetricToItemPoolMetric( aNewPolyPolygon );
if( mpModel->IsWriter() ) if( mpModel->IsWriter() )
......
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