summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2022-03-09 21:32:35 +0100
committerSzymon Kłos <szymon.klos@collabora.com>2022-03-14 08:42:12 +0100
commit0d069f8eeb25e59802c0a8d9cd05287f40aced1f (patch)
tree9866bad74d46dd95f1fff0363778303a6bcf066e /sc
parentbe5e01372659897e50c7334ce205ceda4e3d1db5 (diff)
lok: insert textbox directly in Calc
Change-Id: I3ae00b255dfbaa34ab8d973356d12dfd0f71d345 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131267 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Mert Tumer <mert.tumer@collabora.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/view/tabvwsh2.cxx11
1 files changed, 9 insertions, 2 deletions
diff --git a/sc/source/ui/view/tabvwsh2.cxx b/sc/source/ui/view/tabvwsh2.cxx
index 6644c28098d5..1b9548364be5 100644
--- a/sc/source/ui/view/tabvwsh2.cxx
+++ b/sc/source/ui/view/tabvwsh2.cxx
@@ -261,6 +261,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();
tools::Long nLayoutSign = rViewData.GetDocument().IsLayoutRTL(rViewData.GetTabNo()) ? -1 : 1;
aInsertPos = rViewData.getLOKVisibleArea().Center();
@@ -367,13 +367,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;
}
}