summaryrefslogtreecommitdiff
path: root/sw/source/uibase/uiview
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2018-11-22 12:12:07 +0100
committerJan Holesovsky <kendy@collabora.com>2018-12-07 11:52:32 +0100
commite75c67bd552d8599126374e231c3a6ea15c25f40 (patch)
treea9abea4d8d683e1f77d19b8e155ad1b3eed480d9 /sw/source/uibase/uiview
parent25adc4fb5a655906ff62174d90804e50aa1f345e (diff)
lok: Insert shapes directly into the document.
Change-Id: I182aa395ce0f4e4185c9c85a866dec89499842f9
Diffstat (limited to 'sw/source/uibase/uiview')
-rw-r--r--sw/source/uibase/uiview/viewdraw.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/sw/source/uibase/uiview/viewdraw.cxx b/sw/source/uibase/uiview/viewdraw.cxx
index 5a836876255b..8420e9f3a9f5 100644
--- a/sw/source/uibase/uiview/viewdraw.cxx
+++ b/sw/source/uibase/uiview/viewdraw.cxx
@@ -229,6 +229,9 @@ void SwView::ExecDraw(SfxRequest& rReq)
std::unique_ptr<SwDrawBase> pFuncPtr;
+ // for LibreOfficeKit - choosing a shape should construct it directly
+ bool bCreateDirectly = false;
+
switch (nSlotId)
{
case SID_OBJECT_SELECT:
@@ -300,6 +303,9 @@ void SwView::ExecDraw(SfxRequest& rReq)
case SID_DRAW_CS_ID :
{
pFuncPtr.reset( new ConstCustomShape(m_pWrtShell.get(), m_pEditWin, this, rReq ) );
+
+ bCreateDirectly = comphelper::LibreOfficeKit::isActive();
+
m_nDrawSfxId = nSlotId;
if ( nSlotId != SID_DRAW_CS_ID )
{
@@ -334,7 +340,7 @@ void SwView::ExecDraw(SfxRequest& rReq)
pTempFuncPtr->Activate(nSlotId);
NoRotate();
- if(rReq.GetModifier() == KEY_MOD1)
+ if(rReq.GetModifier() == KEY_MOD1 || bCreateDirectly)
{
if(SID_OBJECT_SELECT == m_nDrawSfxId )
{