summaryrefslogtreecommitdiff
path: root/sd/source
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-10 12:31:38 +0100
commit0ffbb3ca8595e2287a4eb391c922290d8500b63f (patch)
tree1c642413b1beb8a0ecd00b3dd26a9fa7572594e4 /sd/source
parent8ade6298814a7223eb1b11d72534dd4bb4257a4d (diff)
lok: Insert shapes directly into the document.
Change-Id: I182aa395ce0f4e4185c9c85a866dec89499842f9
Diffstat (limited to 'sd/source')
-rw-r--r--sd/source/ui/view/drviewse.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx
index d24dbb65b4d4..170e57321cd5 100644
--- a/sd/source/ui/view/drviewse.cxx
+++ b/sd/source/ui/view/drviewse.cxx
@@ -29,6 +29,7 @@
#include <comphelper/processfactory.hxx>
+#include <comphelper/lok.hxx>
#include <undo/undomanager.hxx>
#include <vcl/waitobj.hxx>
#include <svl/aeitem.hxx>
@@ -227,6 +228,9 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq)
rBind.Update(nOldSId);
}
+ // for LibreOfficeKit - choosing a shape should construct it directly
+ bool bCreateDirectly = false;
+
switch ( nSId )
{
case SID_TEXTEDIT: // BASIC ???
@@ -512,6 +516,8 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq)
SetCurrentFunction( FuConstructCustomShape::Create( this, GetActiveWindow(), mpDrawView, GetDoc(), rReq, bPermanent ) );
rReq.Done();
+ bCreateDirectly = comphelper::LibreOfficeKit::isActive();
+
if ( nSId != SID_DRAW_CS_ID )
{
SfxBindings& rBind = GetViewFrame()->GetBindings();
@@ -582,7 +588,7 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq)
}
// with qualifier construct directly
- if(HasCurrentFunction() && (rReq.GetModifier() & KEY_MOD1))
+ if(HasCurrentFunction() && ((rReq.GetModifier() & KEY_MOD1) || bCreateDirectly))
{
// get SdOptions
SdOptions* pOptions = SD_MOD()->GetSdOptions(GetDoc()->GetDocumentType());