workaround for kCTForegroundColorFromContextAttributeName unavailability

fixes "error: ‘kCTForegroundColorFromContextAttributeName’ was not declared in this scope"

see commits:
  5bc5387669bca8a0b410e295b0992fd2424a1536

Change-Id: Ifdf69ab2f9a6437d18a6d3e3f5d756beeed3ba5c
Reviewed-on: https://gerrit.libreoffice.org/9758
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
Douglas Mencken
2014-06-12 14:38:10 -04:00
committed by Caolán McNamara
parent bdbe854a4a
commit 4af1b78954

View File

@@ -27,6 +27,10 @@
#ifdef MACOSX
#include "osx/salinst.h"
#include "osx/saldata.hxx"
// kCTForegroundColorFromContextAttributeName is available on 10.5, but it is "hidden"
#ifndef kCTForegroundColorFromContextAttributeName
extern const CFStringRef kCTForegroundColorFromContextAttributeName;
#endif
#endif
#include "quartz/salgdi.h"
#include "quartz/utils.h"
@@ -103,7 +107,6 @@ CoreTextStyle::CoreTextStyle( const FontSelectPattern& rFSD )
// allow delayed setting the font color, i.e. after the text layout
CFDictionarySetValue( mpStyleDict, kCTForegroundColorFromContextAttributeName, kCFBooleanTrue );
#if 0 // LastResort is implicit in CoreText's font cascading
const void* aGFBDescriptors[] = { CTFontDescriptorCreateWithNameAndSize( CFSTR("LastResort"), 0) }; // TODO: use the full GFB list
const int nGfbCount = sizeof(aGFBDescriptors) / sizeof(*aGFBDescriptors);