diff options
author | Noel Grandin <noel@peralex.com> | 2014-10-21 08:39:46 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-10-23 12:55:35 +0200 |
commit | 035fe8a6aa6489740a7c9f4e1768452319a686d3 (patch) | |
tree | 0d0341d222b24cfa59d4b79c9420a9e116cc6a78 /sfx2/source/menu | |
parent | bb0039fdca8eff5ca603e333a23c3a7736b32cb2 (diff) |
fdo#84938: replace MENUITEM constants with enum
Change-Id: I7b0085af3b13bd6e1a50bf1e0e986d1524b52d7b
Diffstat (limited to 'sfx2/source/menu')
-rw-r--r-- | sfx2/source/menu/mnuitem.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/menu/virtmenu.cxx | 22 |
2 files changed, 12 insertions, 12 deletions
diff --git a/sfx2/source/menu/mnuitem.cxx b/sfx2/source/menu/mnuitem.cxx index 838d1298c370..3bf7e24d5ca7 100644 --- a/sfx2/source/menu/mnuitem.cxx +++ b/sfx2/source/menu/mnuitem.cxx @@ -346,7 +346,7 @@ IMPL_LINK( SfxAppMenuControl_Impl, Activate, Menu *, pActMenu ) for ( sal_uInt16 nSVPos = 0; nSVPos < nCount; nSVPos++ ) { sal_uInt16 nItemId = pActMenu->GetItemId( nSVPos ); - if ( pActMenu->GetItemType( nSVPos ) != MENUITEM_SEPARATOR ) + if ( pActMenu->GetItemType( nSVPos ) != MenuItemType::SEPARATOR ) { if ( bShowMenuImages ) { diff --git a/sfx2/source/menu/virtmenu.cxx b/sfx2/source/menu/virtmenu.cxx index e6e4d8f1813a..7be7d806fb78 100644 --- a/sfx2/source/menu/virtmenu.cxx +++ b/sfx2/source/menu/virtmenu.cxx @@ -398,8 +398,8 @@ void SfxVirtualMenu::CreateFromSVMenu() { switch ( pSVMenu->GetItemType(nSVPos) ) { - case MENUITEM_STRING: - case MENUITEM_STRINGIMAGE: + case MenuItemType::STRING: + case MenuItemType::STRINGIMAGE: { SfxMenuControl *pMnuCtrl=0; OUString aCmd( pSVMenu->GetItemCommand( nSlotId ) ); @@ -465,11 +465,11 @@ void SfxVirtualMenu::CreateFromSVMenu() break; } - case MENUITEM_IMAGE: + case MenuItemType::IMAGE: //! not implemented break; - case MENUITEM_SEPARATOR: + case MenuItemType::SEPARATOR: //! not implemented break; default: @@ -501,9 +501,9 @@ IMPL_LINK_NOARG(SfxVirtualMenu, SettingsChanged) { for ( sal_uInt16 nSVPos=0; nSVPos<nItemCount; ++nSVPos ) { - sal_uInt16 nSlotId = pSVMenu->GetItemId( nSVPos ); + sal_uInt16 nSlotId = pSVMenu->GetItemId( nSVPos ); MenuItemType nType = pSVMenu->GetItemType( nSVPos ); - if ( nType == MENUITEM_STRING && bIcons ) + if ( nType == MenuItemType::STRING && bIcons ) { if ( framework::AddonMenuManager::IsAddonMenuId( nSlotId )) { @@ -526,7 +526,7 @@ IMPL_LINK_NOARG(SfxVirtualMenu, SettingsChanged) pSVMenu->SetItemImage( nSlotId, GetImage( xFrame, aSlotURL, false )); } } - else if( nType == MENUITEM_STRINGIMAGE && !bIcons ) + else if( nType == MenuItemType::STRINGIMAGE && !bIcons ) { pSVMenu->SetItemImage( nSlotId, Image() ); } @@ -575,7 +575,7 @@ void SfxVirtualMenu::UpdateImages( Menu* pMenu ) { sal_uInt16 nSlotId = pMenu->GetItemId( nPos ); PopupMenu* pPopup = pMenu->GetPopupMenu( nSlotId ); - if ( pMenu->GetItemType( nPos ) != MENUITEM_SEPARATOR ) + if ( pMenu->GetItemType( nPos ) != MenuItemType::SEPARATOR ) { OUString aImageId; @@ -609,7 +609,7 @@ void SfxVirtualMenu::RemoveMenuImages( Menu* pMenu ) { sal_uInt16 nSlotId = pMenu->GetItemId( nPos ); PopupMenu* pPopup = pMenu->GetPopupMenu( nSlotId ); - if ( pMenu->GetItemType( nPos ) == MENUITEM_STRINGIMAGE ) + if ( pMenu->GetItemType( nPos ) == MenuItemType::STRINGIMAGE ) pMenu->SetItemImage( nSlotId, Image() ); if ( pPopup ) RemoveMenuImages( pPopup ); @@ -756,7 +756,7 @@ void SfxVirtualMenu::InsertAddOnsMenuItem( Menu* pMenu ) { sal_uInt16 nItemCount = pMenu->GetItemCount(); OUString aAddonsTitle(SfxResId(STR_MENU_ADDONS).toString()); - if ( nItemCount > 0 && pMenu->GetItemType( nItemCount-1 ) != MENUITEM_SEPARATOR ) + if ( nItemCount > 0 && pMenu->GetItemType( nItemCount-1 ) != MenuItemType::SEPARATOR ) pMenu->InsertSeparator(); pMenu->InsertItem( SID_ADDONS, aAddonsTitle ); pMenu->SetPopupMenu( SID_ADDONS, pAddonMenu ); @@ -851,7 +851,7 @@ IMPL_LINK( SfxVirtualMenu, Activate, Menu *, pMenu ) for ( sal_uInt16 n = nPos; n < pMenu->GetItemCount(); ) pMenu->RemoveItem( n ); - if ( pMenu->GetItemType( pMenu->GetItemCount()-1 ) == MENUITEM_SEPARATOR ) + if ( pMenu->GetItemType( pMenu->GetItemCount()-1 ) == MenuItemType::SEPARATOR ) pMenu->RemoveItem( pMenu->GetItemCount()-1 ); } |