sc/source/filter/xml/xmlwrap.cxx |   12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

New commits:
commit e91290190e4b2ef3cc07efb2bda42ea37b246354
Author:     Lodev <lo...@ossii.com.tw>
AuthorDate: Tue Dec 5 14:27:17 2023 +0800
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Tue Dec 12 10:47:42 2023 +0100

    tdf#158388 Allow user to open ODS file with corrupted meta.xml & 
settings.xml
    
    1. Follow sd/sw module to give corrupted meta.xml and settings.xml only
    warnings instead of blocking user to open.
    
    2. only set rError after all the if's and Removing the unnecessary bRet 
assignment
    
    Change-Id: I6dd6acd919d1fbec91ef4a0d0e78623f0c65dc40
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160605
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>
    Tested-by: Mike Kaganski <mike.kagan...@collabora.com>

diff --git a/sc/source/filter/xml/xmlwrap.cxx b/sc/source/filter/xml/xmlwrap.cxx
index 9794af9593a1..a701b6e913f5 100644
--- a/sc/source/filter/xml/xmlwrap.cxx
+++ b/sc/source/filter/xml/xmlwrap.cxx
@@ -518,24 +518,16 @@ bool ScXMLImportWrapper::Import( ImportFlags nMode, 
ErrCodeMsg& rError )
     if (xStatusIndicator.is())
         xStatusIndicator->end();
 
-    bool bRet = false;
     if (nDocRetval)
-    {
         rError = nDocRetval;
-        if (nDocRetval == SCWARN_IMPORT_RANGE_OVERFLOW ||
-            nDocRetval == SCWARN_IMPORT_ROW_OVERFLOW ||
-            nDocRetval == SCWARN_IMPORT_COLUMN_OVERFLOW ||
-            nDocRetval == SCWARN_IMPORT_SHEET_OVERFLOW)
-            bRet = true;
-    }
     else if (nStylesRetval)
         rError = nStylesRetval;
     else if (nMetaRetval)
         rError = nMetaRetval;
     else if (nSettingsRetval)
         rError = nSettingsRetval;
-    else
-        bRet = true;
+
+    bool bRet = !rError.IsError();
 
     ::svx::DropUnusedNamedItems(xModel);
 

Reply via email to