[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - chart2/source
Dennis Francis (via logerrit)
logerrit at kemper.freedesktop.org
Mon Feb 24 13:13:11 UTC 2020
chart2/source/controller/sidebar/ChartColorWrapper.cxx | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
New commits:
commit 9a80969f3115fc33778005861442f91127344dc0
Author: Dennis Francis <dennis.francis at collabora.com>
AuthorDate: Sun Feb 23 22:38:15 2020 +0530
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Mon Feb 24 14:12:41 2020 +0100
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 at gmail.com>
Reviewed-by: Andras Timar <andras.timar at collabora.com>
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;
More information about the Libreoffice-commits
mailing list