summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2013-04-07 19:08:50 +0300
committerTor Lillqvist <tml@iki.fi>2013-04-08 02:14:17 +0300
commit1c0ef28f57769459982e4464f7c5ddd649829407 (patch)
tree122af175d69fee0f3e3a0d4abefa1c466ee29447
parenta72e3ed81a0d619b81074cb80d7ef9d3d11feda6 (diff)
Add logging output operators for CGPoint and CGSize
Change-Id: I04ce457f002cfc0fdf3ab741a389082614035b17
-rw-r--r--vcl/inc/quartz/utils.h2
-rw-r--r--vcl/quartz/utils.cxx22
2 files changed, 23 insertions, 1 deletions
diff --git a/vcl/inc/quartz/utils.h b/vcl/inc/quartz/utils.h
index ed7e233a7285..a3d8a3647559 100644
--- a/vcl/inc/quartz/utils.h
+++ b/vcl/inc/quartz/utils.h
@@ -40,6 +40,8 @@ CFStringRef CreateCFString( const OUString& );
NSString* CreateNSString( const OUString& );
std::ostream &operator <<(std::ostream& s, CGRect &rRect);
+std::ostream &operator <<(std::ostream& s, CGPoint &rPoint);
+std::ostream &operator <<(std::ostream& s, CGSize &rSize);
#endif // INCLUDED_QUARTZ_UTILS_HXX
diff --git a/vcl/quartz/utils.cxx b/vcl/quartz/utils.cxx
index 390692c0ffc8..9c76adc92a17 100644
--- a/vcl/quartz/utils.cxx
+++ b/vcl/quartz/utils.cxx
@@ -72,7 +72,27 @@ 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 << ")";
+ s << rRect.size << "@" << rRect.origin;
+#endif
+ return s;
+}
+
+std::ostream &operator <<(std::ostream& s, CGPoint &rPoint)
+{
+#ifndef SAL_LOG_INFO
+ (void) rPoint;
+#else
+ s << "(" << rPoint.x << "," << rPoint.y << ")";
+#endif
+ return s;
+}
+
+std::ostream &operator <<(std::ostream& s, CGSize &rSize)
+{
+#ifndef SAL_LOG_INFO
+ (void) rSize;
+#else
+ s << rSize.width << "x" << rSize.height;
#endif
return s;
}