[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - sc/source

Maxim Monastirsky momonasmon at gmail.com
Thu Nov 3 21:28:47 UTC 2016


 sc/source/ui/view/tabvwsh2.cxx |   19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

New commits:
commit e40275ae189fd0dd7fd962fa86d45808abe9fa8c
Author: Maxim Monastirsky <momonasmon at gmail.com>
Date:   Sun Oct 23 01:02:19 2016 +0300

    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 at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sc/source/ui/view/tabvwsh2.cxx b/sc/source/ui/view/tabvwsh2.cxx
index b81fc42..4c750ea 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);


More information about the Libreoffice-commits mailing list