summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorMaxim Monastirsky <momonasmon@gmail.com>2016-10-13 10:20:31 +0300
committerMaxim Monastirsky <momonasmon@gmail.com>2016-10-13 11:12:27 +0300
commit9125a4f3f63a7f49fd307908c181e999120063e0 (patch)
treeef7d47475a37b87cda0e97b766143ab3e4c55cb5 /chart2
parentf1bae1b5c0ba7949f6a91ba938be18589f9accaa (diff)
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
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/controller/sidebar/ChartColorWrapper.cxx15
1 files changed, 7 insertions, 8 deletions
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 <editeng/colritem.hxx>
#include <svx/tbcontrl.hxx>
-#include <svx/svxids.hrc>
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);
}
} }