sc/source/ui/view/tabvwsh2.cxx       |    2 ++
 sd/source/ui/view/drviewse.cxx       |    4 ++++
 sw/source/uibase/uiview/viewdraw.cxx |    3 +++
 3 files changed, 9 insertions(+)

New commits:
commit b08066fe16a74b779be63c6a7368e8f6225e4062
Author:     merttumer <mert.tu...@collabora.com>
AuthorDate: Fri Mar 19 12:31:42 2021 +0300
Commit:     Jan Holesovsky <ke...@collabora.com>
CommitDate: Wed Mar 24 11:01:55 2021 +0100

    Fix Line and Connectors enable interactive drawing
    
    We add them directly for LOK case and have no functionality
    for interactive drawing.
    
    Noticed that in Writer we didnt even add them directly
    I also implemented that as well.
    
    Change-Id: If90bfc8d2cdf84f200bc7963ae4126ef789524ff
    Signed-off-by: merttumer <mert.tu...@collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112703
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Jan Holesovsky <ke...@collabora.com>

diff --git a/sc/source/ui/view/tabvwsh2.cxx b/sc/source/ui/view/tabvwsh2.cxx
index d2efc23d5559..dc48b24dc52c 100644
--- a/sc/source/ui/view/tabvwsh2.cxx
+++ b/sc/source/ui/view/tabvwsh2.cxx
@@ -230,6 +230,7 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
         case SID_DRAW_ELLIPSE:
         case SID_DRAW_MEASURELINE:
             pTabView->SetDrawFuncPtr(new FuConstRectangle(*this, pWin, pView, 
pDoc, aNewReq));
+            bCreateDirectly = comphelper::LibreOfficeKit::isActive();
             break;
 
         case SID_DRAW_CAPTION:
@@ -330,6 +331,7 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
         }
         else
         {
+            GetViewFrame()->GetDispatcher()->Execute(SID_OBJECT_SELECT, 
SfxCallMode::ASYNCHRON);
             ScViewData& rViewData = GetViewData();
             aInsertPos = rViewData.getLOKVisibleArea().Center();
             if (comphelper::LibreOfficeKit::isCompatFlagSet(
diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx
index e330d0416ce8..6aefeb33e77f 100644
--- a/sd/source/ui/view/drviewse.cxx
+++ b/sd/source/ui/view/drviewse.cxx
@@ -608,6 +608,10 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq)
     if(!(HasCurrentFunction() && ((rReq.GetModifier() & KEY_MOD1) || 
bCreateDirectly)))
         return;
 
+    // disable interactive drawing for LOK
+    if (bCreateDirectly)
+            GetViewFrame()->GetDispatcher()->Execute(SID_OBJECT_SELECT, 
SfxCallMode::ASYNCHRON);
+
     // get SdOptions
     SdOptions* pOptions = SD_MOD()->GetSdOptions(GetDoc()->GetDocumentType());
     sal_uInt32 nDefaultObjectSizeWidth(pOptions->GetDefaultObjectSizeWidth());
diff --git a/sw/source/uibase/uiview/viewdraw.cxx 
b/sw/source/uibase/uiview/viewdraw.cxx
index d5c2ff4284c7..507547b06666 100644
--- a/sw/source/uibase/uiview/viewdraw.cxx
+++ b/sw/source/uibase/uiview/viewdraw.cxx
@@ -266,6 +266,7 @@ void SwView::ExecDraw(SfxRequest& rReq)
         case SID_DRAW_CAPTION:
         case SID_DRAW_CAPTION_VERTICAL:
             pFuncPtr.reset( new ConstRectangle(m_pWrtShell.get(), m_pEditWin, 
this) );
+            bCreateDirectly = comphelper::LibreOfficeKit::isActive();
             m_nDrawSfxId = nSlotId;
             m_sDrawCustom.clear();
             break;
@@ -349,6 +350,8 @@ void SwView::ExecDraw(SfxRequest& rReq)
         NoRotate();
         if(rReq.GetModifier() == KEY_MOD1 || bCreateDirectly)
         {
+            if (bCreateDirectly)
+                GetViewFrame()->GetDispatcher()->Execute(SID_OBJECT_SELECT, 
SfxCallMode::ASYNCHRON);
             if(SID_OBJECT_SELECT == m_nDrawSfxId )
             {
                 m_pWrtShell->GotoObj(true);
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to