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

Jim Raykowski (via logerrit) logerrit at kemper.freedesktop.org
Thu Dec 26 16:45:48 UTC 2019


 vcl/source/window/taskpanelist.cxx |   24 +++++++-----------------
 1 file changed, 7 insertions(+), 17 deletions(-)

New commits:
commit 32b9d07baa0cf6907f14ccb9aa068b51d95eefaa
Author:     Jim Raykowski <raykowj at gmail..com>
AuthorDate: Sun Nov 24 20:40:46 2019 -0900
Commit:     Jim Raykowski <raykowj at gmail.com>
CommitDate: Thu Dec 26 17:45:03 2019 +0100

    tdf#129004 Make shift+F6 cycle order reverse of F6
    
    Change-Id: I52013b4c54ef5e457d9fa19210d08d9c042fed45
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/83637
    Tested-by: Jenkins
    Reviewed-by: Jim Raykowski <raykowj at gmail.com>

diff --git a/vcl/source/window/taskpanelist.cxx b/vcl/source/window/taskpanelist.cxx
index 4a11bb272339..6e321f498c3c 100644
--- a/vcl/source/window/taskpanelist.cxx
+++ b/vcl/source/window/taskpanelist.cxx
@@ -59,19 +59,6 @@ struct LTRSort
             return ( pos1.X() < pos2.X() );
     }
 };
-struct LTRSortBackward
-{
-    bool operator()( const vcl::Window* w2, const vcl::Window* w1 ) const
-    {
-        Point pos1(ImplTaskPaneListGetPos( w1 ));
-        Point pos2(ImplTaskPaneListGetPos( w2 ));
-
-        if( pos1.X() == pos2.X() )
-            return ( pos1.Y() < pos2.Y() );
-        else
-            return ( pos1.X() < pos2.X() );
-    }
-};
 
 }
 
@@ -258,10 +245,10 @@ vcl::Window* TaskPaneList::FindNextSplitter( vcl::Window *pWindow )
 // returns first valid item (regardless of type) if pWindow==0, otherwise returns next valid float
 vcl::Window* TaskPaneList::FindNextFloat( vcl::Window *pWindow, bool bForward )
 {
-    if( bForward )
-        ::std::stable_sort( mTaskPanes.begin(), mTaskPanes.end(), LTRSort() );
-    else
-        ::std::stable_sort( mTaskPanes.begin(), mTaskPanes.end(), LTRSortBackward() );
+    ::std::stable_sort( mTaskPanes.begin(), mTaskPanes.end(), LTRSort() );
+
+    if ( !bForward )
+        ::std::reverse( mTaskPanes.begin(), mTaskPanes.end() );
 
     auto p = mTaskPanes.begin();
     if( pWindow )
@@ -290,6 +277,9 @@ vcl::Window* TaskPaneList::FindNextFloat( vcl::Window *pWindow, bool bForward )
             ++p;
     }
 
+    if ( !bForward )
+        ::std::reverse( mTaskPanes.begin(), mTaskPanes.end() );
+
     return pWindow;
 }
 


More information about the Libreoffice-commits mailing list