[Libreoffice-commits] core.git: sd/source sw/source

Jan Holesovsky (via logerrit) logerrit at kemper.freedesktop.org
Fri Aug 30 23:01:32 UTC 2019


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

New commits:
commit 758a4998c56c73d2420c1ee2e3f41bedd153559d
Author:     Jan Holesovsky <kendy at collabora.com>
AuthorDate: Wed May 29 15:42:20 2019 +0200
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Sat Aug 31 01:00:32 2019 +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/78318
    Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
    Tested-by: Jenkins

diff --git a/sd/source/ui/func/fuinsert.cxx b/sd/source/ui/func/fuinsert.cxx
index 0ed716ec7246..64b4b1507a9b 100644
--- a/sd/source/ui/func/fuinsert.cxx
+++ b/sd/source/ui/func/fuinsert.cxx
@@ -76,6 +76,8 @@
 #include <vcl/GraphicNativeTransform.hxx>
 #include <vcl/GraphicNativeMetadata.hxx>
 
+#include <comphelper/lok.hxx>
+
 using namespace com::sun::star;
 
 namespace sd {
@@ -390,8 +392,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 882f4f99329d..313cec6df5de 100644
--- a/sw/source/uibase/table/tablemgr.cxx
+++ b/sw/source/uibase/table/tablemgr.cxx
@@ -48,6 +48,8 @@
 #include <unochart.hxx>
 #include <memory>
 
+#include <comphelper/lok.hxx>
+
 using namespace ::com::sun::star;
 
 // Adjust line height (dialogue)
@@ -248,9 +250,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