From 76f02c23ffff5dd442c78994eda1e6853cfe7e55 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sun, 3 Jun 2012 23:32:48 +0100 Subject: assume for all menus we reserve space for checkboxes so menus have consistent whitespace at left regardless of containing checkboxes/radiobutton entries. Its nasty to have menus "suddenly" appear without whitespace as submenus of ones with whitespace. This is a logical consequence of MENU_FLAG_SHOWCHECKIMAGES always set (in the absence of SetMenuFlags where usage has generally dropped MENU_FLAG_SHOWCHECKIMAGES accidentally) Change-Id: I9501381b91415131eff5143a0c88142221530fb6 --- framework/source/uielement/menubarmanager.cxx | 2 +- framework/source/uielement/toolbarmanager.cxx | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) (limited to 'framework/source') diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx index d24da8c2b673..4c64446bfd8a 100644 --- a/framework/source/uielement/menubarmanager.cxx +++ b/framework/source/uielement/menubarmanager.cxx @@ -831,7 +831,7 @@ IMPL_LINK( MenuBarManager, Activate, Menu *, pMenu ) nFlag &= ~MENU_FLAG_HIDEDISABLEDENTRIES; else nFlag |= MENU_FLAG_HIDEDISABLEDENTRIES; - pMenu->SetMenuFlags( nFlag | MENU_FLAG_SHOWCHECKIMAGES ); + pMenu->SetMenuFlags( nFlag ); if ( m_bActive ) return 0; diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx index f30f07ec80fe..63e24f7fb6b8 100644 --- a/framework/source/uielement/toolbarmanager.cxx +++ b/framework/source/uielement/toolbarmanager.cxx @@ -1780,9 +1780,6 @@ PopupMenu * ToolBarManager::GetToolBarCustomMenu(ToolBox* pToolBar) if( !(pToolBar->GetFloatStyle() & WB_CLOSEABLE) ) aPopupMenu.EnableItem(MENUITEM_TOOLBAR_CLOSE, sal_False); - pItemMenu->SetMenuFlags (pItemMenu->GetMenuFlags () | - MENU_FLAG_SHOWCHECKIMAGES); - for ( nPos = 0; nPos < m_pToolBar->GetItemCount(); ++nPos ) { if ( m_pToolBar->GetItemType(nPos) == TOOLBOXITEM_BUTTON ) @@ -1827,9 +1824,6 @@ PopupMenu * ToolBarManager::GetToolBarCustomMenu(ToolBox* pToolBar) // create an own submenu to avoid auto-delete when resource menu is deleted PopupMenu *pItemMenu = new PopupMenu(); - pItemMenu->SetMenuFlags (pItemMenu->GetMenuFlags () | - MENU_FLAG_SHOWCHECKIMAGES); - for( i=0; i< aPopupMenu.GetPopupMenu( 1 )->GetItemCount(); i++) pItemMenu->CopyItem( *aPopupMenu.GetPopupMenu( 1 ), i, MENU_APPEND ); -- cgit v1.2.3