diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2021-01-05 10:36:31 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2021-01-06 19:43:30 +0100 |
commit | 395260c7ae479be1b55c75b290af6d3f3cf7260f (patch) | |
tree | 36eaf0d0b6ea9bd33ecbf022ed88c32418ae278a /chart2 | |
parent | a814a3793f65bc0628c5e79d91c184fcdedbf710 (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>
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/controller/sidebar/ChartColorWrapper.cxx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/chart2/source/controller/sidebar/ChartColorWrapper.cxx b/chart2/source/controller/sidebar/ChartColorWrapper.cxx index 128fc6848342..f6bd8725ea13 100644 --- a/chart2/source/controller/sidebar/ChartColorWrapper.cxx +++ b/chart2/source/controller/sidebar/ChartColorWrapper.cxx @@ -16,6 +16,10 @@ #include <svx/tbcontrl.hxx> +#include <comphelper/lok.hxx> +#include <sfx2/viewsh.hxx> +#include <LibreOfficeKit/LibreOfficeKitEnums.h> + namespace chart { namespace sidebar { namespace { @@ -111,6 +115,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()); + } } } } |