diff options
author | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2012-09-24 10:51:09 +0200 |
---|---|---|
committer | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2012-09-24 10:51:34 +0200 |
commit | 0671ba1329adf142c26c20a36b4845aea05fe08e (patch) | |
tree | 975c334de773f88877851fce7f7e721235a59323 /oox/source | |
parent | af6b7d8ba30d395e5f4a17876526434cf0a06005 (diff) |
Revert "fdo#54609: Exception while importing xlsx."
We fixed a root cause of that exception.
This reverts commit 0f0bd022b6f8ae89655a6e47964842086a9beb80.
Conflicts:
oox/source/docprop/ooxmldocpropimport.cxx
Change-Id: Ica3691e967a30722516420997e6e49fbf38f20d2
Diffstat (limited to 'oox/source')
-rw-r--r-- | oox/source/docprop/ooxmldocpropimport.cxx | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/oox/source/docprop/ooxmldocpropimport.cxx b/oox/source/docprop/ooxmldocpropimport.cxx index e620b0f4f3fc..9339c5362777 100644 --- a/oox/source/docprop/ooxmldocpropimport.cxx +++ b/oox/source/docprop/ooxmldocpropimport.cxx @@ -68,7 +68,7 @@ Reference< XInterface > SAL_CALL DocumentPropertiesImport_createInstance( const namespace { -Sequence< InputSource > lclGetRelatedStreams( const Reference< XStorage >& rxStorage, const OUString& rStreamType ) throw (Exception) +Sequence< InputSource > lclGetRelatedStreams( const Reference< XStorage >& rxStorage, const OUString& rStreamType ) throw (RuntimeException) { Reference< XRelationshipAccess > xRelation( rxStorage, UNO_QUERY_THROW ); Reference< XHierarchicalStorageAccess > xHierarchy( rxStorage, UNO_QUERY_THROW ); @@ -138,26 +138,19 @@ void SAL_CALL DocumentPropertiesImport::importProperties( const Reference< XStorage >& rxSource, const Reference< XDocumentProperties >& rxDocumentProperties ) throw (RuntimeException, IllegalArgumentException, SAXException, Exception) { - Sequence< InputSource > aCoreStreams; - Sequence< InputSource > aExtStreams; - Sequence< InputSource > aCustomStreams; - if( !mxContext.is() ) throw RuntimeException(); if( !rxSource.is() || !rxDocumentProperties.is() ) throw IllegalArgumentException(); - try { - aCoreStreams = lclGetRelatedStreams( rxSource, CREATE_OFFICEDOC_RELATION_TYPE( "metadata/core-properties" ) ); - // MS Office seems to have a bug, so we have to do similar handling - if( !aCoreStreams.hasElements() ) - aCoreStreams = lclGetRelatedStreams( rxSource, CREATE_PACKAGE_RELATION_TYPE( "metadata/core-properties" ) ); + Sequence< InputSource > aCoreStreams = lclGetRelatedStreams( rxSource, CREATE_OFFICEDOC_RELATION_TYPE( "metadata/core-properties" ) ); + // MS Office seems to have a bug, so we have to do similar handling + if( !aCoreStreams.hasElements() ) + aCoreStreams = lclGetRelatedStreams( rxSource, CREATE_PACKAGE_RELATION_TYPE( "metadata/core-properties" ) ); - aExtStreams = lclGetRelatedStreams( rxSource, CREATE_OFFICEDOC_RELATION_TYPE( "extended-properties" ) ); - aCustomStreams = lclGetRelatedStreams( rxSource, CREATE_OFFICEDOC_RELATION_TYPE( "custom-properties" ) ); - } - catch(Exception) { } + Sequence< InputSource > aExtStreams = lclGetRelatedStreams( rxSource, CREATE_OFFICEDOC_RELATION_TYPE( "extended-properties" ) ); + Sequence< InputSource > aCustomStreams = lclGetRelatedStreams( rxSource, CREATE_OFFICEDOC_RELATION_TYPE( "custom-properties" ) ); if( aCoreStreams.hasElements() || aExtStreams.hasElements() || aCustomStreams.hasElements() ) { |