diff options
author | Tor Lillqvist <tml@collabora.com> | 2013-11-03 17:39:20 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2013-11-03 17:50:52 +0200 |
commit | 58ec629939bc0e31dc8fe8bfba6fba4f27e5bcc9 (patch) | |
tree | 99612725a36f536eadee42d7aa3b897add2a5429 | |
parent | 51c2b2fc1edbfc5c04ae60d3989c0b62329dbd2b (diff) |
Add operator<< for SAL_INFO and SAL_DEBUG use
Change-Id: I1da8d2fcf503f60ef7947e8956009e09c4b5c867
-rw-r--r-- | sw/inc/swrect.hxx | 14 |
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 |