summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-12-11 14:53:11 +0000
committerCaolán McNamara <caolanm@redhat.com>2021-12-12 13:33:01 +0100
commit73e9e027e9978cf5136731118f18b832bd361181 (patch)
tree2c55dbc932c0bb9a6a88a593c7d884639775ee90 /sfx2
parent0785b76c0060055413ee18842a82649a35277449 (diff)
remove menu "Change id" hack
this was introduced with the cryptic: commit e52717eefb2cbf94b70e4620652c1e8848a30c82 Date: Mon May 26 07:30:41 2003 +0000 INTEGRATION: CWS fwk03 (1.34.20); FILE MERGED 2003/05/16 09:58:43 mba 1.34.20.1: #109534#: change in unoctitm.cxx revealed another problem - after ContextMenuInterception slotids might have vanished, so no Controllers can be created in the two remaining uses currently in. sw/source/uibase/docvw/edtwin.cxx and sw/source/uibase/uiview/viewling.cxx I can't see that this could do anything useful anymore. There were other uses in the past however. Change-Id: Ic707566e603bb3b3f6e70bf3fc2581e799828253 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126665 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/view/viewsh.cxx41
1 files changed, 0 insertions, 41 deletions
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index 8f112ec2a593..860310b73667 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -1850,45 +1850,6 @@ void SfxViewShell::RemoveContextMenuInterceptor_Impl( const uno::Reference< ui::
pImpl->aInterceptorContainer.removeInterface( xInterceptor );
}
-static void Change( Menu* pMenu, SfxViewShell* pView )
-{
- SfxDispatcher *pDisp = pView->GetViewFrame()->GetDispatcher();
- sal_uInt16 nCount = pMenu->GetItemCount();
- for ( sal_uInt16 nPos=0; nPos<nCount; ++nPos )
- {
- sal_uInt16 nId = pMenu->GetItemId(nPos);
- OUString aCmd = pMenu->GetItemCommand(nId);
- PopupMenu* pPopup = pMenu->GetPopupMenu(nId);
- if ( pPopup )
- {
- Change( pPopup, pView );
- }
- else if ( nId < 5000 )
- {
- if ( aCmd.startsWith(".uno:") )
- {
- for (sal_uInt16 nIdx=0;;)
- {
- SfxShell *pShell=pDisp->GetShell(nIdx++);
- if (pShell == nullptr)
- break;
- const SfxInterface *pIFace = pShell->GetInterface();
- const SfxSlot* pSlot = pIFace->GetSlot( aCmd );
- if ( pSlot )
- {
- pMenu->InsertItem( pSlot->GetSlotId(), pMenu->GetItemText( nId ),
- pMenu->GetItemBits( nId ), OString(), nPos );
- pMenu->SetItemCommand( pSlot->GetSlotId(), aCmd );
- pMenu->RemoveItem( nPos+1 );
- break;
- }
- }
- }
- }
- }
-}
-
-
bool SfxViewShell::TryContextMenuInterception(const Menu& rIn, const OUString& rMenuIdentifier,
css::uno::Reference<css::awt::XPopupMenu>& rOut,
ui::ContextMenuExecuteEvent aEvent)
@@ -1957,8 +1918,6 @@ bool SfxViewShell::TryContextMenuInterception(const Menu& rIn, const OUString& r
assert(pVCLMenu);
::framework::ActionTriggerHelper::CreateMenuFromActionTriggerContainer(pVCLMenu, aEvent.ActionTriggerContainer);
-
- Change(pVCLMenu, this);
}
return true;