[Libreoffice-commits] core.git: include/sfx2 sfx2/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon Nov 5 07:48:00 UTC 2018


 include/sfx2/sidebar/FocusManager.hxx |    3 ---
 sfx2/source/sidebar/FocusManager.cxx  |   34 +---------------------------------
 2 files changed, 1 insertion(+), 36 deletions(-)

New commits:
commit cd086621e3d4fd4b90fabe0b20c0ae4602447d8a
Author:     Jim Raykowski <raykowj at gmail.com>
AuthorDate: Tue Oct 9 22:28:27 2018 -0800
Commit:     Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
CommitDate: Mon Nov 5 08:47:13 2018 +0100

    tdf#120473 Change sidebar panel content tab navigation behavior
    
    Change-Id: Ifa5d52ffed32a4fe0bfe75fb731ee79d0976c0cf
    Reviewed-on: https://gerrit.libreoffice.org/61949
    Tested-by: Jenkins
    Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>

diff --git a/include/sfx2/sidebar/FocusManager.hxx b/include/sfx2/sidebar/FocusManager.hxx
index a8f66b259788..a8c52279ad0b 100644
--- a/include/sfx2/sidebar/FocusManager.hxx
+++ b/include/sfx2/sidebar/FocusManager.hxx
@@ -75,9 +75,6 @@ private:
     std::vector<VclPtr<Button> > maButtons;
     const std::function<void(const Panel&)> maShowPanelFunctor;
     const std::function<bool(const sal_Int32)> mbIsDeckOpenFunctor;
-    bool mbObservingContentControlFocus;
-    VclPtr<vcl::Window> mpFirstFocusedContentControl;
-    VclPtr<vcl::Window> mpLastFocusedWindow;
 
     enum PanelComponent
     {
diff --git a/sfx2/source/sidebar/FocusManager.cxx b/sfx2/source/sidebar/FocusManager.cxx
index 21bf36579973..9645cb182f4d 100644
--- a/sfx2/source/sidebar/FocusManager.cxx
+++ b/sfx2/source/sidebar/FocusManager.cxx
@@ -41,10 +41,7 @@ FocusManager::FocusManager(const std::function<void(const Panel&)>& rShowPanelFu
       maPanels(),
       maButtons(),
       maShowPanelFunctor(rShowPanelFunctor),
-      mbIsDeckOpenFunctor(rIsDeckOpenFunctor),
-      mbObservingContentControlFocus(false),
-      mpFirstFocusedContentControl(nullptr),
-      mpLastFocusedWindow(nullptr)
+      mbIsDeckOpenFunctor(rIsDeckOpenFunctor)
 {
 }
 
@@ -265,11 +262,7 @@ void FocusManager::FocusPanelContent (const sal_Int32 nPanelIndex)
 
     VclPtr<vcl::Window> pWindow = VCLUnoHelper::GetWindow(maPanels[nPanelIndex]->GetElementWindow());
     if (pWindow)
-    {
-        mbObservingContentControlFocus = true;
         pWindow->GrabFocus();
-        mbObservingContentControlFocus = false;
-    }
 }
 
 void FocusManager::FocusButton (const sal_Int32 nButtonIndex)
@@ -375,7 +368,6 @@ void FocusManager::HandleKeyEvent (
     const vcl::Window& rWindow)
 {
     const FocusLocation aLocation (GetFocusLocation(rWindow));
-    mpLastFocusedWindow = nullptr;
 
     switch (rKeyCode.GetCode())
     {
@@ -603,20 +595,6 @@ IMPL_LINK(FocusManager, ChildEventListener, VclWindowEvent&, rEvent, void)
                             FocusPanel(aLocation.mnIndex, true);
                         break;
 
-                    case KEY_TAB:
-                        {
-                        WindowType aWindowType = pSource->GetType();
-                        if (mpFirstFocusedContentControl!=nullptr
-                            && ( mpLastFocusedWindow == mpFirstFocusedContentControl
-                                 && !( WindowType::EDIT == aWindowType || WindowType::SPINFIELD == aWindowType ) ))
-                        {
-                            // Move focus back to panel (or deck)
-                            // title.
-                            FocusPanel(aLocation.mnIndex, true);
-                        }
-                        }
-                        break;
-
                     default:
                         break;
                 }
@@ -624,16 +602,6 @@ IMPL_LINK(FocusManager, ChildEventListener, VclWindowEvent&, rEvent, void)
             return;
         }
 
-        case VclEventId::WindowGetFocus:
-            // Keep track of focused controls in panel content.
-            // Remember the first focused control.  When it is later
-            // focused again due to pressing the TAB key then the
-            // focus is moved to the panel or deck title.
-            mpLastFocusedWindow = pSource;
-            if (mbObservingContentControlFocus)
-                mpFirstFocusedContentControl = pSource;
-            break;
-
         default:
             break;
     }


More information about the Libreoffice-commits mailing list