diff options
author | Tor Lillqvist <tml@iki.fi> | 2013-04-06 13:35:41 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2013-04-07 01:13:32 +0300 |
commit | efe842ab529646061756e0dfe9b19f8b43a31385 (patch) | |
tree | 842287d2830ca16c10133d4d8638337feddd97ad /vcl | |
parent | bc6295e0b3cbb1544b31fd2e61d95e307c227f9d (diff) |
Add operator<< for CGRect for SAL_INFO goodness
Change-Id: I144c93d0bdd8758dcdf490f29051c8dcaea500d8
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/quartz/utils.h | 6 | ||||
-rw-r--r-- | vcl/quartz/utils.cxx | 13 |
2 files changed, 18 insertions, 1 deletions
diff --git a/vcl/inc/quartz/utils.h b/vcl/inc/quartz/utils.h index 01b1f1372fa8..c23c484dc0dc 100644 --- a/vcl/inc/quartz/utils.h +++ b/vcl/inc/quartz/utils.h @@ -20,18 +20,22 @@ #ifndef INCLUDED_QUARTZ_UTILS_HXX #define INCLUDED_QUARTZ_UTILS_HXX -#include <rtl/ustring.hxx> +#include <iostream> #include <premac.h> #include <CoreFoundation/CoreFoundation.h> #include <Foundation/Foundation.h> #include <postmac.h> +#include <rtl/ustring.hxx> + rtl::OUString GetOUString( CFStringRef ); rtl::OUString GetOUString( NSString* ); CFStringRef CreateCFString( const rtl::OUString& ); NSString* CreateNSString( const rtl::OUString& ); +std::ostream &operator <<(std::ostream& s, CGRect &rRect); + #endif // INCLUDED_QUARTZ_UTILS_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/quartz/utils.cxx b/vcl/quartz/utils.cxx index c2db4d24b814..8319752016b6 100644 --- a/vcl/quartz/utils.cxx +++ b/vcl/quartz/utils.cxx @@ -17,6 +17,9 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <iostream> +#include <iomanip> + #include <rtl/alloc.h> #include <rtl/ustrbuf.hxx> @@ -64,4 +67,14 @@ NSString* CreateNSString( const rtl::OUString& rStr ) return [[NSString alloc] initWithCharacters: rStr.getStr() length: rStr.getLength()]; } +std::ostream &operator <<(std::ostream& s, CGRect &rRect) +{ +#ifndef SAL_LOG_INFO + (void) rRect; +#else + s << (int) rRect.size.width << "x" << (int) rRect.size.height << "@(" << (int) rRect.origin.x << "," << (int) rRect.origin.y << ")"; +#endif + return s; +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |