diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-10-24 11:19:19 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-10-24 11:19:19 +0200 |
commit | 319a07c4be1bf9712a162a970ab3b659dd3777c2 (patch) | |
tree | af881c9c659e7f9c9e5e189ad9b4971944690fba /xmloff | |
parent | 610f59651563205564a0f4818b5c1d347ca02132 (diff) |
Simplify code further
...after 9ad0e56be46df46b021109acfd6ece9d17ce84f8 "fixes for >>= with rhs Any"
Change-Id: Idf7b7033bd0ef5501e2884841ba897f8691a5f77
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/draw/shapeexport.cxx | 34 |
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 |