From 5e028ad5dccc6ff1a9250baf2196f7a2f235e314 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 23 Jun 2017 11:47:53 +0200 Subject: simplify some string handling in tracing calls Change-Id: I0fb76562429e691400a02216019c7f96791cf9b3 Reviewed-on: https://gerrit.libreoffice.org/39159 Tested-by: Jenkins Reviewed-by: Noel Grandin --- svx/source/customshapes/EnhancedCustomShape2d.cxx | 4 +--- svx/source/form/fmsrcimp.cxx | 16 ++-------------- svx/source/svdraw/svdmodel.cxx | 9 ++------- 3 files changed, 5 insertions(+), 24 deletions(-) (limited to 'svx') diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx index 26fbc948bf94..e6bb4233d98c 100644 --- a/svx/source/customshapes/EnhancedCustomShape2d.cxx +++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx @@ -1943,9 +1943,7 @@ void EnhancedCustomShape2d::CreateSubPath( sal_Int32& rSrcPt, sal_Int32& rSegmen case UNKNOWN : default : { - OStringBuffer aString("CustomShapes::unknown PolyFlagValue :"); - aString.append(static_cast(nCommand)); - OSL_FAIL(aString.getStr()); + SAL_WARN( "svx", "CustomShapes::unknown PolyFlagValue :" << nCommand ); } break; #endif diff --git a/svx/source/form/fmsrcimp.cxx b/svx/source/form/fmsrcimp.cxx index 87d3dafc64cd..2ec434d312c8 100644 --- a/svx/source/form/fmsrcimp.cxx +++ b/svx/source/form/fmsrcimp.cxx @@ -211,26 +211,14 @@ bool FmSearchEngine::MoveCursor() } catch(css::sdbc::SQLException const& e) { -#if OSL_DEBUG_LEVEL > 0 - OStringBuffer sDebugMessage("FmSearchEngine::MoveCursor : catched a DatabaseException ("); - sDebugMessage.append(OUStringToOString(e.SQLState, RTL_TEXTENCODING_ASCII_US)); - sDebugMessage.append(") !"); - OSL_FAIL(sDebugMessage.getStr()); -#else (void)e; -#endif + SAL_WARN( "svx", "FmSearchEngine::MoveCursor: catched a DatabaseException: " << e.SQLState ); bSuccess = false; } catch(Exception const& e) { -#if OSL_DEBUG_LEVEL > 0 - OStringBuffer sDebugMessage("FmSearchEngine::MoveCursor : catched an Exception ("); - sDebugMessage.append(OUStringToOString(e.Message, RTL_TEXTENCODING_ASCII_US)); - sDebugMessage.append(") !"); - OSL_FAIL(sDebugMessage.getStr()); -#else (void)e; -#endif + SAL_WARN( "svx", "FmSearchEngine::MoveCursor: catched an Exception: " << e.Message); bSuccess = false; } catch(...) diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx index d487bfd25832..72afa042efae 100644 --- a/svx/source/svdraw/svdmodel.cxx +++ b/svx/source/svdraw/svdmodel.cxx @@ -249,13 +249,8 @@ SdrModel::~SdrModel() ClearUndoBuffer(); #ifdef DBG_UTIL - if(pAktUndoGroup) - { - OStringBuffer aStr("In the Dtor of the SdrModel there is an open Undo left: \""); - aStr.append(OUStringToOString(pAktUndoGroup->GetComment(), osl_getThreadTextEncoding())) - .append('\"'); - OSL_FAIL(aStr.getStr()); - } + SAL_WARN_IF(pAktUndoGroup, "svx", "In the Dtor of the SdrModel there is an open Undo left: \"" + << pAktUndoGroup->GetComment() << '\"'); #endif delete pAktUndoGroup; -- cgit