summaryrefslogtreecommitdiff
path: root/vcl/aqua
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2009-07-24 15:45:35 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2009-07-24 15:45:35 +0000
commit0cc253983c0a3507326cc0f7f81510d754848562 (patch)
tree1936efb41bc83a60d3a2c97a1e6aa53969b36176 /vcl/aqua
parent4b4c5570a0ebc8d24515fad9350190e542c88be6 (diff)
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!)
Diffstat (limited to 'vcl/aqua')
-rwxr-xr-xvcl/aqua/inc/vclnsapp.h1
-rw-r--r--vcl/aqua/source/a11y/aqua11ytextattributeswrapper.mm2
-rw-r--r--vcl/aqua/source/a11y/aqua11yutil.mm2
-rw-r--r--vcl/aqua/source/a11y/aqua11ywrapper.mm8
-rw-r--r--vcl/aqua/source/app/saldata.cxx2
-rw-r--r--vcl/aqua/source/app/salinst.cxx16
-rw-r--r--vcl/aqua/source/app/salsys.cxx8
-rwxr-xr-xvcl/aqua/source/app/vclnsapp.mm73
-rwxr-xr-xvcl/aqua/source/gdi/aquaprintview.mm5
-rwxr-xr-xvcl/aqua/source/gdi/salatslayout.cxx4
-rwxr-xr-xvcl/aqua/source/gdi/salgdiutils.cxx9
-rw-r--r--vcl/aqua/source/gdi/salnativewidgets.cxx8
-rw-r--r--vcl/aqua/source/gdi/salprn.cxx8
-rw-r--r--vcl/aqua/source/gdi/salvd.cxx4
-rw-r--r--vcl/aqua/source/window/salframe.cxx14
-rwxr-xr-xvcl/aqua/source/window/salframeview.mm10
-rw-r--r--vcl/aqua/source/window/salmenu.cxx12
17 files changed, 101 insertions, 85 deletions
diff --git a/vcl/aqua/inc/vclnsapp.h b/vcl/aqua/inc/vclnsapp.h
index a5c339c238bd..fc637ff75a31 100755
--- a/vcl/aqua/inc/vclnsapp.h
+++ b/vcl/aqua/inc/vclnsapp.h
@@ -59,7 +59,6 @@
-(void)scrollbarSettingsChanged: (NSNotification*) pNotification;
-(void)addFallbackMenuItem: (NSMenuItem*)pNewItem;
-(void)removeFallbackMenuItem: (NSMenuItem*)pOldItem;
--(void)getSystemVersionMajor:(unsigned *)major minor:(unsigned *)minor bugFix:(unsigned *)bugFix;
-(void)addDockMenuItem: (NSMenuItem*)pNewItem;
-(void)applicationWillBecomeActive: (NSNotification *)pNotification;
-(void)applicationWillResignActive: (NSNotification *)pNotification;
diff --git a/vcl/aqua/source/a11y/aqua11ytextattributeswrapper.mm b/vcl/aqua/source/a11y/aqua11ytextattributeswrapper.mm
index 53472e6ae34d..e521e7362323 100644
--- a/vcl/aqua/source/a11y/aqua11ytextattributeswrapper.mm
+++ b/vcl/aqua/source/a11y/aqua11ytextattributeswrapper.mm
@@ -249,6 +249,8 @@ using namespace ::rtl;
// empty
} catch ( IndexOutOfBoundsException & e ) {
// empty
+ } catch ( RuntimeException& ) {
+ // at least don't crash
}
return string;
}
diff --git a/vcl/aqua/source/a11y/aqua11yutil.mm b/vcl/aqua/source/a11y/aqua11yutil.mm
index 6d12fbee7a91..44f95169ca68 100644
--- a/vcl/aqua/source/a11y/aqua11yutil.mm
+++ b/vcl/aqua/source/a11y/aqua11yutil.mm
@@ -51,7 +51,7 @@ using namespace ::com::sun::star::awt;
+(Point)nsPointToVclPoint:(NSValue *)nsPoint {
// VCL coordinates are in upper-left-notation, Cocoa likes it the Cartesian way (lower-left)
NSRect screenRect = [ [ NSScreen mainScreen ] frame ];
- return Point ( [ nsPoint pointValue ].x, screenRect.size.height - [ nsPoint pointValue ].y );
+ return Point ( static_cast<long>([ nsPoint pointValue ].x), static_cast<long>(screenRect.size.height - [ nsPoint pointValue ].y) );
}
@end
diff --git a/vcl/aqua/source/a11y/aqua11ywrapper.mm b/vcl/aqua/source/a11y/aqua11ywrapper.mm
index d6f99c7020d6..99bcbd20f698 100644
--- a/vcl/aqua/source/a11y/aqua11ywrapper.mm
+++ b/vcl/aqua/source/a11y/aqua11ywrapper.mm
@@ -728,9 +728,15 @@ static MacOSBOOL isPopupMenuOpen = NO;
if ( nativeSubrole != nil && ! [ nativeSubrole isEqualToString: @"" ] ) {
[ attributeNames addObject: NSAccessibilitySubroleAttribute ];
}
+ try
+ {
if ( [ self accessibleContext ] -> getAccessibleChildCount() > 0 ) {
[ attributeNames addObject: NSAccessibilityChildrenAttribute ];
}
+ }
+ catch( DisposedException& ) {}
+ catch( RuntimeException& ) {}
+
if ( title != nil && ! [ title isEqualToString: @"" ] ) {
[ attributeNames addObject: NSAccessibilityTitleAttribute ];
}
@@ -986,7 +992,7 @@ Reference < XAccessibleContext > hitTestRunner ( Point point, Reference < XAcces
}
Reference < XAccessibleContext > hitChild;
NSRect screenRect = [ [ NSScreen mainScreen ] frame ];
- Point hitPoint ( point.x , screenRect.size.height - point.y );
+ Point hitPoint ( static_cast<long>(point.x) , static_cast<long>(screenRect.size.height - point.y) );
// check child windows first
NSWindow * window = (NSWindow *) [ self accessibilityAttributeValue: NSAccessibilityWindowAttribute ];
NSArray * childWindows = [ window childWindows ];
diff --git a/vcl/aqua/source/app/saldata.cxx b/vcl/aqua/source/app/saldata.cxx
index a70854306122..180f6a106459 100644
--- a/vcl/aqua/source/app/saldata.cxx
+++ b/vcl/aqua/source/app/saldata.cxx
@@ -93,7 +93,7 @@ SalData::~SalData()
}
osl_destroyThreadKey( s_aAutoReleaseKey );
- s_aAutoReleaseKey = NULL;
+ s_aAutoReleaseKey = 0;
}
if ( mpMainController )
[mpMainController release];
diff --git a/vcl/aqua/source/app/salinst.cxx b/vcl/aqua/source/app/salinst.cxx
index b9d66d1e02d3..71bfb7953187 100644
--- a/vcl/aqua/source/app/salinst.cxx
+++ b/vcl/aqua/source/app/salinst.cxx
@@ -140,10 +140,6 @@ bool AquaSalInstance::isOnCommandLine( const rtl::OUString& rArg )
// returns an NSAutoreleasePool that must be released when the event loop begins
static void initNSApp()
{
- SInt32 major = NULL;
- SInt32 minor = NULL;
- SInt32 bugFix = NULL;
-
// create our cocoa NSApplication
[VCL_NSApplication sharedApplication];
@@ -176,7 +172,17 @@ static void initNSApp()
object: nil ];
// get System Version and store the value in GetSalData()->mnSystemVersion
- [NSApp getSystemVersionMajor: (unsigned int *)major minor:(unsigned int *)minor bugFix:(unsigned int *)bugFix ];
+ OSErr err = noErr;
+ 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);
+#endif
+ }
+ else
+ NSLog(@"Unable to obtain system version: %ld", (long)err);
// Initialize Apple Remote
GetSalData()->mpMainController = [[MainController alloc] init];
diff --git a/vcl/aqua/source/app/salsys.cxx b/vcl/aqua/source/app/salsys.cxx
index 28acb47ccade..78b5defe6dd9 100644
--- a/vcl/aqua/source/app/salsys.cxx
+++ b/vcl/aqua/source/app/salsys.cxx
@@ -75,8 +75,8 @@ Rectangle AquaSalSystem::GetDisplayScreenPosSizePixel( unsigned int nScreen )
if( pScreen )
{
NSRect aFrame = [pScreen frame];
- aRet = Rectangle( Point( aFrame.origin.x, aFrame.origin.y ),
- Size( aFrame.size.width, aFrame.size.height ) );
+ aRet = Rectangle( Point( static_cast<long int>(aFrame.origin.x), static_cast<long int>(aFrame.origin.y) ),
+ Size( static_cast<long int>(aFrame.size.width), static_cast<long int>(aFrame.size.height) ) );
}
return aRet;
}
@@ -94,8 +94,8 @@ Rectangle AquaSalSystem::GetDisplayWorkAreaPosSizePixel( unsigned int nScreen )
if( pScreen )
{
NSRect aFrame = [pScreen visibleFrame];
- aRet = Rectangle( Point( aFrame.origin.x, aFrame.origin.y ),
- Size( aFrame.size.width, aFrame.size.height ) );
+ aRet = Rectangle( Point( static_cast<long int>(aFrame.origin.x), static_cast<long int>(aFrame.origin.y) ),
+ Size( static_cast<long int>(aFrame.size.width), static_cast<long int>(aFrame.size.height) ) );
}
return aRet;
}
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();
diff --git a/vcl/aqua/source/gdi/aquaprintview.mm b/vcl/aqua/source/gdi/aquaprintview.mm
index 6099fbaed741..ba139da5f5a4 100755
--- a/vcl/aqua/source/gdi/aquaprintview.mm
+++ b/vcl/aqua/source/gdi/aquaprintview.mm
@@ -58,6 +58,9 @@
{
NSSize aPaperSize = [mpInfoPrinter->getPrintInfo() paperSize];
int nWidth = (int)aPaperSize.width;
+ // #i101108# sanity check
+ if( nWidth < 1 )
+ nWidth = 1;
NSRect aRect = { { page % nWidth, page / nWidth }, aPaperSize };
return aRect;
}
@@ -71,7 +74,7 @@
-(void)drawRect: (NSRect)rect
{
NSPoint aPoint = [self locationOfPrintRect: rect];
- mpInfoPrinter->setStartPageOffset( rect.origin.x, rect.origin.y );
+ mpInfoPrinter->setStartPageOffset( static_cast<int>(rect.origin.x), static_cast<int>(rect.origin.y) );
NSSize aPaperSize = [mpInfoPrinter->getPrintInfo() paperSize];
int nPage = (int)(aPaperSize.width * rect.origin.y + rect.origin.x);
diff --git a/vcl/aqua/source/gdi/salatslayout.cxx b/vcl/aqua/source/gdi/salatslayout.cxx
index 98700feba39d..cec842739de3 100755
--- a/vcl/aqua/source/gdi/salatslayout.cxx
+++ b/vcl/aqua/source/gdi/salatslayout.cxx
@@ -431,8 +431,8 @@ void ATSLayout::DrawText( SalGraphics& rGraphics ) const
if( rAquaGraphics.mnATSUIRotation != 0 )
{
const double fRadians = rAquaGraphics.mnATSUIRotation * (M_PI/0xB40000);
- nXOfsFixed = +rSubPortion.mnXOffset * cos( fRadians );
- nYOfsFixed = +rSubPortion.mnXOffset * sin( fRadians );
+ nXOfsFixed = static_cast<Fixed>(static_cast<double>(+rSubPortion.mnXOffset) * cos( fRadians ));
+ nYOfsFixed = static_cast<Fixed>(static_cast<double>(+rSubPortion.mnXOffset) * sin( fRadians ));
}
// draw sub-portions
diff --git a/vcl/aqua/source/gdi/salgdiutils.cxx b/vcl/aqua/source/gdi/salgdiutils.cxx
index 066268791b11..99a1629006d2 100755
--- a/vcl/aqua/source/gdi/salgdiutils.cxx
+++ b/vcl/aqua/source/gdi/salgdiutils.cxx
@@ -102,8 +102,8 @@ void AquaSalGraphics::SetVirDevGraphics( CGLayerRef xLayer, CGContextRef xContex
else
{
const CGSize aSize = CGLayerGetSize( mxLayer );
- mnWidth = aSize.width;
- mnHeight = aSize.height;
+ mnWidth = static_cast<int>(aSize.width);
+ mnHeight = static_cast<int>(aSize.height);
}
// prepare graphics for drawing
@@ -219,7 +219,10 @@ void AquaSalGraphics::RefreshRect(float lX, float lY, float lWidth, float lHeigh
{
// update a little more around the designated rectangle
// this helps with antialiased rendering
- const Rectangle aVclRect( Point( lX-1, lY-1 ), Size( lWidth+2, lHeight+2) );
+ const Rectangle aVclRect(Point(static_cast<long int>(lX-1),
+ static_cast<long int>(lY-1) ),
+ Size( static_cast<long int>(lWidth+2),
+ static_cast<long int>(lHeight+2) ) );
mpFrame->maInvalidRect.Union( aVclRect );
}
}
diff --git a/vcl/aqua/source/gdi/salnativewidgets.cxx b/vcl/aqua/source/gdi/salnativewidgets.cxx
index 9f2c7c4fa3a7..6cd4e78a2d1a 100644
--- a/vcl/aqua/source/gdi/salnativewidgets.cxx
+++ b/vcl/aqua/source/gdi/salnativewidgets.cxx
@@ -612,7 +612,7 @@ BOOL AquaSalGraphics::drawNativeControl(ControlType nType,
aPushInfo.animation.time.start = 0;
aPushInfo.animation.time.current = 0;
PushButtonValue* pPBVal = (PushButtonValue*)aValue.getOptionalVal();
- int nPaintHeight = rc.size.height;
+ int nPaintHeight = static_cast<int>(rc.size.height);
if( pPBVal && pPBVal->mbBevelButton )
{
@@ -1162,8 +1162,10 @@ BOOL AquaSalGraphics::drawNativeControl(ControlType nType,
if( mxClipPath )
aRect = CGPathGetBoundingBox( mxClipPath );
if( aRect.size.width != 0 && aRect.size.height != 0 )
- buttonRect.Intersection( Rectangle( Point( aRect.origin.x, aRect.origin.y ),
- Size( aRect.size.width, aRect.size.height ) ) );
+ buttonRect.Intersection( Rectangle( Point( static_cast<long int>(aRect.origin.x),
+ static_cast<long int>(aRect.origin.y) ),
+ Size( static_cast<long int>(aRect.size.width),
+ static_cast<long int>(aRect.size.height) ) ) );
}
RefreshRect( buttonRect.Left(), buttonRect.Top(), buttonRect.GetWidth(), buttonRect.GetHeight() );
diff --git a/vcl/aqua/source/gdi/salprn.cxx b/vcl/aqua/source/gdi/salprn.cxx
index 5db6ad30bb8b..b9a1f4ef7748 100644
--- a/vcl/aqua/source/gdi/salprn.cxx
+++ b/vcl/aqua/source/gdi/salprn.cxx
@@ -310,8 +310,12 @@ BOOL AquaSalInfoPrinter::SetData( ULONG i_nFlags, ImplJobSetup* io_pSetupData )
double width = 0, height = 0;
if( io_pSetupData->mePaperFormat == PAPER_USER )
{
- width = TenMuToPt( io_pSetupData->mnPaperWidth );
- height = TenMuToPt( io_pSetupData->mnPaperHeight );
+ // #i101108# sanity check
+ if( io_pSetupData->mnPaperWidth && io_pSetupData->mnPaperHeight )
+ {
+ width = TenMuToPt( io_pSetupData->mnPaperWidth );
+ height = TenMuToPt( io_pSetupData->mnPaperHeight );
+ }
}
else
getPaperSize( width, height, io_pSetupData->mePaperFormat );
diff --git a/vcl/aqua/source/gdi/salvd.cxx b/vcl/aqua/source/gdi/salvd.cxx
index d7690e4e38bd..4d25d5d8b63b 100644
--- a/vcl/aqua/source/gdi/salvd.cxx
+++ b/vcl/aqua/source/gdi/salvd.cxx
@@ -228,8 +228,8 @@ void AquaSalVirtualDevice::GetSize( long& rWidth, long& rHeight )
if( mxLayer )
{
const CGSize aSize = CGLayerGetSize( mxLayer );
- rWidth = aSize.width;
- rHeight = aSize.height;
+ rWidth = static_cast<long>(aSize.width);
+ rHeight = static_cast<long>(aSize.height);
}
else
{
diff --git a/vcl/aqua/source/window/salframe.cxx b/vcl/aqua/source/window/salframe.cxx
index 8c40e1acfe66..9c713ea26a52 100644
--- a/vcl/aqua/source/window/salframe.cxx
+++ b/vcl/aqua/source/window/salframe.cxx
@@ -1182,7 +1182,7 @@ void AquaSalFrame::UpdateSettings( AllSettings& rSettings )
getAppleScrollBarVariant();
// set scrollbar size
- aStyleSettings.SetScrollBarSize( [NSScroller scrollerWidth] );
+ aStyleSettings.SetScrollBarSize( static_cast<long int>([NSScroller scrollerWidth]) );
// images in menus false for MacOSX
aStyleSettings.SetUseImagesInMenus( false );
@@ -1203,7 +1203,15 @@ const SystemEnvData* AquaSalFrame::GetSystemData() const
void AquaSalFrame::Beep( SoundType eSoundType )
{
- NSBeep();
+ switch( eSoundType )
+ {
+ case SOUND_DISABLE:
+ // don't beep
+ break;
+ default:
+ NSBeep();
+ break;
+ }
}
// -----------------------------------------------------------------------
@@ -1240,7 +1248,7 @@ void AquaSalFrame::SetPosSize(long nX, long nY, long nWidth, long nHeight, USHOR
if( (nFlags & SAL_FRAME_POSSIZE_WIDTH) != 0 )
nX = mpParent->maGeometry.nWidth - nWidth-1 - nX;
else
- nX = mpParent->maGeometry.nWidth - aContentRect.size.width-1 - nX;
+ nX = mpParent->maGeometry.nWidth - static_cast<long int>( aContentRect.size.width-1) - nX;
}
NSRect aParentFrameRect = [mpParent->mpWindow frame];
aParentContentRect = [NSWindow contentRectForFrameRect: aParentFrameRect styleMask: mpParent->mnStyleMask];
diff --git a/vcl/aqua/source/window/salframeview.mm b/vcl/aqua/source/window/salframeview.mm
index a6213ca7b64d..c7facd8c6c09 100755
--- a/vcl/aqua/source/window/salframeview.mm
+++ b/vcl/aqua/source/window/salframeview.mm
@@ -841,6 +841,16 @@ private:
if( pUnmodifiedString && [pUnmodifiedString length] == 1 )
{
+ /* #i103102# key events with command and alternate don't make it through
+ interpretKeyEvents (why ?). Try to dispatch them here first,
+ if not successful continue normally
+ */
+ if( (mpFrame->mnLastModifierFlags & (NSAlternateKeyMask | NSCommandKeyMask))
+ == (NSAlternateKeyMask | NSCommandKeyMask) )
+ {
+ if( [self sendSingleCharacter: mpLastEvent] )
+ return YES;
+ }
unichar keyChar = [pUnmodifiedString characterAtIndex: 0];
USHORT nKeyCode = ImplMapCharCode( keyChar );
diff --git a/vcl/aqua/source/window/salmenu.cxx b/vcl/aqua/source/window/salmenu.cxx
index 4fafbbdbb4cf..5c838701933c 100644
--- a/vcl/aqua/source/window/salmenu.cxx
+++ b/vcl/aqua/source/window/salmenu.cxx
@@ -651,11 +651,9 @@ void AquaSalMenu::SetItemImage( unsigned nPos, SalMenuItem* pSMI, const Image& r
NSImage* pImage = CreateNSImage( rImage );
+ [pSalMenuItem->mpMenuItem setImage: pImage];
if( pImage )
- {
- [pSalMenuItem->mpMenuItem setImage: pImage];
[pImage release];
- }
}
void AquaSalMenu::SetItemText( unsigned i_nPos, SalMenuItem* i_pSalMenuItem, const XubString& i_rText )
@@ -894,7 +892,13 @@ Rectangle AquaSalMenu::GetMenuBarButtonRectPixel( USHORT i_nItemId, SalFrame* i_
aRect.origin.x -= i_pReferenceFrame->maGeometry.nX;
aRect.origin.y -= i_pReferenceFrame->maGeometry.nY + aRect.size.height;
- return Rectangle( Point( aRect.origin.x, aRect.origin.y ), Size( aRect.size.width, aRect.size.height ) );
+ return Rectangle( Point(static_cast<long int>(aRect.origin.x),
+ static_cast<long int>(aRect.origin.y)
+ ),
+ Size( static_cast<long int>(aRect.size.width),
+ static_cast<long int>(aRect.size.height)
+ )
+ );
}
// =======================================================================