summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2010-10-01 20:27:44 +0100
committerCaolán McNamara <caolanm@redhat.com>2010-10-05 08:51:35 +0100
commit34a271a014c1cd2aa72c0d0c275cbb12905456b3 (patch)
treecbbbfa12b228beadbf73e9de1ae4f8134902857c /framework
parentadf74f455888c83f3746dc0572da26d3e6d7effd (diff)
use radio buttons for mutually excusive menu options
Diffstat (limited to 'framework')
-rw-r--r--framework/source/classes/menumanager.cxx18
-rw-r--r--framework/source/uielement/menubarmanager.cxx6
2 files changed, 15 insertions, 9 deletions
diff --git a/framework/source/classes/menumanager.cxx b/framework/source/classes/menumanager.cxx
index 61cb8eb4a253..35dab1ecbec1 100644
--- a/framework/source/classes/menumanager.cxx
+++ b/framework/source/classes/menumanager.cxx
@@ -169,11 +169,13 @@ MenuManager::MenuManager(
{
USHORT nItemId = FillItemCommand(aItemCommand,pMenu, i );
bool bShowMenuImages( m_bShowMenuImages );
- MenuItemBits nBits = pMenu->GetItemBits( nItemId );
- // overwrite the default?
- if ( nBits )
- bShowMenuImages = ( ( nBits & MIB_ICON ) == MIB_ICON );
+ // overwrite the show icons on menu option?
+ if (!bShowMenuImages)
+ {
+ MenuItemBits nBits = pMenu->GetItemBits( nItemId );
+ bShowMenuImages = ( ( nBits & MIB_ICON ) == MIB_ICON );
+ }
PopupMenu* pPopupMenu = pMenu->GetPopupMenu( nItemId );
if ( pPopupMenu )
@@ -1137,10 +1139,12 @@ void MenuManager::FillMenuImages(Reference< XFrame >& _xFrame,Menu* _pMenu,sal_B
if ( _pMenu->GetItemType( nPos ) != MENUITEM_SEPARATOR )
{
bool bTmpShowMenuImages( bShowMenuImages );
- MenuItemBits nBits = _pMenu->GetItemBits( nId );
- // overwrite the default?
- if ( nBits )
+ // overwrite the show icons on menu option?
+ if (!bTmpShowMenuImages)
+ {
+ MenuItemBits nBits = _pMenu->GetItemBits( nId );
bTmpShowMenuImages = ( ( nBits & MIB_ICON ) == MIB_ICON );
+ }
if ( bTmpShowMenuImages )
{
diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx
index 9d8aa9205c90..3a8d893cf3fd 100644
--- a/framework/source/uielement/menubarmanager.cxx
+++ b/framework/source/uielement/menubarmanager.cxx
@@ -1331,10 +1331,12 @@ void MenuBarManager::FillMenuManager( Menu* pMenu, const Reference< XFrame >& rF
Reference< XStatusListener > xStatusListener;
PopupMenu* pPopup = pMenu->GetPopupMenu( nItemId );
bool bItemShowMenuImages = m_bShowMenuImages;
- MenuItemBits nBits = pMenu->GetItemBits( nItemId );
// overwrite the show icons on menu option?
- if ( nBits )
+ if (!bItemShowMenuImages)
+ {
+ MenuItemBits nBits = pMenu->GetItemBits( nItemId );
bItemShowMenuImages = ( ( nBits & MIB_ICON ) == MIB_ICON );
+ }
if ( pPopup )
{
// Retrieve module identifier from Help Command entry