Kaydet (Commit) 7b832d54 authored tarafından rbuj's avatar rbuj Kaydeden (comit) Caolán McNamara

'NSNoUnderlineStyle' & ‘NSSingleUnderlineStyle’: Deprecated in OS X 10.9

Change-Id: If18df0c06a1bdec5ea54307f9c452a1edf533e15
Reviewed-on: https://gerrit.libreoffice.org/9740Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 202dac6e
......@@ -107,12 +107,20 @@ using namespace ::rtl;
@implementation AquaA11yTextAttributesWrapper : NSObject
+(int)convertUnderlineStyle:(PropertyValue)property {
#if MACOSX_SDK_VERSION >= 1090
int underlineStyle = NSUnderlineStyleNone;
#else
int underlineStyle = NSNoUnderlineStyle;
#endif
sal_Int16 value = 0;
property.Value >>= value;
if ( value != ::css_awt::FontUnderline::NONE
&& value != ::css_awt::FontUnderline::DONTKNOW) {
#if MACOSX_SDK_VERSION >= 1090
underlineStyle = NSUnderlineStyleSingle;
#else
underlineStyle = NSSingleUnderlineStyle;
#endif
}
return underlineStyle;
}
......@@ -218,7 +226,11 @@ using namespace ::rtl;
if ( property.Value.hasValue() ) {
if ( property.Name.equals ( attrUnderline ) ) {
int style = [ AquaA11yTextAttributesWrapper convertUnderlineStyle: property ];
#if MACOSX_SDK_VERSION >= 1090
if ( style != NSUnderlineStyleNone ) {
#else
if ( style != NSNoUnderlineStyle ) {
#endif
[ string addAttribute: NSAccessibilityUnderlineTextAttribute value: [ NSNumber numberWithInt: style ] range: range ];
}
} else if ( property.Name.equals ( attrFontname ) ) {
......
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