summaryrefslogtreecommitdiff
path: root/sal/inc
diff options
context:
space:
mode:
Diffstat (limited to 'sal/inc')
-rw-r--r--sal/inc/rtl/oustringostreaminserter.hxx16
-rw-r--r--sal/inc/rtl/ustring.hxx5
-rw-r--r--sal/inc/sal/log.hxx8
3 files changed, 15 insertions, 14 deletions
diff --git a/sal/inc/rtl/oustringostreaminserter.hxx b/sal/inc/rtl/oustringostreaminserter.hxx
index 632bc23492ce..28d7c17561d5 100644
--- a/sal/inc/rtl/oustringostreaminserter.hxx
+++ b/sal/inc/rtl/oustringostreaminserter.hxx
@@ -34,14 +34,6 @@
#include "rtl/textenc.h"
#include "rtl/ustring.hxx"
-/** Include this header to support rtl::OUString in std::ostream (and thus in
- CPPUNIT_ASSERT macros, for example).
-
- The rtl::OUString is converted to UTF-8.
-
- @since LibreOffice 3.5.
-*/
-
// The unittest uses slightly different code to help check that the proper
// calls are made. The class is put into a different namespace to make
// sure the compiler generates a different (if generating also non-inline)
@@ -57,6 +49,14 @@ namespace rtl {
#undef rtl
#endif
+/**
+ Support for rtl::OUString in std::ostream (and thus in
+ CPPUNIT_ASSERT or SAL_INFO macros, for example).
+
+ The rtl::OUString is converted to UTF-8.
+
+ @since LibreOffice 3.5.
+*/
template< typename charT, typename traits > std::basic_ostream<charT, traits> &
operator <<(
std::basic_ostream<charT, traits> & stream, rtl::OUString const & string)
diff --git a/sal/inc/rtl/ustring.hxx b/sal/inc/rtl/ustring.hxx
index ee1ba7f7eed5..093b6c953fa4 100644
--- a/sal/inc/rtl/ustring.hxx
+++ b/sal/inc/rtl/ustring.hxx
@@ -2085,4 +2085,9 @@ inline OString OUStringToOString( const OUString & rUnicode,
#endif /* _RTL_USTRING_HXX */
+// Include the ostream << operator directly here, so that it's always available
+// for SAL_INFO etc. Make sure it's outside of #ifdef _RTL_USTRING_HXX, because
+// includes ustring.hxx back.
+#include <rtl/oustringostreaminserter.hxx>
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/inc/sal/log.hxx b/sal/inc/sal/log.hxx
index 59c11cd02713..bb41a6f58e03 100644
--- a/sal/inc/sal/log.hxx
+++ b/sal/inc/sal/log.hxx
@@ -197,13 +197,9 @@ inline char const * unwrapStream(SAL_UNUSED_PARAMETER StreamIgnore const &) {
SAL_INFO("foo", "string " << s << " of length " << n)
- would be an example of such a call; if the given s is of type rtl::OUString,
+ would be an example of such a call.
- \#include "rtl/oustringostreaminserter.hxx"
-
- would make sure that an appropriate operator << is available.
-
- In either case, the composed message should be in UTF-8 and it should
+ In the composed message should be in UTF-8 and it should
contain no vertical formatting characters and no null characters
For the _IF variants, log output is only generated if the given condition is