From ae3ec79354f7b4967e736c6a4cd7c08fc52e2b7d Mon Sep 17 00:00:00 2001 From: Douglas Mencken Date: Mon, 3 Oct 2016 11:03:06 -0400 Subject: there’s no need to peel tildæ for separator MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Id53e5c704759d831bedd42ca9a8cd9f393ecdd0c Reviewed-on: https://gerrit.libreoffice.org/29492 Tested-by: Jenkins Reviewed-by: Noel Grandin --- vcl/osx/salmenu.cxx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/vcl/osx/salmenu.cxx b/vcl/osx/salmenu.cxx index 70a438a8294d..7c9b7dbdbc77 100644 --- a/vcl/osx/salmenu.cxx +++ b/vcl/osx/salmenu.cxx @@ -866,9 +866,6 @@ AquaSalMenuItem::AquaSalMenuItem( const SalItemParams* pItemData ) : mpSubMenu( nullptr ), mpMenuItem( nil ) { - // Delete mnemonics - OUString aText = pItemData->aText.replaceAll("~", ""); - if (pItemData->eType == MenuItemType::SEPARATOR) { mpMenuItem = [NSMenuItem separatorItem]; @@ -880,7 +877,9 @@ AquaSalMenuItem::AquaSalMenuItem( const SalItemParams* pItemData ) : { mpMenuItem = [[SalNSMenuItem alloc] initWithMenuItem: this]; [mpMenuItem setEnabled: YES]; - NSString* pString = CreateNSString( aText ); + + // peel mnemonics because on mac there are no such things for menu items + NSString* pString = CreateNSString( pItemData->aText.replaceAll( "~", "" ) ); if (pString) { [mpMenuItem setTitle: pString]; -- cgit