[Libreoffice-commits] core.git: sc/source

Matúš Kukan matus.kukan at gmail.com
Wed Dec 30 10:30:07 PST 2015


 sc/source/filter/xml/xmlwrap.cxx |   40 ++++-----------------------------------
 1 file changed, 5 insertions(+), 35 deletions(-)

New commits:
commit 6c2a9102eeb4d3de6a64780eb2b97415b15ce4a9
Author: Matúš Kukan <matus.kukan at gmail.com>
Date:   Tue Dec 29 21:37:01 2015 +0100

    Use SAL_WARN here
    
    Change-Id: Ibfa0deed6c3a26ea90c9be327bc1d4b66be95bff

diff --git a/sc/source/filter/xml/xmlwrap.cxx b/sc/source/filter/xml/xmlwrap.cxx
index b63e140..0df5913 100644
--- a/sc/source/filter/xml/xmlwrap.cxx
+++ b/sc/source/filter/xml/xmlwrap.cxx
@@ -209,12 +209,7 @@ sal_uInt32 ScXMLImportWrapper::ImportFromComponent(const uno::Reference<uno::XCo
             nReturn = ERRCODE_SFX_WRONGPASSWORD;
         else
         {
-
-#if OSL_DEBUG_LEVEL > 0
-            OStringBuffer aError("SAX parse exception caught while importing:\n");
-            aError.append(OUStringToOString(r.Message, RTL_TEXTENCODING_ASCII_US));
-            OSL_FAIL(aError.getStr());
-#endif
+            SAL_WARN("sc.filter", "SAX parse exception caught while importing: " << r.Message);
 
             OUString sErr = OUString::number( r.LineNumber ) +
                           "," +
@@ -245,51 +240,26 @@ sal_uInt32 ScXMLImportWrapper::ImportFromComponent(const uno::Reference<uno::XCo
             nReturn = ERRCODE_SFX_WRONGPASSWORD;
         else
         {
-
-#if OSL_DEBUG_LEVEL > 0
-            OStringBuffer aError("SAX exception caught while importing:\n");
-            aError.append(OUStringToOString(r.Message,
-                RTL_TEXTENCODING_ASCII_US));
-            OSL_FAIL(aError.getStr());
-#endif
-            (void)r;    // avoid warning in product version
+            SAL_WARN("sc.filter", "SAX exception caught while importing: " << r.Message);
 
             nReturn = SCERR_IMPORT_FORMAT;
         }
     }
     catch( const packages::zip::ZipIOException& r )
     {
-#if OSL_DEBUG_LEVEL > 0
-        OStringBuffer aError("Zip exception caught while importing:\n");
-        aError.append(OUStringToOString(r.Message,
-            RTL_TEXTENCODING_ASCII_US));
-        OSL_FAIL( aError.getStr() );
-#endif
-        (void)r;    // avoid warning in product version
+        SAL_WARN("sc.filter", "Zip exception caught while importing: " << r.Message);
 
         nReturn = ERRCODE_IO_BROKENPACKAGE;
     }
     catch( const io::IOException& r )
     {
-#if OSL_DEBUG_LEVEL > 0
-        OStringBuffer aError("IO exception caught while importing:\n");
-        aError.append(OUStringToOString(r.Message,
-            RTL_TEXTENCODING_ASCII_US));
-        OSL_FAIL(aError.getStr());
-#endif
-        (void)r;    // avoid warning in product version
+        SAL_WARN("sc.filter", "IO exception caught while importing: " << r.Message);
 
         nReturn = SCERR_IMPORT_OPEN;
     }
     catch( const uno::Exception& r )
     {
-#if OSL_DEBUG_LEVEL > 0
-        OStringBuffer aError("uno exception caught while importing:\n");
-        aError.append(OUStringToOString(r.Message,
-            RTL_TEXTENCODING_ASCII_US));
-        OSL_FAIL(aError.getStr());
-#endif
-        (void)r;    // avoid warning in product version
+        SAL_WARN("sc.filter", "uno exception caught while importing: " << r.Message);
 
         nReturn = SCERR_IMPORT_UNKNOWN;
     }


More information about the Libreoffice-commits mailing list