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

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Jan 9 07:07:16 UTC 2019


 svx/source/gallery2/GalleryControl.cxx |   30 ++++++++++++++++++++----------
 svx/source/gallery2/galbrws1.cxx       |    4 +++-
 2 files changed, 23 insertions(+), 11 deletions(-)

New commits:
commit c9a7c4358d902900eb0fe66db36e283dc8df0336
Author:     Aditya <adityasahu1511 at gmail.com>
AuthorDate: Mon Jan 7 01:37:34 2019 +0530
Commit:     Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Wed Jan 9 08:06:52 2019 +0100

    tdf#120086: Patch for TAB-ing order of Gallery sidebar panel
    
    The current TAB-ing order of Gallery sidebar panel is not sequential
    and the order needed to be changed. This patch fixes the TAB-ing order
    of the gallery sidebar panel to a more sequential and convenient one.
    It also fixes the reverse TAB-ing order (Shift+TAB).
    
    Change-Id: Ib0b22ccef1fa4676e535f42a794fb7c836741d0b
    Reviewed-on: https://gerrit.libreoffice.org/65907
    Reviewed-by: Jim Raykowski <raykowj at gmail.com>
    Tested-by: Mike Kaganski <mike.kaganski at collabora.com>

diff --git a/svx/source/gallery2/GalleryControl.cxx b/svx/source/gallery2/GalleryControl.cxx
old mode 100644
new mode 100755
index d41c3e803bdb..f54034aa88da
--- a/svx/source/gallery2/GalleryControl.cxx
+++ b/svx/source/gallery2/GalleryControl.cxx
@@ -185,25 +185,35 @@ bool GalleryControl::GalleryKeyInput( const KeyEvent& rKEvt )
     {
         if( !rKEvt.GetKeyCode().IsShift() )
         {
-            if( mpBrowser1->mpThemes->HasChildPathFocus( true ) )
-                mpBrowser2->GetViewWindow()->GrabFocus();
-            else if( mpBrowser2->GetViewWindow()->HasFocus() )
+            if( mpBrowser1->maNewTheme->HasFocus() )
+                mpBrowser1->mpThemes->GrabFocus();
+            else if( mpBrowser1->mpThemes->HasChildPathFocus( true ) )
                 mpBrowser2->maViewBox->GrabFocus();
             else if( mpBrowser2->maViewBox->HasFocus() )
-                mpBrowser1->maNewTheme->GrabFocus();
+                mpBrowser2->GetViewWindow()->GrabFocus();
             else
-                mpBrowser1->mpThemes->GrabFocus();
+            {
+                if( mpBrowser1->maNewTheme->IsEnabled() )
+                    mpBrowser1->maNewTheme->GrabFocus();
+                else
+                    mpBrowser1->mpThemes->GrabFocus();
+            }
         }
         else
         {
-            if( mpBrowser1->mpThemes->HasChildPathFocus( true ) )
-                mpBrowser1->maNewTheme->GrabFocus();
-            else if( mpBrowser1->maNewTheme->HasFocus() )
+            if( mpBrowser2->GetViewWindow()->HasFocus() )
                 mpBrowser2->maViewBox->GrabFocus();
             else if( mpBrowser2->maViewBox->HasFocus() )
-                mpBrowser2->GetViewWindow()->GrabFocus();
-            else
                 mpBrowser1->mpThemes->GrabFocus();
+            else if( mpBrowser1->mpThemes->HasChildPathFocus( true ) )
+            {
+                if( mpBrowser1->maNewTheme->IsEnabled() )
+                    mpBrowser1->maNewTheme->GrabFocus();
+                else
+                    mpBrowser2->GetViewWindow()->GrabFocus();
+            }
+            else
+                mpBrowser2->GetViewWindow()->GrabFocus();
         }
     }
 
diff --git a/svx/source/gallery2/galbrws1.cxx b/svx/source/gallery2/galbrws1.cxx
old mode 100644
new mode 100755
index 416fa67f48e7..8c54ac56de4b
--- a/svx/source/gallery2/galbrws1.cxx
+++ b/svx/source/gallery2/galbrws1.cxx
@@ -410,7 +410,9 @@ void GalleryBrowser1::Resize()
 void GalleryBrowser1::GetFocus()
 {
     Control::GetFocus();
-    if( mpThemes )
+    if( maNewTheme->IsEnabled() )
+        maNewTheme->GrabFocus();
+    else
         mpThemes->GrabFocus();
 }
 


More information about the Libreoffice-commits mailing list