diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-11-05 15:20:22 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-11-06 06:27:51 +0100 |
commit | 7b99cdb2d77a3feaf9b782c1e656f2d922e2746e (patch) | |
tree | 180459dcd8379ee1a2e89098a4d9eda72abe8f05 /xmloff | |
parent | 7ee07296a66df29555c9e9a684f24bc68201cb78 (diff) |
loplugin:indentation find broken if statements
so I don't read the "then" block as being a sequential statements
Change-Id: Ib2004acd3518bd4ebd2246f02a26c2c0a8bbab4c
Reviewed-on: https://gerrit.libreoffice.org/82069
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
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 |