summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2021-01-05 10:36:31 +0100
committerSzymon Kłos <szymon.klos@collabora.com>2021-01-11 14:01:25 +0100
commita8b4fd0103a528915ebc66b09e254325abbb73cb (patch)
tree920e4873a9df4de58b434c97c5e6a27e4e37d691
parent21db3d290331a43afccd9c994901e725e295d550 (diff)
lok: send chart color updates
Change-Id: I037049fb19ddf4c1450d7d9327c574cb4e37977c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108793 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108922 Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
-rw-r--r--chart2/source/controller/sidebar/ChartColorWrapper.cxx14
1 files changed, 14 insertions, 0 deletions
diff --git a/chart2/source/controller/sidebar/ChartColorWrapper.cxx b/chart2/source/controller/sidebar/ChartColorWrapper.cxx
index b47d6fd6c2aa..aed95c711c21 100644
--- a/chart2/source/controller/sidebar/ChartColorWrapper.cxx
+++ b/chart2/source/controller/sidebar/ChartColorWrapper.cxx
@@ -14,6 +14,10 @@
#include <svx/tbcontrl.hxx>
+#include <comphelper/lok.hxx>
+#include <sfx2/viewsh.hxx>
+#include <LibreOfficeKit/LibreOfficeKitEnums.h>
+
namespace chart { namespace sidebar {
namespace {
@@ -109,6 +113,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_uInt32 nColor = -1;
+ aEvent.State >>= nColor;
+ pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_STATE_CHANGED,
+ (sCommand + "=" + std::to_string(nColor)).c_str());
+ }
}
} }