summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMaxim Monastirsky <momonasmon@gmail.com>2016-10-23 01:02:19 +0300
committerCaolán McNamara <caolanm@redhat.com>2016-11-03 21:28:18 +0000
commite40275ae189fd0dd7fd962fa86d45808abe9fa8c (patch)
treee29393c2b23b5d96163c6e2b8e65e9a4d13e5cb3 /sc
parentae8226a2166d6a25dd5b711b0f004ad5da1ba90e (diff)
tdf#103178 Final SID can differ from the original one
e.g. if the same one is passed twice to deactivate the current function. So the assumption of commit 11d605cc5a0c221d2423b6e63f502db660d085d2 that if we don't use enum slots then we always use the original one is wrong. (cherry picked from commit d5eabed46ef3bc6754d381a0551ce070df933894) Conflicts: sc/source/ui/view/tabvwsh2.cxx Change-Id: Ib22fa88c958e5af85333cb8fa287f65f92b30e08 Reviewed-on: https://gerrit.libreoffice.org/30171 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/view/tabvwsh2.cxx19
1 files changed, 11 insertions, 8 deletions
diff --git a/sc/source/ui/view/tabvwsh2.cxx b/sc/source/ui/view/tabvwsh2.cxx
index b81fc422d355..4c750eaf174b 100644
--- a/sc/source/ui/view/tabvwsh2.cxx
+++ b/sc/source/ui/view/tabvwsh2.cxx
@@ -207,6 +207,9 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
pTabView->SetDrawFuncPtr(nullptr);
}
+ SfxRequest aNewReq(rReq);
+ aNewReq.SetSlot(nDrawSfxId);
+
assert(nNewId != SID_DRAW_CHART); //#i71254# handled already above
switch (nNewId)
@@ -214,18 +217,18 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
case SID_OBJECT_SELECT:
// Nicht immer zurueckschalten
if(pView->GetMarkedObjectList().GetMarkCount() == 0) SetDrawShell(bEx);
- pTabView->SetDrawFuncPtr(new FuSelection(this, pWin, pView, pDoc, rReq));
+ pTabView->SetDrawFuncPtr(new FuSelection(this, pWin, pView, pDoc, aNewReq));
break;
case SID_DRAW_LINE:
case SID_DRAW_RECT:
case SID_DRAW_ELLIPSE:
- pTabView->SetDrawFuncPtr(new FuConstRectangle(this, pWin, pView, pDoc, rReq));
+ pTabView->SetDrawFuncPtr(new FuConstRectangle(this, pWin, pView, pDoc, aNewReq));
break;
case SID_DRAW_CAPTION:
case SID_DRAW_CAPTION_VERTICAL:
- pTabView->SetDrawFuncPtr(new FuConstRectangle(this, pWin, pView, pDoc, rReq));
+ pTabView->SetDrawFuncPtr(new FuConstRectangle(this, pWin, pView, pDoc, aNewReq));
pView->SetFrameDragSingles( false );
rBindings.Invalidate( SID_BEZIER_EDIT );
break;
@@ -238,25 +241,25 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
case SID_DRAW_BEZIER_FILL:
case SID_DRAW_FREELINE:
case SID_DRAW_FREELINE_NOFILL:
- pTabView->SetDrawFuncPtr(new FuConstPolygon(this, pWin, pView, pDoc, rReq));
+ pTabView->SetDrawFuncPtr(new FuConstPolygon(this, pWin, pView, pDoc, aNewReq));
break;
case SID_DRAW_ARC:
case SID_DRAW_PIE:
case SID_DRAW_CIRCLECUT:
- pTabView->SetDrawFuncPtr(new FuConstArc(this, pWin, pView, pDoc, rReq));
+ pTabView->SetDrawFuncPtr(new FuConstArc(this, pWin, pView, pDoc, aNewReq));
break;
case SID_DRAW_TEXT:
case SID_DRAW_TEXT_VERTICAL:
case SID_DRAW_TEXT_MARQUEE:
case SID_DRAW_NOTEEDIT:
- pTabView->SetDrawFuncPtr(new FuText(this, pWin, pView, pDoc, rReq));
+ pTabView->SetDrawFuncPtr(new FuText(this, pWin, pView, pDoc, aNewReq));
break;
case SID_FM_CREATE_CONTROL:
SetDrawFormShell(true);
- pTabView->SetDrawFuncPtr(new FuConstUnoControl(this, pWin, pView, pDoc, rReq));
+ pTabView->SetDrawFuncPtr(new FuConstUnoControl(this, pWin, pView, pDoc, aNewReq));
nFormSfxId = nNewFormId;
break;
@@ -268,7 +271,7 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
case SID_DRAWTBX_CS_STAR :
case SID_DRAW_CS_ID :
{
- pTabView->SetDrawFuncPtr( new FuConstCustomShape( this, pWin, pView, pDoc, rReq ));
+ pTabView->SetDrawFuncPtr( new FuConstCustomShape( this, pWin, pView, pDoc, aNewReq ));
if ( nNewId != SID_DRAW_CS_ID )
{
const SfxStringItem* pEnumCommand = rReq.GetArg<SfxStringItem>(nNewId);