oox/source/docprop/ooxmldocpropimport.cxx |   22 +++++++---------------
 1 file changed, 7 insertions(+), 15 deletions(-)

New commits:
commit da1b4e50d97123b09e56d6dfaf8458a0890e3f05
Author: Fridrich Å trba <fridrich.st...@bluewin.ch>
Date:   Mon Sep 24 10:40:43 2012 +0200

    Revert "fdo#54609, fdo#45366: Exception while importing xlsx."
    
    We fixed the root cause of this exception.
    
    This reverts commit 3ad52a6453ff612409123db29dc74a9071789aab.
    
    Signed-off-by: Michael Meeks <michael.me...@suse.com>

diff --git a/oox/source/docprop/ooxmldocpropimport.cxx 
b/oox/source/docprop/ooxmldocpropimport.cxx
index b80069e..ef65173 100644
--- a/oox/source/docprop/ooxmldocpropimport.cxx
+++ b/oox/source/docprop/ooxmldocpropimport.cxx
@@ -77,7 +77,7 @@ Reference< XInterface > SAL_CALL 
DocumentPropertiesImport_createInstance( const
 
 namespace {
 
-Sequence< InputSource > lclGetRelatedStreams( const Reference< XStorage >& 
rxStorage, const OUString& rStreamType ) throw (RuntimeException, 
IllegalArgumentException)
+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 );
@@ -147,27 +147,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 (const 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() )
     {
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to