summaryrefslogtreecommitdiff
path: root/xmloff/source/draw/shapeexport.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'xmloff/source/draw/shapeexport.cxx')
-rw-r--r--xmloff/source/draw/shapeexport.cxx34
1 files changed, 15 insertions, 19 deletions
diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx
index 09d6adf65c78..a22ee35cab26 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -2583,27 +2583,23 @@ void XMLShapeExport::ImpExportConnectorShape(
}
}
+ // get PolygonBezier
aAny = xProps->getPropertyValue("PolyPolygonBezier");
- if( aAny.hasValue() )
+ auto pSourcePolyPolygon = o3tl::tryAccess<drawing::PolyPolygonBezierCoords>(aAny);
+ if(pSourcePolyPolygon && pSourcePolyPolygon->Coordinates.getLength())
{
- // get PolygonBezier
- auto pSourcePolyPolygon = o3tl::tryAccess<drawing::PolyPolygonBezierCoords>(aAny);
-
- if(pSourcePolyPolygon && pSourcePolyPolygon->Coordinates.getLength())
- {
- const basegfx::B2DPolyPolygon aPolyPolygon(
- basegfx::tools::UnoPolyPolygonBezierCoordsToB2DPolyPolygon(
- *pSourcePolyPolygon));
- const OUString aPolygonString(
- basegfx::tools::exportToSvgD(
- aPolyPolygon,
- true, // bUseRelativeCoordinates
- false, // bDetectQuadraticBeziers: not used in old, but maybe activated now
- true)); // bHandleRelativeNextPointCompatible
-
- // write point array
- mrExport.AddAttribute(XML_NAMESPACE_SVG, XML_D, aPolygonString);
- }
+ const basegfx::B2DPolyPolygon aPolyPolygon(
+ basegfx::tools::UnoPolyPolygonBezierCoordsToB2DPolyPolygon(
+ *pSourcePolyPolygon));
+ const OUString aPolygonString(
+ basegfx::tools::exportToSvgD(
+ aPolyPolygon,
+ true, // bUseRelativeCoordinates
+ false, // bDetectQuadraticBeziers: not used in old, but maybe activated now
+ true)); // bHandleRelativeNextPointCompatible
+
+ // write point array
+ mrExport.AddAttribute(XML_NAMESPACE_SVG, XML_D, aPolygonString);
}
// get matrix