[Libreoffice-commits] core.git: cui/source cui/uiconfig extras/source include/sfx2 include/vcl sc/source sc/uiconfig sd/source sd/uiconfig sfx2/source solenv/bin solenv/sanitizers svx/uiconfig sw/source sw/uiconfig vcl/source vcl/unx

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Fri Sep 20 19:22:17 UTC 2019


 cui/source/factory/dlgfact.cxx                   |   42 -
 cui/source/factory/dlgfact.hxx                   |    9 
 cui/source/inc/treeopt.hxx                       |   57 +-
 cui/source/options/fontsubs.cxx                  |    4 
 cui/source/options/optjava.cxx                   |    7 
 cui/source/options/personalization.cxx           |   17 
 cui/source/options/personalization.hxx           |    2 
 cui/source/options/treeopt.cxx                   |  510 +++++++++--------------
 cui/uiconfig/ui/opthtmlpage.ui                   |   56 --
 cui/uiconfig/ui/optionsdialog.ui                 |   41 +
 cui/uiconfig/ui/optlanguagespage.ui              |   27 -
 cui/uiconfig/ui/optpathspage.ui                  |   19 
 cui/uiconfig/ui/optsavepage.ui                   |    2 
 cui/uiconfig/ui/optsecuritypage.ui               |   55 +-
 cui/uiconfig/ui/personalization_tab.ui           |   50 --
 extras/source/glade/libreoffice-catalog.xml.in   |   21 
 include/sfx2/sfxdlg.hxx                          |    2 
 include/sfx2/tabdlg.hxx                          |    6 
 include/vcl/abstdlg.hxx                          |    2 
 include/vcl/weld.hxx                             |    7 
 sc/source/ui/docshell/docsh4.cxx                 |    2 
 sc/uiconfig/scalc/ui/tpviewpage.ui               |   89 ----
 sd/source/ui/docshell/docshel3.cxx               |    2 
 sd/uiconfig/simpress/ui/optimpressgeneralpage.ui |    2 
 sfx2/source/appl/appserv.cxx                     |    2 
 solenv/bin/native-code.py                        |    1 
 solenv/sanitizers/ui/cui.suppr                   |   18 
 svx/uiconfig/ui/optgridpage.ui                   |    5 
 sw/source/uibase/shells/langhelper.cxx           |    2 
 sw/source/uibase/shells/textsh1.cxx              |    2 
 sw/uiconfig/swriter/ui/mailconfigpage.ui         |    5 
 sw/uiconfig/swriter/ui/optcompatpage.ui          |    4 
 sw/uiconfig/swriter/ui/optfonttabpage.ui         |    3 
 sw/uiconfig/swriter/ui/optredlinepage.ui         |   16 
 vcl/source/app/salvtables.cxx                    |    6 
 vcl/unx/gtk3/gtk3gtkframe.cxx                    |   34 -
 vcl/unx/gtk3/gtk3gtkinst.cxx                     |   59 ++
 37 files changed, 539 insertions(+), 649 deletions(-)

New commits:
commit 94d6fa11d086187b82adf9aa596e0f334827e095
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Sep 17 12:50:05 2019 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Sep 20 21:20:51 2019 +0200

    weld OfaTreeOptionsDialog
    
    including ability to host a vcl::Window based XWindow hierarchy inside
    a native widget, e.g. the dictionary extensions have option pages
    
    Change-Id: I17d933bac12679e10164214a9045b677291a6557
    Reviewed-on: https://gerrit.libreoffice.org/79070
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index 289c79ccf8be..7608d9f8cd3e 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -108,8 +108,6 @@ short CuiAbstractSingleTabController_Impl::Execute()
     return m_xDlg->run();
 }
 
-IMPL_ABSTDLG_BASE(CuiVclAbstractDialog_Impl)
-
 short AbstractSvxDistributeDialog_Impl::Execute()
 {
     return m_xDlg->run();
@@ -948,9 +946,9 @@ bool AbstractPasswordToOpenModifyDialog_Impl::IsRecommendToOpenReadonly() const
 }
 
 // Create dialogs with simplest interface
-VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateVclDialog( vcl::Window* pParent, sal_uInt32 nResId )
+VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateVclDialog(weld::Window* pParent, sal_uInt32 nResId)
 {
-    VclPtr<Dialog> pDlg;
+    std::unique_ptr<OfaTreeOptionsDialog> xDlg;
     switch ( nResId )
     {
         case SID_OPTIONS_TREEDIALOG :
@@ -961,25 +959,24 @@ VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateVclDialog( vcl::Wind
             if (nResId == SID_OPTIONS_TREEDIALOG)
                 bActivateLastSelection = true;
             Reference< frame::XFrame > xFrame;
-            VclPtrInstance<OfaTreeOptionsDialog> pOptDlg( pParent, xFrame, bActivateLastSelection );
+            xDlg = std::make_unique<OfaTreeOptionsDialog>(pParent, xFrame, bActivateLastSelection);
             if (nResId == SID_OPTIONS_DATABASES)
             {
-                pOptDlg->ActivatePage(SID_SB_DBREGISTEROPTIONS);
+                xDlg->ActivatePage(SID_SB_DBREGISTEROPTIONS);
             }
             else if (nResId == SID_LANGUAGE_OPTIONS)
             {
                 //open the tab page "tools/options/languages"
-                pOptDlg->ActivatePage(OFA_TP_LANGUAGES_FOR_SET_DOCUMENT_LANGUAGE);
+                xDlg->ActivatePage(OFA_TP_LANGUAGES_FOR_SET_DOCUMENT_LANGUAGE);
             }
-            pDlg.reset(pOptDlg);
         }
         break;
         default:
             break;
     }
 
-    if ( pDlg )
-        return VclPtr<CuiVclAbstractDialog_Impl>::Create( pDlg );
+    if (xDlg)
+        return VclPtr<CuiAbstractController_Impl>::Create(std::move(xDlg));
     return nullptr;
 }
 
@@ -988,26 +985,24 @@ VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateAboutDialog(weld::Wi
     return VclPtr<CuiAbstractController_Impl>::Create(std::make_unique<AboutDialog>(pParent));
 }
 
-VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateFrameDialog(vcl::Window* pParent, const Reference< frame::XFrame >& rxFrame,
+VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateFrameDialog(weld::Window* pParent, const Reference< frame::XFrame >& rxFrame,
     sal_uInt32 nResId, const OUString& rParameter )
 {
-    VclPtr<Dialog> pDlg;
-    if ( SID_OPTIONS_TREEDIALOG == nResId || SID_OPTIONS_DATABASES == nResId )
+    std::unique_ptr<OfaTreeOptionsDialog> xDlg;
+    if (SID_OPTIONS_TREEDIALOG == nResId || SID_OPTIONS_DATABASES == nResId)
     {
         // only activate last page if we don't want to activate a special page
         bool bActivateLastSelection = ( nResId != SID_OPTIONS_DATABASES && rParameter.isEmpty() );
-        VclPtrInstance<OfaTreeOptionsDialog> pOptDlg(pParent, rxFrame, bActivateLastSelection);
+        xDlg = std::make_unique<OfaTreeOptionsDialog>(pParent, rxFrame, bActivateLastSelection);
         if ( nResId == SID_OPTIONS_DATABASES )
-            pOptDlg->ActivatePage(SID_SB_DBREGISTEROPTIONS);
+            xDlg->ActivatePage(SID_SB_DBREGISTEROPTIONS);
         else if ( !rParameter.isEmpty() )
-            pOptDlg->ActivatePage( rParameter );
-        pDlg.reset(pOptDlg);
+            xDlg->ActivatePage( rParameter );
     }
 
-    if ( pDlg )
-        return VclPtr<CuiVclAbstractDialog_Impl>::Create( pDlg );
-    else
-        return nullptr;
+    if (xDlg)
+        return VclPtr<CuiAbstractController_Impl>::Create(std::move(xDlg));
+    return nullptr;
 }
 
 // TabDialog outside the drawing layer
@@ -1594,10 +1589,9 @@ VclPtr<SvxAbstractNewTableDialog> AbstractDialogFactory_Impl::CreateSvxNewTableD
     return VclPtr<SvxNewTableDialog>::Create(pParent);
 }
 
-VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateOptionsDialog(
-    weld::Window* /*pParent*/, const OUString& rExtensionId )
+VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateOptionsDialog(weld::Window* pParent, const OUString& rExtensionId)
 {
-    return VclPtr<CuiVclAbstractDialog_Impl>::Create( VclPtr<OfaTreeOptionsDialog>::Create(nullptr /* TODO: pParent*/, rExtensionId ) );
+    return VclPtr<CuiAbstractController_Impl>::Create(std::make_unique<OfaTreeOptionsDialog>(pParent, rExtensionId));
 }
 
 VclPtr<SvxAbstractInsRowColDlg> AbstractDialogFactory_Impl::CreateSvxInsRowColDlg(weld::Window* pParent, bool bCol, const OString& rHelpId)
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index 7d579b22ae20..dab0e9ae43d0 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -112,11 +112,6 @@ bool Class::StartExecuteAsync(VclAbstractDialog::AsyncContext &rCtx) \
     return pDlg->StartExecuteAsync(rCtx);           \
 }
 
-class CuiVclAbstractDialog_Impl : public VclAbstractDialog
-{
-    DECL_ABSTDLG_BASE(CuiVclAbstractDialog_Impl,Dialog)
-};
-
 class CuiAbstractController_Impl : public VclAbstractDialog
 {
     std::unique_ptr<weld::DialogController> m_xDlg;
@@ -761,7 +756,7 @@ public:
 class AbstractDialogFactory_Impl : public SvxAbstractDialogFactory
 {
 public:
-    virtual VclPtr<VclAbstractDialog>    CreateVclDialog( vcl::Window* pParent, sal_uInt32 nResId ) override;
+    virtual VclPtr<VclAbstractDialog>    CreateVclDialog(weld::Window* pParent, sal_uInt32 nResId) override;
 
     virtual VclPtr<VclAbstractDialog>    CreateAboutDialog(weld::Window* pParent) override;
 
@@ -775,7 +770,7 @@ public:
     virtual VclPtr<SfxAbstractDialog>    CreateEventConfigDialog(weld::Widget* pParent,
                                                                  const SfxItemSet& rAttr,
                                                                  const css::uno::Reference< css::frame::XFrame >& rFrame) override;
-    virtual VclPtr<VclAbstractDialog>    CreateFrameDialog(vcl::Window* pParent, const css::uno::Reference< css::frame::XFrame >& rxFrame,
+    virtual VclPtr<VclAbstractDialog>    CreateFrameDialog(weld::Window* pParent, const css::uno::Reference< css::frame::XFrame >& rxFrame,
                                                            sal_uInt32 nResId,
                                                            const OUString& rParameter ) override;
     virtual VclPtr<SfxAbstractTabDialog> CreateAutoCorrTabDialog(weld::Window* pParent, const SfxItemSet* pAttrSet) override;
diff --git a/cui/source/inc/treeopt.hxx b/cui/source/inc/treeopt.hxx
index 9afb955b8e70..a70e984bb3c1 100644
--- a/cui/source/inc/treeopt.hxx
+++ b/cui/source/inc/treeopt.hxx
@@ -116,19 +116,19 @@ struct Module;
 class ExtensionsTabPage;
 class SvxColorTabPage;
 
-class OfaTreeOptionsDialog final: public SfxModalDialog
+class OfaTreeOptionsDialog final: public SfxOkDialogController
 {
 private:
-    VclPtr<OKButton>       pOkPB;
-    VclPtr<PushButton>     pApplyPB;
-    VclPtr<PushButton>     pBackPB;
+    std::unique_ptr<weld::Button> xOkPB;
+    std::unique_ptr<weld::Button> xApplyPB;
+    std::unique_ptr<weld::Button> xBackPB;
 
-    VclPtr<SvTreeListBox>  pTreeLB;
-    VclPtr<VclBox>         pTabBox;
+    std::unique_ptr<weld::TreeView> xTreeLB;
+    std::unique_ptr<weld::Container> xTabBox;
 
-    VclPtr<vcl::Window>    m_pParent;
+    weld::Window*    m_pParent;
 
-    SvTreeListEntry*       pCurrentPageEntry;
+    std::unique_ptr<weld::TreeIter> xCurrentPageEntry;
 
     OUString               sTitle;
 
@@ -161,23 +161,23 @@ private:
 
     void            ApplyOptions( bool deactivate );
 
-    DECL_STATIC_LINK(OfaTreeOptionsDialog, ExpandedHdl_Impl, SvTreeListBox*, void );
-    DECL_LINK(ShowPageHdl_Impl, SvTreeListBox*, void);
-    DECL_LINK(BackHdl_Impl, Button*, void);
-    DECL_LINK(ApplyHdl_Impl, Button*, void);
-    DECL_LINK(OKHdl_Impl, Button*, void);
+    DECL_LINK(ShowPageHdl_Impl, weld::TreeView&, void);
+    DECL_LINK(BackHdl_Impl, weld::Button&, void);
+    DECL_LINK(ApplyHdl_Impl, weld::Button&, void);
+    DECL_LINK(OKHdl_Impl, weld::Button&, void);
     void SelectHdl_Impl();
 
-    virtual bool    EventNotify( NotifyEvent& rNEvt ) override;
-    virtual short   Execute() override;
+    virtual short run() override;
+
+    virtual weld::Button& GetOKButton() const override { return *xOkPB; }
+    virtual const SfxItemSet* GetExampleSet() const override { return nullptr; }
 
 public:
-    OfaTreeOptionsDialog( vcl::Window* pParent,
+    OfaTreeOptionsDialog(weld::Window* pParent,
         const css::uno::Reference< css::frame::XFrame >& _xFrame,
-        bool bActivateLastSelection );
-    OfaTreeOptionsDialog( vcl::Window* pParent, const OUString& rExtensionId );
+        bool bActivateLastSelection);
+    OfaTreeOptionsDialog(weld::Window* pParent, const OUString& rExtensionId);
     virtual ~OfaTreeOptionsDialog() override;
-    virtual void dispose() override;
 
     OptionsPageInfo*    AddTabPage( sal_uInt16 nId, const OUString& rPageName, sal_uInt16 nGroup );
     sal_uInt16              AddGroup(   const OUString& rGroupName,  SfxShell* pCreateShell,
@@ -199,12 +199,13 @@ public:
 namespace com { namespace sun { namespace star { namespace awt { class XWindow; } } } }
 namespace com { namespace sun { namespace star { namespace awt { class XContainerWindowEventHandler; } } } }
 
-class ExtensionsTabPage : public TabPage
+class ExtensionsTabPage
 {
 private:
+    weld::Container* m_pContainer;
     OUString       m_sPageURL;
-    css::uno::Reference< css::awt::XWindow >
-                        m_xPage;
+    css::uno::Reference<css::awt::XWindow> m_xPageParent;
+    css::uno::Reference<css::awt::XWindow> m_xPage;
     OUString       m_sEventHdl;
     css::uno::Reference< css::awt::XContainerWindowEventHandler >
                         m_xEventHdl;
@@ -216,16 +217,18 @@ private:
 
 public:
     ExtensionsTabPage(
-        vcl::Window* pParent, WinBits nStyle,
+        weld::Container* pParent,
         const OUString& rPageURL, const OUString& rEvtHdl,
         const css::uno::Reference<
             css::awt::XContainerWindowProvider >& rProvider );
 
-    virtual ~ExtensionsTabPage() override;
-    virtual void dispose() override;
+    ~ExtensionsTabPage();
+
+    void Show();
+    void Hide();
 
-    virtual void    ActivatePage() override;
-    virtual void    DeactivatePage() override;
+    void    ActivatePage();
+    void    DeactivatePage();
 
     void            ResetPage();
     void            SavePage();
diff --git a/cui/source/options/fontsubs.cxx b/cui/source/options/fontsubs.cxx
index 8fad18ebdcfa..b7ffaeabd6a9 100644
--- a/cui/source/options/fontsubs.cxx
+++ b/cui/source/options/fontsubs.cxx
@@ -121,8 +121,8 @@ IMPL_LINK(SvxFontSubstTabPage, HeaderBarClick, int, nColumn, void)
 
 void SvxFontSubstTabPage::setColSizes()
 {
-    int nW1 = m_xCheckLB->get_pixel_size(m_xCheckLB->get_column_title(4)).Width();
-    int nW2 = m_xCheckLB->get_pixel_size(m_xCheckLB->get_column_title(5)).Width();
+    int nW1 = m_xCheckLB->get_pixel_size(m_xCheckLB->get_column_title(3)).Width();
+    int nW2 = m_xCheckLB->get_pixel_size(m_xCheckLB->get_column_title(4)).Width();
     int nMax = std::max( nW1, nW2 ) + 6; // width of the longest header + a little offset
     int nMin = m_xCheckLB->get_checkbox_column_width();
     nMax = std::max(nMax, nMin);
diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index 41234bfe0e31..5f536acf4d37 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -470,9 +470,9 @@ void SvxJavaOptionsPage::AddFolder( const OUString& _rFolder )
 
 void SvxJavaOptionsPage::RequestRestart(svtools::RestartReason eReason)
 {
-    VclPtr<OfaTreeOptionsDialog> xParentDlg(static_cast<OfaTreeOptionsDialog*>(GetParentDialog()));
-    if (xParentDlg)
-        xParentDlg->SetNeedsRestart(eReason);
+    OfaTreeOptionsDialog* pParentDlg(static_cast<OfaTreeOptionsDialog*>(GetDialogController()));
+    if (pParentDlg)
+        pParentDlg->SetNeedsRestart(eReason);
 }
 
 VclPtr<SfxTabPage> SvxJavaOptionsPage::Create( TabPageParent pParent, const SfxItemSet* rAttrSet )
@@ -480,7 +480,6 @@ VclPtr<SfxTabPage> SvxJavaOptionsPage::Create( TabPageParent pParent, const SfxI
     return VclPtr<SvxJavaOptionsPage>::Create( pParent, *rAttrSet );
 }
 
-
 bool SvxJavaOptionsPage::FillItemSet( SfxItemSet* /*rCoreSet*/ )
 {
     bool bModified = false;
diff --git a/cui/source/options/personalization.cxx b/cui/source/options/personalization.cxx
index ae06e77abf5d..8767c856482a 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -20,6 +20,7 @@
 #include <vcl/svapp.hxx>
 #include <vcl/settings.hxx>
 #include <vcl/graphicfilter.hxx>
+#include <vcl/virdev.hxx>
 
 #include <vector>
 
@@ -36,7 +37,7 @@ SvxPersonalizationTabPage::SvxPersonalizationTabPage(TabPageParent pParent, cons
     for (sal_uInt32 i = 0; i < MAX_DEFAULT_PERSONAS; ++i)
     {
         OString sDefaultId("default" + OString::number(i));
-        m_vDefaultPersonaImages[i] = m_xBuilder->weld_button(sDefaultId);
+        m_vDefaultPersonaImages[i] = m_xBuilder->weld_toggle_button(sDefaultId);
         m_vDefaultPersonaImages[i]->connect_clicked(
             LINK(this, SvxPersonalizationTabPage, DefaultPersona));
     }
@@ -137,7 +138,17 @@ void SvxPersonalizationTabPage::LoadDefaultImages()
 
         INetURLObject aURLObj(gallery + aPreviewFile);
         aFilter.ImportGraphic(aGraphic, aURLObj);
-        m_vDefaultPersonaImages[nIndex]->set_image(aGraphic.GetXGraphic());
+
+        Size aSize(aGraphic.GetSizePixel());
+        aSize.setWidth(aSize.Width() / 4);
+        aSize.setHeight(aSize.Height() / 1.5);
+        ScopedVclPtr<VirtualDevice> xVirDev
+            = m_vDefaultPersonaImages[nIndex]->create_virtual_device();
+        xVirDev->SetOutputSizePixel(aSize);
+        aGraphic.Draw(xVirDev.get(), Point(0, 0));
+        m_vDefaultPersonaImages[nIndex]->set_image(xVirDev.get());
+        xVirDev.disposeAndClear();
+
         m_vDefaultPersonaImages[nIndex]->set_tooltip_text(aName);
         m_vDefaultPersonaImages[nIndex++]->show();
         foundOne = true;
@@ -153,6 +164,8 @@ IMPL_LINK(SvxPersonalizationTabPage, DefaultPersona, weld::Button&, rButton, voi
     {
         if (&rButton == m_vDefaultPersonaImages[nIndex].get())
             m_aPersonaSettings = m_vDefaultPersonaSettings[nIndex];
+        else
+            m_vDefaultPersonaImages[nIndex]->set_active(false);
     }
 }
 
diff --git a/cui/source/options/personalization.hxx b/cui/source/options/personalization.hxx
index 09fb7956003e..9317041409e0 100644
--- a/cui/source/options/personalization.hxx
+++ b/cui/source/options/personalization.hxx
@@ -22,7 +22,7 @@ class SvxPersonalizationTabPage : public SfxTabPage
 private:
     std::unique_ptr<weld::RadioButton> m_xNoPersona; ///< Just the default look, without any bitmap
     std::unique_ptr<weld::RadioButton> m_xDefaultPersona; ///< Use the built-in bitmap
-    std::unique_ptr<weld::Button> m_vDefaultPersonaImages
+    std::unique_ptr<weld::ToggleButton> m_vDefaultPersonaImages
         [MAX_DEFAULT_PERSONAS]; ///< Buttons to show the default persona images
     OUString m_aPersonaSettings; ///< Header and footer images + color to be set in the settings.
 
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index 8b593e86c362..42bd20cac460 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -444,9 +444,9 @@ struct OptionsPageInfo
     sal_uInt16          m_nPageId;
     OUString       m_sPageURL;
     OUString       m_sEventHdl;
-    VclPtr<ExtensionsTabPage>  m_pExtPage;
+    std::unique_ptr<ExtensionsTabPage>  m_xExtPage;
 
-    explicit OptionsPageInfo( sal_uInt16 nId ) : m_pPage( nullptr ), m_nPageId( nId ), m_pExtPage( nullptr ) {}
+    explicit OptionsPageInfo( sal_uInt16 nId ) : m_pPage( nullptr ), m_nPageId( nId ) {}
 };
 
 struct OptionsGroupInfo
@@ -463,46 +463,36 @@ struct OptionsGroupInfo
 };
 
 #define INI_LIST() \
-    m_pParent           ( pParent ),\
-    pCurrentPageEntry   ( nullptr ),\
-    sTitle              ( GetText() ),\
-    bForgetSelection    ( false ),\
-    bIsFromExtensionManager( false ), \
-    bIsForSetDocumentLanguage( false ), \
-    bNeedsRestart ( false ), \
-    eRestartReason( svtools::RESTART_REASON_NONE )
+    , m_pParent           ( pParent )\
+    , sTitle              ( m_xDialog->get_title() )\
+    , bForgetSelection    ( false )\
+    , bIsFromExtensionManager( false ) \
+    , bIsForSetDocumentLanguage( false ) \
+    , bNeedsRestart ( false ) \
+    , eRestartReason( svtools::RESTART_REASON_NONE )
 
 
 void OfaTreeOptionsDialog::InitWidgets()
 {
-    VclButtonBox *pButtonBox = get_action_area();
-    pButtonBox->sort_native_button_order();
-
-    get(pOkPB, "ok");
-    get(pApplyPB, "apply");
-    get(pBackPB, "revert");
-    get(pTreeLB, "pages");
-    get(pTabBox, "box");
-    Size aSize(pTabBox->LogicToPixel(Size(278, 259), MapMode(MapUnit::MapAppFont)));
-    pTabBox->set_width_request(aSize.Width());
+    xOkPB = m_xBuilder->weld_button("ok");
+    xApplyPB = m_xBuilder->weld_button("apply");
+    xBackPB = m_xBuilder->weld_button("revert");
+    xTreeLB = m_xBuilder->weld_tree_view("pages");
+    xTabBox = m_xBuilder->weld_container("box");
+    Size aSize(xTreeLB->get_approximate_digit_width() * 82, xTreeLB->get_height_rows(32));
 #if HAVE_FEATURE_GPGME
     // tdf#115015: make enough space for crypto settings (approx. 14 text edits + padding)
-    pTabBox->set_height_request((Edit::GetMinimumEditSize().Height() + 6) * 14);
+    aSize.setHeight((Edit::GetMinimumEditSize().Height() + 6) * 14);
 #else
-    pTabBox->set_height_request(aSize.Height() - get_action_area()->get_preferred_size().Height());
+    aSize.setHeight(aSize.Height() - get_action_area()->get_preferred_size().Height());
 #endif
-    pTreeLB->set_width_request(pTreeLB->approximate_char_width() * 25);
-    pTreeLB->set_height_request(pTabBox->get_height_request());
-
+    xTabBox->set_size_request(aSize.Width(), aSize.Height());
+    xTreeLB->set_size_request(xTreeLB->get_approximate_digit_width() * 30, aSize.Height());
 }
 
 // Ctor() with Frame -----------------------------------------------------
-OfaTreeOptionsDialog::OfaTreeOptionsDialog(
-    vcl::Window* pParent,
-    const Reference< XFrame >& _xFrame,
-    bool bActivateLastSelection ) :
-
-    SfxModalDialog( pParent, "OptionsDialog", "cui/ui/optionsdialog.ui" ),
+OfaTreeOptionsDialog::OfaTreeOptionsDialog(weld::Window* pParent, const Reference< XFrame >& _xFrame, bool bActivateLastSelection)
+    : SfxOkDialogController(pParent, "cui/ui/optionsdialog.ui", "OptionsDialog")
     INI_LIST()
 {
     InitWidgets();
@@ -513,13 +503,12 @@ OfaTreeOptionsDialog::OfaTreeOptionsDialog(
     if (bActivateLastSelection)
         ActivateLastSelection();
 
-    pTreeLB->SetAccessibleName(GetDisplayText());
+    xTreeLB->set_accessible_name(m_xDialog->get_title());
 }
 
 // Ctor() with ExtensionId -----------------------------------------------
-OfaTreeOptionsDialog::OfaTreeOptionsDialog( vcl::Window* pParent, const OUString& rExtensionId ) :
-
-    SfxModalDialog( pParent, "OptionsDialog", "cui/ui/optionsdialog.ui" ),
+OfaTreeOptionsDialog::OfaTreeOptionsDialog(weld::Window* pParent, const OUString& rExtensionId)
+    : SfxOkDialogController(pParent, "cui/ui/optionsdialog.ui", "OptionsDialog")
     INI_LIST()
 {
     InitWidgets();
@@ -532,20 +521,17 @@ OfaTreeOptionsDialog::OfaTreeOptionsDialog( vcl::Window* pParent, const OUString
 
 OfaTreeOptionsDialog::~OfaTreeOptionsDialog()
 {
-    disposeOnce();
-}
+    xCurrentPageEntry.reset();
 
-void OfaTreeOptionsDialog::dispose()
-{
-    pCurrentPageEntry = nullptr;
-    SvTreeListEntry* pEntry = pTreeLB ? pTreeLB->First() : nullptr;
+    std::unique_ptr<weld::TreeIter> xEntry = xTreeLB->make_iterator();
+    bool bEntry = xTreeLB->get_iter_first(*xEntry);
     // first children
-    while(pEntry)
+    while (bEntry)
     {
         // if Child (has parent), then OptionsPageInfo
-        if(pTreeLB->GetParent(pEntry))
+        if (xTreeLB->get_iter_depth(*xEntry))
         {
-            OptionsPageInfo *pPageInfo = static_cast<OptionsPageInfo *>(pEntry->GetUserData());
+            OptionsPageInfo *pPageInfo = reinterpret_cast<OptionsPageInfo*>(xTreeLB->get_id(*xEntry).toInt64());
             if(pPageInfo->m_pPage)
             {
                 pPageInfo->m_pPage->FillUserData();
@@ -568,42 +554,39 @@ void OfaTreeOptionsDialog::dispose()
                 }
             }
 
-            pPageInfo->m_pExtPage.disposeAndClear();
+            pPageInfo->m_xExtPage.reset();
 
             delete pPageInfo;
         }
-        pEntry = pTreeLB->Next(pEntry);
+        bEntry = xTreeLB->iter_next(*xEntry);
     }
 
     // and parents
-    pEntry = pTreeLB ? pTreeLB->First() : nullptr;
-    while(pEntry)
+    bEntry = xTreeLB->get_iter_first(*xEntry);
+    while (bEntry)
     {
-        if(!pTreeLB->GetParent(pEntry))
+        if (!xTreeLB->get_iter_depth(*xEntry))
         {
-            OptionsGroupInfo* pGroupInfo = static_cast<OptionsGroupInfo*>(pEntry->GetUserData());
+            OptionsGroupInfo* pGroupInfo = reinterpret_cast<OptionsGroupInfo*>(xTreeLB->get_id(*xEntry).toInt64());
             delete pGroupInfo;
         }
-        pEntry = pTreeLB->Next(pEntry);
+        bEntry = xTreeLB->iter_next(*xEntry);
     }
     deleteGroupNames();
-    m_pParent.clear();
-    pOkPB.clear();
-    pApplyPB.clear();
-    pBackPB.clear();
-    pTreeLB.clear();
-    pTabBox.clear();
-    SfxModalDialog::dispose();
 }
 
 OptionsPageInfo* OfaTreeOptionsDialog::AddTabPage(
     sal_uInt16 nId, const OUString& rPageName, sal_uInt16 nGroup )
 {
     OptionsPageInfo* pPageInfo = new OptionsPageInfo( nId );
-    SvTreeListEntry* pParent = pTreeLB->GetEntry( nullptr, nGroup );
-    DBG_ASSERT( pParent, "OfaTreeOptionsDialog::AddTabPage(): no group found" );
-    SvTreeListEntry* pEntry = pTreeLB->InsertEntry( rPageName, pParent );
-    pEntry->SetUserData( pPageInfo );
+
+    std::unique_ptr<weld::TreeIter> xParent = xTreeLB->make_iterator();
+    xTreeLB->get_iter_first(*xParent);
+    xTreeLB->iter_nth_sibling(*xParent, nGroup);
+
+    OUString sId(OUString::number(reinterpret_cast<sal_Int64>(pPageInfo)));;
+    xTreeLB->insert(xParent.get(), -1, &rPageName, &sId, nullptr, nullptr, nullptr, false, nullptr);
+
     return pPageInfo;
 }
 
@@ -613,64 +596,71 @@ sal_uInt16  OfaTreeOptionsDialog::AddGroup(const OUString& rGroupName,
                                         SfxModule* pCreateModule,
                                         sal_uInt16 nDialogId )
 {
-    SvTreeListEntry* pEntry = pTreeLB->InsertEntry(rGroupName);
     OptionsGroupInfo* pInfo =
         new OptionsGroupInfo( pCreateShell, pCreateModule, nDialogId );
-    pEntry->SetUserData(pInfo);
+    OUString sId(OUString::number(reinterpret_cast<sal_Int64>(pInfo)));;
+    xTreeLB->append(sId, rGroupName);
+
     sal_uInt16 nRet = 0;
-    pEntry = pTreeLB->First();
-    while(pEntry)
+    std::unique_ptr<weld::TreeIter> xEntry = xTreeLB->make_iterator();
+    bool bEntry = xTreeLB->get_iter_first(*xEntry);
+    while (bEntry)
     {
-        if(!pTreeLB->GetParent(pEntry))
+        if (!xTreeLB->get_iter_depth(*xEntry))
             nRet++;
-        pEntry = pTreeLB->Next(pEntry);
+        bEntry = xTreeLB->iter_next(*xEntry);
     }
     return nRet - 1;
 }
 
-IMPL_LINK_NOARG(OfaTreeOptionsDialog, ShowPageHdl_Impl, SvTreeListBox*, void)
+IMPL_LINK_NOARG(OfaTreeOptionsDialog, ShowPageHdl_Impl, weld::TreeView&, void)
 {
     SelectHdl_Impl();
 }
 
-IMPL_LINK_NOARG(OfaTreeOptionsDialog, BackHdl_Impl, Button*, void)
+IMPL_LINK_NOARG(OfaTreeOptionsDialog, BackHdl_Impl, weld::Button&, void)
 {
-    if ( pCurrentPageEntry && pTreeLB->GetParent( pCurrentPageEntry ) )
+    if (xCurrentPageEntry && xTreeLB->get_iter_depth(*xCurrentPageEntry))
     {
-        OptionsPageInfo* pPageInfo = static_cast<OptionsPageInfo*>(pCurrentPageEntry->GetUserData());
-        if ( pPageInfo->m_pPage )
+        OptionsPageInfo* pPageInfo = reinterpret_cast<OptionsPageInfo*>(xTreeLB->get_id(*xCurrentPageEntry).toInt64());
+        if (pPageInfo->m_pPage)
         {
+            std::unique_ptr<weld::TreeIter> xParent = xTreeLB->make_iterator(xCurrentPageEntry.get());
+            xTreeLB->iter_parent(*xParent);
             OptionsGroupInfo* pGroupInfo =
-                static_cast<OptionsGroupInfo*>(pTreeLB->GetParent( pCurrentPageEntry )->GetUserData());
+                reinterpret_cast<OptionsGroupInfo*>(xTreeLB->get_id(*xParent).toInt64());
             pPageInfo->m_pPage->Reset( pGroupInfo->m_pInItemSet.get() );
         }
-        else if ( pPageInfo->m_pExtPage )
-            pPageInfo->m_pExtPage->ResetPage();
+        else if ( pPageInfo->m_xExtPage )
+            pPageInfo->m_xExtPage->ResetPage();
     }
 }
 
 void OfaTreeOptionsDialog::ApplyOptions(bool deactivate)
 {
-    SvTreeListEntry* pEntry = pTreeLB->First();
-    while ( pEntry )
+    std::unique_ptr<weld::TreeIter> xEntry = xTreeLB->make_iterator();
+    bool bEntry = xTreeLB->get_iter_first(*xEntry);
+    while (bEntry)
     {
-        if ( pTreeLB->GetParent( pEntry ) )
+        if (xTreeLB->get_iter_depth(*xEntry))
         {
-            OptionsPageInfo* pPageInfo = static_cast<OptionsPageInfo *>(pEntry->GetUserData());
+            OptionsPageInfo* pPageInfo = reinterpret_cast<OptionsPageInfo*>(xTreeLB->get_id(*xEntry).toInt64());
             if ( pPageInfo->m_pPage && !pPageInfo->m_pPage->HasExchangeSupport() )
             {
+                std::unique_ptr<weld::TreeIter> xParent = xTreeLB->make_iterator(xEntry.get());
+                xTreeLB->iter_parent(*xParent);
                 OptionsGroupInfo* pGroupInfo =
-                    static_cast<OptionsGroupInfo*>(pTreeLB->GetParent(pEntry)->GetUserData());
+                    reinterpret_cast<OptionsGroupInfo*>(xTreeLB->get_id(*xParent).toInt64());
                 pPageInfo->m_pPage->FillItemSet(pGroupInfo->m_pOutItemSet.get());
             }
 
-            if ( pPageInfo->m_pExtPage )
+            if ( pPageInfo->m_xExtPage )
             {
                 if ( deactivate )
                 {
-                    pPageInfo->m_pExtPage->DeactivatePage();
+                    pPageInfo->m_xExtPage->DeactivatePage();
                 }
-                pPageInfo->m_pExtPage->SavePage();
+                pPageInfo->m_xExtPage->SavePage();
             }
             if ( pPageInfo->m_pPage && RID_OPTPAGE_CHART_DEFCOLORS == pPageInfo->m_nPageId )
             {
@@ -678,11 +668,11 @@ void OfaTreeOptionsDialog::ApplyOptions(bool deactivate)
                 pPage->SaveChartOptions();
             }
         }
-        pEntry = pTreeLB->Next(pEntry);
+        bEntry = xTreeLB->iter_next(*xEntry);
     }
 }
 
-IMPL_LINK_NOARG(OfaTreeOptionsDialog, ApplyHdl_Impl, Button*, void)
+IMPL_LINK_NOARG(OfaTreeOptionsDialog, ApplyHdl_Impl, weld::Button&, void)
 {
     ApplyOptions(/*deactivate =*/false);
 
@@ -690,21 +680,22 @@ IMPL_LINK_NOARG(OfaTreeOptionsDialog, ApplyHdl_Impl, Button*, void)
     {
         SolarMutexGuard aGuard;
         if (svtools::executeRestartDialog(comphelper::getProcessComponentContext(),
-                                        GetFrameWeld(), eRestartReason))
-            EndDialog(RET_OK);
+                                        m_xDialog.get(), eRestartReason))
+            m_xDialog->response(RET_OK);
     }
 }
 
-IMPL_LINK_NOARG(OfaTreeOptionsDialog, OKHdl_Impl, Button*, void)
+IMPL_LINK_NOARG(OfaTreeOptionsDialog, OKHdl_Impl, weld::Button&, void)
 {
-    pTreeLB->EndSelection();
-    if ( pCurrentPageEntry && pTreeLB->GetParent( pCurrentPageEntry ) )
+    if (xCurrentPageEntry && xTreeLB->get_iter_depth(*xCurrentPageEntry))
     {
-        OptionsPageInfo* pPageInfo = static_cast<OptionsPageInfo *>(pCurrentPageEntry->GetUserData());
+        OptionsPageInfo* pPageInfo = reinterpret_cast<OptionsPageInfo*>(xTreeLB->get_id(*xCurrentPageEntry).toInt64());
         if ( pPageInfo->m_pPage )
         {
-            OptionsGroupInfo* pGroupInfo =
-                static_cast<OptionsGroupInfo *>(pTreeLB->GetParent(pCurrentPageEntry)->GetUserData());
+            std::unique_ptr<weld::TreeIter> xParent = xTreeLB->make_iterator(xCurrentPageEntry.get());
+            xTreeLB->iter_parent(*xParent);
+
+            OptionsGroupInfo* pGroupInfo = reinterpret_cast<OptionsGroupInfo*>(xTreeLB->get_id(*xParent).toInt64());
             if ( RID_SVXPAGE_COLOR != pPageInfo->m_nPageId
                 && pPageInfo->m_pPage->HasExchangeSupport() )
             {
@@ -712,68 +703,34 @@ IMPL_LINK_NOARG(OfaTreeOptionsDialog, OKHdl_Impl, Button*, void)
                 if ( nLeave == DeactivateRC::KeepPage )
                 {
                     // the page mustn't be left
-                    pTreeLB->Select(pCurrentPageEntry);
+                    xTreeLB->select(*xCurrentPageEntry);
                     return;
                 }
             }
-            pPageInfo->m_pPage->Hide();
+            pPageInfo->m_pPage->set_visible(false);
         }
     }
 
     ApplyOptions(/*deactivate =*/ true);
-    EndDialog(RET_OK);
+    m_xDialog->response(RET_OK);
 
     if ( bNeedsRestart )
     {
         SolarMutexGuard aGuard;
         ::svtools::executeRestartDialog(comphelper::getProcessComponentContext(),
-                                        m_pParent->GetFrameWeld(), eRestartReason);
-    }
-}
-
-// an opened group shall be completely visible
-IMPL_STATIC_LINK(
-    OfaTreeOptionsDialog, ExpandedHdl_Impl, SvTreeListBox*, pBox, void )
-{
-    pBox->Update();
-    pBox->InitStartEntry();
-    SvTreeListEntry* pEntry = pBox->GetHdlEntry();
-    if(pEntry && pBox->IsExpanded(pEntry))
-    {
-        sal_uInt32 nChildCount = pBox->GetChildCount( pEntry );
-
-        SvTreeListEntry* pNext = pEntry;
-        for(sal_uInt32 i = 0; i < nChildCount;i++)
-        {
-            pNext = pBox->GetNextEntryInView(pNext);
-            if(!pNext)
-            {
-                pBox->ScrollOutputArea( -static_cast<short>(nChildCount - i + 1) );
-                break;
-            }
-            else
-            {
-                Size aSz(pBox->GetOutputSizePixel());
-                int nHeight = pBox->GetEntryHeight();
-                Point aPos(pBox->GetEntryPosition(pNext));
-                if(aPos.Y()+nHeight > aSz.Height())
-                {
-                    pBox->ScrollOutputArea( -static_cast<short>(nChildCount - i + 1) );
-                    break;
-                }
-            }
-        }
+                                        m_pParent, eRestartReason);
     }
 }
 
 void OfaTreeOptionsDialog::ApplyItemSets()
 {
-    SvTreeListEntry* pEntry = pTreeLB->First();
-    while(pEntry)
+    std::unique_ptr<weld::TreeIter> xEntry = xTreeLB->make_iterator();
+    bool bEntry = xTreeLB->get_iter_first(*xEntry);
+    while (bEntry)
     {
-        if(!pTreeLB->GetParent(pEntry))
+        if (!xTreeLB->get_iter_depth(*xEntry))
         {
-            OptionsGroupInfo* pGroupInfo = static_cast<OptionsGroupInfo *>(pEntry->GetUserData());
+            OptionsGroupInfo* pGroupInfo = reinterpret_cast<OptionsGroupInfo*>(xTreeLB->get_id(*xEntry).toInt64());
             if(pGroupInfo->m_pOutItemSet)
             {
                 if(pGroupInfo->m_pShell)
@@ -782,28 +739,17 @@ void OfaTreeOptionsDialog::ApplyItemSets()
                     ApplyItemSet( pGroupInfo->m_nDialogId, *pGroupInfo->m_pOutItemSet);
             }
         }
-        pEntry = pTreeLB->Next(pEntry);
+        bEntry = xTreeLB->iter_next(*xEntry);
     }
 }
 
 void OfaTreeOptionsDialog::InitTreeAndHandler()
 {
-    pTreeLB->SetNodeDefaultImages();
-
-    pTreeLB->SetHelpId( HID_OFADLG_TREELISTBOX );
-    pTreeLB->SetStyle( pTreeLB->GetStyle()|WB_HASBUTTONS | WB_HASBUTTONSATROOT |
-                           WB_HASLINES | WB_HASLINESATROOT |
-                           WB_CLIPCHILDREN | WB_HSCROLL );
-    pTreeLB->SetForceMakeVisible(true);
-    pTreeLB->SetQuickSearch(true);
-    pTreeLB->SetSpaceBetweenEntries( 0 );
-    pTreeLB->SetSelectionMode( SelectionMode::Single );
-    pTreeLB->SetSublistOpenWithLeftRight();
-    pTreeLB->SetExpandedHdl( LINK( this, OfaTreeOptionsDialog, ExpandedHdl_Impl ) );
-    pTreeLB->SetSelectHdl( LINK( this, OfaTreeOptionsDialog, ShowPageHdl_Impl ) );
-    pBackPB->SetClickHdl( LINK( this, OfaTreeOptionsDialog, BackHdl_Impl ) );
-    pApplyPB->SetClickHdl( LINK( this, OfaTreeOptionsDialog, ApplyHdl_Impl ) );
-    pOkPB->SetClickHdl( LINK( this, OfaTreeOptionsDialog, OKHdl_Impl ) );
+    xTreeLB->set_help_id(HID_OFADLG_TREELISTBOX);
+    xTreeLB->connect_changed( LINK( this, OfaTreeOptionsDialog, ShowPageHdl_Impl ) );
+    xBackPB->connect_clicked( LINK( this, OfaTreeOptionsDialog, BackHdl_Impl ) );
+    xApplyPB->connect_clicked( LINK( this, OfaTreeOptionsDialog, ApplyHdl_Impl ) );
+    xOkPB->connect_clicked( LINK( this, OfaTreeOptionsDialog, OKHdl_Impl ) );
 }
 
 void OfaTreeOptionsDialog::ActivatePage( sal_uInt16 nResId )
@@ -838,8 +784,9 @@ void OfaTreeOptionsDialog::ActivatePage( const OUString& rPageURL )
 
 void OfaTreeOptionsDialog::ActivateLastSelection()
 {
-    SvTreeListEntry* pEntry = nullptr;
-    if ( pLastPageSaver )
+    std::unique_ptr<weld::TreeIter> xEntry;
+
+    if (pLastPageSaver)
     {
         OUString sLastURL = bIsFromExtensionManager ? pLastPageSaver->m_sLastPageURL_ExtMgr
                                                   : pLastPageSaver->m_sLastPageURL_Tools;
@@ -851,13 +798,14 @@ void OfaTreeOptionsDialog::ActivateLastSelection()
 
         bool bMustExpand = ( INetURLObject( sLastURL ).GetProtocol() == INetProtocol::File );
 
-        SvTreeListEntry* pTemp = pTreeLB->First();
-        while( !pEntry && pTemp )
+        std::unique_ptr<weld::TreeIter> xTemp = xTreeLB->make_iterator();
+        bool bTemp = xTreeLB->get_iter_first(*xTemp);
+        while (!bTemp)
         {
             // restore only selection of a leaf
-            if ( pTreeLB->GetParent( pTemp ) && pTemp->GetUserData() )
+            if (xTreeLB->get_iter_depth(*xTemp) && xTreeLB->get_id(*xTemp).toInt64())
             {
-                OptionsPageInfo* pPageInfo = static_cast<OptionsPageInfo*>(pTemp->GetUserData());
+                OptionsPageInfo* pPageInfo = reinterpret_cast<OptionsPageInfo*>(xTreeLB->get_id(*xTemp).toInt64());
                 OUString sPageURL = pPageInfo->m_sPageURL;
                 if ( bMustExpand )
                 {
@@ -868,102 +816,65 @@ void OfaTreeOptionsDialog::ActivateLastSelection()
                 if ( ( !bIsFromExtensionManager
                         && pPageInfo->m_nPageId && pPageInfo->m_nPageId == pLastPageSaver->m_nLastPageId )
                             || ( !pPageInfo->m_nPageId && sLastURL == sPageURL ) )
-                    pEntry = pTemp;
+                {
+                    xEntry = xTreeLB->make_iterator(xTemp.get());
+                    break;
+                }
             }
-            pTemp = pTreeLB->Next(pTemp);
+            bTemp = xTreeLB->iter_next(*xTemp);
         }
     }
 
-    if ( !pEntry )
+    if (!xEntry)
     {
-        pEntry = pTreeLB->First();
-        pEntry = pTreeLB->Next(pEntry);
+        xEntry = xTreeLB->make_iterator();
+        if (!xTreeLB->get_iter_first(*xEntry) || !xTreeLB->iter_next(*xEntry))
+            xEntry.reset();
     }
 
-    if ( !pEntry )
+    if (!xEntry)
         return;
 
-    SvTreeListEntry* pParent = pTreeLB->GetParent(pEntry);
-    pTreeLB->Expand(pParent);
-    pTreeLB->MakeVisible(pParent);
-    pTreeLB->MakeVisible(pEntry);
-    pTreeLB->Select(pEntry);
-    pTreeLB->GrabFocus();
-}
-
-bool OfaTreeOptionsDialog::EventNotify( NotifyEvent& rNEvt )
-{
-    if ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT )
-    {
-        const KeyEvent* pKEvt = rNEvt.GetKeyEvent();
-        const vcl::KeyCode aKeyCode = pKEvt->GetKeyCode();
-
-        if( aKeyCode.GetCode() == KEY_PAGEUP ||
-                aKeyCode.GetCode() == KEY_PAGEDOWN)
-        {
-            SvTreeListEntry* pCurEntry = pTreeLB->FirstSelected();
-            SvTreeListEntry*  pTemp = nullptr;
-            if(aKeyCode.GetCode() == KEY_PAGEDOWN)
-            {
-                pTemp =  pTreeLB->Next( pCurEntry ) ;
-                if(pTemp && !pTreeLB->GetParent(pTemp))
-                {
-                    pTemp =  pTreeLB->Next( pTemp ) ;
-                    pTreeLB->Select(pTemp);
-                }
-            }
-            else
-            {
-                pTemp =  pTreeLB->Prev( pCurEntry ) ;
-                if(pTemp && !pTreeLB->GetParent(pTemp))
-                {
-                    pTemp =  pTreeLB->Prev( pTemp ) ;
-                }
-            }
-            if(pTemp)
-            {
-                if(!pTreeLB->IsExpanded(pTreeLB->GetParent(pTemp)))
-                    pTreeLB->Expand(pTreeLB->GetParent(pTemp));
-                pTreeLB->MakeVisible(pTemp);
-                pTreeLB->Select(pTemp);
-            }
-        }
-    }
-    return SfxModalDialog::EventNotify(rNEvt);
+    std::unique_ptr<weld::TreeIter> xParent(xTreeLB->make_iterator(xEntry.get()));
+    xTreeLB->iter_parent(*xParent);
+    xTreeLB->expand_row(*xParent);
+    xTreeLB->scroll_to_row(*xParent);
+    xTreeLB->scroll_to_row(*xEntry);
+    xTreeLB->set_cursor(*xEntry);
+    xTreeLB->select(*xEntry);
+    xTreeLB->grab_focus();
+    SelectHdl_Impl();
 }
 
 void OfaTreeOptionsDialog::SelectHdl_Impl()
 {
-    SvTreeListBox* pBox = pTreeLB;
+    std::unique_ptr<weld::TreeIter> xEntry(xTreeLB->make_iterator());
 
-    if(pCurrentPageEntry == pBox->GetCurEntry())
-    {
-        pBox->EndSelection();
+    xTreeLB->get_cursor(xEntry.get());
+    if (xCurrentPageEntry && xCurrentPageEntry->equal(*xEntry))
         return;
-    }
 
-    SvTreeListEntry* pEntry = pBox->GetCurEntry();
-    SvTreeListEntry* pParent = pBox->GetParent(pEntry);
+    std::unique_ptr<weld::TreeIter> xParent(xTreeLB->make_iterator(xEntry.get()));
+    bool bParent = xTreeLB->iter_parent(*xParent);
 
     // If the user has selected a category, automatically switch to a suitable
     // default sub-page instead.
-    if (!pParent)
-    {
-        pBox->EndSelection();
+    if (!bParent)
         return;
-    }
-
-    pBox->EndSelection();
 
     TabPage* pOldPage = nullptr;
     TabPage* pNewPage = nullptr;
-    OptionsPageInfo* pOptPageInfo = ( pCurrentPageEntry && pTreeLB->GetParent( pCurrentPageEntry ) )
-        ? static_cast<OptionsPageInfo*>(pCurrentPageEntry->GetUserData()) : nullptr;
+    OptionsPageInfo* pOptPageInfo = (xCurrentPageEntry && xTreeLB->get_iter_depth(*xCurrentPageEntry))
+        ? reinterpret_cast<OptionsPageInfo*>(xTreeLB->get_id(*xCurrentPageEntry).toInt64()) : nullptr;
 
     if ( pOptPageInfo && pOptPageInfo->m_pPage && pOptPageInfo->m_pPage->IsVisible() )
     {
         pOldPage = pOptPageInfo->m_pPage;
-        OptionsGroupInfo* pGroupInfo = static_cast<OptionsGroupInfo*>(pTreeLB->GetParent(pCurrentPageEntry)->GetUserData());
+
+        std::unique_ptr<weld::TreeIter> xCurParent(xTreeLB->make_iterator(xCurrentPageEntry.get()));
+        xTreeLB->iter_parent(*xCurParent);
+
+        OptionsGroupInfo* pGroupInfo = reinterpret_cast<OptionsGroupInfo*>(xTreeLB->get_id(*xCurParent).toInt64());
         DeactivateRC nLeave = DeactivateRC::LeavePage;
         if ( RID_SVXPAGE_COLOR != pOptPageInfo->m_nPageId && pOptPageInfo->m_pPage->HasExchangeSupport() )
            nLeave = pOptPageInfo->m_pPage->DeactivatePage( pGroupInfo->m_pOutItemSet.get() );
@@ -971,20 +882,20 @@ void OfaTreeOptionsDialog::SelectHdl_Impl()
         if ( nLeave == DeactivateRC::KeepPage )
         {
             // we cannot leave this page
-            pBox->Select( pCurrentPageEntry );
+            xTreeLB->select(*xCurrentPageEntry);
             return;
         }
         else
-            pOptPageInfo->m_pPage->Hide();
+            pOptPageInfo->m_pPage->set_visible(false);
     }
-    else if ( pOptPageInfo && pOptPageInfo->m_pExtPage )
+    else if ( pOptPageInfo && pOptPageInfo->m_xExtPage )
     {
-        pOptPageInfo->m_pExtPage->Hide();
-        pOptPageInfo->m_pExtPage->DeactivatePage();
+        pOptPageInfo->m_xExtPage->Hide();
+        pOptPageInfo->m_xExtPage->DeactivatePage();
     }
 
-    OptionsPageInfo *pPageInfo = static_cast<OptionsPageInfo *>(pEntry->GetUserData());
-    OptionsGroupInfo* pGroupInfo = static_cast<OptionsGroupInfo *>(pParent->GetUserData());
+    OptionsPageInfo *pPageInfo = reinterpret_cast<OptionsPageInfo*>(xTreeLB->get_id(*xEntry).toInt64());
+    OptionsGroupInfo* pGroupInfo = reinterpret_cast<OptionsGroupInfo*>(xTreeLB->get_id(*xParent).toInt64());
     if(!pPageInfo->m_pPage && pPageInfo->m_nPageId > 0)
     {
         if(!pGroupInfo->m_pInItemSet)
@@ -996,7 +907,7 @@ void OfaTreeOptionsDialog::SelectHdl_Impl()
                 *pGroupInfo->m_pInItemSet->GetPool(),
                 pGroupInfo->m_pInItemSet->GetRanges());
 
-        TabPageParent pPageParent(pTabBox);
+        TabPageParent pPageParent(xTabBox.get(), this);
 
         pPageInfo->m_pPage.disposeAndReset( ::CreateGeneralTabPage(pPageInfo->m_nPageId, pPageParent, *pGroupInfo->m_pInItemSet ) );
 
@@ -1011,16 +922,15 @@ void OfaTreeOptionsDialog::SelectHdl_Impl()
             pPageInfo->m_pPage->Reset( pGroupInfo->m_pInItemSet.get() );
         }
     }
-    else if ( 0 == pPageInfo->m_nPageId && !pPageInfo->m_pExtPage )
+    else if ( 0 == pPageInfo->m_nPageId && !pPageInfo->m_xExtPage )
     {
         if ( !m_xContainerWinProvider.is() )
         {
             m_xContainerWinProvider = awt::ContainerWindowProvider::create( ::comphelper::getProcessComponentContext() );
         }
 
-        pPageInfo->m_pExtPage = VclPtr<ExtensionsTabPage>::Create(
-
-            pTabBox, 0, pPageInfo->m_sPageURL, pPageInfo->m_sEventHdl, m_xContainerWinProvider );
+        pPageInfo->m_xExtPage = std::make_unique<ExtensionsTabPage>(
+            xTabBox.get(), pPageInfo->m_sPageURL, pPageInfo->m_sEventHdl, m_xContainerWinProvider);
     }
 
     if ( pPageInfo->m_pPage )
@@ -1030,29 +940,30 @@ void OfaTreeOptionsDialog::SelectHdl_Impl()
         {
             pPageInfo->m_pPage->ActivatePage(*pGroupInfo->m_pOutItemSet);
         }
-        pPageInfo->m_pPage->Show();
+        pPageInfo->m_pPage->set_visible(true);
     }
-    else if ( pPageInfo->m_pExtPage )
+    else if ( pPageInfo->m_xExtPage )
     {
-        pPageInfo->m_pExtPage->Show();
-        pPageInfo->m_pExtPage->ActivatePage();
+        pPageInfo->m_xExtPage->Show();
+        pPageInfo->m_xExtPage->ActivatePage();
     }
 
     {
         OUString sTitleText = sTitle
-                            + " - " + pTreeLB->GetEntryText(pParent)
-                            + " - " + pTreeLB->GetEntryText(pEntry);
-        SetText(sTitleText);
+                            + " - " + xTreeLB->get_text(*xParent)
+                            + " - " + xTreeLB->get_text(*xEntry);
+        m_xDialog->set_title(sTitleText);
     }
 
-    pCurrentPageEntry = pEntry;
+    xCurrentPageEntry = std::move(xEntry);
+
     if ( !bForgetSelection )
     {
         if ( !pLastPageSaver )
             pLastPageSaver = new LastPageSaver;
         if ( !bIsFromExtensionManager )
             pLastPageSaver->m_nLastPageId = pPageInfo->m_nPageId;
-        if ( pPageInfo->m_pExtPage )
+        if ( pPageInfo->m_xExtPage )
         {
             if ( bIsFromExtensionManager )
                 pLastPageSaver->m_sLastPageURL_ExtMgr = pPageInfo->m_sPageURL;
@@ -1065,9 +976,9 @@ void OfaTreeOptionsDialog::SelectHdl_Impl()
     // restore lost focus, if necessary
     vcl::Window* pFocusWin = Application::GetFocusWindow();
     // if the focused window is not the options treebox and the old page has the focus
-    if ( pFocusWin && pFocusWin != pBox && pOldPage && pOldPage->HasChildPathFocus() )
+    if ( pFocusWin && !xTreeLB->has_focus() && pOldPage && pOldPage->HasChildPathFocus() )
         // then set the focus to the new page or if we are on a group set the focus to the options treebox
-        pNewPage ? pNewPage->GrabFocus() : pBox->GrabFocus();
+        pNewPage ? pNewPage->GrabFocus() : xTreeLB->grab_focus();
 
     //fdo#58170 use current page's layout child HelpId, unless there isn't a
     //current page
@@ -1078,7 +989,7 @@ void OfaTreeOptionsDialog::SelectHdl_Impl()
         assert(pFirstChild);
         sHelpId = pFirstChild->GetHelpId();
     }
-    pBox->SetHelpId(sHelpId);
+    xTreeLB->set_help_id(sHelpId);
 }
 
 std::unique_ptr<SfxItemSet> OfaTreeOptionsDialog::CreateItemSet( sal_uInt16 nId )
@@ -1946,27 +1857,29 @@ VectorOfNodes OfaTreeOptionsDialog::LoadNodes(
     return aOutNodeList;
 }
 
-static sal_uInt16 lcl_getGroupId( const OUString& rGroupName, const SvTreeListBox& rTreeLB )
+static sal_uInt16 lcl_getGroupId( const OUString& rGroupName, const weld::TreeView& rTreeLB )
 {
     sal_uInt16 nRet = 0;
-    SvTreeListEntry* pEntry = rTreeLB.First();
-    while( pEntry )
+
+    std::unique_ptr<weld::TreeIter> xEntry = rTreeLB.make_iterator();
+    bool bEntry = rTreeLB.get_iter_first(*xEntry);
+    while (bEntry)
     {
-        if ( !rTreeLB.GetParent( pEntry ) )
+        if (!rTreeLB.get_iter_depth(*xEntry))
         {
-            OUString sTemp( rTreeLB.GetEntryText( pEntry ) );
-            if ( sTemp == rGroupName )
+            OUString sTemp(rTreeLB.get_text(*xEntry));
+            if (sTemp == rGroupName)
                 return nRet;
             nRet++;
         }
-        pEntry = rTreeLB.Next( pEntry );
+        bEntry = rTreeLB.iter_next(*xEntry);
     }
 
     return USHRT_MAX;
 }
 
 static void lcl_insertLeaf(
-    OfaTreeOptionsDialog* pDlg, OptionsNode const * pNode, OptionsLeaf const * pLeaf, const SvTreeListBox& rTreeLB )
+    OfaTreeOptionsDialog* pDlg, OptionsNode const * pNode, OptionsLeaf const * pLeaf, const weld::TreeView& rTreeLB )
 {
     sal_uInt16 nGrpId = lcl_getGroupId( pNode->m_sLabel, rTreeLB );
     if ( USHRT_MAX == nGrpId )
@@ -1989,13 +1902,13 @@ void  OfaTreeOptionsDialog::InsertNodes( const VectorOfNodes& rNodeList )
             {
                 for ( size_t k = 0; k < j.size(); ++k )
                 {
-                    lcl_insertLeaf( this, node.get(), j[k].get(), *pTreeLB );
+                    lcl_insertLeaf( this, node.get(), j[k].get(), *xTreeLB );
                 }
             }
 
             for ( auto const & j: node->m_aLeaves )
             {
-                lcl_insertLeaf( this, node.get(), j.get(), *pTreeLB );
+                lcl_insertLeaf( this, node.get(), j.get(), *xTreeLB );
             }
         }
     }
@@ -2007,7 +1920,7 @@ void OfaTreeOptionsDialog::SetNeedsRestart( svtools::RestartReason eReason)
     eRestartReason = eReason;
 }
 
-short OfaTreeOptionsDialog::Execute()
+short OfaTreeOptionsDialog::run()
 {
     std::unique_ptr< SvxDicListChgClamp > pClamp;
     if ( !bIsFromExtensionManager )
@@ -2016,7 +1929,8 @@ short OfaTreeOptionsDialog::Execute()
         Reference<css::linguistic2::XSearchableDictionaryList> xDictionaryList(LinguMgr::GetDictionaryList());
         pClamp.reset( new SvxDicListChgClamp( xDictionaryList ) );
     }
-    short nRet = SfxModalDialog::Execute();
+
+    short nRet = SfxOkDialogController::run();
 
     if( RET_OK == nRet )
     {
@@ -2029,24 +1943,17 @@ short OfaTreeOptionsDialog::Execute()
 
 // class ExtensionsTabPage -----------------------------------------------
 ExtensionsTabPage::ExtensionsTabPage(
-    vcl::Window* pParent, WinBits nStyle, const OUString& rPageURL,
-    const OUString& rEvtHdl, const Reference< awt::XContainerWindowProvider >& rProvider ) :
-
-    TabPage( pParent, nStyle ),
-
-    m_sPageURL          ( rPageURL ),
-    m_sEventHdl         ( rEvtHdl ),
-    m_xWinProvider      ( rProvider )
+    weld::Container* pParent, const OUString& rPageURL,
+    const OUString& rEvtHdl, const Reference< awt::XContainerWindowProvider >& rProvider )
+    : m_pContainer(pParent)
+    , m_sPageURL(rPageURL)
+    , m_sEventHdl(rEvtHdl)
+    , m_xWinProvider(rProvider)
 {
 }
 
 ExtensionsTabPage::~ExtensionsTabPage()
 {
-    disposeOnce();
-}
-
-void ExtensionsTabPage::dispose()
-{
     Hide();
     DeactivatePage();
 
@@ -2056,14 +1963,24 @@ void ExtensionsTabPage::dispose()
         {
             m_xPage->dispose();
         }
-        catch ( const Exception & )
+        catch (const Exception&)
         {
         }
         m_xPage.clear();
     }
-    TabPage::dispose();
-}
 
+    if ( m_xPageParent.is() )
+    {
+        try
+        {
+            m_xPageParent->dispose();
+        }
+        catch (const Exception&)
+        {
+        }
+        m_xPageParent.clear();
+    }
+}
 
 void ExtensionsTabPage::CreateDialogWithHandler()
 {
@@ -2078,8 +1995,8 @@ void ExtensionsTabPage::CreateDialogWithHandler()
 
         if ( !bWithHandler || m_xEventHdl.is() )
         {
-            SetStyle( GetStyle() | WB_DIALOGCONTROL | WB_CHILDDLGCTRL );
-            Reference< awt::XWindowPeer > xParent( VCLUnoHelper::GetInterface( this ), UNO_QUERY );
+            m_xPageParent = m_pContainer->CreateChildFrame();
+            Reference<awt::XWindowPeer> xParent(m_xPageParent, UNO_QUERY);
             m_xPage =
                 m_xWinProvider->createContainerWindow(
                     m_sPageURL, OUString(), xParent, m_xEventHdl );
@@ -2103,7 +2020,6 @@ void ExtensionsTabPage::CreateDialogWithHandler()
     }
 }
 
-
 bool ExtensionsTabPage::DispatchAction( const OUString& rAction )
 {
     bool bRet = false;
@@ -2121,20 +2037,30 @@ bool ExtensionsTabPage::DispatchAction( const OUString& rAction )
     return bRet;
 }
 
-void ExtensionsTabPage::ActivatePage()
+void ExtensionsTabPage::Show()
 {
-    TabPage::ActivatePage();
+    if (!m_xPageParent.is())
+        return;
+    m_xPageParent->setVisible(true);
+}
+
+void ExtensionsTabPage::Hide()
+{
+    if (!m_xPageParent.is())
+        return;
+    m_xPageParent->setVisible(false);
+}
 
+void ExtensionsTabPage::ActivatePage()
+{
     if ( !m_xPage.is() )
     {
         CreateDialogWithHandler();
 
         if ( m_xPage.is() )
         {
-            Point aPos;
-            Size aSize = GetParent()->get_preferred_size();
-            m_xPage->setPosSize( aPos.X() + 1, aPos.Y() + 1,
-                                 aSize.Width() - 2, aSize.Height() - 2, awt::PosSize::POSSIZE );
+            auto aWindowRect = m_xPageParent->getPosSize();
+            m_xPage->setPosSize(0, 0, aWindowRect.Width, aWindowRect.Height, awt::PosSize::POSSIZE);
             if ( !m_sEventHdl.isEmpty() )
                 DispatchAction( "initialize" );
         }
@@ -2148,20 +2074,16 @@ void ExtensionsTabPage::ActivatePage()
 
 void ExtensionsTabPage::DeactivatePage()
 {
-    TabPage::DeactivatePage();
-
     if ( m_xPage.is() )
         m_xPage->setVisible( false );
 }
 
-
 void ExtensionsTabPage::ResetPage()
 {
     DispatchAction( "back" );
     ActivatePage();
 }
 
-
 void ExtensionsTabPage::SavePage()
 {
     DispatchAction( "ok" );
diff --git a/cui/uiconfig/ui/opthtmlpage.ui b/cui/uiconfig/ui/opthtmlpage.ui
index 05087c50922e..15ccce9a9966 100644
--- a/cui/uiconfig/ui/opthtmlpage.ui
+++ b/cui/uiconfig/ui/opthtmlpage.ui
@@ -1,8 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.16.1 -->
+<!-- Generated with glade 3.22.1 -->
 <interface domain="cui">
   <requires lib="gtk+" version="3.18"/>
-  <requires lib="LibreOffice" version="1.0"/>
   <object class="GtkAdjustment" id="adjustsize1">
     <property name="lower">1</property>
     <property name="upper">50</property>
@@ -94,8 +93,6 @@
                       <packing>
                         <property name="left_attach">0</property>
                         <property name="top_attach">6</property>
-                        <property name="width">1</property>
-                        <property name="height">1</property>
                       </packing>
                     </child>
                     <child>
@@ -107,8 +104,6 @@
                       <packing>
                         <property name="left_attach">1</property>
                         <property name="top_attach">6</property>
-                        <property name="width">1</property>
-                        <property name="height">1</property>
                       </packing>
                     </child>
                     <child>
@@ -122,8 +117,6 @@
                       <packing>
                         <property name="left_attach">0</property>
                         <property name="top_attach">5</property>
-                        <property name="width">1</property>
-                        <property name="height">1</property>
                       </packing>
                     </child>
                     <child>
@@ -135,8 +128,6 @@
                       <packing>
                         <property name="left_attach">1</property>
                         <property name="top_attach">5</property>
-                        <property name="width">1</property>
-                        <property name="height">1</property>
                       </packing>
                     </child>
                     <child>
@@ -150,8 +141,6 @@
                       <packing>
                         <property name="left_attach">0</property>
                         <property name="top_attach">4</property>
-                        <property name="width">1</property>
-                        <property name="height">1</property>
                       </packing>
                     </child>
                     <child>
@@ -163,8 +152,6 @@
                       <packing>
                         <property name="left_attach">1</property>
                         <property name="top_attach">4</property>
-                        <property name="width">1</property>
-                        <property name="height">1</property>
                       </packing>
                     </child>
                     <child>
@@ -178,8 +165,6 @@
                       <packing>
                         <property name="left_attach">0</property>
                         <property name="top_attach">3</property>
-                        <property name="width">1</property>
-                        <property name="height">1</property>
                       </packing>
                     </child>
                     <child>
@@ -191,8 +176,6 @@
                       <packing>
                         <property name="left_attach">1</property>
                         <property name="top_attach">3</property>
-                        <property name="width">1</property>
-                        <property name="height">1</property>
                       </packing>
                     </child>
                     <child>
@@ -206,8 +189,6 @@
                       <packing>
                         <property name="left_attach">0</property>
                         <property name="top_attach">2</property>
-                        <property name="width">1</property>
-                        <property name="height">1</property>
                       </packing>
                     </child>
                     <child>
@@ -219,8 +200,6 @@
                       <packing>
                         <property name="left_attach">1</property>
                         <property name="top_attach">2</property>
-                        <property name="width">1</property>
-                        <property name="height">1</property>
                       </packing>
                     </child>
                     <child>
@@ -234,8 +213,6 @@
                       <packing>
                         <property name="left_attach">0</property>
                         <property name="top_attach">1</property>
-                        <property name="width">1</property>
-                        <property name="height">1</property>
                       </packing>
                     </child>
                     <child>
@@ -247,8 +224,6 @@
                       <packing>
                         <property name="left_attach">1</property>
                         <property name="top_attach">1</property>
-                        <property name="width">1</property>
-                        <property name="height">1</property>
                       </packing>
                     </child>
                     <child>
@@ -262,8 +237,6 @@
                       <packing>
                         <property name="left_attach">0</property>
                         <property name="top_attach">0</property>
-                        <property name="width">1</property>
-                        <property name="height">1</property>
                       </packing>
                     </child>
                     <child>
@@ -275,8 +248,6 @@
                       <packing>
                         <property name="left_attach">1</property>
                         <property name="top_attach">0</property>
-                        <property name="width">1</property>
-                        <property name="height">1</property>
                       </packing>
                     </child>
                   </object>
@@ -326,7 +297,6 @@
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="hexpand">True</property>
-                <property name="vexpand">True</property>
                 <property name="top_padding">6</property>
                 <property name="left_padding">12</property>
                 <child>
@@ -349,8 +319,6 @@
                       <packing>
                         <property name="left_attach">0</property>
                         <property name="top_attach">2</property>
-                        <property name="width">1</property>
-                        <property name="height">1</property>
                       </packing>
                     </child>
                     <child>
@@ -367,8 +335,6 @@
                       <packing>
                         <property name="left_attach">0</property>
                         <property name="top_attach">1</property>
-                        <property name="width">1</property>
-                        <property name="height">1</property>
                       </packing>
                     </child>
                     <child>
@@ -385,8 +351,6 @@
                       <packing>
                         <property name="left_attach">0</property>
                         <property name="top_attach">0</property>
-                        <property name="width">1</property>
-                        <property name="height">1</property>
                       </packing>
                     </child>
                   </object>
@@ -415,7 +379,6 @@
             <property name="visible">True</property>
             <property name="can_focus">False</property>
             <property name="hexpand">True</property>
-            <property name="vexpand">True</property>
             <property name="label_xalign">0</property>
             <property name="shadow_type">none</property>
             <child>
@@ -423,7 +386,6 @@
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="hexpand">True</property>
-                <property name="vexpand">True</property>
                 <property name="top_padding">6</property>
                 <property name="left_padding">12</property>
                 <child>
@@ -443,16 +405,14 @@
                           <object class="GtkLabel" id="charsetFT">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
-                            <property name="xalign">0</property>
                             <property name="label" translatable="yes" context="opthtmlpage|charsetFT">Character _set:</property>
                             <property name="use_underline">True</property>
                             <property name="mnemonic_widget">charset</property>
+                            <property name="xalign">0</property>
                           </object>
                           <packing>
                             <property name="left_attach">0</property>
                             <property name="top_attach">0</property>
-                            <property name="width">1</property>
-                            <property name="height">1</property>
                           </packing>
                         </child>
                         <child>
@@ -465,16 +425,12 @@
                           <packing>
                             <property name="left_attach">1</property>
                             <property name="top_attach">0</property>
-                            <property name="width">1</property>
-                            <property name="height">1</property>
                           </packing>
                         </child>
                       </object>
                       <packing>
                         <property name="left_attach">0</property>
                         <property name="top_attach">4</property>
-                        <property name="width">1</property>
-                        <property name="height">1</property>
                       </packing>
                     </child>
                     <child>
@@ -491,8 +447,6 @@
                       <packing>
                         <property name="left_attach">0</property>
                         <property name="top_attach">3</property>
-                        <property name="width">1</property>
-                        <property name="height">1</property>
                       </packing>
                     </child>
                     <child>
@@ -509,8 +463,6 @@
                       <packing>
                         <property name="left_attach">0</property>
                         <property name="top_attach">2</property>
-                        <property name="width">1</property>
-                        <property name="height">1</property>
                       </packing>
                     </child>
                     <child>
@@ -528,8 +480,6 @@
                       <packing>
                         <property name="left_attach">0</property>
                         <property name="top_attach">1</property>
-                        <property name="width">1</property>
-                        <property name="height">1</property>
                       </packing>
                     </child>
                     <child>
@@ -546,8 +496,6 @@
                       <packing>
                         <property name="left_attach">0</property>
                         <property name="top_attach">0</property>
-                        <property name="width">1</property>
-                        <property name="height">1</property>
                       </packing>
                     </child>
                   </object>
diff --git a/cui/uiconfig/ui/optionsdialog.ui b/cui/uiconfig/ui/optionsdialog.ui
index 9d7b4ff2df39..b96ec45a95ea 100644
--- a/cui/uiconfig/ui/optionsdialog.ui
+++ b/cui/uiconfig/ui/optionsdialog.ui
@@ -2,7 +2,14 @@
 <!-- Generated with glade 3.22.1 -->
 <interface domain="cui">
   <requires lib="gtk+" version="3.18"/>
-  <requires lib="LibreOffice" version="1.0"/>
+  <object class="GtkTreeStore" id="liststore1">
+    <columns>
+      <!-- column-name text -->
+      <column type="gchararray"/>
+      <!-- column-name id -->
+      <column type="gchararray"/>
+    </columns>
+  </object>
   <object class="GtkDialog" id="OptionsDialog">
     <property name="can_focus">False</property>
     <property name="hexpand">True</property>
@@ -113,12 +120,38 @@
             <property name="vexpand">True</property>
             <property name="spacing">6</property>
             <child>
-              <object class="vcllo-SvTreeListBox" id="pages:border">
+              <object class="GtkScrolledWindow">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="vexpand">True</property>
-                <child internal-child="selection">
-                  <object class="GtkTreeSelection" id="Tree List-selection"/>
+                <property name="shadow_type">in</property>
+                <child>
+                  <object class="GtkTreeView" id="pages">
+                    <property name="width_request">-1</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="vexpand">True</property>
+                    <property name="model">liststore1</property>
+                    <property name="headers_visible">False</property>
+                    <property name="search_column">1</property>
+                    <property name="show_expanders">True</property>
+                    <property name="enable_tree_lines">True</property>
+                    <child internal-child="selection">
+                      <object class="GtkTreeSelection" id="Macro Library List-selection1"/>
+                    </child>
+                    <child>
+                      <object class="GtkTreeViewColumn" id="treeviewcolumn2">
+                        <property name="spacing">6</property>
+                        <child>
+                          <object class="GtkCellRendererText" id="cellrenderertext2"/>
+                          <attributes>
+                            <attribute name="text">0</attribute>
+                          </attributes>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
                 </child>
               </object>
               <packing>
diff --git a/cui/uiconfig/ui/optlanguagespage.ui b/cui/uiconfig/ui/optlanguagespage.ui
index 8d49ba62aaee..6cf95c2d2981 100644
--- a/cui/uiconfig/ui/optlanguagespage.ui
+++ b/cui/uiconfig/ui/optlanguagespage.ui
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.18.3 -->
+<!-- Generated with glade 3.22.1 -->
 <interface domain="cui">
   <requires lib="gtk+" version="3.18"/>
   <object class="GtkListStore" id="liststore1">
@@ -62,10 +62,10 @@
                   <object class="GtkLabel" id="label4">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
-                    <property name="xalign">0</property>
                     <property name="label" translatable="yes" context="optlanguagespage|label4">_User interface:</property>
                     <property name="use_underline">True</property>
                     <property name="mnemonic_widget">userinterface</property>
+                    <property name="xalign">0</property>
                   </object>
                   <packing>
                     <property name="left_attach">0</property>
@@ -76,10 +76,10 @@
                   <object class="GtkLabel" id="localesettingFT">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
-                    <property name="xalign">0</property>
                     <property name="label" translatable="yes" context="optlanguagespage|localesettingFT">Locale setting:</property>
                     <property name="use_underline">True</property>
                     <property name="mnemonic_widget">localesetting</property>
+                    <property name="xalign">0</property>
                   </object>
                   <packing>
                     <property name="left_attach">0</property>
@@ -90,10 +90,10 @@
                   <object class="GtkLabel" id="label6">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
-                    <property name="xalign">0</property>
                     <property name="label" translatable="yes" context="optlanguagespage|label6">Decimal separator key:</property>
                     <property name="use_underline">True</property>
                     <property name="mnemonic_widget">decimalseparator</property>
+                    <property name="xalign">0</property>
                   </object>
                   <packing>
                     <property name="left_attach">0</property>
@@ -104,10 +104,10 @@
                   <object class="GtkLabel" id="defaultcurrency">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
-                    <property name="xalign">0</property>
                     <property name="label" translatable="yes" context="optlanguagespage|defaultcurrency">_Default currency:</property>
                     <property name="use_underline">True</property>
                     <property name="mnemonic_widget">currencylb</property>
+                    <property name="xalign">0</property>
                   </object>
                   <packing>
                     <property name="left_attach">0</property>
@@ -118,10 +118,10 @@
                   <object class="GtkLabel" id="dataaccpatterns">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
-                    <property name="xalign">0</property>
                     <property name="label" translatable="yes" context="optlanguagespage|dataaccpatterns">Date acceptance _patterns:</property>
                     <property name="use_underline">True</property>
                     <property name="mnemonic_widget">datepatterns</property>
+                    <property name="xalign">0</property>
                   </object>
                   <packing>
                     <property name="left_attach">0</property>
@@ -270,13 +270,13 @@
                     <property name="entry_text_column">0</property>
                     <property name="id_column">1</property>
                     <child>
-                      <object class="GtkCellRendererText" id="cellrenderertext1"/>
+                      <object class="GtkCellRendererText" id="cellrenderertext3"/>
                       <attributes>
                         <attribute name="text">0</attribute>
                       </attributes>
                     </child>
                     <child>
-                      <object class="GtkCellRendererPixbuf" id="cellrenderertext2"/>
+                      <object class="GtkCellRendererPixbuf" id="cellrenderertext4"/>
                       <attributes>
                         <attribute name="pixbuf">2</attribute>
                       </attributes>
@@ -297,13 +297,13 @@
                     <property name="entry_text_column">0</property>
                     <property name="id_column">1</property>
                     <child>
-                      <object class="GtkCellRendererText" id="cellrenderertext1"/>
+                      <object class="GtkCellRendererText" id="cellrenderertext5"/>
                       <attributes>
                         <attribute name="text">0</attribute>
                       </attributes>
                     </child>
                     <child>
-                      <object class="GtkCellRendererPixbuf" id="cellrenderertext2"/>
+                      <object class="GtkCellRendererPixbuf" id="cellrenderertext6"/>
                       <attributes>
                         <attribute name="pixbuf">2</attribute>
                       </attributes>
@@ -320,8 +320,8 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
-                    <property name="use_underline">True</property>
                     <property name="halign">start</property>
+                    <property name="use_underline">True</property>
                     <property name="xalign">0</property>
                     <property name="draw_indicator">True</property>
                   </object>
@@ -364,16 +364,19 @@
                   <object class="GtkLabel" id="western">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
-                    <property name="xalign">0</property>
                     <property name="label" translatable="yes" context="optlanguagespage|western">Western:</property>
                     <property name="use_underline">True</property>
                     <property name="mnemonic_widget">westernlanguage</property>
+                    <property name="xalign">0</property>
                   </object>
                   <packing>
                     <property name="left_attach">0</property>
                     <property name="top_attach">0</property>
                   </packing>
                 </child>
+                <child>
+                  <placeholder/>
+                </child>
               </object>
             </child>
           </object>
diff --git a/cui/uiconfig/ui/optpathspage.ui b/cui/uiconfig/ui/optpathspage.ui
index 1bd03de34de0..79e33ae7c670 100644
--- a/cui/uiconfig/ui/optpathspage.ui
+++ b/cui/uiconfig/ui/optpathspage.ui
@@ -4,7 +4,7 @@
   <requires lib="gtk+" version="3.18"/>
   <object class="GtkTreeStore" id="liststore1">
     <columns>
-       <!-- column-name image -->
+      <!-- column-name image -->
       <column type="GdkPixbuf"/>
       <!-- column-name text -->
       <column type="gchararray"/>
@@ -76,23 +76,20 @@
                           <object class="GtkTreeSelection" id="Macro Library List-selection2"/>
                         </child>
                         <child>
-                          <object class="GtkTreeViewColumn" id="treeviewcolumn1">
+                          <object class="GtkTreeViewColumn" id="treeviewcolumn5">
+                            <property name="resizable">True</property>
+                            <property name="spacing">6</property>
+                            <property name="title" translatable="yes" context="optpathspage|type">Type</property>
                             <child>
                               <object class="GtkCellRendererPixbuf" id="cellrenderertext1"/>
                               <attributes>
                                 <attribute name="pixbuf">0</attribute>
                               </attributes>
                             </child>
-                          </object>
-                        </child>
-                        <child>
-                          <object class="GtkTreeViewColumn" id="treeviewcolumn5">
-                            <property name="resizable">True</property>
-                            <property name="spacing">6</property>
-                            <property name="title" translatable="yes" context="optpathspage|type">Type</property>
                             <child>
                               <object class="GtkCellRendererText" id="cellrenderer4"/>
                               <attributes>
+                                <attribute name="sensitive">8</attribute>
                                 <attribute name="text">1</attribute>
                               </attributes>
                             </child>
@@ -107,13 +104,14 @@
                             <child>
                               <object class="GtkCellRendererText" id="cellrenderer9"/>
                               <attributes>
+                                <attribute name="sensitive">9</attribute>
                                 <attribute name="text">2</attribute>
                               </attributes>
                             </child>
                           </object>
                         </child>
                         <child>
-                          <object class="GtkTreeViewColumn" id="treeviewcolumn1">
+                          <object class="GtkTreeViewColumn" id="treeviewcolumn2">
                             <property name="resizable">True</property>
                             <property name="spacing">6</property>
                             <property name="title" translatable="yes" context="optpathspage|internal_paths">Internal Paths</property>
@@ -121,6 +119,7 @@
                             <child>
                               <object class="GtkCellRendererText" id="cellrenderer1"/>
                               <attributes>
+                                <attribute name="sensitive">10</attribute>
                                 <attribute name="text">3</attribute>
                               </attributes>
                             </child>
diff --git a/cui/uiconfig/ui/optsavepage.ui b/cui/uiconfig/ui/optsavepage.ui
index 61e38e2d5563..689e71f370ff 100644
--- a/cui/uiconfig/ui/optsavepage.ui
+++ b/cui/uiconfig/ui/optsavepage.ui
@@ -37,7 +37,6 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
-                    <property name="vexpand">True</property>
                     <property name="use_underline">True</property>
                     <property name="xalign">0</property>
                     <property name="draw_indicator">True</property>
@@ -53,7 +52,6 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
-                    <property name="vexpand">True</property>
                     <property name="use_underline">True</property>
                     <property name="xalign">0</property>
                     <property name="draw_indicator">True</property>
diff --git a/cui/uiconfig/ui/optsecuritypage.ui b/cui/uiconfig/ui/optsecuritypage.ui
index aa815c6ebf1b..ca5e6aa68374 100644
--- a/cui/uiconfig/ui/optsecuritypage.ui
+++ b/cui/uiconfig/ui/optsecuritypage.ui
@@ -337,15 +337,25 @@ Do you want to delete password list and reset master password?</property>
                   <object class="GtkGrid" id="grid6">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
+                    <property name="row_homogeneous">True</property>
                     <child>
-                      <object class="GtkButton" id="connections">
-                        <property name="label" translatable="yes" context="optsecuritypage|connections">Connect_ions...</property>
+                      <object class="GtkGrid" id="grid9">
                         <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">True</property>
-                        <property name="valign">center</property>
-                        <property name="vexpand">True</property>
-                        <property name="use_underline">True</property>
+                        <property name="can_focus">False</property>
+                        <child>
+                          <object class="GtkButton" id="connections">
+                            <property name="label" translatable="yes" context="optsecuritypage|connections">Connect_ions...</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">True</property>
+                            <property name="valign">center</property>
+                            <property name="use_underline">True</property>
+                          </object>
+                          <packing>
+                            <property name="left_attach">0</property>
+                            <property name="top_attach">0</property>
+                          </packing>
+                        </child>
                       </object>
                       <packing>
                         <property name="left_attach">0</property>
@@ -353,14 +363,23 @@ Do you want to delete password list and reset master password?</property>
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkButton" id="masterpassword">
-                        <property name="label" translatable="yes" context="optsecuritypage|masterpassword">_Master Password...</property>
+                      <object class="GtkGrid" id="grid10">
                         <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">True</property>
-                        <property name="valign">center</property>
-                        <property name="vexpand">True</property>
-                        <property name="use_underline">True</property>
+                        <property name="can_focus">False</property>
+                        <child>
+                          <object class="GtkButton" id="masterpassword">
+                            <property name="label" translatable="yes" context="optsecuritypage|masterpassword">_Master Password...</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">True</property>
+                            <property name="valign">center</property>
+                            <property name="use_underline">True</property>
+                          </object>
+                          <packing>
+                            <property name="left_attach">0</property>
+                            <property name="top_attach">0</property>
+                          </packing>
+                        </child>
                       </object>
                       <packing>
                         <property name="left_attach">0</property>
@@ -466,12 +485,12 @@ Do you want to delete password list and reset master password?</property>
   </object>
   <object class="GtkSizeGroup" id="sizegroup1">
     <widgets>
-      <widget name="options"/>
+      <widget name="tsas"/>
+      <widget name="cert"/>
+      <widget name="macro"/>
       <widget name="connections"/>
       <widget name="masterpassword"/>
-      <widget name="macro"/>
-      <widget name="cert"/>
-      <widget name="tsas"/>
+      <widget name="options"/>
     </widgets>
   </object>
 </interface>
diff --git a/cui/uiconfig/ui/personalization_tab.ui b/cui/uiconfig/ui/personalization_tab.ui
index 448cbf894634..77e67bc5a323 100644
--- a/cui/uiconfig/ui/personalization_tab.ui
+++ b/cui/uiconfig/ui/personalization_tab.ui
@@ -66,16 +66,16 @@
                   <object class="GtkGrid">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
+                    <property name="halign">center</property>
                     <property name="margin_left">24</property>
                     <property name="margin_right">6</property>
-                    <property name="row_spacing">1</property>
-                    <property name="column_spacing">1</property>
+                    <property name="row_spacing">6</property>
+                    <property name="column_spacing">6</property>
                     <child>
-                      <object class="GtkButton" id="default1">
+                      <object class="GtkToggleButton" id="default1">
                         <property name="can_focus">True</property>
                         <property name="receives_default">True</property>
-                        <property name="hexpand">True</property>
-                        <property name="vexpand">True</property>
+                        <property name="always_show_image">True</property>
                       </object>
                       <packing>
                         <property name="left_attach">1</property>
@@ -83,11 +83,10 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkButton" id="default0">
+                      <object class="GtkToggleButton" id="default0">
                         <property name="can_focus">True</property>
                         <property name="receives_default">True</property>
-                        <property name="hexpand">True</property>
-                        <property name="vexpand">True</property>
+                        <property name="always_show_image">True</property>
                       </object>
                       <packing>
                         <property name="left_attach">0</property>
@@ -95,11 +94,10 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkButton" id="default2">
+                      <object class="GtkToggleButton" id="default2">
                         <property name="can_focus">True</property>
                         <property name="receives_default">True</property>
-                        <property name="hexpand">True</property>
-                        <property name="vexpand">True</property>
+                        <property name="always_show_image">True</property>
                       </object>
                       <packing>
                         <property name="left_attach">2</property>
@@ -107,11 +105,10 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkButton" id="default3">
+                      <object class="GtkToggleButton" id="default3">
                         <property name="can_focus">True</property>
                         <property name="receives_default">True</property>
-                        <property name="hexpand">True</property>
-                        <property name="vexpand">True</property>
+                        <property name="always_show_image">True</property>
                       </object>
                       <packing>
                         <property name="left_attach">0</property>
@@ -119,11 +116,10 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkButton" id="default4">
+                      <object class="GtkToggleButton" id="default4">
                         <property name="can_focus">True</property>
                         <property name="receives_default">True</property>
-                        <property name="hexpand">True</property>
-                        <property name="vexpand">True</property>
+                        <property name="always_show_image">True</property>
                       </object>
                       <packing>
                         <property name="left_attach">1</property>
@@ -131,11 +127,10 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkButton" id="default5">
+                      <object class="GtkToggleButton" id="default5">
                         <property name="can_focus">True</property>
                         <property name="receives_default">True</property>
-                        <property name="hexpand">True</property>
-                        <property name="vexpand">True</property>
+                        <property name="always_show_image">True</property>
                       </object>
                       <packing>
                         <property name="left_attach">2</property>
@@ -143,11 +138,10 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkButton" id="default6">
+                      <object class="GtkToggleButton" id="default6">
                         <property name="can_focus">True</property>
                         <property name="receives_default">True</property>
-                        <property name="hexpand">True</property>
-                        <property name="vexpand">True</property>
+                        <property name="always_show_image">True</property>
                       </object>
                       <packing>
                         <property name="left_attach">0</property>
@@ -155,11 +149,10 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkButton" id="default7">
+                      <object class="GtkToggleButton" id="default7">
                         <property name="can_focus">True</property>
                         <property name="receives_default">True</property>
-                        <property name="hexpand">True</property>
-                        <property name="vexpand">True</property>
+                        <property name="always_show_image">True</property>
                       </object>
                       <packing>
                         <property name="left_attach">1</property>
@@ -167,11 +160,10 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkButton" id="default8">
+                      <object class="GtkToggleButton" id="default8">
                         <property name="can_focus">True</property>
                         <property name="receives_default">True</property>
-                        <property name="hexpand">True</property>
-                        <property name="vexpand">True</property>
+                        <property name="always_show_image">True</property>
                       </object>
                       <packing>
                         <property name="left_attach">2</property>
diff --git a/extras/source/glade/libreoffice-catalog.xml.in b/extras/source/glade/libreoffice-catalog.xml.in
index 3bdad8e86e12..63d4c7a0520e 100644
--- a/extras/source/glade/libreoffice-catalog.xml.in
+++ b/extras/source/glade/libreoffice-catalog.xml.in
@@ -137,31 +137,18 @@
     <glade-widget-class title="NUP Preview" name="vcllo-ShowNupOrderWindow"
                         generic-name="NUP Preview" parent="GtkDrawingArea"
                         icon-name="widget-gtk-drawingarea"/>
-    <glade-widget-class title="Tree List" name="vcllo-SvTreeListBox"
-                        generic-name="Tree List" parent="GtkTreeView"
-                        icon-name="widget-gtk-treeview">
-      <properties>
-        <property save="True" query="False" id="min-width-chars" default="-1" name="Minimum Width in Characters">
-          <parameter-spec>
-            <type>GParamInt</type>
-            <min>-1</min>
-          </parameter-spec>
-          <tooltip>The desired minimum width of the SvTreeListBox, in characters</tooltip>
-        </property>
-      </properties>
-    </glade-widget-class>
 
     <glade-widget-class title="Content List Box" name="sfxlo-ContentListBox"
-                        generic-name="Content List Box" parent="vcllo-SvTreeListBox"
+                        generic-name="Content List Box" parent="GtkTreeView"
                         icon-name="widget-gtk-treeview"/>
     <glade-widget-class title="Animation ListBox" name="sdlo-CustomAnimationList"
-                        generic-name="Animation ListBox" parent="vcllo-SvTreeListBox"
+                        generic-name="Animation ListBox" parent="GtkTreeView"
                         icon-name="widget-gtk-treeview"/>
     <glade-widget-class title="Page Objs ListBox" name="sdlo-SdPageObjsTLB"
-                        generic-name="SdPageObjsTLB" parent="vcllo-SvTreeListBox"
+                        generic-name="SdPageObjsTLB" parent="GtkTreeView"
                         icon-name="widget-gtk-treeview"/>
     <glade-widget-class title="Page List Control" name="sduilo-SdPageListControl"
-                        generic-name="Page List Control" parent="vcllo-SvTreeListBox"
+                        generic-name="Page List Control" parent="GtkTreeView"
                         icon-name="widget-gtk-treeview"/>
     <glade-widget-class title="Sidebar Dial Control" name="svxlo-SidebarDialControl"
                         generic-name="Sidebar Dial Control" parent="GtkSpinner"
diff --git a/include/sfx2/sfxdlg.hxx b/include/sfx2/sfxdlg.hxx
index d47b4f219bc6..b82db9001359 100644
--- a/include/sfx2/sfxdlg.hxx
+++ b/include/sfx2/sfxdlg.hxx
@@ -119,7 +119,7 @@ class SFX2_DLLPUBLIC SfxAbstractDialogFactory : virtual public VclAbstractDialog
 public:
                                         virtual ~SfxAbstractDialogFactory() override;    // needed for export of vtable
     static SfxAbstractDialogFactory*    Create();
-    virtual VclPtr<VclAbstractDialog>          CreateFrameDialog(vcl::Window* pParent, const css::uno::Reference< css::frame::XFrame >& rFrame, sal_uInt32 nResId, const OUString& rParameter ) = 0;
+    virtual VclPtr<VclAbstractDialog>          CreateFrameDialog(weld::Window* pParent, const css::uno::Reference< css::frame::XFrame >& rFrame, sal_uInt32 nResId, const OUString& rParameter) = 0;
     virtual VclPtr<SfxAbstractTabDialog>       CreateAutoCorrTabDialog(weld::Window* pParent, const SfxItemSet* pAttrSet) = 0;
     virtual VclPtr<SfxAbstractTabDialog>       CreateCustomizeTabDialog(weld::Window* pParent,
                                             const SfxItemSet* pAttrSet,
diff --git a/include/sfx2/tabdlg.hxx b/include/sfx2/tabdlg.hxx
index 791887059189..851b859796aa 100644
--- a/include/sfx2/tabdlg.hxx
+++ b/include/sfx2/tabdlg.hxx
@@ -196,6 +196,12 @@ public:
     virtual             ~SfxTabPage() override;
     virtual void        dispose() override;
 
+    void set_visible(bool bVisible)
+    {
+        m_xContainer->set_visible(bVisible);
+        Show(bVisible);
+    }
+
     const SfxItemSet&   GetItemSet() const { return *pSet; }
 
     virtual bool        FillItemSet( SfxItemSet* );
diff --git a/include/vcl/abstdlg.hxx b/include/vcl/abstdlg.hxx
index 0870a72fed62..864799204ae8 100644
--- a/include/vcl/abstdlg.hxx
+++ b/include/vcl/abstdlg.hxx
@@ -145,7 +145,7 @@ public:
     virtual             ~VclAbstractDialogFactory();    // needed for export of vtable
     static VclAbstractDialogFactory* Create();
     // The Id is an implementation detail of the factory
-    virtual VclPtr<VclAbstractDialog> CreateVclDialog(vcl::Window* pParent, sal_uInt32 nId) = 0;
+    virtual VclPtr<VclAbstractDialog> CreateVclDialog(weld::Window* pParent, sal_uInt32 nId) = 0;
 
     // creates instance of PasswordToOpenModifyDialog from cui
     virtual VclPtr<AbstractPasswordToOpenModifyDialog> CreatePasswordToOpenModifyDialog(weld::Window * pParent, sal_uInt16 nMaxPasswdLen, bool bIsPasswordToModify) = 0;
diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index 8fd763e434ac..8a1f7ae43d26 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -256,10 +256,13 @@ public:
 class VCL_DLLPUBLIC Container : virtual public Widget
 {
 public:
-    //remove and add in one go
+    // remove and add in one go
     virtual void move(weld::Widget* pWidget, weld::Container* pNewParent) = 0;
-    //recursively unset has-default on any buttons in the widget hierarchy
+    // recursively unset has-default on any buttons in the widget hierarchy
     virtual void recursively_unset_default_buttons() = 0;
+    // create an XWindow as a child of this container. The XWindow is
+    // suitable to contain css::awt::XControl items
+    virtual css::uno::Reference<css::awt::XWindow> CreateChildFrame() = 0;
 };
 
 class VCL_DLLPUBLIC ScrolledWindow : virtual public Container
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index 895ca4cf3ce6..40d694e6df8a 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -1178,7 +1178,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
                 {
                     SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
                     ScTabViewShell* pSh = GetBestViewShell();
-                    ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateVclDialog(pSh ? pSh->GetLegacyDialogParent() : nullptr, SID_LANGUAGE_OPTIONS));
+                    ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateVclDialog(pSh ? pSh->GetDialogParent() : nullptr, SID_LANGUAGE_OPTIONS));
                     pDlg->Execute();
 
                     rDoc.GetLanguage( eLang, eCjk, eCtl );
diff --git a/sc/uiconfig/scalc/ui/tpviewpage.ui b/sc/uiconfig/scalc/ui/tpviewpage.ui
index f6e147c90485..a88f4db61c03 100644
--- a/sc/uiconfig/scalc/ui/tpviewpage.ui
+++ b/sc/uiconfig/scalc/ui/tpviewpage.ui
@@ -2,7 +2,6 @@
 <!-- Generated with glade 3.22.1 -->
 <interface domain="sc">
   <requires lib="gtk+" version="3.18"/>
-  <requires lib="LibreOffice" version="1.0"/>
   <object class="GtkBox" id="TpViewPage">
     <property name="visible">True</property>
     <property name="can_focus">False</property>
@@ -45,8 +44,6 @@
                       <packing>
                         <property name="left_attach">0</property>
                         <property name="top_attach">0</property>
-                        <property name="width">1</property>
-                        <property name="height">1</property>
                       </packing>
                     </child>
                     <child>
@@ -62,8 +59,6 @@
                       <packing>
                         <property name="left_attach">0</property>
                         <property name="top_attach">1</property>
-                        <property name="width">1</property>
-                        <property name="height">1</property>
                       </packing>
                     </child>
                     <child>
@@ -79,8 +74,6 @@
                       <packing>
                         <property name="left_attach">0</property>
                         <property name="top_attach">2</property>
-                        <property name="width">1</property>
-                        <property name="height">1</property>
                       </packing>
                     </child>
                     <child>
@@ -96,8 +89,6 @@
                       <packing>

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list