diff options
author | Dennis Francis <dennis.francis@collabora.com> | 2020-02-23 22:38:15 +0530 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2020-05-16 19:26:32 +0100 |
commit | 30a9c349e7b7db7a44c2f8bc7d282fb92d9c6766 (patch) | |
tree | 14a823fc4e7da890c6aa01712d2248278337a9bd | |
parent | e3fe5d4e0e63d99cb984f431b2ae8e6e9dfb077d (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>
(cherry picked from commit 9a80969f3115fc33778005861442f91127344dc0)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89677
Tested-by: Jenkins
-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 31808b1a292b..128fc6848342 100644 --- a/chart2/source/controller/sidebar/ChartColorWrapper.cxx +++ b/chart2/source/controller/sidebar/ChartColorWrapper.cxx @@ -96,12 +96,15 @@ void ChartColorWrapper::updateModel(const css::uno::Reference<css::frame::XModel void ChartColorWrapper::updateData() { + static const OUStringLiteral aLineColor = "LineColor"; + static const OUStringLiteral 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; |