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

Add SAL_INFO output operator for CTFontRef

Change-Id: If878ae08131ab425ea958f54fc0bd5a07fc76881
üst e1165d62
...@@ -608,4 +608,20 @@ bool CoreTextPhysicalFontFace::HasCJKSupport( void ) ...@@ -608,4 +608,20 @@ bool CoreTextPhysicalFontFace::HasCJKSupport( void )
return m_bHasCJKSupport; 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: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -20,18 +20,19 @@ ...@@ -20,18 +20,19 @@
#ifndef _VCL_CORETEXT_COMMON_H #ifndef _VCL_CORETEXT_COMMON_H
#define _VCL_CORETEXT_COMMON_H #define _VCL_CORETEXT_COMMON_H
#include <sal/types.h> #include <iostream>
#include <premac.h>
#include <premac.h>
#ifdef MACOSX #ifdef MACOSX
#include <ApplicationServices/ApplicationServices.h> #include <ApplicationServices/ApplicationServices.h>
#else #else
#include <CoreGraphics/CoreGraphics.h> #include <CoreGraphics/CoreGraphics.h>
#include <CoreText/CoreText.h> #include <CoreText/CoreText.h>
#endif #endif
#include <postmac.h> #include <postmac.h>
#include <sal/types.h>
#include <tools/debug.hxx> #include <tools/debug.hxx>
// CoreFoundation designers, in their wisdom, decided that CFRelease of NULL // CoreFoundation designers, in their wisdom, decided that CFRelease of NULL
...@@ -45,6 +46,8 @@ ...@@ -45,6 +46,8 @@
#include "vcl/salgtype.hxx" #include "vcl/salgtype.hxx"
std::ostream &operator <<(std::ostream& s, CTFontRef pFont);
#endif /* _VCL_CORETEXT_COMMON_H */ #endif /* _VCL_CORETEXT_COMMON_H */
/* 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