diff options
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/chart/SchXMLImport.cxx | 6 | ||||
-rw-r--r-- | xmloff/source/draw/shapeexport.cxx | 41 |
2 files changed, 24 insertions, 23 deletions
diff --git a/xmloff/source/chart/SchXMLImport.cxx b/xmloff/source/chart/SchXMLImport.cxx index 5e026e346e63..322a97e4331f 100644 --- a/xmloff/source/chart/SchXMLImport.cxx +++ b/xmloff/source/chart/SchXMLImport.cxx @@ -367,7 +367,8 @@ void SchXMLImportHelper::DeleteDataSeries( const Reference< chart2::XDataSeries > & xSeries, const Reference< chart2::XChartDocument > & xDoc ) { - if( xDoc.is() ) + if( !xDoc.is() ) + return; try { Reference< chart2::XCoordinateSystemContainer > xCooSysCnt( @@ -584,7 +585,8 @@ void SAL_CALL SchXMLImport::setTargetDocument(const uno::Reference<lang::XCompon uno::Reference<chart2::XChartDocument> xChartDoc(GetModel(), uno::UNO_QUERY); - if (xChartDoc.is()) + if (!xChartDoc.is()) + return; try { // prevent rebuild of view during load (necessary especially if loaded not diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx index 836fc921fdf3..ddd128d1d8b0 100644 --- a/xmloff/source/draw/shapeexport.cxx +++ b/xmloff/source/draw/shapeexport.cxx @@ -732,32 +732,31 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape { if( aShapeInfo.meShapeType != XmlShapeTypeDrawPageShape && aShapeInfo.meShapeType != XmlShapeTypePresPageShape && aShapeInfo.meShapeType != XmlShapeTypeHandoutShape && aShapeInfo.meShapeType != XmlShapeTypeDrawChartShape ) + try + { + bool bVisible = true; + bool bPrintable = true; - try - { - bool bVisible = true; - bool bPrintable = true; + xSet->getPropertyValue(gsVisible) >>= bVisible; + xSet->getPropertyValue(gsPrintable) >>= bPrintable; - xSet->getPropertyValue(gsVisible) >>= bVisible; - xSet->getPropertyValue(gsPrintable) >>= bPrintable; + XMLTokenEnum eDisplayToken = XML_TOKEN_INVALID; + const unsigned short nDisplay = (bVisible ? 2 : 0) | (bPrintable ? 1 : 0); + switch( nDisplay ) + { + case 0: eDisplayToken = XML_NONE; break; + case 1: eDisplayToken = XML_PRINTER; break; + case 2: eDisplayToken = XML_SCREEN; break; + // case 3: eDisplayToken = XML_ALWAYS break; this is the default + } - XMLTokenEnum eDisplayToken = XML_TOKEN_INVALID; - const unsigned short nDisplay = (bVisible ? 2 : 0) | (bPrintable ? 1 : 0); - switch( nDisplay ) + if( eDisplayToken != XML_TOKEN_INVALID ) + mrExport.AddAttribute(XML_NAMESPACE_DRAW_EXT, XML_DISPLAY, eDisplayToken ); + } + catch(const uno::Exception&) { - case 0: eDisplayToken = XML_NONE; break; - case 1: eDisplayToken = XML_PRINTER; break; - case 2: eDisplayToken = XML_SCREEN; break; - // case 3: eDisplayToken = XML_ALWAYS break; this is the default + DBG_UNHANDLED_EXCEPTION("xmloff.draw"); } - - if( eDisplayToken != XML_TOKEN_INVALID ) - mrExport.AddAttribute(XML_NAMESPACE_DRAW_EXT, XML_DISPLAY, eDisplayToken ); - } - catch(const uno::Exception&) - { - DBG_UNHANDLED_EXCEPTION("xmloff.draw"); - } } // #82003# test export count |