[Libreoffice-commits] core.git: chart2/source

Kelemen Gábor (via logerrit) logerrit at kemper.freedesktop.org
Thu Dec 12 09:55:10 UTC 2019


 chart2/source/tools/DiagramHelper.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 6cdab5c92cecf90090ba72dfa6c22edf0d41028f
Author:     Kelemen Gábor <kelemeng at ubuntu.com>
AuthorDate: Fri Dec 6 11:03:29 2019 +0100
Commit:     László Németh <nemeth at numbertext.org>
CommitDate: Thu Dec 12 10:53:51 2019 +0100

    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 at numbertext.org>

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++;


More information about the Libreoffice-commits mailing list