From 0ac22118721b426b2fc441a1c37572cda972be08 Mon Sep 17 00:00:00 2001 From: Maxim Monastirsky Date: Thu, 17 Dec 2015 00:55:49 +0200 Subject: nConfigId is always 0 Change-Id: Ic314bc04a22ebf23fa7b06dca06e4d2afae096f9 --- include/sfx2/dispatch.hxx | 3 +-- sc/source/ui/view/gridwin.cxx | 2 +- sfx2/source/control/dispatch.cxx | 9 +++------ sw/source/uibase/docvw/edtwin.cxx | 2 +- 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/include/sfx2/dispatch.hxx b/include/sfx2/dispatch.hxx index 17dec3243b5f..f09fe3a92314 100644 --- a/include/sfx2/dispatch.hxx +++ b/include/sfx2/dispatch.hxx @@ -159,8 +159,7 @@ public: void ExecutePopup( const ResId &rId, vcl::Window *pWin = nullptr, const Point *pPosPixel = nullptr ); - static void ExecutePopup( sal_uInt16 nConfigId = 0, - vcl::Window *pWin = nullptr, const Point *pPosPixel = nullptr ); + static void ExecutePopup( vcl::Window *pWin = nullptr, const Point *pPosPixel = nullptr ); bool IsAppDispatcher() const; bool IsFlushed() const; diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index de0d32e2a857..fc11103740ea 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -3215,7 +3215,7 @@ void ScGridWindow::Command( const CommandEvent& rCEvt ) if (!bDone) { - SfxDispatcher::ExecutePopup( 0, this, &aMenuPos ); + SfxDispatcher::ExecutePopup( this, &aMenuPos ); } } } diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx index e50f9abc3e05..2dc5ac8c8394 100644 --- a/sfx2/source/control/dispatch.cxx +++ b/sfx2/source/control/dispatch.cxx @@ -1873,17 +1873,14 @@ SfxPopupMenuManager* SfxDispatcher::Popup( sal_uInt16 nConfigId, vcl::Window *pW return nullptr; } -void SfxDispatcher::ExecutePopup( sal_uInt16 nConfigId, vcl::Window *pWin, const Point *pPos ) +void SfxDispatcher::ExecutePopup( vcl::Window *pWin, const Point *pPos ) { SfxDispatcher &rDisp = *SfxGetpApp()->GetDispatcher_Impl(); sal_uInt16 nShLevel = 0; SfxShell *pSh; if ( rDisp.xImp->bQuiet ) - { - nConfigId = 0; nShLevel = rDisp.xImp->aStack.size(); - } vcl::Window *pWindow = pWin ? pWin : rDisp.xImp->pFrame->GetFrame().GetWorkWindow_Impl()->GetWindow(); Point aPos = pPos ? *pPos : pWindow->GetPointerPosPixel(); @@ -1891,12 +1888,12 @@ void SfxDispatcher::ExecutePopup( sal_uInt16 nConfigId, vcl::Window *pWin, const { const ResId& rResId = pSh->GetInterface()->GetPopupMenuResId(); const OUString& rResName = pSh->GetInterface()->GetPopupMenuName(); - if ( ( nConfigId == 0 && rResId.GetId() ) || ( nConfigId != 0 && rResId.GetId() == nConfigId ) ) + if ( rResId.GetId() ) { SfxPopupMenuManager::ExecutePopup( rResId, rDisp.GetFrame(), aPos, pWindow ); return; } - else if ( nConfigId == 0 && !rResName.isEmpty() ) + else if ( !rResName.isEmpty() ) { css::uno::Sequence< css::uno::Any > aArgs( 3 ); aArgs[0] <<= comphelper::makePropertyValue( "Value", rResName ); diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index 2a11d57df0a5..d376191340fc 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -5265,7 +5265,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt ) } } else if ( !m_rView.ExecSpellPopup( aDocPos ) ) - SfxDispatcher::ExecutePopup( 0, this, &aPixPos); + SfxDispatcher::ExecutePopup(this, &aPixPos); } else if (m_pApplyTempl->nUndo < rSh.GetDoc()->GetIDocumentUndoRedo().GetUndoActionCount()) { -- cgit v1.2.3