diff options
-rw-r--r-- | vcl/inc/quartz/utils.h | 1 | ||||
-rw-r--r-- | vcl/quartz/utils.cxx | 16 |
2 files changed, 17 insertions, 0 deletions
diff --git a/vcl/inc/quartz/utils.h b/vcl/inc/quartz/utils.h index a3d8a3647559..28cc508573e2 100644 --- a/vcl/inc/quartz/utils.h +++ b/vcl/inc/quartz/utils.h @@ -42,6 +42,7 @@ 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); +std::ostream &operator <<(std::ostream& s, CGColorRef pSize); #endif // INCLUDED_QUARTZ_UTILS_HXX diff --git a/vcl/quartz/utils.cxx b/vcl/quartz/utils.cxx index 9c76adc92a17..e0c49e84e43b 100644 --- a/vcl/quartz/utils.cxx +++ b/vcl/quartz/utils.cxx @@ -97,4 +97,20 @@ std::ostream &operator <<(std::ostream& s, CGSize &rSize) return s; } +std::ostream &operator <<(std::ostream& s, CGColorRef pColor) +{ +#ifndef SAL_LOG_INFO + (void) pColor; +#else + CFStringRef colorString = CFCopyDescription(pColor); + if (colorString) { + s << GetOUString(colorString); + CFRelease(colorString); + } else { + s << "NULL"; + } +#endif + return s; +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |