[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - 2 commits - chart2/source desktop/source

Szymon KÅ‚os (via logerrit) logerrit at kemper.freedesktop.org
Tue Oct 6 11:22:23 UTC 2020


 chart2/source/controller/sidebar/ChartAreaPanel.cxx |   15 ++++++++++++++-
 desktop/source/lib/init.cxx                         |    2 +-
 2 files changed, 15 insertions(+), 2 deletions(-)

New commits:
commit 49a1c4c649d062160765520f0a1c82925030a644
Author:     Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Wed Sep 23 15:28:26 2020 +0200
Commit:     Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Tue Oct 6 13:21:59 2020 +0200

    Use default diagram page selection for charts
    
    Change-Id: I0bf0e5d2d1ef43a61c1bb723b25bafa30b5ad5c8
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103602
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Andras Timar <andras.timar at collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104016
    Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>

diff --git a/chart2/source/controller/sidebar/ChartAreaPanel.cxx b/chart2/source/controller/sidebar/ChartAreaPanel.cxx
index 61e72318043c..64fce618760c 100644
--- a/chart2/source/controller/sidebar/ChartAreaPanel.cxx
+++ b/chart2/source/controller/sidebar/ChartAreaPanel.cxx
@@ -45,7 +45,20 @@ OUString getCID(const css::uno::Reference<css::frame::XModel>& xModel)
 
     css::uno::Any aAny = xSelectionSupplier->getSelection();
     if (!aAny.hasValue())
-        return OUString();
+    {
+        // if no selection, default to diagram wall so sidebar can show some editable properties
+        ChartController* pController = dynamic_cast<ChartController*>(xController.get());
+        if (pController)
+        {
+            pController->select( css::uno::Any( ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_PAGE, OUString() ) ) );
+            xSelectionSupplier = css::uno::Reference<css::view::XSelectionSupplier>(xController, css::uno::UNO_QUERY);
+            if (xSelectionSupplier.is())
+                aAny = xSelectionSupplier->getSelection();
+        }
+
+        if (!aAny.hasValue())
+            return OUString();
+    }
 
     OUString aCID;
     aAny >>= aCID;
commit 6684a11703432da748f8a725b05d0e5edcc90568
Author:     Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Mon Sep 21 11:16:35 2020 +0200
Commit:     Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Tue Oct 6 13:21:47 2020 +0200

    Allow to save file if chart editing is active
    
    This helps in online where autosave after user
    closed view with chart editing active caused
    document to be broken and not allowing to open again.
    
    Change-Id: Iab6a9bfe2c5f67c155ee97726e752c83fc47af5f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103091
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Andras Timar <andras.timar at collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104014
    Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index d6cd2f3fb9ce..abde59b9b5c6 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -3986,7 +3986,7 @@ static void doc_postUnoCommand(LibreOfficeKitDocument* pThis, const char* pComma
     bool bResult = false;
     LokChartHelper aChartHelper(SfxViewShell::Current());
 
-    if (aChartHelper.GetWindow() )
+    if (aChartHelper.GetWindow() && aCommand != ".uno:Save" )
     {
         util::URL aCommandURL;
         aCommandURL.Path = aCommand.copy(5);


More information about the Libreoffice-commits mailing list