https://bugs.documentfoundation.org/show_bug.cgi?id=148693

--- Comment #5 from Julien Nabet <serval2...@yahoo.fr> ---
Regina: here's a patch which seems to work:
diff --git a/xmloff/source/draw/shapeexport.cxx
b/xmloff/source/draw/shapeexport.cxx
index 55de243f07aa..9b069a07eb2c 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -2338,11 +2338,13 @@ void XMLShapeExport::ImpExportPolygonShape(
     {
         // get PolygonBezier
         uno::Any aAny( xPropSet->getPropertyValue("Geometry") );
-        const basegfx::B2DPolyPolygon aPolyPolygon(
-           
basegfx::utils::UnoPolyPolygonBezierCoordsToB2DPolyPolygon(*o3tl::doAccess<drawing::PolyPolygonBezierCoords>(aAny)));
-
-        if(aPolyPolygon.count())
+        auto pSourcePolyPolygon =
o3tl::tryAccess<drawing::PolyPolygonBezierCoords>(aAny);
+        if(pSourcePolyPolygon && pSourcePolyPolygon->Coordinates.getLength())
         {
+            const basegfx::B2DPolyPolygon aPolyPolygon(
+                basegfx::utils::UnoPolyPolygonBezierCoordsToB2DPolyPolygon(
+                    *pSourcePolyPolygon));
+
             // complex polygon shape, write as svg:d
             const OUString aPolygonString(
                 basegfx::utils::exportToSvgD(

I took example below line 2789.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to