--- sal/inc/rtl/ustring.hxx	2006-05-30 16:07:29.000000000 +0000
+++ sal/inc/rtl/ustring.hxx	2006-06-01 15:46:53.000000000 +0000
@@ -50,11 +50,16 @@
 #ifndef _RTL_MEMORY_H_
 #include <rtl/memory.h>
 #endif
+#ifndef _OSL_THREAD_H_
+#include <osl/thread.h>
+#endif
 
 #if !defined EXCEPTIONS_OFF
 #include <new>
 #endif
 
+#include <ostream>
+
 namespace rtl
 {
 /* ======================================================================= */
@@ -1306,6 +1311,21 @@ inline OString OUStringToOString( const 
 
 } /* Namespace */
 
+/** Output OUString to a std ostream.
+
+    Mainly for debugging purposes.
+
+    Usage:
+        ::rtl::OUString aString;
+        ... something with aString ...
+        std::cerr << "The string is: " << aString << std::endl;
+ */
+inline std::ostream & operator<< ( std::ostream & rStream, const rtl::OUString & rString )
+{
+    rStream << rtl::OUStringToOString( rString, osl_getThreadTextEncoding() ).getStr();
+    return rStream;
+}
+
 #endif /* __cplusplus */
 
 #endif /* _RTL_USTRING_HXX */
