diff options
-rw-r--r-- | oox/source/helper/zipstorage.cxx | 30 | ||||
-rw-r--r-- | sal/inc/sal/log-areas.dox | 1 |
2 files changed, 21 insertions, 10 deletions
diff --git a/oox/source/helper/zipstorage.cxx b/oox/source/helper/zipstorage.cxx index 4ddb09e417b7..1845afdc7c89 100644 --- a/oox/source/helper/zipstorage.cxx +++ b/oox/source/helper/zipstorage.cxx @@ -67,8 +67,10 @@ ZipStorage::ZipStorage( const Reference< XComponentContext >& rxContext, const R ZIP_STORAGE_FORMAT_STRING, rxInStream, xFactory, sal_False ); // DEV300_m80: Was sal_True, but DOCX and others did not load } - catch( Exception& ) + catch (Exception const& e) { + SAL_WARN("oox.storage", "ZipStorage::ZipStorage " + "exception opening input storage: " << e.Message); } } @@ -84,9 +86,10 @@ ZipStorage::ZipStorage( const Reference< XComponentContext >& rxContext, const R mxStorage = ::comphelper::OStorageHelper::GetStorageOfFormatFromStream( OFOPXML_STORAGE_FORMAT_STRING, rxStream, nOpenMode, xFactory, sal_True ); } - catch( Exception& ) + catch (Exception const& e) { - OSL_FAIL( "ZipStorage::ZipStorage - cannot open output storage" ); + SAL_WARN("oox.storage", "ZipStorage::ZipStorage " + "exception opening output storage: " << e.Message); } } @@ -94,7 +97,8 @@ ZipStorage::ZipStorage( const ZipStorage& rParentStorage, const Reference< XStor StorageBase( rParentStorage, rElementName, rParentStorage.isReadOnly() ), mxStorage( rxStorage ) { - OSL_ENSURE( mxStorage.is(), "ZipStorage::ZipStorage - missing storage" ); + SAL_WARN_IF(!mxStorage.is(), "oox.storage", "ZipStorage::ZipStorage " + " - missing storage" ); } ZipStorage::~ZipStorage() @@ -120,8 +124,9 @@ void ZipStorage::implGetElementNames( ::std::vector< OUString >& orElementNames if( aNames.getLength() > 0 ) orElementNames.insert( orElementNames.end(), aNames.getConstArray(), aNames.getConstArray() + aNames.getLength() ); } - catch( Exception& ) + catch (Exception const& e) { + SAL_INFO("oox.storage", "getElementNames: exception: " << e.Message); } } @@ -140,8 +145,9 @@ StorageRef ZipStorage::implOpenSubStorage( const OUString& rElementName, bool bC { bMissing = true; } - catch( Exception& ) + catch (Exception const& e) { + SAL_INFO("oox.storage", "openStorageElement: exception: " << e.Message); } if( bMissing && bCreateMissing ) try @@ -149,8 +155,9 @@ StorageRef ZipStorage::implOpenSubStorage( const OUString& rElementName, bool bC xSubXStorage = mxStorage->openStorageElement( rElementName, ::com::sun::star::embed::ElementModes::READWRITE ); } - catch( Exception& ) + catch (Exception const& e) { + SAL_INFO("oox.storage", "openStorageElement: exception: " << e.Message); } StorageRef xSubStorage; @@ -166,8 +173,9 @@ Reference< XInputStream > ZipStorage::implOpenInputStream( const OUString& rElem { xInStream.set( mxStorage->openStreamElement( rElementName, ::com::sun::star::embed::ElementModes::READ ), UNO_QUERY ); } - catch( Exception& ) + catch (Exception const& e) { + SAL_INFO("oox.storage", "openStreamElement: exception: " << e.Message); } return xInStream; } @@ -179,8 +187,9 @@ Reference< XOutputStream > ZipStorage::implOpenOutputStream( const OUString& rEl { xOutStream.set( mxStorage->openStreamElement( rElementName, ::com::sun::star::embed::ElementModes::READWRITE ), UNO_QUERY ); } - catch( Exception& ) + catch (Exception const& e) { + SAL_INFO("oox.storage", "openStreamElement: exception: " << e.Message); } return xOutStream; } @@ -191,8 +200,9 @@ void ZipStorage::implCommit() const { Reference< XTransactedObject >( mxStorage, UNO_QUERY_THROW )->commit(); } - catch( Exception& ) + catch (Exception const& e) { + SAL_WARN("oox.storage", "commit: exception: " << e.Message); } } diff --git a/sal/inc/sal/log-areas.dox b/sal/inc/sal/log-areas.dox index 0eadebbb6804..45220ee0cf5d 100644 --- a/sal/inc/sal/log-areas.dox +++ b/sal/inc/sal/log-areas.dox @@ -81,6 +81,7 @@ certain functionality. @li @c filter.ms - escher import/export @li @c filter.xslt - xslt import/export @li @c oox.xmlstream - XmlStream class +@li @c oox.storage - ZipStorage class @section formula |