[Libreoffice-commits] core.git: chart2/source

Szymon KÅ‚os (via logerrit) logerrit at kemper.freedesktop.org
Fri Jan 8 11:59:50 UTC 2021


 chart2/source/controller/sidebar/ChartColorWrapper.cxx |   14 ++++++++++++++
 1 file changed, 14 insertions(+)

New commits:
commit 142803e20776d62b07abe1af87ed608af53bf4bb
Author:     Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Tue Jan 5 10:36:31 2021 +0100
Commit:     Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Fri Jan 8 12:59:09 2021 +0100

    lok: send chart color updates
    
    Change-Id: I037049fb19ddf4c1450d7d9327c574cb4e37977c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108793
    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/+/108927
    Tested-by: Jenkins
    Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>

diff --git a/chart2/source/controller/sidebar/ChartColorWrapper.cxx b/chart2/source/controller/sidebar/ChartColorWrapper.cxx
index 5a809cf1436c..613407a827e7 100644
--- a/chart2/source/controller/sidebar/ChartColorWrapper.cxx
+++ b/chart2/source/controller/sidebar/ChartColorWrapper.cxx
@@ -26,6 +26,10 @@
 #include <svx/xlndsit.hxx>
 #include <svx/unomid.hxx>
 
+#include <comphelper/lok.hxx>
+#include <sfx2/viewsh.hxx>
+#include <LibreOfficeKit/LibreOfficeKitEnums.h>
+
 namespace chart::sidebar {
 
 namespace {
@@ -115,6 +119,16 @@ void ChartColorWrapper::updateData()
     aEvent.IsEnabled = true;
     aEvent.State = xPropSet->getPropertyValue(maPropertyName);
     mpControl->statusChanged(aEvent);
+
+    SfxViewShell* pViewShell = SfxViewShell::Current();
+    if (comphelper::LibreOfficeKit::isActive() && pViewShell && (maPropertyName == aLineColor))
+    {
+        std::string sCommand = OUStringToOString(aUrl.Complete, RTL_TEXTENCODING_ASCII_US).getStr();
+        sal_Int32 nColor = -1;
+        aEvent.State >>= nColor;
+        pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_STATE_CHANGED,
+                                               (sCommand + "=" + std::to_string(nColor)).c_str());
+    }
 }
 
 ChartLineStyleWrapper::ChartLineStyleWrapper(


More information about the Libreoffice-commits mailing list