[Libreoffice-commits] core.git: chart2/source include/sfx2 sc/source sd/source sfx2/source svx/source sw/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Tue Feb 16 09:08:38 UTC 2021


 chart2/source/controller/sidebar/ChartAxisPanel.cxx     |    2 ++
 chart2/source/controller/sidebar/ChartElementsPanel.cxx |    2 ++
 chart2/source/controller/sidebar/ChartErrorBarPanel.cxx |    2 ++
 chart2/source/controller/sidebar/ChartSeriesPanel.cxx   |    2 ++
 chart2/source/controller/sidebar/ChartTypePanel.cxx     |    2 ++
 include/sfx2/sidebar/PanelLayout.hxx                    |    2 ++
 sc/source/ui/formdlg/dwfunctr.cxx                       |    2 ++
 sc/source/ui/navipi/navipi.cxx                          |    2 ++
 sc/source/ui/sidebar/AlignmentPropertyPanel.cxx         |    1 +
 sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx      |    1 +
 sd/source/ui/animations/CustomAnimationPane.cxx         |    1 +
 sd/source/ui/dlg/navigatr.cxx                           |    2 ++
 sd/source/ui/sidebar/LayoutMenu.cxx                     |    1 +
 sd/source/ui/sidebar/MasterPagesSelector.cxx            |    2 ++
 sd/source/ui/table/TableDesignPane.hxx                  |    7 +++++++
 sfx2/source/dialog/templdlg.cxx                         |    1 +
 sfx2/source/sidebar/PanelLayout.cxx                     |    9 +++++++++
 svx/source/gallery2/GalleryControl.cxx                  |    1 +
 svx/source/gallery2/galbrws1.cxx                        |   11 ++++++++---
 svx/source/gallery2/galbrws1.hxx                        |    1 +
 svx/source/sidebar/area/AreaPropertyPanelBase.cxx       |    2 ++
 svx/source/sidebar/effect/EffectPropertyPanel.cxx       |    2 ++
 svx/source/sidebar/inspector/InspectorTextPanel.cxx     |    1 +
 svx/source/sidebar/lists/ListsPropertyPanel.cxx         |    1 +
 svx/source/sidebar/media/MediaPlaybackPanel.cxx         |    2 ++
 svx/source/sidebar/paragraph/ParaPropertyPanel.cxx      |    1 +
 svx/source/sidebar/shapes/DefaultShapesPanel.cxx        |    2 ++
 svx/source/sidebar/styles/StylesPropertyPanel.cxx       |    1 +
 svx/source/sidebar/text/TextPropertyPanel.cxx           |    2 ++
 sw/source/uibase/sidebar/StylePresetsPanel.cxx          |    2 ++
 sw/source/uibase/sidebar/TableEditPanel.cxx             |    2 ++
 sw/source/uibase/sidebar/ThemePanel.cxx                 |    2 ++
 sw/source/uibase/sidebar/WrapPropertyPanel.cxx          |    2 ++
 sw/source/uibase/utlui/navipi.cxx                       |    2 ++
 34 files changed, 75 insertions(+), 3 deletions(-)

New commits:
commit e8ffe26c0621e5eaa94bab5d24651e9abd4ea178
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Feb 15 20:16:44 2021 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Feb 16 10:07:52 2021 +0100

    tdf#140387 grab focus to first panel widget on panel gaining focus
    
    otherwise focus is getting lost in these currently mixed vcl+gtk widget
    panels.
    
    Change-Id: I6488ddfc98afdedb55bb3217f3877e96258dd65a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110955
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/chart2/source/controller/sidebar/ChartAxisPanel.cxx b/chart2/source/controller/sidebar/ChartAxisPanel.cxx
index 63807f37c9ec..c1d9a4e62871 100644
--- a/chart2/source/controller/sidebar/ChartAxisPanel.cxx
+++ b/chart2/source/controller/sidebar/ChartAxisPanel.cxx
@@ -219,6 +219,8 @@ ChartAxisPanel::ChartAxisPanel(
     , mbModelValid(true)
 {
     Initialize();
+
+    m_pInitialFocusWidget = mxCBShowLabel.get();
 }
 
 ChartAxisPanel::~ChartAxisPanel()
diff --git a/chart2/source/controller/sidebar/ChartElementsPanel.cxx b/chart2/source/controller/sidebar/ChartElementsPanel.cxx
index 27b96dc74007..b14705cc8080 100644
--- a/chart2/source/controller/sidebar/ChartElementsPanel.cxx
+++ b/chart2/source/controller/sidebar/ChartElementsPanel.cxx
@@ -336,6 +336,8 @@ ChartElementsPanel::ChartElementsPanel(
     maTextSubTitle = mxTextSubTitle->get_label();
 
     Initialize();
+
+    m_pInitialFocusWidget = mxCBTitle.get();
 }
 
 ChartElementsPanel::~ChartElementsPanel()
diff --git a/chart2/source/controller/sidebar/ChartErrorBarPanel.cxx b/chart2/source/controller/sidebar/ChartErrorBarPanel.cxx
index cb768d34dd15..b435520c5968 100644
--- a/chart2/source/controller/sidebar/ChartErrorBarPanel.cxx
+++ b/chart2/source/controller/sidebar/ChartErrorBarPanel.cxx
@@ -249,6 +249,8 @@ ChartErrorBarPanel::ChartErrorBarPanel(
     , mbModelValid(true)
 {
     Initialize();
+
+    m_pInitialFocusWidget = mxRBPosAndNeg.get();
 }
 
 ChartErrorBarPanel::~ChartErrorBarPanel()
diff --git a/chart2/source/controller/sidebar/ChartSeriesPanel.cxx b/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
index 8a0c0d787db3..727aabbc2458 100644
--- a/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
+++ b/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
@@ -297,6 +297,8 @@ ChartSeriesPanel::ChartSeriesPanel(
     , mbModelValid(true)
 {
     Initialize();
+
+    m_pInitialFocusWidget = mxCBLabel.get();
 }
 
 ChartSeriesPanel::~ChartSeriesPanel()
diff --git a/chart2/source/controller/sidebar/ChartTypePanel.cxx b/chart2/source/controller/sidebar/ChartTypePanel.cxx
index 74a8e7bd0983..a0e38bdb393a 100644
--- a/chart2/source/controller/sidebar/ChartTypePanel.cxx
+++ b/chart2/source/controller/sidebar/ChartTypePanel.cxx
@@ -119,6 +119,8 @@ ChartTypePanel::ChartTypePanel(vcl::Window* pParent,
     m_pSortByXValuesResourceGroup->setChangeListener(this);
 
     Initialize();
+
+    m_pInitialFocusWidget = m_xMainTypeList.get();
 }
 
 ChartTypePanel::~ChartTypePanel() { disposeOnce(); }
diff --git a/include/sfx2/sidebar/PanelLayout.hxx b/include/sfx2/sidebar/PanelLayout.hxx
index e8ee96ae8f44..0e9e56875ff1 100644
--- a/include/sfx2/sidebar/PanelLayout.hxx
+++ b/include/sfx2/sidebar/PanelLayout.hxx
@@ -25,6 +25,7 @@ protected:
     std::unique_ptr<weld::Builder> m_xBuilder;
     VclPtr<vcl::Window> m_xVclContentArea;
     std::unique_ptr<weld::Container> m_xContainer;
+    weld::Widget* m_pInitialFocusWidget;
 
 private:
     Idle m_aPanelLayoutIdle;
@@ -40,6 +41,7 @@ public:
     virtual void dispose() override;
 
     virtual Size GetOptimalSize() const override;
+    virtual void GetFocus() override;
     virtual void setPosSizePixel(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, PosSizeFlags nFlags = PosSizeFlags::All) override;
     virtual void queue_resize(StateChangedType eReason = StateChangedType::Layout) override;
     virtual bool EventNotify(NotifyEvent& rNEvt) override;
diff --git a/sc/source/ui/formdlg/dwfunctr.cxx b/sc/source/ui/formdlg/dwfunctr.cxx
index 436fcff51708..e5adb6859be2 100644
--- a/sc/source/ui/formdlg/dwfunctr.cxx
+++ b/sc/source/ui/formdlg/dwfunctr.cxx
@@ -70,6 +70,8 @@ ScFunctionWin::ScFunctionWin(vcl::Window* pParent, const css::uno::Reference<css
     xCatBox->set_active(0);
 
     SelComboHdl(*xCatBox);
+
+    m_pInitialFocusWidget = xCatBox.get();
 }
 
 /*************************************************************************
diff --git a/sc/source/ui/navipi/navipi.cxx b/sc/source/ui/navipi/navipi.cxx
index 4b7247657e10..5d3e7366f6f6 100644
--- a/sc/source/ui/navipi/navipi.cxx
+++ b/sc/source/ui/navipi/navipi.cxx
@@ -417,6 +417,8 @@ ScNavigatorDlg::ScNavigatorDlg(SfxBindings* pB, vcl::Window* pParent)
     SetListMode(eNavMode);
 
     aExpandedSize = GetOptimalSize();
+
+    m_pInitialFocusWidget = m_xEdCol.get();
 }
 
 void ScNavigatorDlg::UpdateSheetLimits()
diff --git a/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx b/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx
index 24396c7c6ae6..702845cb6593 100644
--- a/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx
+++ b/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx
@@ -73,6 +73,7 @@ AlignmentPropertyPanel::AlignmentPropertyPanel(
     , mpBindings(pBindings)
 {
     Initialize();
+    m_pInitialFocusWidget = &mxMFLeftIndent->get_widget();
 }
 
 AlignmentPropertyPanel::~AlignmentPropertyPanel()
diff --git a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx
index 12fc841dc6a1..bd7069e34d26 100644
--- a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx
+++ b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx
@@ -54,6 +54,7 @@ NumberFormatPropertyPanel::NumberFormatPropertyPanel(
     , mpBindings(pBindings)
 {
     Initialize();
+    m_pInitialFocusWidget = mxLbCategory.get();
 }
 
 NumberFormatPropertyPanel::~NumberFormatPropertyPanel()
diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx
index 045522bc1ff4..624d70ad901d 100644
--- a/sd/source/ui/animations/CustomAnimationPane.cxx
+++ b/sd/source/ui/animations/CustomAnimationPane.cxx
@@ -155,6 +155,7 @@ CustomAnimationPane::CustomAnimationPane( Window* pParent, ViewShellBase& rBase,
     , maLateInitTimer()
 {
     initialize();
+    m_pInitialFocusWidget = &mxCustomAnimationList->get_widget();
 }
 
 void CustomAnimationPane::initialize()
diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx
index 1c2c4f217c04..8d9023acdb89 100644
--- a/sd/source/ui/dlg/navigatr.cxx
+++ b/sd/source/ui/dlg/navigatr.cxx
@@ -86,6 +86,8 @@ SdNavigatorWin::SdNavigatorWin(vcl::Window* pParent, SfxBindings* pInBindings)
     mxLbDocs->connect_changed(LINK(this, SdNavigatorWin, SelectDocumentHdl));
 
     SetDragImage();
+
+    m_pInitialFocusWidget = mxToolbox.get();
 }
 
 void SdNavigatorWin::SetUpdateRequestFunctor(const UpdateRequestFunctor& rUpdateRequest)
diff --git a/sd/source/ui/sidebar/LayoutMenu.cxx b/sd/source/ui/sidebar/LayoutMenu.cxx
index 96a2fcecb447..ca44ceb79871 100644
--- a/sd/source/ui/sidebar/LayoutMenu.cxx
+++ b/sd/source/ui/sidebar/LayoutMenu.cxx
@@ -173,6 +173,7 @@ LayoutMenu::LayoutMenu (
 #ifdef DEBUG
     SetText(OUString("sd:LayoutMenu"));
 #endif
+    m_pInitialFocusWidget = mxLayoutValueSet->GetDrawingArea();
 }
 
 void LayoutMenu::implConstruct( DrawDocShell& rDocumentShell )
diff --git a/sd/source/ui/sidebar/MasterPagesSelector.cxx b/sd/source/ui/sidebar/MasterPagesSelector.cxx
index bbd1e862e1d5..9d358f9dbfd9 100644
--- a/sd/source/ui/sidebar/MasterPagesSelector.cxx
+++ b/sd/source/ui/sidebar/MasterPagesSelector.cxx
@@ -86,6 +86,8 @@ MasterPagesSelector::MasterPagesSelector (
 
     Link<MasterPageContainerChangeEvent&,void> aChangeListener (LINK(this,MasterPagesSelector,ContainerChangeListener));
     mpContainer->AddChangeListener(aChangeListener);
+
+    m_pInitialFocusWidget = mxPreviewValueSet->GetDrawingArea();
 }
 
 MasterPagesSelector::~MasterPagesSelector()
diff --git a/sd/source/ui/table/TableDesignPane.hxx b/sd/source/ui/table/TableDesignPane.hxx
index 27f2b164d755..d03a3260303a 100644
--- a/sd/source/ui/table/TableDesignPane.hxx
+++ b/sd/source/ui/table/TableDesignPane.hxx
@@ -83,6 +83,12 @@ private:
     DECL_LINK(implValueSetHdl, ValueSet*, void);
     DECL_LINK(implCheckBoxHdl, weld::ToggleButton&, void);
 
+public:
+    weld::Widget* GetInitialFocusWidget()
+    {
+        return m_xValueSet->GetDrawingArea();
+    }
+
 private:
     ViewShellBase& mrBase;
 
@@ -105,6 +111,7 @@ public:
             "modules/simpress/ui/tabledesignpanel.ui", css::uno::Reference<css::frame::XFrame>())
         , m_xImpl(new TableDesignWidget(*m_xBuilder, rBase))
     {
+        m_pInitialFocusWidget = m_xImpl->GetInitialFocusWidget();
     }
     virtual void dispose() override
     {
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index c76f06b14bbe..27697a46dbfb 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -369,6 +369,7 @@ SfxTemplatePanelControl::SfxTemplatePanelControl(SfxBindings* pBindings, vcl::Wi
     , pImpl(new SfxTemplateDialog_Impl(pBindings, this))
 {
     OSL_ASSERT(pBindings!=nullptr);
+    m_pInitialFocusWidget = pImpl->m_xActionTbL.get();
 }
 
 SfxTemplatePanelControl::~SfxTemplatePanelControl()
diff --git a/sfx2/source/sidebar/PanelLayout.cxx b/sfx2/source/sidebar/PanelLayout.cxx
index c419403bdf79..0e37e2278a73 100644
--- a/sfx2/source/sidebar/PanelLayout.cxx
+++ b/sfx2/source/sidebar/PanelLayout.cxx
@@ -18,6 +18,7 @@ using namespace sfx2::sidebar;
 PanelLayout::PanelLayout(vcl::Window* pParent, const OString& rID, const OUString& rUIXMLDescription,
                          const css::uno::Reference<css::frame::XFrame> &rFrame)
     : Control(pParent)
+    , m_pInitialFocusWidget(nullptr)
     , m_bInClose(false)
     , mxFrame(rFrame)
 {
@@ -34,6 +35,13 @@ PanelLayout::PanelLayout(vcl::Window* pParent, const OString& rID, const OUStrin
     m_xContainer = m_xBuilder->weld_container(rID);
 }
 
+void PanelLayout::GetFocus()
+{
+    Control::GetFocus();
+    if (m_pInitialFocusWidget)
+        m_pInitialFocusWidget->grab_focus();
+}
+
 PanelLayout::~PanelLayout()
 {
     disposeOnce();
@@ -42,6 +50,7 @@ PanelLayout::~PanelLayout()
 void PanelLayout::dispose()
 {
     m_bInClose = true;
+    m_pInitialFocusWidget = nullptr;
     m_aPanelLayoutIdle.Stop();
     m_xContainer.reset();
     m_xBuilder.reset();
diff --git a/svx/source/gallery2/GalleryControl.cxx b/svx/source/gallery2/GalleryControl.cxx
index a25d178d4ad7..7ecbffaa90bf 100644
--- a/svx/source/gallery2/GalleryControl.cxx
+++ b/svx/source/gallery2/GalleryControl.cxx
@@ -36,6 +36,7 @@ GalleryControl::GalleryControl(vcl::Window* pParent)
     , mxBrowser2(new GalleryBrowser2(*m_xBuilder, mpGallery))
 {
     mxBrowser1->SelectTheme(0);
+    m_pInitialFocusWidget = mxBrowser1->GetInitialFocusWidget();
 }
 
 GalleryControl::~GalleryControl()
diff --git a/svx/source/gallery2/galbrws1.cxx b/svx/source/gallery2/galbrws1.cxx
index 2c2d8efa64cf..295adea78d9a 100644
--- a/svx/source/gallery2/galbrws1.cxx
+++ b/svx/source/gallery2/galbrws1.cxx
@@ -304,12 +304,17 @@ void GalleryBrowser1::ImplExecute(std::string_view rIdent)
     }
 }
 
-void GalleryBrowser1::GrabFocus()
+weld::Widget* GalleryBrowser1::GetInitialFocusWidget()
 {
     if (mxNewTheme->get_sensitive())
-        mxNewTheme->grab_focus();
+        return mxNewTheme.get();
     else
-        mxThemes->grab_focus();
+        return mxThemes.get();
+}
+
+void GalleryBrowser1::GrabFocus()
+{
+    GetInitialFocusWidget()->grab_focus();
 }
 
 void GalleryBrowser1::Notify( SfxBroadcaster&, const SfxHint& rHint )
diff --git a/svx/source/gallery2/galbrws1.hxx b/svx/source/gallery2/galbrws1.hxx
index d179972dc999..7a51bd0928b1 100644
--- a/svx/source/gallery2/galbrws1.hxx
+++ b/svx/source/gallery2/galbrws1.hxx
@@ -86,6 +86,7 @@ public:
 
     void                    SelectTheme( sal_uInt16 nThemePos ) { mxThemes->select( nThemePos ); SelectThemeHdl( *mxThemes ); }
     OUString                GetSelectedTheme() const { return mxThemes->get_selected_text(); }
+    weld::Widget*           GetInitialFocusWidget();
     void                    GrabFocus();
 };
 
diff --git a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
index 43ee78a9f83a..5e210968b4a1 100644
--- a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
+++ b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
@@ -107,6 +107,8 @@ AreaPropertyPanelBase::AreaPropertyPanelBase(
     mpPanel = dynamic_cast<sfx2::sidebar::Panel*>(pParent);
 
     Initialize();
+
+    m_pInitialFocusWidget = mxLbFillType.get();
 }
 
 AreaPropertyPanelBase::~AreaPropertyPanelBase()
diff --git a/svx/source/sidebar/effect/EffectPropertyPanel.cxx b/svx/source/sidebar/effect/EffectPropertyPanel.cxx
index 6c429420cf65..58d027b0cfd6 100644
--- a/svx/source/sidebar/effect/EffectPropertyPanel.cxx
+++ b/svx/source/sidebar/effect/EffectPropertyPanel.cxx
@@ -41,6 +41,8 @@ EffectPropertyPanel::EffectPropertyPanel(vcl::Window* pParent,
     , mxSoftEdgeRadius(m_xBuilder->weld_metric_spin_button("SB_SOFTEDGE_RADIUS", FieldUnit::POINT))
 {
     Initialize();
+
+    m_pInitialFocusWidget = &mxGlowRadius->get_widget();
 }
 
 EffectPropertyPanel::~EffectPropertyPanel() { disposeOnce(); }
diff --git a/svx/source/sidebar/inspector/InspectorTextPanel.cxx b/svx/source/sidebar/inspector/InspectorTextPanel.cxx
index 7c713696320a..7b07be9997c4 100644
--- a/svx/source/sidebar/inspector/InspectorTextPanel.cxx
+++ b/svx/source/sidebar/inspector/InspectorTextPanel.cxx
@@ -58,6 +58,7 @@ InspectorTextPanel::InspectorTextPanel(vcl::Window* pParent,
     aWidths.push_back(fWidth * 34);
     aWidths.push_back(fWidth * 34);
     mpListBoxStyles->set_column_fixed_widths(aWidths);
+    m_pInitialFocusWidget = mpListBoxStyles.get();
 }
 
 static bool GetPropertyValues(const OUString& rPropName, const uno::Any& rAny, OUString& rString)
diff --git a/svx/source/sidebar/lists/ListsPropertyPanel.cxx b/svx/source/sidebar/lists/ListsPropertyPanel.cxx
index 2b579b4979b1..a28cbf777a09 100644
--- a/svx/source/sidebar/lists/ListsPropertyPanel.cxx
+++ b/svx/source/sidebar/lists/ListsPropertyPanel.cxx
@@ -46,6 +46,7 @@ ListsPropertyPanel::ListsPropertyPanel(vcl::Window* pParent,
     , mxTBxOutline(m_xBuilder->weld_toolbar("outline"))
     , mxOutlineDispatcher(new ToolbarUnoDispatcher(*mxTBxOutline, *m_xBuilder, rxFrame))
 {
+    m_pInitialFocusWidget = mxTBxNumBullet.get();
 }
 
 ListsPropertyPanel::~ListsPropertyPanel() { disposeOnce(); }
diff --git a/svx/source/sidebar/media/MediaPlaybackPanel.cxx b/svx/source/sidebar/media/MediaPlaybackPanel.cxx
index 2b2cd5d10ab8..78a56e4405e5 100644
--- a/svx/source/sidebar/media/MediaPlaybackPanel.cxx
+++ b/svx/source/sidebar/media/MediaPlaybackPanel.cxx
@@ -46,6 +46,8 @@ MediaPlaybackPanel::MediaPlaybackPanel (
     mxZoomListBox = m_xBuilder->weld_combo_box("zoombox");
 
     Initialize();
+
+    m_pInitialFocusWidget = mxTimeEdit.get();
 }
 
 VclPtr< vcl::Window > MediaPlaybackPanel::Create(
diff --git a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx
index b246b7fea273..ab97dc60c8c0 100644
--- a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx
+++ b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx
@@ -449,6 +449,7 @@ ParaPropertyPanel::ParaPropertyPanel(vcl::Window* pParent,
 
     initial();
     m_aMetricCtl.RequestUpdate();
+    m_pInitialFocusWidget = mxTBxHorzAlign.get();
 }
 
 void ParaPropertyPanel::limitMetricWidths()
diff --git a/svx/source/sidebar/shapes/DefaultShapesPanel.cxx b/svx/source/sidebar/shapes/DefaultShapesPanel.cxx
index 9295d9b5ade4..3d52ae23fb0d 100644
--- a/svx/source/sidebar/shapes/DefaultShapesPanel.cxx
+++ b/svx/source/sidebar/shapes/DefaultShapesPanel.cxx
@@ -53,6 +53,8 @@ DefaultShapesPanel::DefaultShapesPanel (
     , mxFrame(rxFrame)
 {
     Initialize();
+
+    m_pInitialFocusWidget = mxLineArrowSet->GetDrawingArea();
 }
 
 VclPtr< vcl::Window > DefaultShapesPanel::Create(
diff --git a/svx/source/sidebar/styles/StylesPropertyPanel.cxx b/svx/source/sidebar/styles/StylesPropertyPanel.cxx
index 7e23e090fbd3..e976e9b25985 100644
--- a/svx/source/sidebar/styles/StylesPropertyPanel.cxx
+++ b/svx/source/sidebar/styles/StylesPropertyPanel.cxx
@@ -36,6 +36,7 @@ StylesPropertyPanel::StylesPropertyPanel ( vcl::Window* pParent, const css::uno:
     , m_xStyle(m_xBuilder->weld_toolbar("style"))
     , m_xStyleDispatch(new ToolbarUnoDispatcher(*m_xStyle, *m_xBuilder, rxFrame))
 {
+    m_pInitialFocusWidget = m_xFontStyle.get();
 }
 
 StylesPropertyPanel::~StylesPropertyPanel()
diff --git a/svx/source/sidebar/text/TextPropertyPanel.cxx b/svx/source/sidebar/text/TextPropertyPanel.cxx
index 4b5adca519ab..ac93e6c70e2c 100644
--- a/svx/source/sidebar/text/TextPropertyPanel.cxx
+++ b/svx/source/sidebar/text/TextPropertyPanel.cxx
@@ -70,6 +70,8 @@ TextPropertyPanel::TextPropertyPanel ( vcl::Window* pParent, const css::uno::Ref
             pViewShell && pViewShell->isLOKMobilePhone())
         isMobilePhone = true;
     mxSpacingBar->set_visible(!isMobilePhone);
+
+    m_pInitialFocusWidget = mxFont.get();
 }
 
 TextPropertyPanel::~TextPropertyPanel()
diff --git a/sw/source/uibase/sidebar/StylePresetsPanel.cxx b/sw/source/uibase/sidebar/StylePresetsPanel.cxx
index ecb2e61bd3f6..417b0792de37 100644
--- a/sw/source/uibase/sidebar/StylePresetsPanel.cxx
+++ b/sw/source/uibase/sidebar/StylePresetsPanel.cxx
@@ -152,6 +152,8 @@ StylePresetsPanel::StylePresetsPanel(vcl::Window* pParent,
     mxValueSet->SetDoubleClickHdl(LINK(this, StylePresetsPanel, DoubleClickHdl));
 
     RefreshList();
+
+    m_pInitialFocusWidget = mxValueSet->GetDrawingArea();
 }
 
 void StylePresetsPanel::RefreshList()
diff --git a/sw/source/uibase/sidebar/TableEditPanel.cxx b/sw/source/uibase/sidebar/TableEditPanel.cxx
index 3fef04c92e30..d1840f8e95e7 100644
--- a/sw/source/uibase/sidebar/TableEditPanel.cxx
+++ b/sw/source/uibase/sidebar/TableEditPanel.cxx
@@ -137,6 +137,8 @@ TableEditPanel::TableEditPanel(vcl::Window* pParent,
 
     if (comphelper::LibreOfficeKit::isActive())
         m_xMisc->set_item_visible(".uno:InsertFormula", false);
+
+    m_pInitialFocusWidget = &m_xRowHeightEdit->get_widget();
 }
 
 TableEditPanel::~TableEditPanel() { disposeOnce(); }
diff --git a/sw/source/uibase/sidebar/ThemePanel.cxx b/sw/source/uibase/sidebar/ThemePanel.cxx
index 2ba276cf212e..25eac48e1174 100644
--- a/sw/source/uibase/sidebar/ThemePanel.cxx
+++ b/sw/source/uibase/sidebar/ThemePanel.cxx
@@ -447,6 +447,8 @@ ThemePanel::ThemePanel(vcl::Window* pParent,
 
     if (!aColorSets.empty())
         mxValueSetColors->SelectItem(1); // ItemId 1, position 0
+
+    m_pInitialFocusWidget = mxListBoxFonts.get();
 }
 
 ThemePanel::~ThemePanel()
diff --git a/sw/source/uibase/sidebar/WrapPropertyPanel.cxx b/sw/source/uibase/sidebar/WrapPropertyPanel.cxx
index 567a5daaf699..985bd34ffcc3 100644
--- a/sw/source/uibase/sidebar/WrapPropertyPanel.cxx
+++ b/sw/source/uibase/sidebar/WrapPropertyPanel.cxx
@@ -75,6 +75,8 @@ WrapPropertyPanel::WrapPropertyPanel(
     SpacingListBox::Fill(IsInch(eMetric) ? SpacingType::SPACING_INCH : SpacingType::SPACING_CM, *mxSpacingLB);
 
     Initialize();
+
+    m_pInitialFocusWidget = mxWrapOptions.get();
 }
 
 WrapPropertyPanel::~WrapPropertyPanel()
diff --git a/sw/source/uibase/utlui/navipi.cxx b/sw/source/uibase/utlui/navipi.cxx
index 7c440647e4e3..662ae43ebbe2 100644
--- a/sw/source/uibase/utlui/navipi.cxx
+++ b/sw/source/uibase/utlui/navipi.cxx
@@ -644,6 +644,8 @@ SwNavigationPI::SwNavigationPI(vcl::Window* pParent,
     m_xDocListBox->set_accessible_name(m_aStatusArr[3]);
 
     m_aExpandedSize = GetOptimalSize();
+
+    m_pInitialFocusWidget = m_xContent1ToolBox.get();
 }
 
 SwNavigationPI::~SwNavigationPI()


More information about the Libreoffice-commits mailing list