diff options
author | Tor Lillqvist <tml@iki.fi> | 2013-04-08 00:38:58 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2013-04-08 02:14:17 +0300 |
commit | e1165d62aa33624c4beae0b2eada4db8c38f9c22 (patch) | |
tree | 6802263cfd4de170cc5f8da4852610575568a6aa /vcl | |
parent | 1c0ef28f57769459982e4464f7c5ddd649829407 (diff) |
Add SAL_INFO output operator for CGColorRef
Change-Id: Ie14e6ab19e43961559de21e6e82bd13f647f4e1f
Diffstat (limited to 'vcl')
-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: */ |