diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-06-23 11:47:53 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-06-23 14:38:14 +0200 |
commit | 5e028ad5dccc6ff1a9250baf2196f7a2f235e314 (patch) | |
tree | 6c6992e6fccf43b60141fb6ae32a6ad8e37cb84d /sw | |
parent | f905d6056606234ba53a26a3e4105ad3560d4b7b (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')
-rw-r--r-- | sw/source/filter/ww8/sortedarray.hxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par.cxx | 5 | ||||
-rw-r--r-- | sw/source/filter/xml/swxml.cxx | 36 | ||||
-rw-r--r-- | sw/source/uibase/uiview/viewsrch.cxx | 8 |
4 files changed, 8 insertions, 43 deletions
diff --git a/sw/source/filter/ww8/sortedarray.hxx b/sw/source/filter/ww8/sortedarray.hxx index 8038ad8a5344..7efec13aa9ff 100644 --- a/sw/source/filter/ww8/sortedarray.hxx +++ b/sw/source/filter/ww8/sortedarray.hxx @@ -95,7 +95,7 @@ namespace ww } if (bBroken) { - OSL_FAIL( OUStringToOString( sError, RTL_TEXTENCODING_ASCII_US ).getStr() ); + SAL_WARN( "sw", sError ); } #endif } diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index a12f89e25dd9..9eb7f693b77e 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -3337,10 +3337,7 @@ void SwWW8ImplReader::simpleAddTextToParagraph(const OUString& rAddString) return; #if OSL_DEBUG_LEVEL > 1 - { - OString sText(OUStringToOString(rAddString, RTL_TEXTENCODING_UTF8)); - SAL_INFO("sw.ww8", "<addTextToParagraph>" << sText.getStr() << "</addTextToParagraph>"); - } + SAL_INFO("sw.ww8", "<addTextToParagraph>" << rAddString << "</addTextToParagraph>"); #endif const SwContentNode *pCntNd = m_pPaM->GetContentNode(); 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; } diff --git a/sw/source/uibase/uiview/viewsrch.cxx b/sw/source/uibase/uiview/viewsrch.cxx index c94038539893..0c08d996dd27 100644 --- a/sw/source/uibase/uiview/viewsrch.cxx +++ b/sw/source/uibase/uiview/viewsrch.cxx @@ -498,13 +498,7 @@ void SwView::ExecSearch(SfxRequest& rReq) } break; default: -#if OSL_DEBUG_LEVEL > 1 - if(nSlot) - { - OString sStr("nSlot: " + OString::number(nSlot) + " wrong Dispatcher (viewsrch.cxx)"); - OSL_FAIL(sStr.getStr()); - } -#endif + SAL_WARN_IF( nSlot, "sw", "nSlot: " << nSlot << " wrong Dispatcher (viewsrch.cxx)" ); return; } } |