diff options
-rw-r--r-- | xmloff/source/draw/shapeexport2.cxx | 40 |
1 files changed, 39 insertions, 1 deletions
diff --git a/xmloff/source/draw/shapeexport2.cxx b/xmloff/source/draw/shapeexport2.cxx index a7cac0cb176b..a7bb8bd7fcec 100644 --- a/xmloff/source/draw/shapeexport2.cxx +++ b/xmloff/source/draw/shapeexport2.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: shapeexport2.cxx,v $ - * $Revision: 1.65 $ + * $Revision: 1.66 $ * * This file is part of OpenOffice.org. * @@ -1446,6 +1446,44 @@ void XMLShapeExport::ImpExportConnectorShape( } } + if( xProps->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("PolyPolygonBezier") ) ) >>= aAny ) + { + // get PolygonBezier + drawing::PolyPolygonBezierCoords* pSourcePolyPolygon = + (drawing::PolyPolygonBezierCoords*)aAny.getValue(); + + if(pSourcePolyPolygon && pSourcePolyPolygon->Coordinates.getLength()) + { + sal_Int32 nOuterCnt(pSourcePolyPolygon->Coordinates.getLength()); + drawing::PointSequence* pOuterSequence = pSourcePolyPolygon->Coordinates.getArray(); + drawing::FlagSequence* pOuterFlags = pSourcePolyPolygon->Flags.getArray(); + + if(pOuterSequence && pOuterFlags) + { + // prepare svx:d element export + awt::Point aPoint( 0, 0 ); + awt::Size aSize( 1, 1 ); + SdXMLImExViewBox aViewBox( 0, 0, 1, 1 ); + SdXMLImExSvgDElement aSvgDElement(aViewBox); + + for(sal_Int32 a(0L); a < nOuterCnt; a++) + { + drawing::PointSequence* pSequence = pOuterSequence++; + drawing::FlagSequence* pFlags = pOuterFlags++; + + if(pSequence && pFlags) + { + aSvgDElement.AddPolygon(pSequence, pFlags, + aPoint, aSize, sal_False ); + } + } + + // write point array + mrExport.AddAttribute(XML_NAMESPACE_SVG, XML_D, aSvgDElement.GetExportString()); + } + } + } + // write connector shape. Add Export later. sal_Bool bCreateNewline( (nFeatures & SEF_EXPORT_NO_WS) == 0 ); // #86116#/#92210# SvXMLElementExport aOBJ(mrExport, XML_NAMESPACE_DRAW, XML_CONNECTOR, bCreateNewline, sal_True); |