summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Francis <dennis.francis@collabora.com>2020-02-23 22:38:15 +0530
committerAndras Timar <andras.timar@collabora.com>2020-02-28 22:54:43 +0100
commit5f193d851e3567e1018a61763846698e02ce38ec (patch)
tree1939d0d380cf95c701f8be427d3bab055f66f83a
parent4ac48ae4b02b8e0e3ae7e4833893f9ad40d4d14d (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.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/chart2/source/controller/sidebar/ChartColorWrapper.cxx b/chart2/source/controller/sidebar/ChartColorWrapper.cxx
index 9a8c568a863d..d9903b12c275 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;