cui/Library_cui.mk                    |    1 
 cui/UIConfig_cui.mk                   |    1 
 cui/inc/strings.hrc                   |    3 
 cui/inc/toolbarmode.hrc               |   38 ---
 cui/inc/uimode.hrc                    |   38 +++
 cui/source/dialogs/toolbarmodedlg.cxx |  173 ++--------------
 cui/source/dialogs/uitabpage.cxx      |  173 ++++++++++++++++
 cui/source/inc/toolbarmodedlg.hxx     |   31 +-
 cui/source/inc/uitabpage.hxx          |   39 +++
 cui/uiconfig/ui/toolbarmodedialog.ui  |  359 ++++------------------------------
 cui/uiconfig/ui/uitabpage.ui          |  307 +++++++++++++++++++++++++++++
 solenv/sanitizers/ui/cui.suppr        |    1 
 12 files changed, 650 insertions(+), 514 deletions(-)

New commits:
commit ec04856ff1dfe0c5c9462263f2d261c30a336d7c
Author:     Heiko Tietze <tietze.he...@gmail.com>
AuthorDate: Mon Apr 28 14:15:08 2025 +0200
Commit:     Heiko Tietze <heiko.tie...@documentfoundation.org>
CommitDate: Wed Apr 30 19:00:43 2025 +0200

    Turn UI picker dialog into a SfxTabDialog
    
    Prerequisite to 6fa44178cad838fe126e64c87c873a1ee181f542
    
    Change-Id: I8612658bddc79682b9b63c60eb8e4bf72021b50e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184714
    Reviewed-by: Heiko Tietze <heiko.tie...@documentfoundation.org>
    Tested-by: Jenkins

diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk
index 383574c2e481..cd540ab16a06 100644
--- a/cui/Library_cui.mk
+++ b/cui/Library_cui.mk
@@ -161,6 +161,7 @@ $(eval $(call gb_Library_add_exception_objects,cui,\
     cui/source/dialogs/srchxtra \
     cui/source/dialogs/thesdlg \
     cui/source/dialogs/toolbarmodedlg \
+    cui/source/dialogs/uitabpage \
     cui/source/dialogs/zoom \
     cui/source/factory/cuiexp \
     cui/source/factory/cuiresmgr \
diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk
index e17527985f13..f34f73abc750 100644
--- a/cui/UIConfig_cui.mk
+++ b/cui/UIConfig_cui.mk
@@ -222,6 +222,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
        cui/uiconfig/ui/textflowpage \
        cui/uiconfig/ui/thesaurus \
        cui/uiconfig/ui/toolbarmodedialog \
+       cui/uiconfig/ui/uitabpage \
        cui/uiconfig/ui/transparencytabpage \
        cui/uiconfig/ui/tsaurldialog \
        cui/uiconfig/ui/twolinespage \
diff --git a/cui/inc/strings.hrc b/cui/inc/strings.hrc
index 5a42bd184054..982845bb3795 100644
--- a/cui/inc/strings.hrc
+++ b/cui/inc/strings.hrc
@@ -385,7 +385,8 @@
 #define RID_CUISTR_ADDITIONS_THEMES                 
NC_("RID_SVXSTR_ADDITIONS_THEMES", "Extensions: Color Themes")
 #define RID_CUISTR_ADDITIONS_TEMPLATES              
NC_("RID_SVXSTR_ADDITIONS_TEMPLATES", "Extensions: Templates")
 
-#define RID_CUISTR_UI_APPLYALL                      
NC_("RID_SVXSTR_UI_APPLYALL", "Apply to %MODULE")
+#define RID_CUISTR_UI_APPLY                         NC_("RID_SVXSTR_UI_APPLY", 
"Apply to %MODULE")
+#define RID_CUISTR_UI_APPLYALL                      
NC_("RID_SVXSTR_UI_APPLYALL", "Apply to All")
 
 #define RID_CUISTR_OLE_INSERT                       
NC_("RID_SVXSTR_OLE_INSERT", "Inserting OLE object...")
 
diff --git a/cui/inc/toolbarmode.hrc b/cui/inc/toolbarmode.hrc
deleted file mode 100644
index 1891795b93cf..000000000000
--- a/cui/inc/toolbarmode.hrc
+++ /dev/null
@@ -1,38 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-
-#pragma once
-
-#define NC_(Context, String) TranslateId(Context, u8##String)
-
-#include <rtl/ustring.hxx>
-#include <tuple>
-#include <unotools/resmgr.hxx>
-
-/*
- Description, ui file name, preview file name
-*/
-const std::tuple<TranslateId, OUString, OUString> TOOLBARMODES_ARRAY[] =
-{
-    { NC_("RID_CUI_TOOLBARMODES", "Standard user interface with menu, toolbar, 
and collapsed sidebar. Intended for users who are familiar with the classic 
interface."), "Default", "default.png" },
-    { NC_("RID_CUI_TOOLBARMODES", "The Tabbed user interface is the most 
similar to the Ribbons used in Microsoft Office. It organizes functions in tabs 
and makes the main menu obsolete."), "notebookbar.ui", "notebookbar.png" },
-    { NC_("RID_CUI_TOOLBARMODES", "Standard user interface but with 
single-line toolbar. Intended for use on small screens."), "Single", 
"single.png" },
-    { NC_("RID_CUI_TOOLBARMODES", "Standard user interface with expanded 
sidebar. Expert users who want to quickly change many different properties are 
advised to use this UI."), "Sidebar", "sidebar.png" },
-    { NC_("RID_CUI_TOOLBARMODES", "The Tabbed Compact variant aims to be 
familiar with the Microsoft Office interface, yet occupying less space for 
smaller screens."), "notebookbar_compact.ui", "notebookbar_compact.png" },
-    { NC_("RID_CUI_TOOLBARMODES", "The Groupedbar interface provides access to 
functions in groups, with icons for most-frequently used features, and dropdown 
menus for others. This full variant favors functions and is slightly larger 
than others."), "notebookbar_groupedbar_full.ui", 
"notebookbar_groupedbar_full.png" },
-    { NC_("RID_CUI_TOOLBARMODES", "The Groupedbar interface provides access to 
functions in groups, with icons for most-frequently used features, and dropdown 
menus for others. This compact variant favors vertical space."), 
"notebookbar_groupedbar_compact.ui", "notebookbar_groupedbar_compact.png" },
-    { NC_("RID_CUI_TOOLBARMODES", "The Contextual Single interface shows 
functions in a single-line toolbar with context-dependent content."), 
"notebookbar_single.ui", "notebookbar_single.png" },
-    { NC_("RID_CUI_TOOLBARMODES", "The Contextual Groups interface focuses on 
beginners. It exposes the most frequently used functions on groups with the 
core action as large icon and a couple of small additional features. All 
functions have a label. Depending on the context, an additional section 
provides access to those functions."), "notebookbar_groups.ui", 
"notebookbar_groups.png" },
-};
-
-//hide experimental UIs
-constexpr int nGroupedbarFull = 5;
-constexpr int nContextualGroups = 8;
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/inc/uimode.hrc b/cui/inc/uimode.hrc
new file mode 100644
index 000000000000..6c303961d458
--- /dev/null
+++ b/cui/inc/uimode.hrc
@@ -0,0 +1,38 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#pragma once
+
+#define NC_(Context, String) TranslateId(Context, u8##String)
+
+#include <rtl/ustring.hxx>
+#include <tuple>
+#include <unotools/resmgr.hxx>
+
+/*
+ Description, ui file name, preview file name
+*/
+const std::tuple<TranslateId, OUString, OUString> UIMODES_ARRAY[] =
+{
+    { NC_("RID_CUI_UIMODES", "Standard user interface with menu, toolbar, and 
collapsed sidebar. Intended for users who are familiar with the classic 
interface."), "Default", "default.png" },
+    { NC_("RID_CUI_UIMODES", "The Tabbed user interface is the most similar to 
the Ribbons used in Microsoft Office. It organizes functions in tabs and makes 
the main menu obsolete."), "notebookbar.ui", "notebookbar.png" },
+    { NC_("RID_CUI_UIMODES", "Standard user interface but with single-line 
toolbar. Intended for use on small screens."), "Single", "single.png" },
+    { NC_("RID_CUI_UIMODES", "Standard user interface with expanded sidebar. 
Expert users who want to quickly change many different properties are advised 
to use this UI."), "Sidebar", "sidebar.png" },
+    { NC_("RID_CUI_UIMODES", "The Tabbed Compact variant aims to be familiar 
with the Microsoft Office interface, yet occupying less space for smaller 
screens."), "notebookbar_compact.ui", "notebookbar_compact.png" },
+    { NC_("RID_CUI_UIMODES", "The Groupedbar interface provides access to 
functions in groups, with icons for most-frequently used features, and dropdown 
menus for others. This full variant favors functions and is slightly larger 
than others."), "notebookbar_groupedbar_full.ui", 
"notebookbar_groupedbar_full.png" },
+    { NC_("RID_CUI_UIMODES", "The Groupedbar interface provides access to 
functions in groups, with icons for most-frequently used features, and dropdown 
menus for others. This compact variant favors vertical space."), 
"notebookbar_groupedbar_compact.ui", "notebookbar_groupedbar_compact.png" },
+    { NC_("RID_CUI_UIMODES", "The Contextual Single interface shows functions 
in a single-line toolbar with context-dependent content."), 
"notebookbar_single.ui", "notebookbar_single.png" },
+    { NC_("RID_CUI_UIMODES", "The Contextual Groups interface focuses on 
beginners. It exposes the most frequently used functions on groups with the 
core action as large icon and a couple of small additional features. All 
functions have a label. Depending on the context, an additional section 
provides access to those functions."), "notebookbar_groups.ui", 
"notebookbar_groups.png" },
+};
+
+//hide experimental UIs
+constexpr int nGroupedbarFull = 5;
+constexpr int nContextualGroups = 8;
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/dialogs/toolbarmodedlg.cxx 
b/cui/source/dialogs/toolbarmodedlg.cxx
index 1d91a8b6f5cc..901043f3500e 100644
--- a/cui/source/dialogs/toolbarmodedlg.cxx
+++ b/cui/source/dialogs/toolbarmodedlg.cxx
@@ -7,177 +7,52 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-#include <sal/config.h>
-
 #include <toolbarmodedlg.hxx>
-#include <toolbarmode.hrc>
 
-#include <com/sun/star/frame/ModuleManager.hpp>
 #include <comphelper/dispatchcommand.hxx>
-#include <comphelper/types.hxx>
 #include <dialmgr.hxx>
-#include <officecfg/Office/Common.hxx>
 #include <officecfg/Office/UI/ToolbarMode.hxx>
-#include <osl/file.hxx>
-#include <rtl/bootstrap.hxx>
 #include <sfx2/viewfrm.hxx>
 #include <strings.hrc>
 #include <unotools/confignode.hxx>
-#include <vcl/virdev.hxx>
-#include <vcl/graphicfilter.hxx>
-#include <vcl/EnumContext.hxx>
-#include <vcl/weld.hxx>
-#include <com/sun/star/beans/PropertyValue.hpp>
-
-static OUString GetCurrentApp()
-{
-    OUString sResult;
-    if (SfxViewFrame* pViewFrame = SfxViewFrame::Current())
-    {
-        const auto xCurrentFrame = pViewFrame->GetFrame().GetFrameInterface();
-        const auto& xContext = comphelper::getProcessComponentContext();
-        const auto xModuleManager = 
css::frame::ModuleManager::create(xContext);
-        switch 
(vcl::EnumContext::GetApplicationEnum(xModuleManager->identify(xCurrentFrame)))
-        {
-            case vcl::EnumContext::Application::Writer:
-                sResult = "Writer";
-                break;
-            case vcl::EnumContext::Application::Calc:
-                sResult = "Calc";
-                break;
-            case vcl::EnumContext::Application::Impress:
-                sResult = "Impress";
-                break;
-            case vcl::EnumContext::Application::Draw:
-                sResult = "Draw";
-                break;
-            case vcl::EnumContext::Application::Formula:
-                sResult = "Formula";
-                break;
-            case vcl::EnumContext::Application::Base:
-                sResult = "Base";
-                break;
-            default:
-                sResult = "Unsupported";
-        }
-    }
-    return sResult;
-}
-
-static OUString GetCurrentMode()
-{
-    OUString sResult;
-    if (SfxViewFrame::Current())
-    {
-        const auto& xContext = comphelper::getProcessComponentContext();
-        const utl::OConfigurationTreeRoot aAppNode(
-            xContext, "org.openoffice.Office.UI.ToolbarMode/Applications/" + 
GetCurrentApp(), true);
-        if (aAppNode.isValid())
-            sResult = 
comphelper::getString(aAppNode.getNodeValue(u"Active"_ustr));
-    };
-    return sResult;
-}
 
 ToolbarmodeDialog::ToolbarmodeDialog(weld::Window* pParent)
-    : GenericDialogController(pParent, u"cui/ui/toolbarmodedialog.ui"_ustr,
-                              u"ToolbarmodeDialog"_ustr)
-    , m_pImage(m_xBuilder->weld_image(u"imImage"_ustr))
-    , m_pApply(m_xBuilder->weld_button(u"btnApply"_ustr))
-    , m_pApplyAll(m_xBuilder->weld_button(u"btnApplyAll"_ustr))
-    , m_pRadioButtons{ (m_xBuilder->weld_radio_button(u"rbButton1"_ustr)),
-                       (m_xBuilder->weld_radio_button(u"rbButton2"_ustr)),
-                       (m_xBuilder->weld_radio_button(u"rbButton3"_ustr)),
-                       (m_xBuilder->weld_radio_button(u"rbButton4"_ustr)),
-                       (m_xBuilder->weld_radio_button(u"rbButton5"_ustr)),
-                       (m_xBuilder->weld_radio_button(u"rbButton6"_ustr)),
-                       (m_xBuilder->weld_radio_button(u"rbButton7"_ustr)),
-                       (m_xBuilder->weld_radio_button(u"rbButton8"_ustr)),
-                       (m_xBuilder->weld_radio_button(u"rbButton9"_ustr)) }
-    , m_pInfoLabel(m_xBuilder->weld_label(u"lbInfo"_ustr))
+    : SfxTabDialogController(pParent, u"cui/ui/toolbarmodedialog.ui"_ustr,
+                             u"ToolbarModeDialog"_ustr)
+    , m_xOKBtn(m_xBuilder->weld_button(u"ok"_ustr))
+    , m_xApplyBtn(m_xBuilder->weld_button(u"apply"_ustr)) // Apply to %Module
+    , m_xCancelBtn(m_xBuilder->weld_button(u"cancel"_ustr)) // Close
+    , m_xHelpBtn(m_xBuilder->weld_button(u"help"_ustr))
+    , m_xResetBtn(m_xBuilder->weld_button(u"reset"_ustr)) // Apply to All
 {
-    static_assert(SAL_N_ELEMENTS(m_pRadioButtons) == 
std::size(TOOLBARMODES_ARRAY));
-
-    Link<weld::Toggleable&, void> aLink = LINK(this, ToolbarmodeDialog, 
SelectToolbarmode);
-
-    const OUString sCurrentMode = GetCurrentMode();
-    for (std::size_t i = 0; i < std::size(m_pRadioButtons); ++i)
-    {
-        m_pRadioButtons[i]->connect_toggled(aLink);
-        if (sCurrentMode == std::get<1>(TOOLBARMODES_ARRAY[i]))
-        {
-            m_pRadioButtons[i]->set_active(true);
-            UpdateImage(std::get<2>(TOOLBARMODES_ARRAY[i]));
-            
m_pInfoLabel->set_label(CuiResId(std::get<0>(TOOLBARMODES_ARRAY[i])));
-        }
-    }
-
-    
m_pApply->set_label(CuiResId(RID_CUISTR_UI_APPLYALL).replaceFirst("%MODULE", 
GetCurrentApp()));
-    m_pApply->connect_clicked(LINK(this, ToolbarmodeDialog, OnApplyClick));
-    m_pApplyAll->connect_clicked(LINK(this, ToolbarmodeDialog, OnApplyClick));
+    AddTabPage("uimode", UITabPage::Create, nullptr);
 
-    if (!officecfg::Office::Common::Misc::ExperimentalMode::get())
-    {
-        m_pRadioButtons[nGroupedbarFull]->set_visible(false);
-        m_pRadioButtons[nContextualGroups]->set_visible(false);
-    }
-}
-
-ToolbarmodeDialog::~ToolbarmodeDialog() = default;
-
-static bool file_exists(const OUString& fileName)
-{
-    osl::File aFile(fileName);
-    return aFile.open(osl_File_OpenFlag_Read) == osl::FileBase::E_None;
-}
-
-int ToolbarmodeDialog::GetActiveRadioButton()
-{
-    for (std::size_t i = 0; i < std::size(m_pRadioButtons); ++i)
-    {
-        if (m_pRadioButtons[i]->get_active())
-            return i;
-    }
-    return -1;
+    m_xOKBtn->set_visible(false);
+    m_xHelpBtn->set_visible(false);
+    m_xCancelBtn->set_label(CuiResId(RID_CUISTR_HYPDLG_CLOSEBUT)); // "close"
 }
 
-void ToolbarmodeDialog::UpdateImage(std::u16string_view sFileName)
+void ToolbarmodeDialog::ActivatePage(const OUString& rPage)
 {
-    // load image
-    OUString aURL(u"$BRAND_BASE_DIR/$BRAND_SHARE_SUBDIR/toolbarmode/"_ustr);
-    rtl::Bootstrap::expandMacros(aURL);
-    aURL += sFileName;
-    if (sFileName.empty() || !file_exists(aURL))
-        return;
-    // draw image
-    Graphic aGraphic;
-    if (GraphicFilter::LoadGraphic(aURL, OUString(), aGraphic) == ERRCODE_NONE)
+    if (rPage == "uimode")
     {
-        ScopedVclPtr<VirtualDevice> m_pVirDev = 
m_pImage->create_virtual_device();
-        m_pVirDev->SetOutputSizePixel(aGraphic.GetSizePixel());
-        m_pVirDev->DrawBitmapEx(Point(0, 0), aGraphic.GetBitmapEx());
-        m_pImage->set_image(m_pVirDev.get());
-        m_pVirDev.disposeAndClear();
-    }
-}
+        m_xApplyBtn->set_label(
+            CuiResId(RID_CUISTR_UI_APPLY).replaceFirst("%MODULE", 
UITabPage::GetCurrentApp()));
+        m_xApplyBtn->set_from_icon_name("sw/res/sc20558.png");
+        m_xResetBtn->set_label(CuiResId(RID_CUISTR_UI_APPLYALL));
 
-IMPL_LINK_NOARG(ToolbarmodeDialog, SelectToolbarmode, weld::Toggleable&, void)
-{
-    const int i = GetActiveRadioButton();
-    if (i > -1)
-    {
-        UpdateImage(std::get<2>(TOOLBARMODES_ARRAY[i]));
-        m_pInfoLabel->set_label(CuiResId(std::get<0>(TOOLBARMODES_ARRAY[i])));
+        m_xApplyBtn->connect_clicked(LINK(this, ToolbarmodeDialog, 
OnApplyClick));
+        m_xResetBtn->connect_clicked(LINK(this, ToolbarmodeDialog, 
OnApplyClick));
     }
 }
 
 IMPL_LINK(ToolbarmodeDialog, OnApplyClick, weld::Button&, rButton, void)
 {
-    const int i = GetActiveRadioButton();
-    if (i == -1)
-        return;
-    const OUString sCmd = std::get<1>(TOOLBARMODES_ARRAY[i]);
+    UITabPage* pUITabPage = static_cast<UITabPage*>(GetCurTabPage());
+    const OUString& sCmd = pUITabPage->GetSelectedMode();
+
     //apply to all except current module
-    if (&rButton == m_pApplyAll.get())
+    if (&rButton == m_xResetBtn.get()) // Apply to All
     {
         std::shared_ptr<comphelper::ConfigurationChanges> aBatch(
             comphelper::ConfigurationChanges::create());
@@ -187,7 +62,7 @@ IMPL_LINK(ToolbarmodeDialog, OnApplyClick, weld::Button&, 
rButton, void)
         officecfg::Office::UI::ToolbarMode::ActiveDraw::set(sCmd, aBatch);
         aBatch->commit();
 
-        OUString sCurrentApp = GetCurrentApp();
+        const OUString sCurrentApp = UITabPage::GetCurrentApp();
         if (SfxViewFrame::Current())
         {
             const auto& xContext = comphelper::getProcessComponentContext();
diff --git a/cui/source/dialogs/uitabpage.cxx b/cui/source/dialogs/uitabpage.cxx
new file mode 100644
index 000000000000..7079d5cf4e1a
--- /dev/null
+++ b/cui/source/dialogs/uitabpage.cxx
@@ -0,0 +1,173 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <uitabpage.hxx>
+
+#include <com/sun/star/frame/ModuleManager.hpp>
+#include <comphelper/types.hxx>
+#include <dialmgr.hxx>
+#include <officecfg/Office/Common.hxx>
+#include <osl/file.hxx>
+#include <rtl/bootstrap.hxx>
+#include <sfx2/viewfrm.hxx>
+#include <unotools/confignode.hxx>
+#include <vcl/virdev.hxx>
+#include <vcl/graphicfilter.hxx>
+#include <vcl/EnumContext.hxx>
+
+std::unique_ptr<SfxTabPage> UITabPage::Create(weld::Container* pPage,
+                                              weld::DialogController* 
pController,
+                                              const SfxItemSet* rAttr)
+{
+    return std::make_unique<UITabPage>(pPage, pController, *rAttr);
+}
+
+UITabPage::UITabPage(weld::Container* pPage, weld::DialogController* 
pController,
+                     const SfxItemSet& rAttr)
+    : SfxTabPage(pPage, pController, u"cui/ui/uitabpage.ui"_ustr, 
u"UITabPage"_ustr, &rAttr)
+    , m_pImage(m_xBuilder->weld_image(u"imImage"_ustr))
+    , m_pApply(m_xBuilder->weld_button(u"btnApply"_ustr))
+    , m_pApplyAll(m_xBuilder->weld_button(u"btnApplyAll"_ustr))
+    , m_pRadioButtons{ (m_xBuilder->weld_radio_button(u"rbButton1"_ustr)),
+                       (m_xBuilder->weld_radio_button(u"rbButton2"_ustr)),
+                       (m_xBuilder->weld_radio_button(u"rbButton3"_ustr)),
+                       (m_xBuilder->weld_radio_button(u"rbButton4"_ustr)),
+                       (m_xBuilder->weld_radio_button(u"rbButton5"_ustr)),
+                       (m_xBuilder->weld_radio_button(u"rbButton6"_ustr)),
+                       (m_xBuilder->weld_radio_button(u"rbButton7"_ustr)),
+                       (m_xBuilder->weld_radio_button(u"rbButton8"_ustr)),
+                       (m_xBuilder->weld_radio_button(u"rbButton9"_ustr)) }
+    , m_pInfoLabel(m_xBuilder->weld_label(u"lbInfo"_ustr))
+{
+    static_assert(SAL_N_ELEMENTS(m_pRadioButtons) == std::size(UIMODES_ARRAY));
+
+    Link<weld::Toggleable&, void> aLink = LINK(this, UITabPage, SelectUIMode);
+
+    const OUString sCurrentMode = GetCurrentMode();
+    for (std::size_t i = 0; i < std::size(m_pRadioButtons); ++i)
+    {
+        m_pRadioButtons[i]->connect_toggled(aLink);
+        if (sCurrentMode == std::get<1>(UIMODES_ARRAY[i]))
+        {
+            m_pRadioButtons[i]->set_active(true);
+            UpdateImage(std::get<2>(UIMODES_ARRAY[i]));
+            m_pInfoLabel->set_label(CuiResId(std::get<0>(UIMODES_ARRAY[i])));
+        }
+    }
+
+    if (!officecfg::Office::Common::Misc::ExperimentalMode::get())
+    {
+        m_pRadioButtons[nGroupedbarFull]->set_visible(false);
+        m_pRadioButtons[nContextualGroups]->set_visible(false);
+    }
+}
+
+OUString UITabPage::GetCurrentMode()
+{
+    OUString sResult;
+    if (SfxViewFrame::Current())
+    {
+        const auto& xContext = comphelper::getProcessComponentContext();
+        const utl::OConfigurationTreeRoot aAppNode(
+            xContext, "org.openoffice.Office.UI.ToolbarMode/Applications/" + 
GetCurrentApp(), true);
+        if (aAppNode.isValid())
+            sResult = 
comphelper::getString(aAppNode.getNodeValue(u"Active"_ustr));
+    };
+    return sResult;
+}
+
+OUString UITabPage::GetCurrentApp()
+{
+    OUString sResult;
+    if (SfxViewFrame* pViewFrame = SfxViewFrame::Current())
+    {
+        const auto xCurrentFrame = pViewFrame->GetFrame().GetFrameInterface();
+        const auto& xContext = comphelper::getProcessComponentContext();
+        const auto xModuleManager = 
css::frame::ModuleManager::create(xContext);
+        switch 
(vcl::EnumContext::GetApplicationEnum(xModuleManager->identify(xCurrentFrame)))
+        {
+            case vcl::EnumContext::Application::Writer:
+                sResult = "Writer";
+                break;
+            case vcl::EnumContext::Application::Calc:
+                sResult = "Calc";
+                break;
+            case vcl::EnumContext::Application::Impress:
+                sResult = "Impress";
+                break;
+            case vcl::EnumContext::Application::Draw:
+                sResult = "Draw";
+                break;
+            case vcl::EnumContext::Application::Formula:
+                sResult = "Formula";
+                break;
+            case vcl::EnumContext::Application::Base:
+                sResult = "Base";
+                break;
+            default:
+                sResult = "Unsupported";
+        }
+    }
+    return sResult;
+}
+
+int UITabPage::GetActiveRadioButton()
+{
+    const int nSize = std::size(m_pRadioButtons);
+    for (int i = 0; i < nSize; ++i)
+    {
+        if (m_pRadioButtons[i]->get_active())
+            return i;
+    }
+    return -1;
+}
+
+const OUString& UITabPage::GetSelectedMode()
+{
+    int i = GetActiveRadioButton();
+    return std::get<1>(UIMODES_ARRAY[i]);
+}
+
+static bool file_exists(const OUString& fileName)
+{
+    osl::File aFile(fileName);
+    return aFile.open(osl_File_OpenFlag_Read) == osl::FileBase::E_None;
+}
+
+void UITabPage::UpdateImage(std::u16string_view sFileName)
+{
+    // load image
+    OUString aURL(u"$BRAND_BASE_DIR/$BRAND_SHARE_SUBDIR/toolbarmode/"_ustr);
+    rtl::Bootstrap::expandMacros(aURL);
+    aURL += sFileName;
+    if (sFileName.empty() || !file_exists(aURL))
+        return;
+    // draw image
+    Graphic aGraphic;
+    if (GraphicFilter::LoadGraphic(aURL, OUString(), aGraphic) == ERRCODE_NONE)
+    {
+        ScopedVclPtr<VirtualDevice> m_pVirDev = 
m_pImage->create_virtual_device();
+        m_pVirDev->SetOutputSizePixel(aGraphic.GetSizePixel());
+        m_pVirDev->DrawBitmapEx(Point(0, 0), aGraphic.GetBitmapEx());
+        m_pImage->set_image(m_pVirDev.get());
+        m_pVirDev.disposeAndClear();
+    }
+}
+
+IMPL_LINK_NOARG(UITabPage, SelectUIMode, weld::Toggleable&, void)
+{
+    const int i = GetActiveRadioButton();
+    if (i > -1)
+    {
+        UpdateImage(std::get<2>(UIMODES_ARRAY[i]));
+        m_pInfoLabel->set_label(CuiResId(std::get<0>(UIMODES_ARRAY[i])));
+    }
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/cui/source/inc/toolbarmodedlg.hxx 
b/cui/source/inc/toolbarmodedlg.hxx
index 5965aa7598d6..d1abfb2a2db9 100644
--- a/cui/source/inc/toolbarmodedlg.hxx
+++ b/cui/source/inc/toolbarmodedlg.hxx
@@ -9,29 +9,24 @@
 
 #pragma once
 
-#include <sal/config.h>
+#include <sfx2/tabdlg.hxx>
+#include "uitabpage.hxx"
 
-#include <string_view>
-
-#include <vcl/weld.hxx>
-
-class ToolbarmodeDialog : public weld::GenericDialogController
+class ToolbarmodeDialog : public SfxTabDialogController
 {
-public:
-    ToolbarmodeDialog(weld::Window* pWindow);
-    virtual ~ToolbarmodeDialog() override;
-
 private:
-    std::unique_ptr<weld::Image> m_pImage;
-    std::unique_ptr<weld::Button> m_pApply;
-    std::unique_ptr<weld::Button> m_pApplyAll;
-    std::unique_ptr<weld::RadioButton> m_pRadioButtons[9];
-    std::unique_ptr<weld::Label> m_pInfoLabel;
+    std::unique_ptr<weld::Button> m_xOKBtn;
+    std::unique_ptr<weld::Button> m_xApplyBtn;
+    std::unique_ptr<weld::Button> m_xCancelBtn;
+    std::unique_ptr<weld::Button> m_xHelpBtn;
+    std::unique_ptr<weld::Button> m_xResetBtn;
+
+    virtual void ActivatePage(const OUString& rPage) override;
 
-    void UpdateImage(std::u16string_view sFileName);
-    int GetActiveRadioButton();
-    DECL_LINK(SelectToolbarmode, weld::Toggleable&, void);
     DECL_LINK(OnApplyClick, weld::Button&, void);
+
+public:
+    ToolbarmodeDialog(weld::Window* pParent);
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/cui/source/inc/uitabpage.hxx b/cui/source/inc/uitabpage.hxx
new file mode 100644
index 000000000000..1851243a69d7
--- /dev/null
+++ b/cui/source/inc/uitabpage.hxx
@@ -0,0 +1,39 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#pragma once
+
+#include <sfx2/tabdlg.hxx>
+
+#include <uimode.hrc>
+
+class UITabPage : public SfxTabPage
+{
+private:
+    std::unique_ptr<weld::Image> m_pImage;
+    std::unique_ptr<weld::Button> m_pApply;
+    std::unique_ptr<weld::Button> m_pApplyAll;
+    std::unique_ptr<weld::RadioButton> 
m_pRadioButtons[std::size(UIMODES_ARRAY)];
+    std::unique_ptr<weld::Label> m_pInfoLabel;
+
+    void UpdateImage(std::u16string_view sFileName);
+    static OUString GetCurrentMode();
+    int GetActiveRadioButton();
+    DECL_LINK(SelectUIMode, weld::Toggleable&, void);
+
+public:
+    UITabPage(weld::Container* pPage, weld::DialogController* pController, 
const SfxItemSet& rSet);
+    static std::unique_ptr<SfxTabPage>
+    Create(weld::Container* pPage, weld::DialogController* pController, const 
SfxItemSet* rSet);
+
+    const OUString& GetSelectedMode();
+    static OUString GetCurrentApp();
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/cui/uiconfig/ui/toolbarmodedialog.ui 
b/cui/uiconfig/ui/toolbarmodedialog.ui
index 4428eeac1166..67ed53a7304b 100644
--- a/cui/uiconfig/ui/toolbarmodedialog.ui
+++ b/cui/uiconfig/ui/toolbarmodedialog.ui
@@ -2,36 +2,28 @@
 <!-- Generated with glade 3.40.0 -->
 <interface domain="cui">
   <requires lib="gtk+" version="3.20"/>
-  <object class="GtkImage" id="imgApply">
-    <property name="visible">True</property>
-    <property name="can-focus">False</property>
-    <property name="icon-name">sw/res/sc20558.png</property>
-  </object>
-  <object class="GtkDialog" id="ToolbarmodeDialog">
+  <object class="GtkDialog" id="ToolbarModeDialog">
     <property name="can-focus">False</property>
     <property name="border-width">6</property>
-    <property name="title" translatable="yes" 
context="ToolbarmodeDialog|Name">Select Your Preferred User Interface</property>
-    <property name="resizable">False</property>
+    <property name="title" translatable="yes" 
context="toolbarmodedialog|ToolbarModeDialog">Select Your Preferred User 
Interface</property>
     <property name="modal">True</property>
-    <property name="window-position">center-on-parent</property>
+    <property name="default-width">0</property>
+    <property name="default-height">0</property>
     <property name="type-hint">dialog</property>
     <child internal-child="vbox">
-      <object class="GtkBox" id="dialog-vbox">
+      <object class="GtkBox" id="dialog-vbox1">
         <property name="can-focus">False</property>
         <property name="orientation">vertical</property>
         <property name="spacing">12</property>
         <child internal-child="action_area">
-          <object class="GtkButtonBox" id="dialog-action_area">
+          <object class="GtkButtonBox" id="dialog-action_area1">
             <property name="can-focus">False</property>
-            <property name="hexpand">True</property>
             <property name="layout-style">end</property>
             <child>
-              <object class="GtkButton" id="btnApplyAll">
-                <property name="label" translatable="yes" 
context="ToolbarmodeDialog|applyall">A_pply to All</property>
+              <object class="GtkButton" id="reset">
+                <property name="label" translatable="yes" 
context="stock">_Reset</property>
                 <property name="visible">True</property>
                 <property name="can-focus">True</property>
-                <property name="can-default">True</property>
-                <property name="has-default">True</property>
                 <property name="receives-default">True</property>
                 <property name="use-underline">True</property>
               </object>
@@ -42,16 +34,14 @@
               </packing>
             </child>
             <child>
-              <object class="GtkButton" id="btnApply">
-                <property name="label" translatable="yes" 
context="ToolbarmodeDialog|applymodule">A_pply to %MODULE</property>
+              <object class="GtkButton" id="ok">
+                <property name="label" translatable="yes" 
context="stock">_OK</property>
                 <property name="visible">True</property>
                 <property name="can-focus">True</property>
                 <property name="can-default">True</property>
                 <property name="has-default">True</property>
                 <property name="receives-default">True</property>
-                <property name="image">imgApply</property>
                 <property name="use-underline">True</property>
-                <property name="always-show-image">True</property>
               </object>
               <packing>
                 <property name="expand">False</property>
@@ -60,12 +50,10 @@
               </packing>
             </child>
             <child>
-              <object class="GtkButton" id="close">
-                <property name="label" translatable="yes" 
context="stock">_Close</property>
+              <object class="GtkButton" id="cancel">
+                <property name="label" translatable="yes" 
context="stock">_Cancel</property>
                 <property name="visible">True</property>
                 <property name="can-focus">True</property>
-                <property name="can-default">True</property>
-                <property name="has-default">True</property>
                 <property name="receives-default">True</property>
                 <property name="use-underline">True</property>
               </object>
@@ -82,327 +70,84 @@
                 <property name="can-focus">True</property>
                 <property name="receives-default">True</property>
                 <property name="use-underline">True</property>
-                <property name="image-position">right</property>
               </object>
               <packing>
-                <property name="expand">True</property>
+                <property name="expand">False</property>
                 <property name="fill">True</property>
                 <property name="position">3</property>
                 <property name="secondary">True</property>
               </packing>
             </child>
+            <child>
+              <object class="GtkButton" id="apply">
+                <property name="label" translatable="yes" 
context="stock">_Apply</property>
+                <property name="visible">True</property>
+                <property name="can-focus">True</property>
+                <property name="receives-default">True</property>
+                <property name="use-underline">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">4</property>
+              </packing>
+            </child>
           </object>
           <packing>
             <property name="expand">False</property>
-            <property name="fill">False</property>
+            <property name="fill">True</property>
             <property name="pack-type">end</property>
-            <property name="position">1</property>
+            <property name="position">0</property>
           </packing>
         </child>
         <child>
-          <object class="GtkBox">
+          <object class="GtkNotebook" id="tabcontrol">
             <property name="visible">True</property>
-            <property name="can-focus">False</property>
+            <property name="can-focus">True</property>
+            <property name="hexpand">True</property>
+            <property name="vexpand">True</property>
+            <property name="scrollable">True</property>
+            <property name="enable-popup">True</property>
             <child>
-              <object class="GtkFrame">
+              <!-- n-columns=1 n-rows=1 -->
+              <object class="GtkGrid">
                 <property name="visible">True</property>
                 <property name="can-focus">False</property>
-                <property name="margin-start">12</property>
-                <property name="margin-end">12</property>
-                <property name="label-xalign">0</property>
-                <property name="shadow-type">none</property>
                 <child>
-                  <object class="GtkBox">
-                    <property name="visible">True</property>
-                    <property name="can-focus">False</property>
-                    <property name="margin-start">12</property>
-                    <property name="margin-top">6</property>
-                    <property name="orientation">vertical</property>
-                    <property name="spacing">3</property>
-                    <child>
-                      <object class="GtkRadioButton" id="rbButton1">
-                        <property name="label" translatable="yes" 
context="ToolbarmodeDialog|radiobutton1">Standard Toolbar</property>
-                        <property name="visible">True</property>
-                        <property name="can-focus">True</property>
-                        <property name="receives-default">False</property>
-                        <property name="halign">start</property>
-                        <property name="valign">start</property>
-                        <property name="active">True</property>
-                        <property name="draw-indicator">True</property>
-                      </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">True</property>
-                        <property name="position">0</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkRadioButton" id="rbButton2">
-                        <property name="label" translatable="yes" 
context="ToolbarmodeDialog|radiobutton2">Tabbed</property>
-                        <property name="visible">True</property>
-                        <property name="can-focus">True</property>
-                        <property name="receives-default">False</property>
-                        <property name="halign">start</property>
-                        <property name="valign">start</property>
-                        <property name="draw-indicator">True</property>
-                        <property name="group">rbButton1</property>
-                      </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">True</property>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkSeparator">
-                        <property name="visible">True</property>
-                        <property name="can-focus">False</property>
-                      </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">True</property>
-                        <property name="position">2</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkRadioButton" id="rbButton3">
-                        <property name="label" translatable="yes" 
context="ToolbarmodeDialog|radiobutton3">Single Toolbar</property>
-                        <property name="visible">True</property>
-                        <property name="can-focus">True</property>
-                        <property name="receives-default">False</property>
-                        <property name="halign">start</property>
-                        <property name="valign">start</property>
-                        <property name="draw-indicator">True</property>
-                        <property name="group">rbButton1</property>
-                      </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">True</property>
-                        <property name="position">3</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkRadioButton" id="rbButton4">
-                        <property name="label" translatable="yes" 
context="ToolbarmodeDialog|radiobutton4">Sidebar</property>
-                        <property name="visible">True</property>
-                        <property name="can-focus">True</property>
-                        <property name="receives-default">False</property>
-                        <property name="halign">start</property>
-                        <property name="valign">start</property>
-                        <property name="draw-indicator">True</property>
-                        <property name="group">rbButton1</property>
-                      </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">True</property>
-                        <property name="position">4</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkRadioButton" id="rbButton5">
-                        <property name="label" translatable="yes" 
context="ToolbarmodeDialog|radiobutton5">Tabbed Compact</property>
-                        <property name="visible">True</property>
-                        <property name="can-focus">True</property>
-                        <property name="receives-default">False</property>
-                        <property name="halign">start</property>
-                        <property name="valign">start</property>
-                        <property name="draw-indicator">True</property>
-                        <property name="group">rbButton1</property>
-                      </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">True</property>
-                        <property name="position">5</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkRadioButton" id="rbButton6">
-                        <property name="label" translatable="yes" 
context="ToolbarmodeDialog|radiobutton6">Groupedbar</property>
-                        <property name="visible">True</property>
-                        <property name="can-focus">True</property>
-                        <property name="receives-default">False</property>
-                        <property name="halign">start</property>
-                        <property name="valign">start</property>
-                        <property name="draw-indicator">True</property>
-                        <property name="group">rbButton1</property>
-                      </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">True</property>
-                        <property name="position">6</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkRadioButton" id="rbButton7">
-                        <property name="label" translatable="yes" 
context="ToolbarmodeDialog|radiobutton7">Groupedbar Compact</property>
-                        <property name="visible">True</property>
-                        <property name="can-focus">True</property>
-                        <property name="receives-default">False</property>
-                        <property name="halign">start</property>
-                        <property name="valign">start</property>
-                        <property name="draw-indicator">True</property>
-                        <property name="group">rbButton1</property>
-                      </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">True</property>
-                        <property name="position">7</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkRadioButton" id="rbButton8">
-                        <property name="label" translatable="yes" 
context="ToolbarmodeDialog|radiobutton8">Contextual Single</property>
-                        <property name="visible">True</property>
-                        <property name="can-focus">True</property>
-                        <property name="receives-default">False</property>
-                        <property name="halign">start</property>
-                        <property name="valign">start</property>
-                        <property name="draw-indicator">True</property>
-                        <property name="group">rbButton1</property>
-                      </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">True</property>
-                        <property name="position">8</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkRadioButton" id="rbButton9">
-                        <property name="label" translatable="yes" 
context="ToolbarmodeDialog|radiobutton9">Contextual Groups</property>
-                        <property name="visible">True</property>
-                        <property name="can-focus">True</property>
-                        <property name="receives-default">False</property>
-                        <property name="halign">start</property>
-                        <property name="valign">start</property>
-                        <property name="draw-indicator">True</property>
-                        <property name="group">rbButton1</property>
-                      </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">True</property>
-                        <property name="position">9</property>
-                      </packing>
-                    </child>
-                  </object>
-                </child>
-                <child type="label">
-                  <object class="GtkLabel">
-                    <property name="visible">True</property>
-                    <property name="can-focus">False</property>
-                    <property name="label" translatable="yes" 
context="ToolbarmodeDialog|leftframe">UI variants</property>
-                    <attributes>
-                      <attribute name="weight" value="bold"/>
-                    </attributes>
-                  </object>
+                  <placeholder/>
                 </child>
               </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">0</property>
-              </packing>
             </child>
-            <child>
-              <object class="GtkFrame">
+            <child type="tab">
+              <object class="GtkLabel" id="uimode">
                 <property name="visible">True</property>
                 <property name="can-focus">False</property>
-                <property name="margin-start">12</property>
-                <property name="margin-end">12</property>
-                <property name="label-xalign">0</property>
-                <property name="shadow-type">none</property>
-                <child>
-                  <object class="GtkBox">
-                    <property name="visible">True</property>
-                    <property name="can-focus">False</property>
-                    <property name="margin-start">12</property>
-                    <property name="margin-top">6</property>
-                    <property name="orientation">vertical</property>
-                    <property name="spacing">12</property>
-                    <property name="baseline-position">top</property>
-                    <child>
-                      <object class="GtkImage" id="imImage">
-                        <property name="height-request">125</property>
-                        <property name="visible">True</property>
-                        <property name="can-focus">False</property>
-                        <property name="halign">center</property>
-                        <property name="valign">start</property>
-                        <property name="vexpand">True</property>
-                        <property name="icon-name">missing-image</property>
-                      </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                        <property name="position">0</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkScrolledWindow">
-                        <property name="width-request">436</property>
-                        <property name="height-request">100</property>
-                        <property name="visible">True</property>
-                        <property name="can-focus">True</property>
-                        <child>
-                          <object class="GtkViewport">
-                            <property name="visible">True</property>
-                            <property name="can-focus">False</property>
-                            <child>
-                              <object class="GtkLabel" id="lbInfo">
-                                <property name="visible">True</property>
-                                <property name="can-focus">False</property>
-                                <property name="valign">start</property>
-                                <property name="vexpand">True</property>
-                                <property name="label">Information:</property>
-                                <property name="wrap">True</property>
-                                <property name="wrap-mode">word-char</property>
-                                <property name="max-width-chars">50</property>
-                                <property name="xalign">0</property>
-                                <attributes>
-                                  <attribute name="scale" 
value="0.90000000000000002"/>
-                                </attributes>
-                              </object>
-                            </child>
-                          </object>
-                        </child>
-                      </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">True</property>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                  </object>
-                </child>
-                <child type="label">
-                  <object class="GtkLabel">
-                    <property name="visible">True</property>
-                    <property name="can-focus">False</property>
-                    <property name="label" translatable="yes" 
context="ToolbarmodeDialog|rightframe">Preview</property>
-                    <attributes>
-                      <attribute name="weight" value="bold"/>
-                    </attributes>
-                  </object>
-                </child>
+                <property name="label" translatable="yes" 
context="toolbarmodedialog|uimode">User Interface</property>
               </object>
               <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">1</property>
+                <property name="tab-fill">False</property>
               </packing>
             </child>
           </object>
           <packing>
             <property name="expand">False</property>
             <property name="fill">True</property>
-            <property name="position">0</property>
+            <property name="position">1</property>
           </packing>
         </child>
       </object>
     </child>
     <action-widgets>
-      <action-widget response="-5">btnApplyAll</action-widget>
-      <action-widget response="-5">btnApply</action-widget>
-      <action-widget response="-7">close</action-widget>
+      <action-widget response="101">reset</action-widget>
+      <action-widget response="-5">ok</action-widget>
+      <action-widget response="-6">cancel</action-widget>
       <action-widget response="-11">help</action-widget>
+      <action-widget response="102">apply</action-widget>
     </action-widgets>
+    <child internal-child="accessible">
+      <object class="AtkObject" id="ToolbarModeDialog-atkobject">
+        <property name="AtkObject::accessible-description" translatable="yes" 
context="toolbarmodedialog|extended_tip|ToolbarModeDialog">Sets the fill 
properties of the selected drawing object.</property>
+      </object>
+    </child>
   </object>
 </interface>
diff --git a/cui/uiconfig/ui/uitabpage.ui b/cui/uiconfig/ui/uitabpage.ui
new file mode 100644
index 000000000000..4c9a1b4f5a59
--- /dev/null
+++ b/cui/uiconfig/ui/uitabpage.ui
@@ -0,0 +1,307 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.40.0 -->
+<interface domain="cui">
+  <requires lib="gtk+" version="3.20"/>
+  <object class="GtkBox" id="UITabPage">
+    <property name="visible">True</property>
+    <property name="can-focus">False</property>
+    <child>
+      <object class="GtkFrame">
+        <property name="visible">True</property>
+        <property name="can-focus">False</property>
+        <property name="margin-start">12</property>
+        <property name="margin-end">12</property>
+        <property name="margin-top">12</property>
+        <property name="label-xalign">0</property>
+        <property name="shadow-type">none</property>
+        <child>
+          <object class="GtkBox">
+            <property name="visible">True</property>
+            <property name="can-focus">False</property>
+            <property name="margin-start">12</property>
+            <property name="margin-top">6</property>
+            <property name="orientation">vertical</property>
+            <property name="spacing">3</property>
+            <child>
+              <object class="GtkRadioButton" id="rbButton1">
+                <property name="label" translatable="yes" 
context="ToolbarmodeDialog|radiobutton1">Standard Toolbar</property>
+                <property name="visible">True</property>
+                <property name="can-focus">True</property>
+                <property name="receives-default">False</property>
+                <property name="halign">start</property>
+                <property name="valign">start</property>
+                <property name="active">True</property>
+                <property name="draw-indicator">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkRadioButton" id="rbButton2">
+                <property name="label" translatable="yes" 
context="ToolbarmodeDialog|radiobutton2">Tabbed</property>
+                <property name="visible">True</property>
+                <property name="can-focus">True</property>
+                <property name="receives-default">False</property>
+                <property name="halign">start</property>
+                <property name="valign">start</property>
+                <property name="draw-indicator">True</property>
+                <property name="group">rbButton1</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkSeparator">
+                <property name="visible">True</property>
+                <property name="can-focus">False</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkRadioButton" id="rbButton3">
+                <property name="label" translatable="yes" 
context="ToolbarmodeDialog|radiobutton3">Single Toolbar</property>
+                <property name="visible">True</property>
+                <property name="can-focus">True</property>
+                <property name="receives-default">False</property>
+                <property name="halign">start</property>
+                <property name="valign">start</property>
+                <property name="draw-indicator">True</property>
+                <property name="group">rbButton1</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">3</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkRadioButton" id="rbButton4">
+                <property name="label" translatable="yes" 
context="ToolbarmodeDialog|radiobutton4">Sidebar</property>
+                <property name="visible">True</property>
+                <property name="can-focus">True</property>
+                <property name="receives-default">False</property>
+                <property name="halign">start</property>
+                <property name="valign">start</property>
+                <property name="draw-indicator">True</property>
+                <property name="group">rbButton1</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">4</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkRadioButton" id="rbButton5">
+                <property name="label" translatable="yes" 
context="ToolbarmodeDialog|radiobutton5">Tabbed Compact</property>
+                <property name="visible">True</property>
+                <property name="can-focus">True</property>
+                <property name="receives-default">False</property>
+                <property name="halign">start</property>
+                <property name="valign">start</property>
+                <property name="draw-indicator">True</property>
+                <property name="group">rbButton1</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">5</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkRadioButton" id="rbButton6">
+                <property name="label" translatable="yes" 
context="ToolbarmodeDialog|radiobutton6">Groupedbar</property>
+                <property name="visible">True</property>
+                <property name="can-focus">True</property>
+                <property name="receives-default">False</property>
+                <property name="halign">start</property>
+                <property name="valign">start</property>
+                <property name="draw-indicator">True</property>
+                <property name="group">rbButton1</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">6</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkRadioButton" id="rbButton7">
+                <property name="label" translatable="yes" 
context="ToolbarmodeDialog|radiobutton7">Groupedbar Compact</property>
+                <property name="visible">True</property>
+                <property name="can-focus">True</property>
+                <property name="receives-default">False</property>
+                <property name="halign">start</property>
+                <property name="valign">start</property>
+                <property name="draw-indicator">True</property>
+                <property name="group">rbButton1</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">7</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkRadioButton" id="rbButton8">
+                <property name="label" translatable="yes" 
context="ToolbarmodeDialog|radiobutton8">Contextual Single</property>
+                <property name="visible">True</property>
+                <property name="can-focus">True</property>
+                <property name="receives-default">False</property>
+                <property name="halign">start</property>
+                <property name="valign">start</property>
+                <property name="draw-indicator">True</property>
+                <property name="group">rbButton1</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">8</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkRadioButton" id="rbButton9">
+                <property name="label" translatable="yes" 
context="ToolbarmodeDialog|radiobutton9">Contextual Groups</property>
+                <property name="visible">True</property>
+                <property name="can-focus">True</property>
+                <property name="receives-default">False</property>
+                <property name="halign">start</property>
+                <property name="valign">start</property>
+                <property name="draw-indicator">True</property>
+                <property name="group">rbButton1</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">9</property>
+              </packing>
+            </child>
+          </object>
+        </child>
+        <child type="label">
+          <object class="GtkLabel">
+            <property name="visible">True</property>
+            <property name="can-focus">False</property>
+            <property name="label" translatable="yes" 
context="ToolbarmodeDialog|leftframe">Options</property>
+            <attributes>
+              <attribute name="weight" value="bold"/>
+            </attributes>
+          </object>
+        </child>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">True</property>
+        <property name="position">0</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkFrame">
+        <property name="visible">True</property>
+        <property name="can-focus">False</property>
+        <property name="margin-start">12</property>
+        <property name="margin-end">12</property>
+        <property name="margin-top">12</property>
+        <property name="label-xalign">0</property>
+        <property name="shadow-type">none</property>
+        <child>
+          <object class="GtkBox">
+            <property name="visible">True</property>
+            <property name="can-focus">False</property>
+            <property name="margin-start">12</property>
+            <property name="margin-top">6</property>
+            <property name="orientation">vertical</property>
+            <property name="spacing">12</property>
+            <property name="baseline-position">top</property>
+            <child>
+              <object class="GtkImage" id="imImage">
+                <property name="height-request">125</property>
+                <property name="visible">True</property>
+                <property name="can-focus">False</property>
+                <property name="halign">center</property>
+                <property name="valign">start</property>
+                <property name="vexpand">True</property>
+                <property name="icon-name">missing-image</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkScrolledWindow">
+                <property name="width-request">436</property>
+                <property name="height-request">100</property>
+                <property name="visible">True</property>
+                <property name="can-focus">True</property>
+                <child>
+                  <object class="GtkViewport">
+                    <property name="visible">True</property>
+                    <property name="can-focus">False</property>
+                    <child>
+                      <object class="GtkLabel" id="lbInfo">
+                        <property name="visible">True</property>
+                        <property name="can-focus">False</property>
+                        <property name="valign">start</property>
+                        <property name="vexpand">True</property>
+                        <property name="label">Information:</property>
+                        <property name="wrap">True</property>
+                        <property name="wrap-mode">word-char</property>
+                        <property name="max-width-chars">50</property>
+                        <property name="xalign">0</property>
+                        <attributes>
+                          <attribute name="scale" value="0.90000000000000002"/>
+                        </attributes>
+                        <child internal-child="accessible">
+                          <object class="AtkObject" id="lbInfo-atkobject">
+                            <property 
name="AtkObject::accessible-role">static</property>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child internal-child="accessible">
+              <object class="AtkObject">
+                <property name="AtkObject::accessible-role">static</property>
+              </object>
+            </child>
+          </object>
+        </child>
+        <child type="label">
+          <object class="GtkLabel">
+            <property name="visible">True</property>
+            <property name="can-focus">False</property>
+            <property name="label" translatable="yes" 
context="ToolbarmodeDialog|rightframe">Preview</property>
+            <attributes>
+              <attribute name="weight" value="bold"/>
+            </attributes>
+          </object>
+        </child>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">True</property>
+        <property name="position">1</property>
+      </packing>
+    </child>
+  </object>
+</interface>
diff --git a/solenv/sanitizers/ui/cui.suppr b/solenv/sanitizers/ui/cui.suppr
index 4254c0c013ac..4ed2095fb546 100644
--- a/solenv/sanitizers/ui/cui.suppr
+++ b/solenv/sanitizers/ui/cui.suppr
@@ -200,7 +200,6 @@ 
cui/uiconfig/ui/textanimtabpage.ui://GtkLabel[@id='FT_DELAY'] orphan-label
 cui/uiconfig/ui/textflowpage.ui://GtkLabel[@id='labelOrphan'] orphan-label
 cui/uiconfig/ui/textflowpage.ui://GtkLabel[@id='labelWidow'] orphan-label
 cui/uiconfig/ui/thesaurus.ui://GtkLabel[@id='notfound'] orphan-label
-cui/uiconfig/ui/toolbarmodedialog.ui://GtkLabel[@id='lbInfo'] orphan-label
 cui/uiconfig/ui/tsaurldialog.ui://GtkLabel[@id='label2'] orphan-label
 cui/uiconfig/ui/tsaurldialog.ui://GtkLabel[@id='enteraurl'] orphan-label
 cui/uiconfig/ui/twolinespage.ui://GtkLabel[@id='label29'] orphan-label

Reply via email to