diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2011-11-22 09:34:46 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2011-11-22 09:41:47 +0100 |
commit | 70a6b9ffbd676a1384433a86205d2cd4f2d4f4b1 (patch) | |
tree | ffb31ef817b5f2037cf7c332da422b9179d613d5 /basic/source/sbx | |
parent | f2972242673cc9608960e9ca70e82766be5275e3 (diff) |
New sal/log.h obsoletes osl/diagnose.h and tools/debug.hxx.
* New SAL_INFO..., SAL_WARN... macros.
* New SAL_STREAM supersedes OSL_FORMAT.
* oustringostreaminserter.hxx moved from unotest to rtl (and always UTF-8 now).
* TODO to enable GCC __attribute__((format)) in sal/log.h (requires call-site
cleanup).
* Further functionality in tools/debug.hxx (DBG_MEMTEST, DBG_CTOR, etc.) not yet
addressed.
* Some replacements tools String -> rtl::OUString.
Diffstat (limited to 'basic/source/sbx')
-rw-r--r-- | basic/source/sbx/sbxbase.cxx | 25 |
1 files changed, 5 insertions, 20 deletions
diff --git a/basic/source/sbx/sbxbase.cxx b/basic/source/sbx/sbxbase.cxx index 1520c437638f..fa831ab36bd6 100644 --- a/basic/source/sbx/sbxbase.cxx +++ b/basic/source/sbx/sbxbase.cxx @@ -38,7 +38,8 @@ #include <basic/sbxbase.hxx> #include <rtl/instance.hxx> -#include <rtl/strbuf.hxx> +#include <rtl/oustringostreaminserter.hxx> +#include <sal/log.h> // AppData-Structure for SBX: @@ -212,19 +213,11 @@ SbxBase* SbxBase::Create( sal_uInt16 nSbxId, sal_uInt32 nCreator ) if( pNew ) break; } -#ifdef DBG_UTIL - if( !pNew ) - { - rtl::OStringBuffer aMsg( - RTL_CONSTASCII_STRINGPARAM("SBX: Keine Factory fuer SBX-ID ")); - aMsg.append(static_cast<sal_Int32>(nSbxId)); - DbgError(aMsg.getStr()); - } -#endif + SAL_WARN_IF_S(!pNew, "basic", "No factory for SBX ID " << nSbxId); return pNew; } -SbxObject* SbxBase::CreateObject( const XubString& rClass ) +SbxObject* SbxBase::CreateObject( const rtl::OUString& rClass ) { SbxAppData& r = GetSbxData_Impl(); SbxObject* pNew = NULL; @@ -234,15 +227,7 @@ SbxObject* SbxBase::CreateObject( const XubString& rClass ) if( pNew ) break; } -#ifdef DBG_UTIL - if( !pNew ) - { - ByteString aMsg( "SBX: Keine Factory fuer Objektklasse " ); - ByteString aClassStr( (const UniString&)rClass, RTL_TEXTENCODING_ASCII_US ); - aMsg += aClassStr; - DbgError( (const char*)aMsg.GetBuffer() ); - } -#endif + SAL_WARN_IF_S(!pNew, "basic", "No factory for object class " << rClass); return pNew; } |