summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vcl/inc/osx/salinst.h2
-rw-r--r--vcl/osx/DropTarget.cxx7
-rw-r--r--vcl/osx/a11ytextattributeswrapper.mm24
-rw-r--r--vcl/osx/salframe.cxx97
-rw-r--r--vcl/osx/salinst.cxx40
-rw-r--r--vcl/osx/salmenu.cxx24
-rw-r--r--vcl/osx/salnsmenu.mm18
-rw-r--r--vcl/osx/saltimer.cxx5
-rw-r--r--vcl/osx/vclnsapp.mm31
9 files changed, 87 insertions, 161 deletions
diff --git a/vcl/inc/osx/salinst.h b/vcl/inc/osx/salinst.h
index c94d5871a1df..3be765057ca9 100644
--- a/vcl/inc/osx/salinst.h
+++ b/vcl/inc/osx/salinst.h
@@ -145,7 +145,7 @@ public:
void startedPrintJob() { mnActivePrintJobs++; }
void endedPrintJob() { mnActivePrintJobs--; }
- // event subtypes for NSApplicationDefined events
+ // event subtypes for NSEventTypeApplicationDefined events
static const short AppExecuteSVMain = 1;
static const short AppStartTimerEvent = 10;
static const short YieldWakeupEvent = 20;
diff --git a/vcl/osx/DropTarget.cxx b/vcl/osx/DropTarget.cxx
index 26398cb903a3..56407a40abe9 100644
--- a/vcl/osx/DropTarget.cxx
+++ b/vcl/osx/DropTarget.cxx
@@ -370,12 +370,7 @@ void SAL_CALL DropTarget::initialize(const Sequence< Any >& aArguments)
id wnd = [mView window];
NSWindow* parentWnd = [wnd parentWindow];
-SAL_WNODEPRECATED_DECLARATIONS_PUSH
- // 'NSClosableWindowMask' is deprecated: first deprecated in macOS 10.12
- // 'NSResizableWindowMask' is deprecated: first deprecated in macOS 10.12
- // 'NSTitleWindowMask' is deprecated: first deprecated in macOS 10.12
- unsigned int topWndStyle = (NSTitledWindowMask | NSClosableWindowMask | NSResizableWindowMask);
-SAL_WNODEPRECATED_DECLARATIONS_POP
+ unsigned int topWndStyle = (NSWindowStyleMaskTitled | NSWindowStyleMaskClosable | NSWindowStyleMaskResizable);
unsigned int wndStyles = [wnd styleMask] & topWndStyle;
if (parentWnd == nil && (wndStyles == topWndStyle))
diff --git a/vcl/osx/a11ytextattributeswrapper.mm b/vcl/osx/a11ytextattributeswrapper.mm
index a1a6d0350e4b..84a9b27e54cc 100644
--- a/vcl/osx/a11ytextattributeswrapper.mm
+++ b/vcl/osx/a11ytextattributeswrapper.mm
@@ -247,19 +247,21 @@ using namespace ::com::sun::star::uno;
sal_Int32 alignment;
property.Value >>= alignment;
NSNumber *textAlignment = nil;
-SAL_WNODEPRECATED_DECLARATIONS_PUSH
- // 'NSCenterTextAlignment' is deprecated: first deprecated in macOS 10.12
- // 'NSJustifiedTextAlignment' is deprecated: first deprecated in macOS 10.12
- // 'NSLeftTextAlignment' is deprecated: first deprecated in macOS 10.12
- // 'NSRightTextAlignment' is deprecated: first deprecated in macOS 10.12
switch(static_cast<css::style::ParagraphAdjust>(alignment)) {
- case css::style::ParagraphAdjust_RIGHT : textAlignment = [NSNumber numberWithInteger:NSRightTextAlignment] ; break;
- case css::style::ParagraphAdjust_CENTER: textAlignment = [NSNumber numberWithInteger:NSCenterTextAlignment] ; break;
- case css::style::ParagraphAdjust_BLOCK : textAlignment = [NSNumber numberWithInteger:NSJustifiedTextAlignment]; break;
- case css::style::ParagraphAdjust_LEFT :
- default : textAlignment = [NSNumber numberWithInteger:NSLeftTextAlignment] ; break;
+ case css::style::ParagraphAdjust_RIGHT:
+ textAlignment = [NSNumber numberWithInteger:NSTextAlignmentRight];
+ break;
+ case css::style::ParagraphAdjust_CENTER:
+ textAlignment = [NSNumber numberWithInteger:NSTextAlignmentCenter];
+ break;
+ case css::style::ParagraphAdjust_BLOCK:
+ textAlignment = [NSNumber numberWithInteger:NSTextAlignmentJustified];
+ break;
+ case css::style::ParagraphAdjust_LEFT:
+ default:
+ textAlignment = [NSNumber numberWithInteger:NSTextAlignmentLeft];
+ break;
}
-SAL_WNODEPRECATED_DECLARATIONS_POP
NSDictionary *paragraphStyle = [NSDictionary dictionaryWithObjectsAndKeys:textAlignment, @"AXTextAlignment", textAlignment, @"AXVisualTextAlignment", nil];
[string addAttribute:@"AXParagraphStyle" value:paragraphStyle range:range];
}
diff --git a/vcl/osx/salframe.cxx b/vcl/osx/salframe.cxx
index 7ef3b7b2c1ce..a5356fcf19be 100644
--- a/vcl/osx/salframe.cxx
+++ b/vcl/osx/salframe.cxx
@@ -174,21 +174,15 @@ void AquaSalFrame::initWindowAndView()
maGeometry.nHeight = static_cast<unsigned int>(aVisibleRect.size.height * 0.8);
// calculate style mask
-SAL_WNODEPRECATED_DECLARATIONS_PUSH
- // 'NSBorderlessWindowMask' is deprecated: first deprecated in macOS 10.12
- // 'NSClosableWindowMask' is deprecated: first deprecated in macOS 10.12
- // 'NSMiniaturizableWindowMask' is deprecated: first deprecated in macOS 10.12
- // 'NSResizableWindowMask' is deprecated: first deprecated in macOS 10.12
- // 'NSTitledWindowMask' is deprecated: first deprecated in macOS 10.12
if( (mnStyle & SalFrameStyleFlags::FLOAT) ||
(mnStyle & SalFrameStyleFlags::OWNERDRAWDECORATION) )
- mnStyleMask = NSBorderlessWindowMask;
+ mnStyleMask = NSWindowStyleMaskBorderless;
else if( mnStyle & SalFrameStyleFlags::DEFAULT )
{
- mnStyleMask = NSTitledWindowMask |
- NSMiniaturizableWindowMask |
- NSResizableWindowMask |
- NSClosableWindowMask;
+ mnStyleMask = NSWindowStyleMaskTitled |
+ NSWindowStyleMaskMiniaturizable |
+ NSWindowStyleMaskResizable |
+ NSWindowStyleMaskClosable;
// make default window "maximized"
maGeometry.nX = static_cast<int>(aVisibleRect.origin.x);
maGeometry.nY = static_cast<int>(aVisibleRect.origin.y);
@@ -200,20 +194,19 @@ SAL_WNODEPRECATED_DECLARATIONS_PUSH
{
if( mnStyle & SalFrameStyleFlags::MOVEABLE )
{
- mnStyleMask |= NSTitledWindowMask;
+ mnStyleMask |= NSWindowStyleMaskTitled;
if( mpParent == nullptr )
- mnStyleMask |= NSMiniaturizableWindowMask;
+ mnStyleMask |= NSWindowStyleMaskMiniaturizable;
}
if( mnStyle & SalFrameStyleFlags::SIZEABLE )
- mnStyleMask |= NSResizableWindowMask;
+ mnStyleMask |= NSWindowStyleMaskResizable;
if( mnStyle & SalFrameStyleFlags::CLOSEABLE )
- mnStyleMask |= NSClosableWindowMask;
- // documentation says anything other than NSBorderlessWindowMask (=0)
- // should also include NSTitledWindowMask;
+ mnStyleMask |= NSWindowStyleMaskClosable;
+ // documentation says anything other than NSWindowStyleMaskBorderless (=0)
+ // should also include NSWindowStyleMaskTitled;
if( mnStyleMask != 0 )
- mnStyleMask |= NSTitledWindowMask;
+ mnStyleMask |= NSWindowStyleMaskTitled;
}
-SAL_WNODEPRECATED_DECLARATIONS_POP
if (Application::IsBitmapRendering())
return;
@@ -1343,10 +1336,7 @@ SAL_WNODEPRECATED_DECLARATIONS_POP
getAppleScrollBarVariant(aStyleSettings);
// set scrollbar size
-SAL_WNODEPRECATED_DECLARATIONS_PUSH
- // 'NSRegularControlSize' is deprecated: first deprecated in macOS 10.12
- aStyleSettings.SetScrollBarSize( static_cast<tools::Long>([NSScroller scrollerWidthForControlSize:NSRegularControlSize scrollerStyle:NSScrollerStyleLegacy]) );
-SAL_WNODEPRECATED_DECLARATIONS_POP
+ aStyleSettings.SetScrollBarSize( static_cast<tools::Long>([NSScroller scrollerWidthForControlSize:NSControlSizeRegular scrollerStyle:NSScrollerStyleLegacy]) );
// images in menus false for MacOSX
aStyleSettings.SetPreferredUseImagesInMenus( false );
aStyleSettings.SetHideDisabledMenuItems( true );
@@ -1495,53 +1485,50 @@ SalFrame::SalPointerState AquaSalFrame::GetPointerState()
if( pCur )
{
bMouseEvent = true;
-SAL_WNODEPRECATED_DECLARATIONS_PUSH
- // 'NSLeftMouseDown' is deprecated: first deprecated in macOS 10.12
- // 'NSLeftMouseDragged' is deprecated: first deprecated in macOS 10.12
- // 'NSLeftMouseUp' is deprecated: first deprecated in macOS 10.12
- // 'NSMouseMoved' is deprecated: first deprecated in macOS 10.12
- // 'NSOtherMouseDown' is deprecated: first deprecated in macOS 10.12
- // 'NSOtherMouseDragged' is deprecated: first deprecated in macOS 10.12
- // 'NSOtherMouseUp' is deprecated: first deprecated in macOS 10.12
- // 'NSRightMouseDown' is deprecated: first deprecated in macOS 10.12
- // 'NSRightMouseDragged' is deprecated: first deprecated in macOS 10.12
- // 'NSRightMouseUp' is deprecated: first deprecated in macOS 10.12
switch( [pCur type] )
{
- case NSLeftMouseDown: state.mnState |= MOUSE_LEFT; break;
- case NSLeftMouseUp: break;
- case NSRightMouseDown: state.mnState |= MOUSE_RIGHT; break;
- case NSRightMouseUp: break;
- case NSOtherMouseDown: state.mnState |= ([pCur buttonNumber] == 2) ? MOUSE_MIDDLE : 0; break;
- case NSOtherMouseUp: break;
- case NSMouseMoved: break;
- case NSLeftMouseDragged: state.mnState |= MOUSE_LEFT; break;
- case NSRightMouseDragged: state.mnState |= MOUSE_RIGHT; break;
- case NSOtherMouseDragged: state.mnState |= ([pCur buttonNumber] == 2) ? MOUSE_MIDDLE : 0; break;
+ case NSEventTypeLeftMouseDown:
+ state.mnState |= MOUSE_LEFT;
+ break;
+ case NSEventTypeLeftMouseUp:
+ break;
+ case NSEventTypeRightMouseDown:
+ state.mnState |= MOUSE_RIGHT;
+ break;
+ case NSEventTypeRightMouseUp:
+ break;
+ case NSEventTypeOtherMouseDown:
+ state.mnState |= ([pCur buttonNumber] == 2) ? MOUSE_MIDDLE : 0;
+ break;
+ case NSEventTypeOtherMouseUp:
+ break;
+ case NSEventTypeMouseMoved:
+ break;
+ case NSEventTypeLeftMouseDragged:
+ state.mnState |= MOUSE_LEFT;
+ break;
+ case NSEventTypeRightMouseDragged:
+ state.mnState |= MOUSE_RIGHT;
+ break;
+ case NSEventTypeOtherMouseDragged:
+ state.mnState |= ([pCur buttonNumber] == 2) ? MOUSE_MIDDLE : 0;
break;
default:
bMouseEvent = false;
break;
}
-SAL_WNODEPRECATED_DECLARATIONS_POP
}
if( bMouseEvent )
{
unsigned int nMask = static_cast<unsigned int>([pCur modifierFlags]);
-SAL_WNODEPRECATED_DECLARATIONS_PUSH
- // 'NSAlternateKeyMask' is deprecated: first deprecated in macOS 10.12
- // 'NSCommandKeyMask' is deprecated: first deprecated in macOS 10.12
- // 'NSControlKeyMask' is deprecated: first deprecated in macOS 10.12
- // 'NSShiftKeyMask' is deprecated: first deprecated in macOS 10.12
- if( (nMask & NSShiftKeyMask) != 0 )
+ if( (nMask & NSEventModifierFlagShift) != 0 )
state.mnState |= KEY_SHIFT;
- if( (nMask & NSControlKeyMask) != 0 )
+ if( (nMask & NSEventModifierFlagControl) != 0 )
state.mnState |= KEY_MOD3;
- if( (nMask & NSAlternateKeyMask) != 0 )
+ if( (nMask & NSEventModifierFlagOption) != 0 )
state.mnState |= KEY_MOD2;
- if( (nMask & NSCommandKeyMask) != 0 )
+ if( (nMask & NSEventModifierFlagCommand) != 0 )
state.mnState |= KEY_MOD1;
-SAL_WNODEPRECATED_DECLARATIONS_POP
}
else
diff --git a/vcl/osx/salinst.cxx b/vcl/osx/salinst.cxx
index 452821f33e14..6ac198554fb0 100644
--- a/vcl/osx/salinst.cxx
+++ b/vcl/osx/salinst.cxx
@@ -493,7 +493,7 @@ void AquaSalInstance::handleAppDefinedEvent( NSEvent* pEvent )
break;
default:
- OSL_FAIL( "unhandled NSApplicationDefined event" );
+ OSL_FAIL( "unhandled NSEventTypeApplicationDefined event" );
break;
}
}
@@ -508,10 +508,8 @@ bool AquaSalInstance::RunInMainYield( bool bHandleAllCurrentEvents )
static bool isWakeupEvent( NSEvent *pEvent )
{
-SAL_WNODEPRECATED_DECLARATIONS_PUSH
- return NSApplicationDefined == [pEvent type]
+ return NSEventTypeApplicationDefined == [pEvent type]
&& AquaSalInstance::YieldWakeupEvent == static_cast<int>([pEvent subtype]);
-SAL_WNODEPRECATED_DECLARATIONS_POP
}
bool AquaSalInstance::DoYield(bool bWait, bool bHandleAllCurrentEvents)
@@ -659,36 +657,18 @@ bool AquaSalInstance::AnyInput( VclInputFlags nType )
}
unsigned/*NSUInteger*/ nEventMask = 0;
-SAL_WNODEPRECATED_DECLARATIONS_PUSH
- // 'NSFlagsChangedMask' is deprecated: first deprecated in macOS 10.12
- // 'NSKeyDownMask' is deprecated: first deprecated in macOS 10.12
- // 'NSKeyUpMask' is deprecated: first deprecated in macOS 10.12
- // 'NSLeftMouseDownMask' is deprecated: first deprecated in macOS 10.12
- // 'NSLeftMouseDraggedMask' is deprecated: first deprecated in macOS 10.12
- // 'NSLeftMouseUpMask' is deprecated: first deprecated in macOS 10.12
- // 'NSMouseEnteredMask' is deprecated: first deprecated in macOS 10.12
- // 'NSMouseExitedMask' is deprecated: first deprecated in macOS 10.12
- // 'NSOtherMouseDownMask' is deprecated: first deprecated in macOS 10.12
- // 'NSOtherMouseDraggedMask' is deprecated: first deprecated in macOS 10.12
- // 'NSOtherMouseUpMask' is deprecated: first deprecated in macOS 10.12
- // 'NSRightMouseDownMask' is deprecated: first deprecated in macOS 10.12
- // 'NSRightMouseDraggedMask' is deprecated: first deprecated in macOS 10.12
- // 'NSRightMouseUpMask' is deprecated: first deprecated in macOS 10.12
- // 'NSScrollWheelMask' is deprecated: first deprecated in macOS 10.12
- // 'NSTabletPoint' is deprecated: first deprecated in macOS 10.12
if( nType & VclInputFlags::MOUSE)
nEventMask |=
- NSLeftMouseDownMask | NSRightMouseDownMask | NSOtherMouseDownMask |
- NSLeftMouseUpMask | NSRightMouseUpMask | NSOtherMouseUpMask |
- NSLeftMouseDraggedMask | NSRightMouseDraggedMask | NSOtherMouseDraggedMask |
- NSScrollWheelMask |
- // NSMouseMovedMask |
- NSMouseEnteredMask | NSMouseExitedMask;
+ NSEventMaskLeftMouseDown | NSEventMaskRightMouseDown | NSEventMaskOtherMouseDown |
+ NSEventMaskLeftMouseUp | NSEventMaskRightMouseUp | NSEventMaskOtherMouseUp |
+ NSEventMaskLeftMouseDragged | NSEventMaskRightMouseDragged | NSEventMaskOtherMouseDragged |
+ NSEventMaskScrollWheel |
+ // NSEventMaskMouseMoved |
+ NSEventMaskMouseEntered | NSEventMaskMouseExited;
if( nType & VclInputFlags::KEYBOARD)
- nEventMask |= NSKeyDownMask | NSKeyUpMask | NSFlagsChangedMask;
+ nEventMask |= NSEventMaskKeyDown | NSEventMaskKeyUp | NSEventMaskFlagsChanged;
if( nType & VclInputFlags::OTHER)
- nEventMask |= NSTabletPoint | NSApplicationDefinedMask;
-SAL_WNODEPRECATED_DECLARATIONS_POP
+ nEventMask |= NSEventMaskTabletPoint | NSEventMaskApplicationDefined;
// TODO: VclInputFlags::PAINT / more VclInputFlags::OTHER
if( !bool(nType) )
return false;
diff --git a/vcl/osx/salmenu.cxx b/vcl/osx/salmenu.cxx
index f0db6320d756..aeda577a2615 100644
--- a/vcl/osx/salmenu.cxx
+++ b/vcl/osx/salmenu.cxx
@@ -150,10 +150,7 @@ static void initAppMenu()
action: @selector(showPreferences:)
keyEquivalent: @","];
[pString release];
-SAL_WNODEPRECATED_DECLARATIONS_PUSH
- // 'NSCommandKeyMask' is deprecated: first deprecated in macOS 10.12
- [pNewItem setKeyEquivalentModifierMask: NSCommandKeyMask];
-SAL_WNODEPRECATED_DECLARATIONS_POP
+ [pNewItem setKeyEquivalentModifierMask: NSEventModifierFlagCommand];
[pNewItem setTarget: pMainMenuSelector];
[pAppMenu addItem:[NSMenuItem separatorItem]];
@@ -182,10 +179,7 @@ SAL_WNODEPRECATED_DECLARATIONS_POP
action:@selector(hideOtherApplications:)
keyEquivalent:@"h"];
[pString release];
-SAL_WNODEPRECATED_DECLARATIONS_PUSH
- // 'NSCommandKeyMask' is deprecated: first deprecated in macOS 10.12
- [pNewItem setKeyEquivalentModifierMask: NSCommandKeyMask | NSAlternateKeyMask];
-SAL_WNODEPRECATED_DECLARATIONS_POP
+ [pNewItem setKeyEquivalentModifierMask: NSEventModifierFlagCommand | NSEventModifierFlagOption];
// Show All
pString = CreateNSString(VclResId(SV_MENU_MAC_SHOWALL));
@@ -711,27 +705,21 @@ void AquaSalMenu::SetAccelerator( unsigned /*nPos*/, SalMenuItem* pSalMenuItem,
// should always use the command key
int nItemModifier = 0;
-SAL_WNODEPRECATED_DECLARATIONS_PUSH
- // 'NSAlternateKeyMask' is deprecated: first deprecated in macOS 10.12
- // 'NSCommandKeyMask' is deprecated: first deprecated in macOS 10.12
- // 'NSControlKeyMask' is deprecated: first deprecated in macOS 10.12
- // 'NSShiftKeyMask' is deprecated: first deprecated in macOS 10.12
if (nModifier & KEY_SHIFT)
{
- nItemModifier |= NSShiftKeyMask; // actually useful only for function keys
+ nItemModifier |= NSEventModifierFlagShift; // actually useful only for function keys
if( nKeyCode >= KEY_A && nKeyCode <= KEY_Z )
nCommandKey = nKeyCode - KEY_A + 'A';
}
if (nModifier & KEY_MOD1)
- nItemModifier |= NSCommandKeyMask;
+ nItemModifier |= NSEventModifierFlagCommand;
if(nModifier & KEY_MOD2)
- nItemModifier |= NSAlternateKeyMask;
+ nItemModifier |= NSEventModifierFlagOption;
if(nModifier & KEY_MOD3)
- nItemModifier |= NSControlKeyMask;
-SAL_WNODEPRECATED_DECLARATIONS_POP
+ nItemModifier |= NSEventModifierFlagControl;
AquaSalMenuItem *pAquaSalMenuItem = static_cast<AquaSalMenuItem *>(pSalMenuItem);
NSString* pString = CreateNSString( OUString( &nCommandKey, 1 ) );
diff --git a/vcl/osx/salnsmenu.mm b/vcl/osx/salnsmenu.mm
index 1dba47f031db..546b47601325 100644
--- a/vcl/osx/salnsmenu.mm
+++ b/vcl/osx/salnsmenu.mm
@@ -99,17 +99,11 @@
// must still end up in the view. This is necessary to handle common edit actions in docked
// windows (e.g. in toolbar fields).
NSEvent* pEvent = [NSApp currentEvent];
-SAL_WNODEPRECATED_DECLARATIONS_PUSH
- // 'NSAlternateKeyMask' is deprecated: first deprecated in macOS 10.12
- // 'NSCommandKeyMask' is deprecated: first deprecated in macOS 10.12
- // 'NSControlKeyMask' is deprecated: first deprecated in macOS 10.12
- // 'NSKeyDown' is deprecated: first deprecated in macOS 10.12
- // 'NSShiftKeyMask' is deprecated: first deprecated in macOS 10.12
- if( pEvent && [pEvent type] == NSKeyDown )
+ if( pEvent && [pEvent type] == NSEventTypeKeyDown )
{
- unsigned int nModMask = ([pEvent modifierFlags] & (NSShiftKeyMask|NSControlKeyMask|NSAlternateKeyMask|NSCommandKeyMask));
+ unsigned int nModMask = ([pEvent modifierFlags] & (NSEventModifierFlagShift|NSEventModifierFlagControl|NSEventModifierFlagOption|NSEventModifierFlagCommand));
NSString* charactersIgnoringModifiers = [pEvent charactersIgnoringModifiers];
- if( nModMask == NSCommandKeyMask &&
+ if( nModMask == NSEventModifierFlagCommand &&
( [charactersIgnoringModifiers isEqualToString: @"v"] ||
[charactersIgnoringModifiers isEqualToString: @"c"] ||
[charactersIgnoringModifiers isEqualToString: @"x"] ||
@@ -120,7 +114,6 @@ SAL_WNODEPRECATED_DECLARATIONS_PUSH
return;
}
}
-SAL_WNODEPRECATED_DECLARATIONS_POP
const AquaSalFrame* pFrame = mpMenuItem->mpParentMenu ? mpMenuItem->mpParentMenu->getFrame() : nullptr;
if( pFrame && AquaSalFrame::isAlive( pFrame ) && ! pFrame->GetWindow()->IsInModalMode() )
@@ -185,10 +178,7 @@ SAL_WNODEPRECATED_DECLARATIONS_POP
aImgRect.origin.y = floor((aFrame.size.height - aFromRect.size.height)/2);
aImgRect.size = aFromRect.size;
if( rButtons[i].mpNSImage )
-SAL_WNODEPRECATED_DECLARATIONS_PUSH
- // 'NSCompositeSourceOver' is deprecated: first deprecated in macOS 10.12
- [rButtons[i].mpNSImage drawInRect: aImgRect fromRect: aFromRect operation: NSCompositeSourceOver fraction: 1.0];
-SAL_WNODEPRECATED_DECLARATIONS_POP
+ [rButtons[i].mpNSImage drawInRect: aImgRect fromRect: aFromRect operation: NSCompositingOperationSourceOver fraction: 1.0];
aImgRect.origin.x += aFromRect.size.width + 2;
}
}
diff --git a/vcl/osx/saltimer.cxx b/vcl/osx/saltimer.cxx
index 55593e64ea0d..4c33c321d729 100644
--- a/vcl/osx/saltimer.cxx
+++ b/vcl/osx/saltimer.cxx
@@ -32,10 +32,7 @@
void ImplNSAppPostEvent( short nEventId, BOOL bAtStart, int nUserData )
{
ReleasePoolHolder aPool;
-SAL_WNODEPRECATED_DECLARATIONS_PUSH
-// 'NSApplicationDefined' is deprecated: first deprecated in macOS 10.12
- NSEvent* pEvent = [NSEvent otherEventWithType: NSApplicationDefined
-SAL_WNODEPRECATED_DECLARATIONS_POP
+ NSEvent* pEvent = [NSEvent otherEventWithType: NSEventTypeApplicationDefined
location: NSZeroPoint
modifierFlags: 0
timestamp: [[NSProcessInfo processInfo] systemUptime]
diff --git a/vcl/osx/vclnsapp.mm b/vcl/osx/vclnsapp.mm
index f420bfd83c5d..ee848375cedb 100644
--- a/vcl/osx/vclnsapp.mm
+++ b/vcl/osx/vclnsapp.mm
@@ -63,9 +63,7 @@
{
(void)pNotification;
-SAL_WNODEPRECATED_DECLARATIONS_PUSH
- // 'NSApplicationDefined' is deprecated: first deprecated in macOS 10.12
- NSEvent* pEvent = [NSEvent otherEventWithType: NSApplicationDefined
+ NSEvent* pEvent = [NSEvent otherEventWithType: NSEventTypeApplicationDefined
location: NSZeroPoint
modifierFlags: 0
timestamp: [[NSProcessInfo processInfo] systemUptime]
@@ -74,7 +72,6 @@ SAL_WNODEPRECATED_DECLARATIONS_PUSH
subtype: AquaSalInstance::AppExecuteSVMain
data1: 0
data2: 0 ];
-SAL_WNODEPRECATED_DECLARATIONS_POP
assert( pEvent );
[NSApp postEvent: pEvent atStart: NO];
@@ -87,38 +84,29 @@ SAL_WNODEPRECATED_DECLARATIONS_POP
-(void)sendEvent:(NSEvent*)pEvent
{
NSEventType eType = [pEvent type];
-SAL_WNODEPRECATED_DECLARATIONS_PUSH
- // 'NSAlternateKeyMask' is deprecated: first deprecated in macOS 10.12
- // 'NSApplicationDefined' is deprecated: first deprecated in macOS 10.12
- // 'NSClosableWindowMask' is deprecated: first deprecated in macOS 10.12
- // 'NSCommandKeyMask' is deprecated: first deprecated in macOS 10.12
- // 'NSControlKeyMask' is deprecated: first deprecated in macOS 10.12
- // 'NSKeyDown' is deprecated: first deprecated in macOS 10.12
- // 'NSMiniaturizableWindowMask' is deprecated: first deprecated in macOS 10.12
- // 'NSShiftKeyMask' is deprecated: first deprecated in macOS 10.12
- if( eType == NSApplicationDefined )
+ if( eType == NSEventTypeApplicationDefined )
{
AquaSalInstance::handleAppDefinedEvent( pEvent );
}
- else if( eType == NSKeyDown && ([pEvent modifierFlags] & NSCommandKeyMask) != 0 )
+ else if( eType == NSEventTypeKeyDown && ([pEvent modifierFlags] & NSEventModifierFlagCommand) != 0 )
{
NSWindow* pKeyWin = [NSApp keyWindow];
if( pKeyWin && [pKeyWin isKindOfClass: [SalFrameWindow class]] )
{
AquaSalFrame* pFrame = [static_cast<SalFrameWindow*>(pKeyWin) getSalFrame];
- unsigned int nModMask = ([pEvent modifierFlags] & (NSShiftKeyMask|NSControlKeyMask|NSAlternateKeyMask|NSCommandKeyMask));
+ unsigned int nModMask = ([pEvent modifierFlags] & (NSEventModifierFlagShift|NSEventModifierFlagControl|NSEventModifierFlagOption|NSEventModifierFlagCommand));
/*
* #i98949# - Cmd-M miniaturize window, Cmd-Option-M miniaturize all windows
*/
if( [[pEvent charactersIgnoringModifiers] isEqualToString: @"m"] )
{
- if ( nModMask == NSCommandKeyMask && ([pFrame->getNSWindow() styleMask] & NSMiniaturizableWindowMask) )
+ if ( nModMask == NSEventModifierFlagCommand && ([pFrame->getNSWindow() styleMask] & NSWindowStyleMaskMiniaturizable) )
{
[pFrame->getNSWindow() performMiniaturize: nil];
return;
}
- if ( nModMask == ( NSCommandKeyMask | NSAlternateKeyMask ) )
+ if ( nModMask == ( NSEventModifierFlagCommand | NSEventModifierFlagOption ) )
{
[NSApp miniaturizeAll: nil];
return;
@@ -168,8 +156,8 @@ SAL_WNODEPRECATED_DECLARATIONS_PUSH
// precondition: this ONLY works because CMD-V (paste), CMD-C (copy) and CMD-X (cut) are
// NOT localized, that is the same in all locales. Should this be
// different in any locale, this hack will fail.
- unsigned int nModMask = ([pEvent modifierFlags] & (NSShiftKeyMask|NSControlKeyMask|NSAlternateKeyMask|NSCommandKeyMask));
- if( nModMask == NSCommandKeyMask )
+ unsigned int nModMask = ([pEvent modifierFlags] & (NSEventModifierFlagShift|NSEventModifierFlagControl|NSEventModifierFlagOption|NSEventModifierFlagCommand));
+ if( nModMask == NSEventModifierFlagCommand )
{
if( [[pEvent charactersIgnoringModifiers] isEqualToString: @"v"] )
@@ -198,7 +186,7 @@ SAL_WNODEPRECATED_DECLARATIONS_PUSH
return;
}
}
- else if( nModMask == (NSCommandKeyMask|NSShiftKeyMask) )
+ else if( nModMask == (NSEventModifierFlagCommand|NSEventModifierFlagShift) )
{
if( [[pEvent charactersIgnoringModifiers] isEqualToString: @"Z"] )
{
@@ -208,7 +196,6 @@ SAL_WNODEPRECATED_DECLARATIONS_PUSH
}
}
}
-SAL_WNODEPRECATED_DECLARATIONS_POP
[super sendEvent: pEvent];
}