diff options
author | Dennis Francis <dennis.francis@collabora.com> | 2020-02-23 22:38:15 +0530 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2020-02-24 14:12:41 +0100 |
commit | 9a80969f3115fc33778005861442f91127344dc0 (patch) | |
tree | 7688b635f9afed38f506bf58247059490ed3323a /chart2 | |
parent | f07e77b93ddfbac967dbc526dc01ec39b5a046c7 (diff) |
chart2: Fix the color uno command in ChartColorWrapper
The uno command for color depends on the property name. For LineColor
it should be .uno:XLineColor and the only other case is FillColor for
which it should be .uno:FillColor. Without this fix, on selecting
the chart for editing the first time, the sidebar line-color control
is disabled as a side-effect.
Change-Id: Ia71ed2f6d9e0f31523f1415f3ee089fd9d7d1b2d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89304
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 | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/chart2/source/controller/sidebar/ChartColorWrapper.cxx b/chart2/source/controller/sidebar/ChartColorWrapper.cxx index 49a3cf5b9eba..b47d6fd6c2aa 100644 --- a/chart2/source/controller/sidebar/ChartColorWrapper.cxx +++ b/chart2/source/controller/sidebar/ChartColorWrapper.cxx @@ -94,12 +94,15 @@ void ChartColorWrapper::updateModel(const css::uno::Reference<css::frame::XModel void ChartColorWrapper::updateData() { + static const OUString aLineColor = "LineColor"; + static const OUString aCommands[2] = {".uno:XLineColor", ".uno:FillColor"}; + css::uno::Reference<css::beans::XPropertySet> xPropSet = getPropSet(mxModel); if (!xPropSet.is()) return; css::util::URL aUrl; - aUrl.Complete = ".uno:FillColor"; + aUrl.Complete = (maPropertyName == aLineColor) ? aCommands[0] : aCommands[1]; css::frame::FeatureStateEvent aEvent; aEvent.FeatureURL = aUrl; |