From 2c05d758b2b62c9df413e2514fb3cd233d0f3ec7 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 29 Sep 2017 16:21:54 +0200 Subject: add << operator for css::uno::Exception Change-Id: Ia23dafd07133779144965682df3b7125a3214235 Reviewed-on: https://gerrit.libreoffice.org/43046 Reviewed-by: Stephan Bergmann Tested-by: Jenkins --- oox/source/drawingml/shape.cxx | 6 +++--- oox/source/drawingml/textfield.cxx | 2 +- oox/source/export/chartexport.cxx | 12 ++++++------ oox/source/export/shapes.cxx | 8 ++++---- oox/source/helper/propertyset.cxx | 4 ++-- oox/source/helper/zipstorage.cxx | 16 ++++++++-------- oox/source/ole/axcontrol.cxx | 15 ++++++++------- oox/source/ppt/timenode.cxx | 6 +++--- oox/source/vml/vmldrawing.cxx | 4 ++-- 9 files changed, 37 insertions(+), 36 deletions(-) (limited to 'oox') diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx index 292f2a2be8d0..6064220e602c 100644 --- a/oox/source/drawingml/shape.cxx +++ b/oox/source/drawingml/shape.cxx @@ -276,7 +276,7 @@ void Shape::addShape( } catch( const Exception& e ) { - SAL_WARN( "oox.drawingml", "Shape::addShape: Exception: " << e.Message ); + SAL_WARN( "oox.drawingml", "Shape::addShape: " << e ); } } @@ -1229,7 +1229,7 @@ void Shape::keepDiagramCompatibilityInfo( XmlFilterBase const & rFilterBase ) } catch( const Exception& e ) { - SAL_WARN( "oox.drawingml", "Shape::keepDiagramCompatibilityInfo: Exception: " << e.Message ); + SAL_WARN( "oox.drawingml", "Shape::keepDiagramCompatibilityInfo: " << e ); } } @@ -1298,7 +1298,7 @@ Reference < XShape > Shape::renderDiagramToGraphic( XmlFilterBase const & rFilte } catch( const Exception& e ) { - SAL_WARN( "oox.drawingml", "Shape::renderDiagramToGraphic: Exception: " << e.Message ); + SAL_WARN( "oox.drawingml", "Shape::renderDiagramToGraphic: " << e ); } return xShape; diff --git a/oox/source/drawingml/textfield.cxx b/oox/source/drawingml/textfield.cxx index 2a3527779e41..3fed73ce56d9 100644 --- a/oox/source/drawingml/textfield.cxx +++ b/oox/source/drawingml/textfield.cxx @@ -130,7 +130,7 @@ void lclCreateTextFields( std::list< Reference< XTextField > > & aFields, } catch(Exception & e) { - SAL_WARN("oox", "Exception " << e.Message ); + SAL_WARN("oox", e ); } } else if ( sType == "slidenum" ) diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx index bbf0cf113f14..e3b69806df07 100644 --- a/oox/source/export/chartexport.cxx +++ b/oox/source/export/chartexport.cxx @@ -185,7 +185,7 @@ Reference< chart2::data::XLabeledDataSequence > lcl_getCategories( const Referen } catch( const uno::Exception & ex ) { - SAL_WARN( "oox", "Exception caught. " << ex.Message); + SAL_WARN( "oox", "Exception caught. " << ex); } return xResult; @@ -232,7 +232,7 @@ bool lcl_isSeriesAttachedToFirstAxis( } catch( const uno::Exception & ex ) { - SAL_WARN( "oox", "Exception caught. " << ex.Message); + SAL_WARN( "oox", "Exception caught. " << ex); } return bResult; @@ -540,7 +540,7 @@ void ChartExport::InitRangeSegmentationProperties( const Reference< chart2::XCha } catch( const uno::Exception & ex ) { - SAL_WARN( "oox", "Exception caught. " << ex.Message); + SAL_WARN( "oox", "Exception caught. " << ex); } } @@ -1289,7 +1289,7 @@ void ChartExport::exportBitmapFill( const Reference< XPropertySet >& xPropSet ) } catch (const uno::Exception & rEx) { - SAL_INFO("oox", "ChartExport::exportBitmapFill " << rEx.Message); + SAL_INFO("oox", "ChartExport::exportBitmapFill " << rEx); } } @@ -1318,7 +1318,7 @@ void ChartExport::exportGradientFill( const Reference< XPropertySet >& xPropSet catch (const uno::Exception & rEx) { SAL_INFO("oox", - "ChartExport::exportGradientFill " << rEx.Message); + "ChartExport::exportGradientFill " << rEx); } } @@ -3036,7 +3036,7 @@ void ChartExport::exportDataPoints( } catch( const uno::Exception & rEx ) { - SAL_WARN( "oox", "Exception caught during Export of data point: " << rEx.Message ); + SAL_WARN( "oox", "Exception caught during Export of data point: " << rEx ); } } else diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx index f1073262da70..b5a44c754c11 100644 --- a/oox/source/export/shapes.cxx +++ b/oox/source/export/shapes.cxx @@ -289,7 +289,7 @@ static uno::Reference lcl_StoreOwnAsOOXML( } catch (uno::Exception const& e) { - SAL_WARN("oox.shape", "oox::GetOLEObjectStream: exception: \"" << e.Message << "\""); + SAL_WARN("oox.shape", "oox::GetOLEObjectStream: " << e); return nullptr; } xTempStream->getOutputStream()->closeOutput(); @@ -329,7 +329,7 @@ uno::Reference GetOLEObjectStream( } catch (uno::Exception const& e) { - SAL_WARN("oox.shape", "oox::GetOLEObjectStream: exception: " << e.Message); + SAL_WARN("oox.shape", "oox::GetOLEObjectStream: " << e); } return xInStream; } @@ -1968,7 +1968,7 @@ ShapeExport& ShapeExport::WriteOLE2Shape( const Reference< XShape >& xShape ) } catch (uno::Exception const& e) { - SAL_WARN("oox.shape", "ShapeExport::WriteOLE2Shape: exception: " << e.Message); + SAL_WARN("oox.shape", "ShapeExport::WriteOLE2Shape: " << e); return *this; } @@ -2037,7 +2037,7 @@ ShapeExport& ShapeExport::WriteOLE2Shape( const Reference< XShape >& xShape ) try { ::comphelper::OStorageHelper::CopyInputToOutput(xInStream, xOutStream); } catch (uno::Exception const& e) { - SAL_WARN("oox.shape", "ShapeExport::WriteOLEObject: exception: " << e.Message); + SAL_WARN("oox.shape", "ShapeExport::WriteOLEObject: " << e); } OUString const sRelId = mpFB->addRelation( diff --git a/oox/source/helper/propertyset.cxx b/oox/source/helper/propertyset.cxx index 52b44d79cbcd..ce36308eb425 100644 --- a/oox/source/helper/propertyset.cxx +++ b/oox/source/helper/propertyset.cxx @@ -119,7 +119,7 @@ bool PropertySet::implGetPropertyValue( Any& orValue, const OUString& rPropName catch( Exception& e) { SAL_WARN( "oox", "PropertySet::implGetPropertyValue - cannot get property \"" << - rPropName << "\" Error: " << e.Message); + rPropName << "\" Error: " << e); } return false; } @@ -134,7 +134,7 @@ bool PropertySet::implSetPropertyValue( const OUString& rPropName, const Any& rV catch( Exception& e) { SAL_WARN( "oox", "PropertySet::implSetPropertyValue - cannot set property \"" << - rPropName << "\" Error: " << e.Message); + rPropName << "\" Error: " << e); } return false; } diff --git a/oox/source/helper/zipstorage.cxx b/oox/source/helper/zipstorage.cxx index d60e24b8488b..90d38554c359 100644 --- a/oox/source/helper/zipstorage.cxx +++ b/oox/source/helper/zipstorage.cxx @@ -63,7 +63,7 @@ ZipStorage::ZipStorage( const Reference< XComponentContext >& rxContext, const R catch (Exception const& e) { SAL_WARN("oox.storage", "ZipStorage::ZipStorage " - "exception opening input storage: " << e.Message); + "exception opening input storage: " << e); } } @@ -81,7 +81,7 @@ ZipStorage::ZipStorage( const Reference< XComponentContext >& rxContext, const R catch (Exception const& e) { SAL_WARN("oox.storage", "ZipStorage::ZipStorage " - "exception opening output storage: " << e.Message); + "exception opening output storage: " << e); } } @@ -118,7 +118,7 @@ void ZipStorage::implGetElementNames( ::std::vector< OUString >& orElementNames } catch (Exception const& e) { - SAL_INFO("oox.storage", "getElementNames: exception: " << e.Message); + SAL_INFO("oox.storage", "getElementNames: " << e); } } @@ -139,7 +139,7 @@ StorageRef ZipStorage::implOpenSubStorage( const OUString& rElementName, bool bC } catch (Exception const& e) { - SAL_INFO("oox.storage", "openStorageElement: exception: " << e.Message); + SAL_INFO("oox.storage", "openStorageElement: " << e); } if( bMissing && bCreateMissing ) try @@ -149,7 +149,7 @@ StorageRef ZipStorage::implOpenSubStorage( const OUString& rElementName, bool bC } catch (Exception const& e) { - SAL_INFO("oox.storage", "openStorageElement: exception: " << e.Message); + SAL_INFO("oox.storage", "openStorageElement: " << e); } StorageRef xSubStorage; @@ -167,7 +167,7 @@ Reference< XInputStream > ZipStorage::implOpenInputStream( const OUString& rElem } catch (Exception const& e) { - SAL_INFO("oox.storage", "openStreamElement: exception: " << e.Message); + SAL_INFO("oox.storage", "openStreamElement: " << e); } return xInStream; } @@ -181,7 +181,7 @@ Reference< XOutputStream > ZipStorage::implOpenOutputStream( const OUString& rEl } catch (Exception const& e) { - SAL_INFO("oox.storage", "openStreamElement: exception: " << e.Message); + SAL_INFO("oox.storage", "openStreamElement: " << e); } return xOutStream; } @@ -194,7 +194,7 @@ void ZipStorage::implCommit() const } catch (Exception const& e) { - SAL_WARN("oox.storage", "commit: exception: " << e.Message); + SAL_WARN("oox.storage", "commit: " << e); } } diff --git a/oox/source/ole/axcontrol.cxx b/oox/source/ole/axcontrol.cxx index efe55b582eeb..36cdfc2b10de 100644 --- a/oox/source/ole/axcontrol.cxx +++ b/oox/source/ole/axcontrol.cxx @@ -58,6 +58,7 @@ #include "oox/ole/axbinarywriter.hxx" #include #include + namespace oox { namespace ole { @@ -174,7 +175,7 @@ bool lclExtractRangeFromName( CellRangeAddress& orRangeAddr, const Reference< XM } catch (const Exception& e) { - SAL_WARN("oox", "exception: " << e.Message); + SAL_WARN("oox", e); } return false; } @@ -207,7 +208,7 @@ void lclPrepareConverter( PropertySet& rConverter, const Reference< XModel >& rx } catch (const Exception& e) { - SAL_WARN("oox", "exception: " << e.Message); + SAL_WARN("oox", e); } rConverter.setProperty( PROP_XLA1Representation, rAddressString ); rConverter.setProperty( PROP_ReferenceSheet, nRefSheet ); @@ -351,7 +352,7 @@ void ControlConverter::bindToSources( const Reference< XControlModel >& rxCtrlMo } catch (const Exception& e) { - SAL_WARN("oox", "exception: " << e.Message); + SAL_WARN("oox", e); } // list entry source @@ -383,7 +384,7 @@ void ControlConverter::bindToSources( const Reference< XControlModel >& rxCtrlMo } catch (const Exception& e) { - SAL_WARN("oox", "exception: " << e.Message); + SAL_WARN("oox", e); } } @@ -2662,7 +2663,7 @@ bool EmbeddedControl::convertProperties( const Reference< XControlModel >& rxCtr } catch (const Exception& e) { - SAL_WARN("oox", "exception: " << e.Message); + SAL_WARN("oox", e); } mxModel->convertProperties( aPropMap, rConv ); PropertySet aPropSet( rxCtrlModel ); @@ -2711,7 +2712,7 @@ Reference< XControlModel > EmbeddedForm::convertAndInsert( const EmbeddedControl } catch (const Exception& e) { - SAL_WARN("oox", "exception creating Control: " << e.Message); + SAL_WARN("oox", "exception creating Control: " << e); } return xRet; } @@ -2737,7 +2738,7 @@ Reference< XIndexContainer > const & EmbeddedForm::createXForm() } catch (const Exception& e) { - SAL_WARN("oox", "exception creating Form: " << e.Message); + SAL_WARN("oox", "exception creating Form: " << e); } // always clear the forms supplier to not try to create the form again mxFormsSupp.clear(); diff --git a/oox/source/ppt/timenode.cxx b/oox/source/ppt/timenode.cxx index 223cf8b31f2e..b379b8d4a3c0 100644 --- a/oox/source/ppt/timenode.cxx +++ b/oox/source/ppt/timenode.cxx @@ -200,7 +200,7 @@ namespace oox { namespace ppt { } catch( const Exception& e ) { - SAL_INFO("oox.ppt","OOX: exception raised in TimeNode::addNode() - " << e.Message ); + SAL_INFO("oox.ppt","OOX: exception raised in TimeNode::addNode() - " << e ); } } @@ -558,7 +558,7 @@ namespace oox { namespace ppt { } catch( const Exception& e ) { - SAL_INFO("oox.ppt","OOX: exception raised in TimeNode::setNode() - " << e.Message ); + SAL_INFO("oox.ppt","OOX: exception raised in TimeNode::setNode() - " << e ); } } @@ -576,7 +576,7 @@ namespace oox { namespace ppt { } catch( const Exception& e ) { - SAL_INFO("oox.ppt", "OOX: exception raised in TimeNode::createAndInsert() trying to create a service " << rServiceName << " = " << e.Message ); + SAL_INFO("oox.ppt", "OOX: exception raised in TimeNode::createAndInsert() trying to create a service " << rServiceName << " = " << e ); } return Reference< XAnimationNode >(); diff --git a/oox/source/vml/vmldrawing.cxx b/oox/source/vml/vmldrawing.cxx index c95031d8f880..5c85cc199c4d 100644 --- a/oox/source/vml/vmldrawing.cxx +++ b/oox/source/vml/vmldrawing.cxx @@ -228,7 +228,7 @@ Reference< XShape > Drawing::createAndInsertXShape( const OUString& rService, } catch( Exception& e ) { - SAL_WARN( "oox", "Drawing::createAndInsertXShape - error during shape object creation: " << e.Message ); + SAL_WARN( "oox", "Drawing::createAndInsertXShape - error during shape object creation: " << e ); } OSL_ENSURE( xShape.is(), "Drawing::createAndInsertXShape - cannot instantiate shape object" ); return xShape; @@ -251,7 +251,7 @@ Reference< XShape > Drawing::createAndInsertXControlShape( const ::oox::ole::Emb } catch (Exception const& e) { - SAL_WARN("oox", "exception inserting Shape: " << e.Message); + SAL_WARN("oox", "exception inserting Shape: " << e); } return xShape; } -- cgit