sc/source/ui/view/tabvwsh2.cxx | 11 +++++++++-- svx/sdi/svx.sdi | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-)
New commits: commit bf995bf71c87cd2deb5237a2ab87a78b57caecf2 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: Mon Mar 14 21:23:33 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/+/131535 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 dc48b24dc52c..693ef04ed055 100644 --- a/sc/source/ui/view/tabvwsh2.cxx +++ b/sc/source/ui/view/tabvwsh2.cxx @@ -262,6 +262,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: @@ -331,7 +332,6 @@ 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( @@ -363,13 +363,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 9b3d9c89a48f..3f268536390e 100644 --- a/svx/sdi/svx.sdi +++ b/svx/sdi/svx.sdi @@ -8373,7 +8373,7 @@ SfxBoolItem Text SID_ATTR_CHAR SfxBoolItem DrawText SID_DRAW_TEXT - +(SfxBoolItem CreateDirectly FN_PARAM_1) [ AutoUpdate = TRUE, FastCall = FALSE,