summaryrefslogtreecommitdiffstats
path: root/chart2
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-13 08:27:47 +0100
commit4f7f39a262c5db74285bc44798f438a431fa7210 (patch)
treeebf69c9bc800e85de9e9123a1617e21c402ea0b0 /chart2
parenttdf#123076 Get paper size for print preview (diff)
downloadcore-4f7f39a262c5db74285bc44798f438a431fa7210.tar.gz
core-4f7f39a262c5db74285bc44798f438a431fa7210.zip
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> (cherry picked from commit 6cdab5c92cecf90090ba72dfa6c22edf0d41028f) Reviewed-on: https://gerrit.libreoffice.org/85025
Diffstat (limited to 'chart2')
-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++;