Kaydet (Commit) efe842ab authored tarafından Tor Lillqvist's avatar Tor Lillqvist

Add operator<< for CGRect for SAL_INFO goodness

Change-Id: I144c93d0bdd8758dcdf490f29051c8dcaea500d8
üst bc6295e0
...@@ -20,18 +20,22 @@ ...@@ -20,18 +20,22 @@
#ifndef INCLUDED_QUARTZ_UTILS_HXX #ifndef INCLUDED_QUARTZ_UTILS_HXX
#define INCLUDED_QUARTZ_UTILS_HXX #define INCLUDED_QUARTZ_UTILS_HXX
#include <rtl/ustring.hxx> #include <iostream>
#include <premac.h> #include <premac.h>
#include <CoreFoundation/CoreFoundation.h> #include <CoreFoundation/CoreFoundation.h>
#include <Foundation/Foundation.h> #include <Foundation/Foundation.h>
#include <postmac.h> #include <postmac.h>
#include <rtl/ustring.hxx>
rtl::OUString GetOUString( CFStringRef ); rtl::OUString GetOUString( CFStringRef );
rtl::OUString GetOUString( NSString* ); rtl::OUString GetOUString( NSString* );
CFStringRef CreateCFString( const rtl::OUString& ); CFStringRef CreateCFString( const rtl::OUString& );
NSString* CreateNSString( const rtl::OUString& ); NSString* CreateNSString( const rtl::OUString& );
std::ostream &operator <<(std::ostream& s, CGRect &rRect);
#endif // INCLUDED_QUARTZ_UTILS_HXX #endif // INCLUDED_QUARTZ_UTILS_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -17,6 +17,9 @@ ...@@ -17,6 +17,9 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 . * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/ */
#include <iostream>
#include <iomanip>
#include <rtl/alloc.h> #include <rtl/alloc.h>
#include <rtl/ustrbuf.hxx> #include <rtl/ustrbuf.hxx>
...@@ -64,4 +67,14 @@ NSString* CreateNSString( const rtl::OUString& rStr ) ...@@ -64,4 +67,14 @@ NSString* CreateNSString( const rtl::OUString& rStr )
return [[NSString alloc] initWithCharacters: rStr.getStr() length: rStr.getLength()]; 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: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment