[Libreoffice-commits] core.git: Branch 'ports/macosx10.5/master' - vcl/quartz
Douglas Mencken
dougmencken at gmail.com
Sun Oct 5 15:20:27 PDT 2014
vcl/quartz/CTRunData.hxx | 12 ++++++++++++
vcl/quartz/ctfonts.cxx | 4 ++++
2 files changed, 16 insertions(+)
New commits:
commit 81c16c499e9f73cc576bd34bd712910cde07d1ee
Author: Douglas Mencken <dougmencken at gmail.com>
Date: Sun Oct 5 18:02:00 2014 -0400
vcl-quartz: restore conditional code for SDKs < 10.8
Fixes: fatal error: CoreGraphics/CoreGraphics.h: No such file or directory
Related commit: 4fa8282816cb39692678e9da6b6693e821a3039b
Change-Id: I158339662c45059a77f025254c2e5ec4a734c328
diff --git a/vcl/quartz/CTRunData.hxx b/vcl/quartz/CTRunData.hxx
index 40c2a0a..b6d1a1d 100644
--- a/vcl/quartz/CTRunData.hxx
+++ b/vcl/quartz/CTRunData.hxx
@@ -10,8 +10,20 @@
#define CTRunData_Included
#include "premac.h"
+#if defined(MACOSX) && MACOSX_SDK_VERSION < 1080
+#include <ApplicationServices/ApplicationServices.h>
+#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060
+// The following symbols are SPI (System Programming Interface) in 10.5
+extern "C" {
+ void CTRunGetAdvances(CTRunRef run, CFRange range, CGSize buffer[]);
+ const CGSize* CTRunGetAdvancesPtr(CTRunRef run);
+ extern const CFStringRef kCTTypesetterOptionForcedEmbeddingLevel;
+}
+#endif
+#else
#include <CoreGraphics/CoreGraphics.h>
#include <CoreText/CoreText.h>
+#endif
#include "postmac.h"
class CTRunData
diff --git a/vcl/quartz/ctfonts.cxx b/vcl/quartz/ctfonts.cxx
index 8a06d3b..38cf249 100644
--- a/vcl/quartz/ctfonts.cxx
+++ b/vcl/quartz/ctfonts.cxx
@@ -249,7 +249,11 @@ int CoreTextFontData::GetFontTable( const char pTagName[5], unsigned char* pResu
// get the raw table length
CTFontDescriptorRef pFontDesc = reinterpret_cast<CTFontDescriptorRef>( GetFontId());
CTFontRef rCTFont = CTFontCreateWithFontDescriptor( pFontDesc, 0.0, NULL);
+#if defined(MACOSX) && MACOSX_SDK_VERSION < 1080
+ const uint32_t opts( kCTFontTableOptionExcludeSynthetic );
+#else
const uint32_t opts( kCTFontTableOptionNoOptions );
+#endif
CFDataRef pDataRef = CTFontCopyTable( rCTFont, nTagCode, opts);
CFRelease( rCTFont);
if( !pDataRef)
More information about the Libreoffice-commits
mailing list