[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - sd/source sw/source

Jan Holesovsky (via logerrit) logerrit at kemper.freedesktop.org
Thu Jun 4 16:33:04 UTC 2020


 sd/source/ui/func/fuinsert.cxx      |    6 +++++-
 sw/source/uibase/table/tablemgr.cxx |    7 +++++--
 2 files changed, 10 insertions(+), 3 deletions(-)

New commits:
commit 67c09ed54c8a01d8d02a08e4380780e30db35df5
Author:     Jan Holesovsky <kendy at collabora.com>
AuthorDate: Wed May 29 15:42:20 2019 +0200
Commit:     Michael Meeks <michael.meeks at collabora.com>
CommitDate: Thu Jun 4 18:32:34 2020 +0200

    sw sd lok: Don't enter the OLE editing mode right after inserting a chart.
    
    Turns out that it is confusing for the users that they can edit the
    properties of the chart rather than its position just after inserting
    it in the browser.
    
    Let's change it accordingly.  When the user wants to edit the chart
    itself, they have to double-click.
    
    Calc is not handled in this patch.
    
    Change-Id: If5661b843a06ebaeb8d4cd1b2c469aeedda4257e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95524
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Michael Meeks <michael.meeks at collabora.com>

diff --git a/sd/source/ui/func/fuinsert.cxx b/sd/source/ui/func/fuinsert.cxx
index 013b1c5aa829..22f3e26b81ce 100644
--- a/sd/source/ui/func/fuinsert.cxx
+++ b/sd/source/ui/func/fuinsert.cxx
@@ -89,6 +89,8 @@
 #include <vcl/GraphicNativeTransform.hxx>
 #include <vcl/GraphicNativeMetadata.hxx>
 
+#include <comphelper/lok.hxx>
+
 using namespace com::sun::star;
 
 namespace sd {
@@ -407,8 +409,10 @@ void FuInsertOLE::DoExecute( SfxRequest& rReq )
             else
                 bRet = mpView->InsertObjectAtView(pOleObj, *pPV, SdrInsertFlags::SETDEFLAYER);
 
-            if( bRet )
+            if (bRet && !comphelper::LibreOfficeKit::isActive())
             {
+                // Let the chart be activated after the inserting (unless
+                // via LibreOfficeKit)
                 if (nSlotId == SID_INSERT_DIAGRAM)
                 {
                     pOleObj->SetProgName( "StarChart");
diff --git a/sw/source/uibase/table/tablemgr.cxx b/sw/source/uibase/table/tablemgr.cxx
index da16e077bad8..38cf44e9c142 100644
--- a/sw/source/uibase/table/tablemgr.cxx
+++ b/sw/source/uibase/table/tablemgr.cxx
@@ -47,6 +47,8 @@
 #include <unochart.hxx>
 #include <memory>
 
+#include <comphelper/lok.hxx>
+
 using namespace ::com::sun::star;
 
 // Adjust line height (dialogue)
@@ -247,9 +249,10 @@ uno::Reference< frame::XModel > SwTableFUNC::InsertChart(
     }
     pSh->EndAllAction();
 
-    if ( xObj.is() )
+    if (xObj.is() && !comphelper::LibreOfficeKit::isActive())
     {
-        // Let the chart be activated after the inserting
+        // Let the chart be activated after the inserting (unless
+        // via LibreOfficeKit)
         SfxInPlaceClient* pClient = pSh->GetView().FindIPClient( xObj, &pSh->GetView().GetEditWin() );
         if ( !pClient )
         {


More information about the Libreoffice-commits mailing list