diff options
Diffstat (limited to 'svl')
-rw-r--r-- | svl/source/inc/poolio.hxx | 9 | ||||
-rw-r--r-- | svl/source/items/itempool.cxx | 2 | ||||
-rw-r--r-- | svl/source/items/poolio.cxx | 9 | ||||
-rw-r--r-- | svl/source/items/whassert.hxx | 25 |
4 files changed, 8 insertions, 37 deletions
diff --git a/svl/source/inc/poolio.hxx b/svl/source/inc/poolio.hxx index 1515779d33ed..15f55eebdb72 100644 --- a/svl/source/inc/poolio.hxx +++ b/svl/source/inc/poolio.hxx @@ -154,17 +154,8 @@ struct SfxItemPool_Impl #endif #if defined(DBG_UTIL) && defined(MSC) -#define SFX_TRACE(s,p) \ - { \ - ByteString aPtr(RTL_CONSTASCII_STRINGPARAM("0x0000:0x0000")); \ - _snprintf(const_cast< sal_Char *>(aPtr.GetBuffer()), aPtr.Len(), \ - "%lp", p ); \ - aPtr.Insert(s, 0); \ - DbgTrace( aPtr.GetBuffer() ); \ - } #define DBG(x) x #else -#define SFX_TRACE(s,p) #define DBG(x) #endif diff --git a/svl/source/items/itempool.cxx b/svl/source/items/itempool.cxx index 2bcef79a1bfc..cdcf217b1467 100644 --- a/svl/source/items/itempool.cxx +++ b/svl/source/items/itempool.cxx @@ -836,7 +836,6 @@ void SfxItemPool::Remove( const SfxPoolItem& rItem ) else { SFX_ASSERT( 0, rItem.Which(), "removing Item without ref" ); - SFX_TRACE( "to be removed, but not no refs: ", p ); } // ggf. kleinstmoegliche freie Position merken @@ -854,7 +853,6 @@ void SfxItemPool::Remove( const SfxPoolItem& rItem ) // nicht vorhanden SFX_ASSERT( 0, rItem.Which(), "removing Item not in Pool" ); - SFX_TRACE( "to be removed, but not in pool: ", &rItem ); } // ----------------------------------------------------------------------- diff --git a/svl/source/items/poolio.cxx b/svl/source/items/poolio.cxx index eb84af50e9d1..ce5bb32b7db4 100644 --- a/svl/source/items/poolio.cxx +++ b/svl/source/items/poolio.cxx @@ -32,6 +32,7 @@ #include <string.h> #include <stdio.h> +#include <sal/log.h> #include <tools/solar.h> #include <svl/itempool.hxx> #include "whassert.hxx" @@ -955,14 +956,12 @@ SvStream &SfxItemPool::Load1_Impl(SvStream &rStream) delete rpNewItem; rpNewItem = pOldItem; bFound = true; - SFX_TRACE( "reusing item", pOldItem ); + SAL_INFO_S("svl", "reusing item" << pOldItem); break; } } - if ( !bFound ) - { - SFX_TRACE( "item not found: ", pOldItem ); - } + SAL_INFO_IF_S( + !bFound, "svl", "item not found: " << pOldItem); } } } diff --git a/svl/source/items/whassert.hxx b/svl/source/items/whassert.hxx index 379d4794458d..d994f0d33f66 100644 --- a/svl/source/items/whassert.hxx +++ b/svl/source/items/whassert.hxx @@ -28,29 +28,12 @@ #ifndef _SFX_WHASSERT_HXX #define _SFX_WHASSERT_HXX -#include <tools/debug.hxx> -#include <rtl/strbuf.hxx> +#include "sal/config.h" -//------------------------------------------------------------------------ - -#ifdef DBG_UTIL -#define SFX_ASSERT( bCondition, nId, sMessage ) \ -{ \ - if ( DbgIsAssert() ) \ - { \ - if ( !(bCondition) ) \ - { \ - rtl::OStringBuffer aMsg(sMessage); \ - aMsg.append(RTL_CONSTASCII_STRINGPARAM("\nwith Id/Pos: ")); \ - aMsg.append(static_cast<sal_Int32>(nId)); \ - DbgError(aMsg.getStr(), __FILE__, __LINE__); \ - } \ - } \ -} -#else -#define SFX_ASSERT( bCondition, nId, sMessage ) -#endif +#include "sal/log.h" +#define SFX_ASSERT( bCondition, nId, sMessage ) SAL_WARN_IF_S( \ + !(bCondition), "svl", (sMessage) << ", with ID/pos " << (nId)); #endif |