diff -r 21777680017e framework/source/uielement/menubarmanager.cxx --- a/framework/source/uielement/menubarmanager.cxx Thu Mar 18 17:15:13 2010 +0000 +++ b/framework/source/uielement/menubarmanager.cxx Fri Apr 02 12:58:01 2010 +0100 @@ -548,11 +548,14 @@ if ( Event.State >>= bCheckmark ) { - // Checkmark + // Checkmark or RadioButton m_pVCLMenu->ShowItem( pMenuItemHandler->nItemId, TRUE ); m_pVCLMenu->CheckItem( pMenuItemHandler->nItemId, bCheckmark ); - m_pVCLMenu->SetItemBits( pMenuItemHandler->nItemId, - m_pVCLMenu->GetItemBits( pMenuItemHandler->nItemId ) | MIB_CHECKABLE ); + + MenuItemBits nBits = m_pVCLMenu->GetItemBits( pMenuItemHandler->nItemId ); + //If not already designated RadioButton set as CheckMark + if (!(nBits & MIB_RADIOCHECK)) + m_pVCLMenu->SetItemBits( pMenuItemHandler->nItemId, nBits | MIB_CHECKABLE ); } else if ( Event.State >>= aItemText ) { @@ -1805,6 +1808,8 @@ nBits |= MIB_ICON; if ( nStyle & ::com::sun::star::ui::ItemStyle::TEXT ) nBits |= MIB_TEXT; + if ( nStyle & ::com::sun::star::ui::ItemStyle::RADIO_CHECK ) + nBits |= MIB_RADIOCHECK; pMenu->SetItemBits( nId, nBits ); } if ( xIndexContainer.is() ) diff -r 21777680017e framework/source/xml/menudocumenthandler.cxx --- a/framework/source/xml/menudocumenthandler.cxx Thu Mar 18 17:15:13 2010 +0000 +++ b/framework/source/xml/menudocumenthandler.cxx Fri Apr 02 12:58:01 2010 +0100 @@ -94,6 +94,7 @@ #define ATTRIBUTE_ITEMSTYLE_TEXT "text" #define ATTRIBUTE_ITEMSTYLE_IMAGE "image" +#define ATTRIBUTE_ITEMSTYLE_RADIO "radio" // Property names of a menu/menu item ItemDescriptor static const char ITEM_DESCRIPTOR_COMMANDURL[] = "CommandURL"; @@ -134,6 +135,7 @@ MenuStyleItem MenuItemStyles[ ] = { { ::com::sun::star::ui::ItemStyle::ICON, ATTRIBUTE_ITEMSTYLE_IMAGE }, { ::com::sun::star::ui::ItemStyle::TEXT, ATTRIBUTE_ITEMSTYLE_TEXT }, + { ::com::sun::star::ui::ItemStyle::RADIO_CHECK, ATTRIBUTE_ITEMSTYLE_RADIO } }; @@ -437,8 +439,10 @@ { if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_TEXT ) ) ) nItemBits |= ::com::sun::star::ui::ItemStyle::TEXT; - if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_IMAGE ) ) ) + else if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_IMAGE ) ) ) nItemBits |= ::com::sun::star::ui::ItemStyle::ICON; + else if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_RADIO ) ) ) + nItemBits |= ::com::sun::star::ui::ItemStyle::RADIO_CHECK; } } while ( nIndex >= 0 ); @@ -670,8 +674,10 @@ { if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_TEXT ) ) ) nItemBits |= ::com::sun::star::ui::ItemStyle::TEXT; - if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_IMAGE ) ) ) + else if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_IMAGE ) ) ) nItemBits |= ::com::sun::star::ui::ItemStyle::ICON; + else if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_RADIO ) ) ) + nItemBits |= ::com::sun::star::ui::ItemStyle::RADIO_CHECK; } } while ( nIndex >= 0 ); @@ -725,8 +731,10 @@ { if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_TEXT ) ) ) nItemBits |= ::com::sun::star::ui::ItemStyle::TEXT; - if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_IMAGE ) ) ) + else if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_IMAGE ) ) ) nItemBits |= ::com::sun::star::ui::ItemStyle::ICON; + else if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_RADIO ) ) ) + nItemBits |= ::com::sun::star::ui::ItemStyle::RADIO_CHECK; } } while ( nIndex >= 0 ); diff -r 21777680017e sw/uiconfig/sglobal/menubar/menubar.xml --- a/sw/uiconfig/sglobal/menubar/menubar.xml Thu Mar 18 17:15:13 2010 +0000 +++ b/sw/uiconfig/sglobal/menubar/menubar.xml Fri Apr 02 12:58:01 2010 +0100 @@ -65,8 +65,8 @@ - - + + @@ -240,11 +240,11 @@ - - - - - + + + + + @@ -264,14 +264,14 @@ - - - - + + + + - - - + + + diff -r 21777680017e sw/uiconfig/sweb/menubar/menubar.xml --- a/sw/uiconfig/sweb/menubar/menubar.xml Thu Mar 18 17:15:13 2010 +0000 +++ b/sw/uiconfig/sweb/menubar/menubar.xml Fri Apr 02 12:58:01 2010 +0100 @@ -54,8 +54,8 @@ - - + + @@ -187,11 +187,11 @@ - - - - - + + + + + @@ -211,14 +211,14 @@ - - - - + + + + - - - + + + diff -r 21777680017e sw/uiconfig/swform/menubar/menubar.xml --- a/sw/uiconfig/swform/menubar/menubar.xml Thu Mar 18 17:15:13 2010 +0000 +++ b/sw/uiconfig/swform/menubar/menubar.xml Fri Apr 02 12:58:01 2010 +0100 @@ -66,8 +66,8 @@ - - + + @@ -240,11 +240,11 @@ - - - - - + + + + + @@ -264,14 +264,14 @@ - - - - + + + + - - - + + + diff -r 21777680017e sw/uiconfig/swreport/menubar/menubar.xml --- a/sw/uiconfig/swreport/menubar/menubar.xml Thu Mar 18 17:15:13 2010 +0000 +++ b/sw/uiconfig/swreport/menubar/menubar.xml Fri Apr 02 12:58:01 2010 +0100 @@ -66,8 +66,8 @@ - - + + @@ -240,11 +240,11 @@ - - - - - + + + + + @@ -264,14 +264,14 @@ - - - - + + + + - - - + + + diff -r 21777680017e sw/uiconfig/swriter/menubar/menubar.xml --- a/sw/uiconfig/swriter/menubar/menubar.xml Thu Mar 18 17:15:13 2010 +0000 +++ b/sw/uiconfig/swriter/menubar/menubar.xml Fri Apr 02 12:58:01 2010 +0100 @@ -69,8 +69,8 @@ - - + + @@ -243,11 +243,11 @@ - - - - - + + + + + @@ -267,14 +267,14 @@ - - - - + + + + - - - + + + diff -r 21777680017e sw/uiconfig/swxform/menubar/menubar.xml --- a/sw/uiconfig/swxform/menubar/menubar.xml Thu Mar 18 17:15:13 2010 +0000 +++ b/sw/uiconfig/swxform/menubar/menubar.xml Fri Apr 02 12:58:01 2010 +0100 @@ -67,8 +67,8 @@ - - + + @@ -241,11 +241,11 @@ - - - - - + + + + + @@ -265,14 +265,14 @@ - - - - + + + + - - - + + +