diff options
author | Marco Cecchetti <marco.cecchetti@collabora.com> | 2023-06-14 14:13:09 +0200 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2023-10-15 20:26:58 +0200 |
commit | 48b6965c1cbbd8087d476c74fc2c20faa3e5e2a8 (patch) | |
tree | a2d2fe3e1b995632da9efaf763f56699491f0597 | |
parent | ca62ba974cc9ff737b82a450aabe7b8ef778207c (diff) |
fixup for: 7523efa svg export filter: not export hidden slides
It seems that the Visible property does not always exist
That was causing a failure in Online Impress:
- swicth to master view
- select any object in the master slide
- result: the object is not selected or getting focus and the server
report an error
Change-Id: I77b0211c6e13da1804457ba48098bbee821b7d4a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153049
Reviewed-by: Gökay ŞATIR <gokaysatir@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157980
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
-rw-r--r-- | filter/source/svg/svgfilter.cxx | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/filter/source/svg/svgfilter.cxx b/filter/source/svg/svgfilter.cxx index 3a08bda76078..71483c209949 100644 --- a/filter/source/svg/svgfilter.cxx +++ b/filter/source/svg/svgfilter.cxx @@ -441,10 +441,16 @@ bool SVGFilter::filterImpressOrDraw( const Sequence< PropertyValue >& rDescripto Reference< XPropertySet > xPropSet( xDrawPage, UNO_QUERY ); bool bIsSlideVisible = true; // default: true - xPropSet->getPropertyValue( "Visible" ) >>= bIsSlideVisible; - if (!bIsSlideVisible) - continue; - + if (xPropSet.is()) + { + Reference< XPropertySetInfo > xPropSetInfo = xPropSet->getPropertySetInfo(); + if (xPropSetInfo.is() && xPropSetInfo->hasPropertyByName("Visible")) + { + xPropSet->getPropertyValue( "Visible" ) >>= bIsSlideVisible; + if (!bIsSlideVisible) + continue; + } + } mSelectedPages.push_back(xDrawPage); } } @@ -494,10 +500,16 @@ bool SVGFilter::filterImpressOrDraw( const Sequence< PropertyValue >& rDescripto uno::Reference< drawing::XDrawPage > xDrawPage( xDrawPages->getByIndex( i ), uno::UNO_QUERY ); Reference< XPropertySet > xPropSet( xDrawPage, UNO_QUERY ); bool bIsSlideVisible = true; // default: true - xPropSet->getPropertyValue( "Visible" ) >>= bIsSlideVisible; - if (!bIsSlideVisible) - continue; - + if (xPropSet.is()) + { + Reference< XPropertySetInfo > xPropSetInfo = xPropSet->getPropertySetInfo(); + if (xPropSetInfo.is() && xPropSetInfo->hasPropertyByName("Visible")) + { + xPropSet->getPropertyValue( "Visible" ) >>= bIsSlideVisible; + if (!bIsSlideVisible) + continue; + } + } mSelectedPages.push_back(xDrawPage); } } |