summaryrefslogtreecommitdiff
path: root/sw/source/filter/xml/swxml.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-06-23 11:47:53 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-06-23 14:38:14 +0200
commit5e028ad5dccc6ff1a9250baf2196f7a2f235e314 (patch)
tree6c6992e6fccf43b60141fb6ae32a6ad8e37cb84d /sw/source/filter/xml/swxml.cxx
parentf905d6056606234ba53a26a3e4105ad3560d4b7b (diff)
simplify some string handling in tracing calls
Change-Id: I0fb76562429e691400a02216019c7f96791cf9b3 Reviewed-on: https://gerrit.libreoffice.org/39159 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/filter/xml/swxml.cxx')
-rw-r--r--sw/source/filter/xml/swxml.cxx36
1 files changed, 5 insertions, 31 deletions
diff --git a/sw/source/filter/xml/swxml.cxx b/sw/source/filter/xml/swxml.cxx
index 8282b081c2e8..61bd0949f002 100644
--- a/sw/source/filter/xml/swxml.cxx
+++ b/sw/source/filter/xml/swxml.cxx
@@ -194,12 +194,7 @@ ErrCode ReadThroughComponent(
if( bEncrypted )
return ERRCODE_SFX_WRONGPASSWORD;
-#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( "sw", "SAX parse exception caught while importing: " << r.Message );
const OUString sErr( OUString::number( r.LineNumber )
+ ","
@@ -229,46 +224,25 @@ ErrCode ReadThroughComponent(
if( bEncrypted )
return ERRCODE_SFX_WRONGPASSWORD;
-#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
-
+ SAL_WARN( "sw", "SAX exception caught while importing: " << r.Message);
return ERR_SWG_READ_ERROR;
}
catch(const packages::zip::ZipIOException& r)
{
(void)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
+ SAL_WARN( "sw", "Zip exception caught while importing: " << r.Message);
return ERRCODE_IO_BROKENPACKAGE;
}
catch(const io::IOException& r)
{
(void)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
+ SAL_WARN( "sw", "IO exception caught while importing: " << r.Message);
return ERR_SWG_READ_ERROR;
}
catch(const uno::Exception& r)
{
(void)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
+ SAL_WARN( "sw", "uno exception caught while importing: " << r.Message );
return ERR_SWG_READ_ERROR;
}