From 9ad0e56be46df46b021109acfd6ece9d17ce84f8 Mon Sep 17 00:00:00 2001 From: Jochen Nitschke Date: Fri, 21 Oct 2016 15:59:45 +0200 Subject: [PATCH] fixes for >>= with rhs Any this changes behaviour because >>= always returned true Change-Id: Ia7bbce1696e5c23f6e1e6f1a7e60b3c462cf0086 Reviewed-on: https://gerrit.libreoffice.org/30141 Tested-by: Jenkins Reviewed-by: Noel Grandin --- filter/source/flash/swffilter.cxx | 7 ++----- filter/source/svg/svgfilter.cxx | 4 ++-- xmloff/source/draw/shapeexport.cxx | 3 ++- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/filter/source/flash/swffilter.cxx b/filter/source/flash/swffilter.cxx index b3db3bc3b090..5ac39b8c6a2e 100644 --- a/filter/source/flash/swffilter.cxx +++ b/filter/source/flash/swffilter.cxx @@ -262,12 +262,9 @@ sal_Bool SAL_CALL FlashExportFilter::filter( const css::uno::Sequence< css::bean if(xSelection.is()) { - Any aSelection; - - if(xSelection->getSelection() >>= aSelection) - { + Any aSelection = xSelection->getSelection(); + if (aSelection.hasValue()) aSelection >>= mxSelectedShapes; - } } } } diff --git a/filter/source/svg/svgfilter.cxx b/filter/source/svg/svgfilter.cxx index 7304a56c9077..bd6dae648a25 100644 --- a/filter/source/svg/svgfilter.cxx +++ b/filter/source/svg/svgfilter.cxx @@ -235,9 +235,9 @@ sal_Bool SAL_CALL SVGFilter::filter( const Sequence< PropertyValue >& rDescripto if (xSelection.is()) { - uno::Any aSelection; + uno::Any aSelection = xSelection->getSelection(); - if (xSelection->getSelection() >>= aSelection) + if (aSelection.hasValue()) { bGotSelection = ( aSelection >>= maShapeSelection ); } diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx index 0fd26d7927ef..09d6adf65c78 100644 --- a/xmloff/source/draw/shapeexport.cxx +++ b/xmloff/source/draw/shapeexport.cxx @@ -2583,7 +2583,8 @@ void XMLShapeExport::ImpExportConnectorShape( } } - if( xProps->getPropertyValue("PolyPolygonBezier") >>= aAny ) + aAny = xProps->getPropertyValue("PolyPolygonBezier"); + if( aAny.hasValue() ) { // get PolygonBezier auto pSourcePolyPolygon = o3tl::tryAccess(aAny);