tdf#156557 Sidebar: Make Shift+Tab kb navigation behave as expected

This patch makes Shift+Tab change keyboard focus to the last panel
control of the previous panel when focus is currently on a panel title.
It also makes Shift+Tab change keyboard focus to the Tabbar hamburger
menu when focus is currently on the "Close Sidebar Deck" button.

Change-Id: I3ff849655afc4f01dba2268055292eee573adf43
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155333
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
diff --git a/sfx2/source/sidebar/FocusManager.cxx b/sfx2/source/sidebar/FocusManager.cxx
index d0c3846..b77d30a 100644
--- a/sfx2/source/sidebar/FocusManager.cxx
+++ b/sfx2/source/sidebar/FocusManager.cxx
@@ -297,6 +297,11 @@ bool FocusManager::MoveFocusInsideDeckTitle (
                FocusPanelContent(0);
                bConsumed = true;
            }
            else if (nDirection < 0)
            {
                FocusButton(0);
                bConsumed = true;
            }
            break;

        default: break;
@@ -369,6 +374,8 @@ bool FocusManager::HandleKeyEvent(
            {
                case PC_PanelTitle:
                case PC_PanelToolBox:
                    if (rKeyCode.IsShift())
                        break;
                    MoveFocusInsidePanel(aLocation, nDirection);
                    bConsumed = true;
                    break;