From e75c67bd552d8599126374e231c3a6ea15c25f40 Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Thu, 22 Nov 2018 12:12:07 +0100 Subject: lok: Insert shapes directly into the document. Change-Id: I182aa395ce0f4e4185c9c85a866dec89499842f9 --- sd/source/ui/view/drviewse.cxx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'sd') 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 #include +#include #include #include #include @@ -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()); -- cgit