diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2019-11-08 15:40:02 +0100 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2019-11-08 16:32:58 +0100 |
commit | c28ea22c5198c1162fc5a535d35b407762b8a865 (patch) | |
tree | e903385e19f49bb1a5e1b03dae032e03416f48a5 /svx | |
parent | 506d2abdd6f68a9f6d895d3aadb06b40b05624c5 (diff) |
jsdialogs: send .uno:FillColor & XLineColor status updates
Change-Id: I665ca45293fb3e98a7940e24c1f14a5963b8d073
Reviewed-on: https://gerrit.libreoffice.org/82307
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/svdraw/svdedtv1.cxx | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx index c0efa3a717a4..53bf8eb1d519 100644 --- a/svx/source/svdraw/svdedtv1.cxx +++ b/svx/source/svdraw/svdedtv1.cxx @@ -63,6 +63,11 @@ #include <svx/xlnstwit.hxx> #include <svx/xlnwtit.hxx> #include <svx/svdview.hxx> +#include <svx/xlnclit.hxx> +#include <svx/xflclit.hxx> +#include <LibreOfficeKit/LibreOfficeKitEnums.h> +#include <rtl/ustring.hxx> +#include <sfx2/viewsh.hxx> #include <comphelper/lok.hxx> // EditView @@ -925,6 +930,36 @@ void SdrEditView::MergeAttrFromMarked(SfxItemSet& rAttr, bool bOnlyHardAttr) con rAttr.MergeValue(rItem, true); } + if (comphelper::LibreOfficeKit::isActive()) + { + OUString sPayload; + switch(nWhich) + { + case XATTR_LINECOLOR: + { + const SfxPoolItem* pItem = rSet.GetItem(XATTR_LINECOLOR); + Color aColor = static_cast<const XLineColorItem*>(pItem)->GetColorValue(); + sPayload = OUString::number(static_cast<sal_uInt32>(aColor)); + + sPayload = ".uno:XLineColor=" + sPayload; + break; + } + + case XATTR_FILLCOLOR: + { + const SfxPoolItem* pItem = rSet.GetItem(XATTR_FILLCOLOR); + Color aColor = static_cast<const XFillColorItem*>(pItem)->GetColorValue(); + sPayload = OUString::number(static_cast<sal_uInt32>(aColor)); + + sPayload = ".uno:FillColor=" + sPayload; + break; + } + } + + GetSfxViewShell()->libreOfficeKitViewCallback(LOK_CALLBACK_STATE_CHANGED, + OUStringToOString(sPayload, RTL_TEXTENCODING_ASCII_US).getStr()); + } + nWhich = aIter.NextWhich(); } } |