diff options
author | Tor Lillqvist <tml@iki.fi> | 2013-04-08 00:41:02 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2013-04-08 02:14:17 +0300 |
commit | 0d6ed6ff7c7c6b3c85283396eb2e165446f4b95f (patch) | |
tree | 294e0de6dde79da9214cac12a7abd24505921da0 /vcl | |
parent | e1165d62aa33624c4beae0b2eada4db8c38f9c22 (diff) |
Add SAL_INFO output operator for CTFontRef
Change-Id: If878ae08131ab425ea958f54fc0bd5a07fc76881
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/coretext/salcoretextfontutils.cxx | 16 | ||||
-rw-r--r-- | vcl/inc/coretext/common.h | 9 |
2 files changed, 22 insertions, 3 deletions
diff --git a/vcl/coretext/salcoretextfontutils.cxx b/vcl/coretext/salcoretextfontutils.cxx index 5b6b6c0027d3..8e90557ca802 100644 --- a/vcl/coretext/salcoretextfontutils.cxx +++ b/vcl/coretext/salcoretextfontutils.cxx @@ -608,4 +608,20 @@ bool CoreTextPhysicalFontFace::HasCJKSupport( void ) return m_bHasCJKSupport; } +std::ostream &operator <<(std::ostream& s, CTFontRef pFont) +{ +#ifndef SAL_LOG_INFO + (void) pFont; +#else + if (pFont) { + CFStringRef fontString = CTFontCopyFullName(pFont); + s << "{" << GetOUString(fontString) << "@" << CTFontGetSize(pFont) << "}"; + CFRelease(fontString); + } else { + s << "NULL"; + } +#endif + return s; +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/coretext/common.h b/vcl/inc/coretext/common.h index f00ebf7fe174..f26d48c9e738 100644 --- a/vcl/inc/coretext/common.h +++ b/vcl/inc/coretext/common.h @@ -20,18 +20,19 @@ #ifndef _VCL_CORETEXT_COMMON_H #define _VCL_CORETEXT_COMMON_H -#include <sal/types.h> -#include <premac.h> +#include <iostream> +#include <premac.h> #ifdef MACOSX #include <ApplicationServices/ApplicationServices.h> #else #include <CoreGraphics/CoreGraphics.h> #include <CoreText/CoreText.h> #endif - #include <postmac.h> +#include <sal/types.h> + #include <tools/debug.hxx> // CoreFoundation designers, in their wisdom, decided that CFRelease of NULL @@ -45,6 +46,8 @@ #include "vcl/salgtype.hxx" +std::ostream &operator <<(std::ostream& s, CTFontRef pFont); + #endif /* _VCL_CORETEXT_COMMON_H */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |