From 0cc253983c0a3507326cc0f7f81510d754848562 Mon Sep 17 00:00:00 2001 From: Jens-Heiner Rechtien Date: Fri, 24 Jul 2009 15:45:35 +0000 Subject: CWS-TOOLING: integrate CWS vcl103 2009-07-24 Jens-Heiner Rechtien #i10000#: merge with m53 2009-07-10 Philipp Lohmann merge 2009-07-10 hdu #i103417# ignore non-standard font styles 2009-07-07 Philipp Lohmann #i98789# add: Invalidate on StateChanged( STATE_CHANGE_ENABLE ) 2009-07-07 Philipp Lohmann #i102501# ExportFormFields should be persistent 2009-07-07 Philipp Lohmann merge 2009-07-07 Philipp Lohmann #i103319# there is no platform currently where we should beep on disabled controls 2009-07-02 Philipp Lohmann merge 2009-07-01 Philipp Lohmann #i93100# handle ListBox with no border a little more graceful on MacOSX 2009-07-01 Philipp Lohmann #i101307# don't crash due to unfortunate timing 2009-07-03 thb #i103145# Swapped HINT_DOCK for HINT_TOOLBAR for the presentation fullscreen window; anecdotal evidence suggests it works much better then for wide-spread window managers 2009-06-30 Philipp Lohmann #i103102# evaluate Cmd-Option key combinations 2009-06-29 Philipp Lohmann #i103148# catch exception from missing UCB (thanks thb) 2009-06-29 hdu #i102378# fix PDF-export on PPC (thanks cloph!) 2009-06-25 Philipp Lohmann fix another link problem 2009-06-24 Philipp Lohmann use correct method signature 2009-06-24 Philipp Lohmann fix a warning 2009-06-24 Philipp Lohmann fix a warning 2009-06-24 Philipp Lohmann #i100357# add: GDIMetaFile::GetBoundRect 2009-06-24 Philipp Lohmann merge 2009-06-24 hdu #i100357# extend GetTextBoundRect() to measure justified text too 2009-06-23 Philipp Lohmann #i101108# protect writer from itself, no one could ever use paper of size (0,0) 2009-06-22 Philipp Lohmann merge 2009-06-22 Philipp Lohmann #i92356# treat windows running a popup menu as modal 2009-06-22 hdu #i100000# remove sft.h again (CWS dba32b accidentially reintroduced it) 2009-06-17 Philipp Lohmann merge 2009-06-17 Philipp Lohmann remove warnings (thanks ericb) 2009-06-17 Philipp Lohmann merge 2009-06-17 Philipp Lohmann #i102133# free cursors (thanks cmc) 2009-06-17 Philipp Lohmann #i97293# catch exception 2009-06-17 Philipp Lohmann #i91240# fix images in menus, again 2009-06-15 Philipp Lohmann #i100586# fix a pure virtual method (thanks cmc) 2009-06-15 Philipp Lohmann fix an array delete issue 2009-06-15 Philipp Lohmann #i102228# fix a cleanup issue 2009-06-15 Philipp Lohmann #i97218# solve duplicate accelerator 2009-06-12 hdu #i102219# avoid void*->oslGenericFunction cast for MingW (thanks tono!) --- vcl/aqua/source/app/vclnsapp.mm | 73 ++++++++++++----------------------------- 1 file changed, 21 insertions(+), 52 deletions(-) (limited to 'vcl/aqua/source/app/vclnsapp.mm') diff --git a/vcl/aqua/source/app/vclnsapp.mm b/vcl/aqua/source/app/vclnsapp.mm index 4ad5e7ff9271..43d44c709c12 100755 --- a/vcl/aqua/source/app/vclnsapp.mm +++ b/vcl/aqua/source/app/vclnsapp.mm @@ -105,44 +105,33 @@ } } - /* #i89611# - Cmd-Option-Space is for some reason not consumed by the menubar, - but also not by the input method (like e.g. Cmd-Space) and stays - without function. - - However MOD1 + MOD2 combinations are not used throughout OOo code - since they tend to clash with system shortcuts on all platforms so - we can skip this case here. - */ // get information whether the event was handled; keyDown returns nothing GetSalData()->maKeyEventAnswer[ pEvent ] = false; bool bHandled = false; - if( nModMask != (NSCommandKeyMask | NSAlternateKeyMask) ) + // dispatch to view directly to avoid the key event being consumed by the menubar + // popup windows do not get the focus, so they don't get these either + // simplest would be dispatch this to the key window always if it is without parent + // however e.g. in document we want the menu shortcut if e.g. the stylist has focus + if( pFrame->mpParent && (pFrame->mnStyle & SAL_FRAME_STYLE_FLOAT) == 0 ) { - // dispatch to view directly to avoid the key event being consumed by the menubar - // popup windows do not get the focus, so they don't get these either - // simplest would be dispatch this to the key window always if it is without parent - // however e.g. in document we want the menu shortcut if e.g. the stylist has focus - if( pFrame->mpParent && (pFrame->mnStyle & SAL_FRAME_STYLE_FLOAT) == 0 ) - { - [[pKeyWin contentView] keyDown: pEvent]; - bHandled = GetSalData()->maKeyEventAnswer[ pEvent ]; - } - - // see whether the main menu consumes this event - // if not, we want to dispatch it ourselves. Unless we do this "trick" - // the main menu just beeps for an unknown or disabled key equivalent - // and swallows the event wholesale - NSMenu* pMainMenu = [NSApp mainMenu]; - if( ! bHandled && (pMainMenu == 0 || ! [pMainMenu performKeyEquivalent: pEvent]) ) - { - [[pKeyWin contentView] keyDown: pEvent]; - bHandled = GetSalData()->maKeyEventAnswer[ pEvent ]; - } - else - bHandled = true; // event handled already or main menu just handled it + [[pKeyWin contentView] keyDown: pEvent]; + bHandled = GetSalData()->maKeyEventAnswer[ pEvent ]; + } + + // see whether the main menu consumes this event + // if not, we want to dispatch it ourselves. Unless we do this "trick" + // the main menu just beeps for an unknown or disabled key equivalent + // and swallows the event wholesale + NSMenu* pMainMenu = [NSApp mainMenu]; + if( ! bHandled && (pMainMenu == 0 || ! [pMainMenu performKeyEquivalent: pEvent]) ) + { + [[pKeyWin contentView] keyDown: pEvent]; + bHandled = GetSalData()->maKeyEventAnswer[ pEvent ]; } + else + bHandled = true; // event handled already or main menu just handled it + GetSalData()->maKeyEventAnswer.erase( pEvent ); if( bHandled ) return; @@ -374,26 +363,6 @@ AquaSalMenu::removeFallbackMenuItem( pItem ); } -- (void)getSystemVersionMajor:(unsigned *)major - minor:(unsigned *)minor - bugFix:(unsigned *)bugFix -{ - OSErr err; - SInt32 systemVersion = VER_TIGER; // Initialize with minimal requirement - if ((err = Gestalt(gestaltSystemVersion, &systemVersion)) == noErr) - { - GetSalData()->mnSystemVersion = systemVersion; -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "System Version %x\n", (unsigned int)systemVersion); - fprintf( stderr, "Stored System Version %x\n", (unsigned int)GetSalData()->mnSystemVersion); -#endif - } - else - NSLog(@"Unable to obtain system version: %ld", (long)err); - - return; -} - -(void)addDockMenuItem: (NSMenuItem*)pNewItem { NSMenu* pDock = AquaSalInstance::GetDynamicDockMenu(); -- cgit