diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx index 15d69fa3e132..8c83304015dc 100644 --- a/svx/source/svdraw/svdedtv1.cxx +++ b/svx/source/svdraw/svdedtv1.cxx @@ -65,6 +65,11 @@ #include #include #include +#include +#include +#include +#include +#include #include // EditView @@ -927,6 +932,43 @@ 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); + if (pItem) + { + Color aColor = static_cast(pItem)->GetColorValue(); + sPayload = OUString::number(static_cast(aColor)); + + sPayload = ".uno:XLineColor=" + sPayload; + } + break; + } + + case XATTR_FILLCOLOR: + { + const SfxPoolItem* pItem = rSet.GetItem(XATTR_FILLCOLOR); + if (pItem) + { + Color aColor = static_cast(pItem)->GetColorValue(); + sPayload = OUString::number(static_cast(aColor)); + + sPayload = ".uno:FillColor=" + sPayload; + } + break; + } + } + + if (!sPayload.isEmpty()) + GetSfxViewShell()->libreOfficeKitViewCallback(LOK_CALLBACK_STATE_CHANGED, + OUStringToOString(sPayload, RTL_TEXTENCODING_ASCII_US).getStr()); + } + nWhich = aIter.NextWhich(); } }