summaryrefslogtreecommitdiff
path: root/basic/source/app
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2011-11-22 09:34:46 +0100
committerStephan Bergmann <sbergman@redhat.com>2011-11-22 09:41:47 +0100
commit70a6b9ffbd676a1384433a86205d2cd4f2d4f4b1 (patch)
treeffb31ef817b5f2037cf7c332da422b9179d613d5 /basic/source/app
parentf2972242673cc9608960e9ca70e82766be5275e3 (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/app')
-rw-r--r--basic/source/app/app.cxx17
1 files changed, 9 insertions, 8 deletions
diff --git a/basic/source/app/app.cxx b/basic/source/app/app.cxx
index 72f3ab0cd5e3..e0175696726e 100644
--- a/basic/source/app/app.cxx
+++ b/basic/source/app/app.cxx
@@ -70,7 +70,9 @@
#include <ucbhelper/content.hxx>
#include <unotools/syslocale.hxx>
+#include <rtl/oustringostreaminserter.hxx>
#include <rtl/strbuf.hxx>
+#include <sal/log.h>
using namespace comphelper;
using namespace cppu;
@@ -241,8 +243,9 @@ int BasicApp::Main( )
DbgSetPrintTestTool( DBG_TestToolDebugMessageFilter );
DBG_INSTOUTERROR( DBG_OUT_TESTTOOL );
- if ( osl_setDebugMessageFunc( osl_TestToolDebugMessageFilter ) )
- OSL_FAIL("osl_setDebugMessageFunc returns non NULL pointer");
+ SAL_WARN_IF(
+ osl_setDebugMessageFunc(osl_TestToolDebugMessageFilter), "basic",
+ "osl_setDebugMessageFunc returns non NULL pointer");
#endif
ResMgr::SetReadStringHook( ReplaceStringHookProc );
@@ -1849,12 +1852,10 @@ String BasicFrame::GenRealString( const String &aResString )
}
else
{
- OSL_FAIL(
- OSL_FORMAT(
- "Unknown replacement in String: %s",
- rtl::OUStringToOString(
- aResult.Copy(nStart, nEnd - nStart),
- RTL_TEXTENCODING_UTF8).getStr()));
+ SAL_WARN_S(
+ "basic",
+ "Unknown replacement in String: "
+ << rtl::OUString(aResult.Copy(nStart, nEnd - nStart)));
nStartPos = nStartPos + StartKenn.Len();
}
}