summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2013-11-03 17:39:20 +0200
committerTor Lillqvist <tml@collabora.com>2013-11-03 17:50:52 +0200
commit58ec629939bc0e31dc8fe8bfba6fba4f27e5bcc9 (patch)
tree99612725a36f536eadee42d7aa3b897add2a5429
parent51c2b2fc1edbfc5c04ae60d3989c0b62329dbd2b (diff)
Add operator<< for SAL_INFO and SAL_DEBUG use
Change-Id: I1da8d2fcf503f60ef7947e8956009e09c4b5c867
-rw-r--r--sw/inc/swrect.hxx14
1 files changed, 14 insertions, 0 deletions
diff --git a/sw/inc/swrect.hxx b/sw/inc/swrect.hxx
index b74a49101821..52182243b1de 100644
--- a/sw/inc/swrect.hxx
+++ b/sw/inc/swrect.hxx
@@ -18,8 +18,12 @@
*/
#ifndef _SWRECT_HXX
#define _SWRECT_HXX
+
+#include <ostream>
+
#include <sal/log.hxx>
#include <tools/gen.hxx>
+
class SvStream;
class SAL_WARN_UNUSED SwRect
@@ -346,6 +350,16 @@ inline SwRect::SwRect( long X, long Y, long W, long H ) :
{
}
+template< typename charT, typename traits >
+inline std::basic_ostream<charT, traits> & operator <<(
+ std::basic_ostream<charT, traits> & stream, const SwRect& rectangle )
+{
+ if (rectangle.IsEmpty())
+ return stream << "EMPTY";
+ else
+ return stream << rectangle.SSize()
+ << "@(" << rectangle.Pos() << ")";
+}
#endif //_SWRECT_HXX