From 9125a4f3f63a7f49fd307908c181e999120063e0 Mon Sep 17 00:00:00 2001 From: Maxim Monastirsky Date: Thu, 13 Oct 2016 10:20:31 +0300 Subject: Use FeatureStateEvent directly for status updates ... for SfxPopupWindow and SvxColorToolBoxControl (the latter shares BorderColorStatus with SvxColorWindow_Impl, so it was easier to convert it too). Change-Id: Ifcb23fe5809e467322d1cf4d790420886ac79b47 --- chart2/source/controller/sidebar/ChartColorWrapper.cxx | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'chart2') diff --git a/chart2/source/controller/sidebar/ChartColorWrapper.cxx b/chart2/source/controller/sidebar/ChartColorWrapper.cxx index 4b2c7694e14d..b2ff6196916d 100644 --- a/chart2/source/controller/sidebar/ChartColorWrapper.cxx +++ b/chart2/source/controller/sidebar/ChartColorWrapper.cxx @@ -11,9 +11,7 @@ #include "ChartController.hxx" -#include #include -#include namespace chart { namespace sidebar { @@ -88,13 +86,14 @@ void ChartColorWrapper::updateData() if (!xPropSet.is()) return; - css::uno::Any aAny = xPropSet->getPropertyValue(maPropertyName); - sal_uInt32 nColor = 0; - aAny >>= nColor; - Color aColor(nColor); + css::util::URL aUrl; + aUrl.Complete = ".uno:FillColor"; - SvxColorItem aItem(aColor, SID_ATTR_FILL_COLOR); - mpControl->StateChanged(SID_ATTR_FILL_COLOR, SfxItemState::SET, &aItem); + css::frame::FeatureStateEvent aEvent; + aEvent.FeatureURL = aUrl; + aEvent.IsEnabled = true; + aEvent.State = xPropSet->getPropertyValue(maPropertyName); + mpControl->statusChanged(aEvent); } } } -- cgit