From 70a6b9ffbd676a1384433a86205d2cd4f2d4f4b1 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 22 Nov 2011 09:34:46 +0100 Subject: 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. --- cppu/qa/cppumaker/test_cppumaker.cxx | 15 +-------------- cppu/qa/test_unotype.cxx | 15 +-------------- 2 files changed, 2 insertions(+), 28 deletions(-) (limited to 'cppu') diff --git a/cppu/qa/cppumaker/test_cppumaker.cxx b/cppu/qa/cppumaker/test_cppumaker.cxx index 11435e544b9a..bac4b167eca9 100644 --- a/cppu/qa/cppumaker/test_cppumaker.cxx +++ b/cppu/qa/cppumaker/test_cppumaker.cxx @@ -372,26 +372,13 @@ #include #include #include +#include "rtl/oustringostreaminserter.hxx" #include "rtl/ustring.h" #include "rtl/ustring.hxx" #include #include -//TODO, copied here from test/oustringostreaminserter.hxx, make DRY again: -#include "osl/thread.h" -namespace rtl { -template< typename charT, typename traits > std::basic_ostream & -operator <<( - std::basic_ostream & stream, rtl::OUString const & string) -{ - return stream << - rtl::OUStringToOString(string, osl_getThreadTextEncoding()).getStr(); - // best effort; potentially loses data due to conversion failures and - // embedded null characters -} -} - namespace com { namespace sun { namespace star { namespace uno { std::ostream & operator <<( diff --git a/cppu/qa/test_unotype.cxx b/cppu/qa/test_unotype.cxx index dbb13d6b1d1f..fa2995b2e2cd 100644 --- a/cppu/qa/test_unotype.cxx +++ b/cppu/qa/test_unotype.cxx @@ -55,24 +55,11 @@ #include "com/sun/star/uno/XComponentContext.hpp" #include "com/sun/star/uno/XInterface.hpp" #include "cppu/unotype.hxx" +#include "rtl/oustringostreaminserter.hxx" #include "rtl/ustring.h" #include "rtl/ustring.hxx" #include "sal/types.h" -//TODO, copied here from test/oustringostreaminserter.hxx, make DRY again: -#include "osl/thread.h" -namespace rtl { -template< typename charT, typename traits > std::basic_ostream & -operator <<( - std::basic_ostream & stream, rtl::OUString const & string) -{ - return stream << - rtl::OUStringToOString(string, osl_getThreadTextEncoding()).getStr(); - // best effort; potentially loses data due to conversion failures and - // embedded null characters -} -} - namespace com { namespace sun { namespace star { namespace uno { class Any; } } } } -- cgit