From 92b37ecdef6ca915698d91cdfd053bb3950a0f98 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 24 Aug 2020 12:34:27 +0100 Subject: crashtesting: exception on reexport of fdo55178-3.xlsx to xlsx MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit since... commit acfd9e9ca2dfd76536c072e21c65cb3efc6aac80 Date: Mon Jul 27 00:31:04 2020 +0200 tdf#128345 PPTX: add transparence gradient for fill in chart use GetProperty which checks for exceptions and put result on success into mAny Change-Id: If327848031910f47eb05e5998fa2b3265e8e258a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101275 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- oox/source/export/chartexport.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx index c9f3df4fd195..cdbe588ffc30 100644 --- a/oox/source/export/chartexport.cxx +++ b/oox/source/export/chartexport.cxx @@ -1589,7 +1589,7 @@ void ChartExport::exportFill( const Reference< XPropertySet >& xPropSet ) } OUString sFillTransparenceGradientName; if (aFillStyle == FillStyle_SOLID - && (xPropSet->getPropertyValue("FillTransparenceGradientName") >>= sFillTransparenceGradientName) + && GetProperty(xPropSet, "FillTransparenceGradientName") && (mAny >>= sFillTransparenceGradientName) && !sFillTransparenceGradientName.isEmpty()) { awt::Gradient aTransparenceGradient; @@ -1644,7 +1644,8 @@ void ChartExport::exportSolidFill(const Reference< XPropertySet >& xPropSet) awt::Gradient aTransparenceGradient; bool bNeedGradientFill(false); OUString sFillTransparenceGradientName; - if ((xPropSet->getPropertyValue("FillTransparenceGradientName") >>= sFillTransparenceGradientName) + if (GetProperty(xPropSet, "FillTransparenceGradientName") + && (mAny >>= sFillTransparenceGradientName) && !sFillTransparenceGradientName.isEmpty()) { uno::Reference< lang::XMultiServiceFactory > xFact( getModel(), uno::UNO_QUERY ); -- cgit v1.2.3