Commits

Anonymous committed 7ee246e

contextmenu1: #i116175 Disable automatic mnemomnics generation

Comments (0)

Files changed (1)

framework/source/uielement/fontmenucontroller.cxx

 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
 //_________________________________________________________________________________________________________________
 //	Defines
 //_________________________________________________________________________________________________________________
-// 
+//
 
 using namespace com::sun::star::uno;
 using namespace com::sun::star::lang;
     const rtl::OUString*    pFontNameArray = rFontNameSeq.getConstArray();
     VCLXPopupMenu*          pPopupMenu = (VCLXPopupMenu *)VCLXMenu::GetImplementation( rPopupMenu );
     PopupMenu*              pVCLPopupMenu = 0;
-    
+
     vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() );
-    
+
     resetPopupMenu( rPopupMenu );
     if ( pPopupMenu )
         pVCLPopupMenu = (PopupMenu *)pPopupMenu->GetMenu();
-        
+
 	if ( pVCLPopupMenu )
 	{
+        pVCLPopupMenu->SetMenuFlags( pVCLPopupMenu->GetMenuFlags() | MENU_FLAG_NOAUTOMNEMONICS );
+
 		vector<rtl::OUString> aVector;
         aVector.reserve(rFontNameSeq.getLength());
 		for ( USHORT i = 0; i < rFontNameSeq.getLength(); i++ )
 void SAL_CALL FontMenuController::activate( const css::awt::MenuEvent& ) throw (RuntimeException)
 {
     osl::MutexGuard aLock( m_aMutex );
-    
+
     if ( m_xPopupMenu.is() )
     {
         // find new font name and set check mark!
 void FontMenuController::impl_setPopupMenu()
 {
     Reference< XDispatchProvider > xDispatchProvider( m_xFrame, UNO_QUERY );
-    
+
     com::sun::star::util::URL aTargetURL;
     // Register for font list updates to get the current font list from the controller
     aTargetURL.Complete = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FontNameList" ));
     m_xURLTransformer->parseStrict( aTargetURL );
     m_xFontListDispatch = xDispatchProvider->queryDispatch( aTargetURL, ::rtl::OUString(), 0 );
 }
-		
+
 void SAL_CALL FontMenuController::updatePopupMenu() throw ( ::com::sun::star::uno::RuntimeException )
 {
 	svt::PopupMenuControllerBase::updatePopupMenu();