summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKelemen Gábor <kelemeng@ubuntu.com>2019-12-06 11:03:29 +0100
committerLászló Németh <nemeth@numbertext.org>2019-12-12 10:53:51 +0100
commit6cdab5c92cecf90090ba72dfa6c22edf0d41028f (patch)
tree96b9a5932fce43970c5835246ef1e21fe3705eae
parentcea1ae2a4f7abdcfc3874d714bdafef801910c1c (diff)
tdf#34517 Bring forward/backward in chart series switched
Turns out bringing a data series forward means its index is increased while bringing backwards means decreasing it. Since the bool MOVE_SERIES_FORWARD is defined as true in ControllerCommandDispatch.cxx the condition here meant that bringing forward decreased the index and MOVE_SERIES_BACKWARD as false meant that bringing backward increased the index. Now the commands do the expected series order change. Change-Id: Ib49b301eacc227439b8fb3b0dc3513e59cbdc484 Reviewed-on: https://gerrit.libreoffice.org/84608 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
-rw-r--r--chart2/source/tools/DiagramHelper.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/chart2/source/tools/DiagramHelper.cxx b/chart2/source/tools/DiagramHelper.cxx
index 22ddfb27acd5..14d8126625ae 100644
--- a/chart2/source/tools/DiagramHelper.cxx
+++ b/chart2/source/tools/DiagramHelper.cxx
@@ -1328,7 +1328,8 @@ bool lcl_moveSeriesOrCheckIfMoveIsAllowed(
{
sal_Int32 nNewSeriesIndex = nS;
- if( bForward )
+ // tdf#34517 Bringing forward means increasing, backwards means decreasing series position
+ if( !bForward )
nNewSeriesIndex--;
else
nNewSeriesIndex++;