sc/source/ui/view/tabvwsh2.cxx |   11 +++++++++--
 svx/sdi/svx.sdi                |    2 +-
 2 files changed, 10 insertions(+), 3 deletions(-)

New commits:
commit c65ec2706aac6064d66715141c840b7a55811bb7
Author:     Szymon Kłos <szymon.k...@collabora.com>
AuthorDate: Wed Mar 9 21:32:35 2022 +0100
Commit:     Szymon Kłos <szymon.k...@collabora.com>
CommitDate: Wed Mar 16 12:06:26 2022 +0100

    lok: insert textbox directly in Calc
    
    Change-Id: I3ae00b255dfbaa34ab8d973356d12dfd0f71d345
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131267
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Mert Tumer <mert.tu...@collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131641
    Tested-by: Szymon Kłos <szymon.k...@collabora.com>
    Reviewed-by: Szymon Kłos <szymon.k...@collabora.com>

diff --git a/sc/source/ui/view/tabvwsh2.cxx b/sc/source/ui/view/tabvwsh2.cxx
index 98826e80d4d1..1c74f9767515 100644
--- a/sc/source/ui/view/tabvwsh2.cxx
+++ b/sc/source/ui/view/tabvwsh2.cxx
@@ -265,6 +265,7 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
         case SID_DRAW_TEXT_MARQUEE:
         case SID_DRAW_NOTEEDIT:
             pTabView->SetDrawFuncPtr(new FuText(*this, pWin, pView, pDoc, 
aNewReq));
+            bCreateDirectly = comphelper::LibreOfficeKit::isActive();
             break;
 
         case SID_FM_CREATE_CONTROL:
@@ -335,7 +336,6 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
     }
     else
     {
-        GetViewFrame()->GetDispatcher()->Execute(SID_OBJECT_SELECT, 
SfxCallMode::ASYNCHRON);
         ScViewData& rViewData = GetViewData();
         tools::Long nLayoutSign = 
rViewData.GetDocument().IsLayoutRTL(rViewData.GetTabNo()) ? -1 : 1;
         aInsertPos = rViewData.getLOKVisibleArea().Center();
@@ -371,13 +371,20 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
     // insert into page
     pView->InsertObjectAtView(pObj.release(), *pPageView);
 
-    if ( nNewId == SID_DRAW_CAPTION || nNewId == SID_DRAW_CAPTION_VERTICAL )
+    switch ( nNewId )
     {
+    case SID_DRAW_CAPTION:
+    case SID_DRAW_CAPTION_VERTICAL:
+    case SID_DRAW_TEXT:
+    case SID_DRAW_TEXT_VERTICAL:
         //  use KeyInput to start edit mode (FuText is created).
         //  For FuText objects, edit mode is handled within 
CreateDefaultObject.
         //  KEY_F2 is handled in FuDraw::KeyInput.
 
         pFuActual->KeyInput( KeyEvent( 0, vcl::KeyCode( KEY_F2 ) ) );
+        break;
+    default:
+        break;
     }
 }
 
diff --git a/svx/sdi/svx.sdi b/svx/sdi/svx.sdi
index f0314fe63360..d4a4d6eee905 100644
--- a/svx/sdi/svx.sdi
+++ b/svx/sdi/svx.sdi
@@ -8520,7 +8520,7 @@ SfxBoolItem Text SID_ATTR_CHAR
 
 
 SfxBoolItem DrawText SID_DRAW_TEXT
-
+(SfxBoolItem CreateDirectly FN_PARAM_1)
 [
     AutoUpdate = TRUE,
     FastCall = FALSE,

Reply via email to