summaryrefslogtreecommitdiff
path: root/tools
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 /tools
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 'tools')
-rw-r--r--tools/source/rc/resmgr.cxx6
-rw-r--r--tools/source/ref/pstm.cxx17
2 files changed, 4 insertions, 19 deletions
diff --git a/tools/source/rc/resmgr.cxx b/tools/source/rc/resmgr.cxx
index 3e808571923e..4556423c132b 100644
--- a/tools/source/rc/resmgr.cxx
+++ b/tools/source/rc/resmgr.cxx
@@ -801,11 +801,7 @@ void ResMgr::Init( const OUString& rFileName )
if ( !pImpRes )
{
-#ifdef DBG_UTIL
- OStringBuffer aStr("Resourcefile not found:\n");
- aStr.append(OUStringToOString(rFileName, RTL_TEXTENCODING_UTF8));
- OSL_FAIL(aStr.getStr());
-#endif
+ SAL_WARN( "tools.rc", "Resourcefile not found: " << rFileName);
RscException_Impl();
}
#ifdef DBG_UTIL
diff --git a/tools/source/ref/pstm.cxx b/tools/source/ref/pstm.cxx
index 77856390e2a6..41b8cacf3135 100644
--- a/tools/source/ref/pstm.cxx
+++ b/tools/source/ref/pstm.cxx
@@ -454,10 +454,7 @@ void SvPersistStream::ReadObj
if( !pFunc )
{
#ifdef DBG_UTIL
- OStringBuffer aStr("no class with id: " );
- aStr.append(static_cast<sal_Int32>(nClassId));
- aStr.append(" registered");
- SAL_INFO("tools", aStr.getStr());
+ SAL_INFO( "tools", "no class with id: " << nClassId << " registered" );
#else
(void)nObjLen;
#endif
@@ -475,16 +472,8 @@ void SvPersistStream::ReadObj
SAL_WARN_IF( (nHdr & P_DBGUTIL) && (nId != nNewId), "tools","read write id conflict: not the same");
rpObj->Load( *this );
-#ifdef DBG_UTIL
- if( nObjLen + nObjPos != Tell() )
- {
- OStringBuffer aStr("false object len: read = ");
- aStr.append(static_cast<sal_Int64>((long)(Tell() - nObjPos)));
- aStr.append(", should = ");
- aStr.append(static_cast<sal_Int32>(nObjLen));
- OSL_FAIL(aStr.getStr());
- }
-#endif
+ SAL_WARN_IF( nObjLen + nObjPos != Tell(), "tools", "false object len: read = " << (Tell() - nObjPos)
+ << ", should = " << nObjLen);
rpObj->RestoreNoDelete();
rpObj->ReleaseRef();
}