summaryrefslogtreecommitdiffstats
path: root/sd
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 /sd
parentAvoid writing out unneeded data to SVG file in SelectionOnly mode (diff)
downloadcore-e75c67bd552d8599126374e231c3a6ea15c25f40.tar.gz
core-e75c67bd552d8599126374e231c3a6ea15c25f40.zip
lok: Insert shapes directly into the document.
Change-Id: I182aa395ce0f4e4185c9c85a866dec89499842f9
Diffstat (limited to 'sd')
-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 4645d63f6212..0d89b22eb3bd 100644
--- a/sd/source/ui/view/drviewse.cxx
+++ b/sd/source/ui/view/drviewse.cxx
@@ -27,6 +27,7 @@
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/uno/Any.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 ???
@@ -521,6 +525,8 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq)
SetCurrentFunction( FuConstructCustomShape::Create( this, GetActiveWindow(), mpDrawView.get(), GetDoc(), rReq, bPermanent ) );
rReq.Done();
+ bCreateDirectly = comphelper::LibreOfficeKit::isActive();
+
if ( nSId != SID_DRAW_CS_ID )
{
SfxBindings& rBind = GetViewFrame()->GetBindings();
@@ -598,7 +604,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());