oox: ZipStorage: better exception tracing
Change-Id: I2b81f92cea8a8c9577c3f9ca33b915942708330c
This commit is contained in:
@@ -67,8 +67,10 @@ ZipStorage::ZipStorage( const Reference< XComponentContext >& rxContext, const R
|
|||||||
ZIP_STORAGE_FORMAT_STRING, rxInStream, xFactory,
|
ZIP_STORAGE_FORMAT_STRING, rxInStream, xFactory,
|
||||||
sal_False ); // DEV300_m80: Was sal_True, but DOCX and others did not load
|
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(
|
mxStorage = ::comphelper::OStorageHelper::GetStorageOfFormatFromStream(
|
||||||
OFOPXML_STORAGE_FORMAT_STRING, rxStream, nOpenMode, xFactory, sal_True );
|
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() ),
|
StorageBase( rParentStorage, rElementName, rParentStorage.isReadOnly() ),
|
||||||
mxStorage( rxStorage )
|
mxStorage( rxStorage )
|
||||||
{
|
{
|
||||||
OSL_ENSURE( mxStorage.is(), "ZipStorage::ZipStorage - missing storage" );
|
SAL_WARN_IF(!mxStorage.is(), "oox.storage", "ZipStorage::ZipStorage "
|
||||||
|
" - missing storage" );
|
||||||
}
|
}
|
||||||
|
|
||||||
ZipStorage::~ZipStorage()
|
ZipStorage::~ZipStorage()
|
||||||
@@ -120,8 +124,9 @@ void ZipStorage::implGetElementNames( ::std::vector< OUString >& orElementNames
|
|||||||
if( aNames.getLength() > 0 )
|
if( aNames.getLength() > 0 )
|
||||||
orElementNames.insert( orElementNames.end(), aNames.getConstArray(), aNames.getConstArray() + aNames.getLength() );
|
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;
|
bMissing = true;
|
||||||
}
|
}
|
||||||
catch( Exception& )
|
catch (Exception const& e)
|
||||||
{
|
{
|
||||||
|
SAL_INFO("oox.storage", "openStorageElement: exception: " << e.Message);
|
||||||
}
|
}
|
||||||
|
|
||||||
if( bMissing && bCreateMissing ) try
|
if( bMissing && bCreateMissing ) try
|
||||||
@@ -149,8 +155,9 @@ StorageRef ZipStorage::implOpenSubStorage( const OUString& rElementName, bool bC
|
|||||||
xSubXStorage = mxStorage->openStorageElement(
|
xSubXStorage = mxStorage->openStorageElement(
|
||||||
rElementName, ::com::sun::star::embed::ElementModes::READWRITE );
|
rElementName, ::com::sun::star::embed::ElementModes::READWRITE );
|
||||||
}
|
}
|
||||||
catch( Exception& )
|
catch (Exception const& e)
|
||||||
{
|
{
|
||||||
|
SAL_INFO("oox.storage", "openStorageElement: exception: " << e.Message);
|
||||||
}
|
}
|
||||||
|
|
||||||
StorageRef xSubStorage;
|
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 );
|
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;
|
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 );
|
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;
|
return xOutStream;
|
||||||
}
|
}
|
||||||
@@ -191,8 +200,9 @@ void ZipStorage::implCommit() const
|
|||||||
{
|
{
|
||||||
Reference< XTransactedObject >( mxStorage, UNO_QUERY_THROW )->commit();
|
Reference< XTransactedObject >( mxStorage, UNO_QUERY_THROW )->commit();
|
||||||
}
|
}
|
||||||
catch( Exception& )
|
catch (Exception const& e)
|
||||||
{
|
{
|
||||||
|
SAL_WARN("oox.storage", "commit: exception: " << e.Message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -81,6 +81,7 @@ certain functionality.
|
|||||||
@li @c filter.ms - escher import/export
|
@li @c filter.ms - escher import/export
|
||||||
@li @c filter.xslt - xslt import/export
|
@li @c filter.xslt - xslt import/export
|
||||||
@li @c oox.xmlstream - XmlStream class
|
@li @c oox.xmlstream - XmlStream class
|
||||||
|
@li @c oox.storage - ZipStorage class
|
||||||
|
|
||||||
@section formula
|
@section formula
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user