summaryrefslogtreecommitdiff
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 21:23:33 +0100
commitbf995bf71c87cd2deb5237a2ab87a78b57caecf2 (patch)
treed5a960e5e23511e4392dbe041d205e708b6de7c6
parentad2debaf59b61374b50a347fef38f2600c25e451 (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> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131535 Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
-rw-r--r--sc/source/ui/view/tabvwsh2.cxx11
-rw-r--r--svx/sdi/svx.sdi2
2 files changed, 10 insertions, 3 deletions
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,