summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--filter/source/flash/swffilter.cxx4
-rw-r--r--filter/source/svg/svgfilter.cxx8
-rw-r--r--xmloff/source/draw/shapeexport.cxx34
3 files changed, 18 insertions, 28 deletions
diff --git a/filter/source/flash/swffilter.cxx b/filter/source/flash/swffilter.cxx
index 5ac39b8c6a2e..81ec8a03946d 100644
--- a/filter/source/flash/swffilter.cxx
+++ b/filter/source/flash/swffilter.cxx
@@ -262,9 +262,7 @@ sal_Bool SAL_CALL FlashExportFilter::filter( const css::uno::Sequence< css::bean
if(xSelection.is())
{
- Any aSelection = xSelection->getSelection();
- if (aSelection.hasValue())
- aSelection >>= mxSelectedShapes;
+ xSelection->getSelection() >>= mxSelectedShapes;
}
}
}
diff --git a/filter/source/svg/svgfilter.cxx b/filter/source/svg/svgfilter.cxx
index bd6dae648a25..c1faa06469b5 100644
--- a/filter/source/svg/svgfilter.cxx
+++ b/filter/source/svg/svgfilter.cxx
@@ -235,12 +235,8 @@ sal_Bool SAL_CALL SVGFilter::filter( const Sequence< PropertyValue >& rDescripto
if (xSelection.is())
{
- uno::Any aSelection = xSelection->getSelection();
-
- if (aSelection.hasValue())
- {
- bGotSelection = ( aSelection >>= maShapeSelection );
- }
+ bGotSelection
+ = ( xSelection->getSelection() >>= maShapeSelection );
}
}
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