[Libreoffice-commits] core.git: 2 commits - basctl/source cui/source include/sfx2 sc/source sd/source sfx2/inc sfx2/Library_sfx.mk sfx2/source svx/source sw/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Fri May 31 08:32:14 UTC 2019


 basctl/source/basicide/basides1.cxx     |    1 
 cui/source/customize/cfg.cxx            |    2 
 cui/source/dialogs/cuifmsearch.cxx      |    1 
 cui/source/inc/optlingu.hxx             |    1 
 cui/source/options/optaboutconfig.cxx   |    1 
 cui/source/options/optaccessibility.hxx |    2 
 cui/source/options/optjava.cxx          |    7 
 cui/source/options/optjava.hxx          |    2 
 cui/source/options/optopencl.hxx        |    1 
 cui/source/options/optsave.hxx          |    1 
 cui/source/options/optupdt.hxx          |    1 
 cui/source/options/personalization.cxx  |    1 
 cui/source/tabpages/tparea.cxx          |    6 
 include/sfx2/tabdlg.hxx                 |  120 ----
 sc/source/ui/inc/tpcalc.hxx             |    1 
 sc/source/ui/view/tabcont.cxx           |    1 
 sd/source/ui/dlg/diactrl.cxx            |    1 
 sd/source/ui/dlg/paragr.cxx             |    1 
 sfx2/Library_sfx.mk                     |    1 
 sfx2/inc/uitest/sfx_uiobject.hxx        |   39 -
 sfx2/source/dialog/dinfdlg.cxx          |    2 
 sfx2/source/dialog/tabdlg.cxx           |  952 --------------------------------
 sfx2/source/uitest/sfx_uiobject.cxx     |   87 --
 svx/source/form/fmshimp.cxx             |    1 
 sw/source/uibase/uiview/viewprt.cxx     |    1 
 25 files changed, 24 insertions(+), 1210 deletions(-)

New commits:
commit 13da1c7913ca76ca5b33f0666ab7cc4a219815e1
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed May 29 14:16:06 2019 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri May 31 10:31:28 2019 +0200

    drop unneeded includes
    
    Change-Id: Ie0f52bb1d6866075d0b664bfc3ddc47c02e4f81b
    Reviewed-on: https://gerrit.libreoffice.org/73169
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/basctl/source/basicide/basides1.cxx b/basctl/source/basicide/basides1.cxx
index 8ec13c090270..5fac7468fe41 100644
--- a/basctl/source/basicide/basides1.cxx
+++ b/basctl/source/basicide/basides1.cxx
@@ -52,6 +52,7 @@
 #include <svl/visitem.hxx>
 #include <svl/whiter.hxx>
 #include <vcl/xtextedt.hxx>
+#include <vcl/tabctrl.hxx>
 #include <vcl/textview.hxx>
 #include <vcl/svapp.hxx>
 #include <vcl/weld.hxx>
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 4ae83691ae40..bf583d4d37a4 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -25,11 +25,13 @@
 #include <time.h>
 #include <typeinfo>
 
+#include <vcl/button.hxx>
 #include <vcl/commandinfoprovider.hxx>
 #include <vcl/edit.hxx>
 #include <vcl/event.hxx>
 #include <vcl/help.hxx>
 #include <vcl/svapp.hxx>
+#include <vcl/toolbox.hxx>
 #include <vcl/weld.hxx>
 #include <vcl/decoview.hxx>
 #include <vcl/virdev.hxx>
diff --git a/cui/source/dialogs/cuifmsearch.cxx b/cui/source/dialogs/cuifmsearch.cxx
index ea1ad2452d00..d898930ef147 100644
--- a/cui/source/dialogs/cuifmsearch.cxx
+++ b/cui/source/dialogs/cuifmsearch.cxx
@@ -18,6 +18,7 @@
  */
 
 #include <tools/debug.hxx>
+#include <vcl/button.hxx>
 #include <vcl/weld.hxx>
 #include <vcl/svapp.hxx>
 #include <dialmgr.hxx>
diff --git a/cui/source/inc/optlingu.hxx b/cui/source/inc/optlingu.hxx
index 8a6b75a016e0..77e016d0b154 100644
--- a/cui/source/inc/optlingu.hxx
+++ b/cui/source/inc/optlingu.hxx
@@ -19,6 +19,7 @@
 #ifndef INCLUDED_CUI_SOURCE_INC_OPTLINGU_HXX
 #define INCLUDED_CUI_SOURCE_INC_OPTLINGU_HXX
 
+#include <vcl/button.hxx>
 #include <vcl/fixed.hxx>
 #include <vcl/toolbox.hxx>
 #include <vcl/field.hxx>
diff --git a/cui/source/options/optaboutconfig.cxx b/cui/source/options/optaboutconfig.cxx
index e62d555a1f1c..b7a02eff8287 100644
--- a/cui/source/options/optaboutconfig.cxx
+++ b/cui/source/options/optaboutconfig.cxx
@@ -10,6 +10,7 @@
 #include "optaboutconfig.hxx"
 #include "optHeaderTabListbox.hxx"
 
+#include <vcl/button.hxx>
 #include <vcl/event.hxx>
 #include <vcl/svlbitm.hxx>
 #include <vcl/treelistentry.hxx>
diff --git a/cui/source/options/optaccessibility.hxx b/cui/source/options/optaccessibility.hxx
index d451d1969875..5f4dc18206a5 100644
--- a/cui/source/options/optaccessibility.hxx
+++ b/cui/source/options/optaccessibility.hxx
@@ -20,8 +20,10 @@
 #define INCLUDED_CUI_SOURCE_OPTIONS_OPTACCESSIBILITY_HXX
 
 #include <sfx2/tabdlg.hxx>
+#include <vcl/button.hxx>
 #include <vcl/fixed.hxx>
 #include <vcl/field.hxx>
+
 class SvxAccessibilityOptionsTabPage : public SfxTabPage
 {
     VclPtr<CheckBox>       m_pAccessibilityTool;
diff --git a/cui/source/options/optopencl.hxx b/cui/source/options/optopencl.hxx
index de289d23341f..dc3a226bb37c 100644
--- a/cui/source/options/optopencl.hxx
+++ b/cui/source/options/optopencl.hxx
@@ -23,6 +23,7 @@
 #include <opencl/openclconfig.hxx>
 #include <sfx2/tabdlg.hxx>
 #include <svtools/simptabl.hxx>
+#include <vcl/button.hxx>
 #include <vcl/fixed.hxx>
 
 class SvxOpenCLTabPage : public SfxTabPage
diff --git a/cui/source/options/optsave.hxx b/cui/source/options/optsave.hxx
index 56d88fd5af4a..a6b7579f16f5 100644
--- a/cui/source/options/optsave.hxx
+++ b/cui/source/options/optsave.hxx
@@ -20,6 +20,7 @@
 #define INCLUDED_CUI_SOURCE_OPTIONS_OPTSAVE_HXX
 
 #include <memory>
+#include <vcl/button.hxx>
 #include <vcl/field.hxx>
 #include <vcl/fixed.hxx>
 #include <vcl/lstbox.hxx>
diff --git a/cui/source/options/optupdt.hxx b/cui/source/options/optupdt.hxx
index 5e09143ca61a..b9c844fa82a1 100644
--- a/cui/source/options/optupdt.hxx
+++ b/cui/source/options/optupdt.hxx
@@ -21,6 +21,7 @@
 #define INCLUDED_CUI_SOURCE_OPTIONS_OPTUPDT_HXX
 
 #include <sfx2/tabdlg.hxx>
+#include <vcl/button.hxx>
 #include <vcl/fixed.hxx>
 #include <com/sun/star/container/XNameReplace.hpp>
 #include <com/sun/star/configuration/XReadWriteAccess.hpp>
diff --git a/cui/source/options/personalization.cxx b/cui/source/options/personalization.cxx
index e9d9380065d1..e7c68fccb495 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -20,6 +20,7 @@
 #include <rtl/strbuf.hxx>
 #include <tools/urlobj.hxx>
 #include <tools/stream.hxx>
+#include <vcl/button.hxx>
 #include <vcl/event.hxx>
 #include <vcl/svapp.hxx>
 #include <vcl/settings.hxx>
diff --git a/include/sfx2/tabdlg.hxx b/include/sfx2/tabdlg.hxx
index 862dc10a1bcc..77f9125ef8d2 100644
--- a/include/sfx2/tabdlg.hxx
+++ b/include/sfx2/tabdlg.hxx
@@ -24,9 +24,6 @@
 #include <sfx2/dllapi.h>
 #include <sfx2/basedlgs.hxx>
 #include <sal/types.h>
-#include <vcl/button.hxx>
-#include <vcl/tabctrl.hxx>
-#include <vcl/tabdlg.hxx>
 #include <vcl/tabpage.hxx>
 #include <svl/itempool.hxx>
 #include <svl/itemset.hxx>
diff --git a/sc/source/ui/inc/tpcalc.hxx b/sc/source/ui/inc/tpcalc.hxx
index f2a3e33284ac..31d5d6f3c62e 100644
--- a/sc/source/ui/inc/tpcalc.hxx
+++ b/sc/source/ui/inc/tpcalc.hxx
@@ -21,6 +21,7 @@
 #define INCLUDED_SC_SOURCE_UI_INC_TPCALC_HXX
 
 #include <sfx2/tabdlg.hxx>
+#include <vcl/button.hxx>
 #include <vcl/fixed.hxx>
 #include <vcl/field.hxx>
 #include "editfield.hxx"
diff --git a/sc/source/ui/view/tabcont.cxx b/sc/source/ui/view/tabcont.cxx
index e4e42e947dcc..4a2739c28fe0 100644
--- a/sc/source/ui/view/tabcont.cxx
+++ b/sc/source/ui/view/tabcont.cxx
@@ -23,6 +23,7 @@
 #include <tools/urlobj.hxx>
 #include <vcl/commandevent.hxx>
 #include <vcl/svapp.hxx>
+#include <vcl/tabctrl.hxx>
 #include <tabcont.hxx>
 #include <tabvwsh.hxx>
 #include <docsh.hxx>
diff --git a/sd/source/ui/dlg/diactrl.cxx b/sd/source/ui/dlg/diactrl.cxx
index cc8dd8761501..d05f4f1f16a0 100644
--- a/sd/source/ui/dlg/diactrl.cxx
+++ b/sd/source/ui/dlg/diactrl.cxx
@@ -18,6 +18,7 @@
  */
 
 #include <svl/intitem.hxx>
+#include <vcl/toolbox.hxx>
 
 #include <strings.hrc>
 
diff --git a/sd/source/ui/dlg/paragr.cxx b/sd/source/ui/dlg/paragr.cxx
index 3f874bbe8aaf..a1e631b49254 100644
--- a/sd/source/ui/dlg/paragr.cxx
+++ b/sd/source/ui/dlg/paragr.cxx
@@ -22,6 +22,7 @@
 #include <svl/cjkoptions.hxx>
 #include <svl/eitem.hxx>
 #include <svl/intitem.hxx>
+#include <vcl/button.hxx>
 
 #include <svx/dialogs.hrc>
 #include <svx/svxids.hrc>
diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx
index 18c38e3c4882..6ee16148076a 100644
--- a/svx/source/form/fmshimp.cxx
+++ b/svx/source/form/fmshimp.cxx
@@ -96,6 +96,7 @@
 #include <toolkit/helper/vclunohelper.hxx>
 #include <tools/debug.hxx>
 #include <tools/diagnose_ex.h>
+#include <vcl/image.hxx>
 #include <vcl/weld.hxx>
 #include <vcl/waitobj.hxx>
 #include <vcl/settings.hxx>
diff --git a/sw/source/uibase/uiview/viewprt.cxx b/sw/source/uibase/uiview/viewprt.cxx
index 42301529fe8a..3a3bf94abef3 100644
--- a/sw/source/uibase/uiview/viewprt.cxx
+++ b/sw/source/uibase/uiview/viewprt.cxx
@@ -25,6 +25,7 @@
 #include <sfx2/app.hxx>
 #include <sfx2/viewfrm.hxx>
 #include <vcl/weld.hxx>
+#include <vcl/button.hxx>
 #include <vcl/oldprintadaptor.hxx>
 #include <sfx2/printer.hxx>
 #include <sfx2/prnmon.hxx>
commit d6e4c97c8e8ab96ca099dd4f8a3fe35204dea8c1
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed May 29 12:41:16 2019 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri May 31 10:31:17 2019 +0200

    remove newly unused SfxTabDialog
    
    Change-Id: Iebbfe2ab66ff6e058c90c85de747f549cbc36aa5
    Reviewed-on: https://gerrit.libreoffice.org/73156
    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/options/optjava.cxx b/cui/source/options/optjava.cxx
index 34f8de7c3f4b..4c2a9d1f2c8c 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -362,7 +362,6 @@ IMPL_LINK_NOARG(SvxJavaOptionsPage, StartFolderPickerHdl, void*, void)
     }
 }
 
-
 IMPL_LINK( SvxJavaOptionsPage, DialogClosedHdl, DialogClosedEvent*, pEvt, void )
 {
     if ( RET_OK == pEvt->DialogResult )
@@ -373,10 +372,9 @@ IMPL_LINK( SvxJavaOptionsPage, DialogClosedHdl, DialogClosedEvent*, pEvt, void )
     }
 }
 
-
-IMPL_LINK_NOARG( SvxJavaOptionsPage, ExpertConfigHdl_Impl, Button*, void )
+IMPL_STATIC_LINK( SvxJavaOptionsPage, ExpertConfigHdl_Impl, Button*, pButton, void )
 {
-    ScopedVclPtrInstance< CuiAboutConfigTabPage > pExpertConfigDlg(GetTabDialog());
+    ScopedVclPtrInstance< CuiAboutConfigTabPage > pExpertConfigDlg(pButton->GetParentDialog());
     pExpertConfigDlg->Reset();//initialize and reset function
 
     if( RET_OK == pExpertConfigDlg->Execute() )
@@ -387,7 +385,6 @@ IMPL_LINK_NOARG( SvxJavaOptionsPage, ExpertConfigHdl_Impl, Button*, void )
     pExpertConfigDlg.disposeAndClear();
 }
 
-
 void SvxJavaOptionsPage::ClearJavaInfo()
 {
 #if HAVE_FEATURE_JAVA
diff --git a/cui/source/options/optjava.hxx b/cui/source/options/optjava.hxx
index 12de3f8df507..116008567143 100644
--- a/cui/source/options/optjava.hxx
+++ b/cui/source/options/optjava.hxx
@@ -98,7 +98,7 @@ private:
     DECL_LINK(        StartFolderPickerHdl, void *, void );
     DECL_LINK(        DialogClosedHdl, css::ui::dialogs::DialogClosedEvent*, void );
 
-    DECL_LINK(        ExpertConfigHdl_Impl, Button*, void);
+    DECL_STATIC_LINK(SvxJavaOptionsPage, ExpertConfigHdl_Impl, Button*, void);
 
     void                    ClearJavaInfo();
     void                    ClearJavaList();
diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx
index f3ff007461cf..0ba9dcdeda72 100644
--- a/cui/source/tabpages/tparea.cxx
+++ b/cui/source/tabpages/tparea.cxx
@@ -393,15 +393,9 @@ void SvxAreaTabPage::SelectFillType(weld::ToggleButton& rButton, const SfxItemSe
         maBox.SelectButton(&rButton);
         FillType eFillType = static_cast<FillType>(maBox.GetCurrentButtonPos());
         TabPageParent aFillTab(m_xFillTab.get(), GetDialogController());
-        // TEMP
-        if (!aFillTab.pController)
-            aFillTab.pParent = GetParentDialog();
         m_pFillTabPage.disposeAndReset(lcl_CreateFillStyleTabPage(eFillType, aFillTab, m_rXFSet));
         if (m_pFillTabPage)
-        {
-            m_pFillTabPage->SetTabDialog(GetTabDialog());
             m_pFillTabPage->SetDialogController(GetDialogController());
-        }
         CreatePage( eFillType , m_pFillTabPage);
     }
 }
diff --git a/include/sfx2/tabdlg.hxx b/include/sfx2/tabdlg.hxx
index 80cb3faade16..862dc10a1bcc 100644
--- a/include/sfx2/tabdlg.hxx
+++ b/include/sfx2/tabdlg.hxx
@@ -51,121 +51,6 @@ public:
     virtual SfxPoolItem*    Clone(SfxItemPool* pToPool = nullptr) const override;
 };
 
-class SFX2_DLLPUBLIC SfxTabDialog : public TabDialog
-{
-private:
-friend class SfxTabPage;
-friend class SfxTabDialogUIObject;
-
-    VclPtr<VclBox>     m_pBox;
-    VclPtr<TabControl> m_pTabCtrl;
-
-    VclPtr<PushButton> m_pOKBtn;
-    VclPtr<PushButton> m_pUserBtn;
-    VclPtr<CancelButton> m_pCancelBtn;
-    VclPtr<HelpButton> m_pHelpBtn;
-    VclPtr<PushButton> m_pResetBtn;
-    VclPtr<PushButton> m_pBaseFmtBtn;
-
-    bool m_bOwnsOKBtn;
-    bool m_bOwnsCancelBtn;
-    bool m_bOwnsHelpBtn;
-    bool m_bOwnsResetBtn;
-    bool m_bOwnsBaseFmtBtn;
-
-    std::unique_ptr<SfxItemSet>           m_pSet;
-    std::unique_ptr<SfxItemSet>           m_pOutSet;
-    std::unique_ptr< TabDlg_Impl >        m_pImpl;
-    std::unique_ptr<sal_uInt16[]>         m_pRanges;
-    sal_uInt16          m_nAppPageId;
-    bool                m_bStandardPushed;
-
-    DECL_DLLPRIVATE_LINK(ActivatePageHdl, TabControl*, void );
-    DECL_DLLPRIVATE_LINK(DeactivatePageHdl, TabControl*, bool );
-    DECL_DLLPRIVATE_LINK(OkHdl, Button*, void);
-    DECL_DLLPRIVATE_LINK(ResetHdl, Button*, void);
-    DECL_DLLPRIVATE_LINK(BaseFmtHdl, Button*, void);
-    DECL_DLLPRIVATE_LINK(UserHdl, Button*, void);
-    DECL_DLLPRIVATE_LINK(CancelHdl, Button*, void);
-    SAL_DLLPRIVATE void Init_Impl();
-
-protected:
-    virtual short               Ok();
-    // Is deleted in Sfx!
-    static SfxItemSet*          CreateInputItemSet( sal_uInt16 nId );
-    virtual void                PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
-
-    VclPtr<VclButtonBox>   m_pActionArea;
-    SfxItemSet*     m_pExampleSet;
-    SfxItemSet*     GetInputSetImpl();
-    SfxTabPage*     GetTabPage( sal_uInt16 nPageId ) const;
-
-    /** prepare to leave the current page. Calls the DeactivatePage method of the current page, (if necessary),
-        handles the item sets to copy.
-        @return sal_True if it is allowed to leave the current page, sal_False otherwise
-    */
-    bool PrepareLeaveCurrentPage();
-
-    /** save the position of the TabDialog and which tab page is the currently active one
-     */
-    void SavePosAndId();
-
-    void SetPageName(sal_uInt16 nPageId, const OString& rName) const;
-public:
-    SfxTabDialog(vcl::Window* pParent,
-                 const OUString& rID, const OUString& rUIXMLDescription,
-                 const SfxItemSet * = nullptr);
-    virtual ~SfxTabDialog() override;
-    virtual void dispose() override;
-
-    sal_uInt16          AddTabPage( const OString& rName,           // Name of the label for the page in the notebook .ui
-                                    CreateTabPage pCreateFunc);      // != 0
-
-    void                AddTabPage( sal_uInt16 nId,
-                                    const OUString &rRiderText,
-                                    CreateTabPage pCreateFunc,      // != 0
-                                    sal_uInt16 nPos = TAB_APPEND);
-
-    void                SetCurPageId(sal_uInt16 nId)
-    {
-        m_nAppPageId = nId;
-    }
-    sal_uInt16          GetCurPageId() const
-    {
-        return m_pTabCtrl->GetCurPageId();
-    }
-
-    SfxTabPage* GetCurTabPage() const
-    {
-        return GetTabPage(m_pTabCtrl->GetCurPageId());
-    }
-
-    virtual OString GetScreenshotId() const override;
-
-    OUString const & GetPageText( sal_uInt16 nPageId ) const
-    {
-        return m_pTabCtrl->GetPageText(nPageId);
-    }
-
-    void                ShowPage( sal_uInt16 nId );
-
-    // may provide local slots converted by Map
-    const sal_uInt16*       GetInputRanges( const SfxItemPool& );
-    const SfxItemSet*   GetOutputItemSet() const { return m_pOutSet.get(); }
-
-    short               Execute() override;
-    bool                StartExecuteAsync( VclAbstractDialog::AsyncContext &rCtx ) override;
-
-    const SfxItemSet*   GetExampleSet() const { return m_pExampleSet; }
-
-    SAL_DLLPRIVATE void Start_Impl();
-
-    virtual FactoryFunction GetUITestFactory() const override;
-    // Screenshot interface
-    virtual std::vector<OString> getAllPageUIXMLDescriptions() const override;
-    virtual bool selectPageByUIXMLDescription(const OString& rUIXMLDescription) override;
-};
-
 class SFX2_DLLPUBLIC SfxTabDialogController : public SfxOkDialogController
 {
 protected:
@@ -306,10 +191,8 @@ protected:
         return static_cast<const T*>(GetOldItem(rSet, sal_uInt16(nSlot), bDeep));
     }
 
-    SfxTabDialog*       GetTabDialog() const;
     SfxOkDialogController* GetDialogController() const;
 public:
-    void                SetTabDialog(SfxTabDialog* pDialog);
     void                SetDialogController(SfxOkDialogController* pDialog);
 public:
     virtual             ~SfxTabPage() override;
diff --git a/sfx2/Library_sfx.mk b/sfx2/Library_sfx.mk
index d4fb4cf6b972..fe6f24c6dd98 100644
--- a/sfx2/Library_sfx.mk
+++ b/sfx2/Library_sfx.mk
@@ -291,7 +291,6 @@ $(eval $(call gb_Library_add_exception_objects,sfx,\
     sfx2/source/statbar/stbitem \
     sfx2/source/styles/StyleManager \
     sfx2/source/toolbox/tbxitem \
-    sfx2/source/uitest/sfx_uiobject \
     sfx2/source/view/classificationcontroller \
     sfx2/source/view/classificationhelper \
     sfx2/source/view/frame \
diff --git a/sfx2/inc/uitest/sfx_uiobject.hxx b/sfx2/inc/uitest/sfx_uiobject.hxx
deleted file mode 100644
index b240a2745aa3..000000000000
--- a/sfx2/inc/uitest/sfx_uiobject.hxx
+++ /dev/null
@@ -1,39 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-
-#include <vcl/uitest/uiobject.hxx>
-#include <memory>
-
-class SfxTabDialog;
-
-class SfxTabDialogUIObject : public WindowUIObject
-{
-private:
-
-    VclPtr<SfxTabDialog> mxTabDialog;
-
-public:
-
-    SfxTabDialogUIObject(const VclPtr<SfxTabDialog>& xTabDialog);
-
-    virtual ~SfxTabDialogUIObject() override;
-
-    virtual StringMap get_state() override;
-
-    virtual void execute(const OUString& rAction,
-            const StringMap& rParameters) override;
-
-    static std::unique_ptr<UIObject> create(vcl::Window* pWindow);
-
-protected:
-
-    virtual OUString get_name() const override;
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index 02afc0af8452..71612ce19235 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -814,7 +814,7 @@ void SfxDocumentPage::ImplUpdateSignatures()
     try
     {
         xD = security::DocumentDigitalSignatures::createDefault(comphelper::getProcessComponentContext());
-        xD->setParentWindow(VCLUnoHelper::GetInterface(GetTabDialog()));
+        xD->setParentWindow(GetDialogController()->getDialog()->GetXWindow());
     }
     catch ( const css::uno::DeploymentException& )
     {
diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx
index 79e2ad750ada..f75b78a1a9f7 100644
--- a/sfx2/source/dialog/tabdlg.cxx
+++ b/sfx2/source/dialog/tabdlg.cxx
@@ -33,7 +33,6 @@
 #include <sfx2/bindings.hxx>
 #include <sfx2/sfxdlg.hxx>
 #include <sfx2/viewsh.hxx>
-#include <uitest/sfx_uiobject.hxx>
 #include <unotools/viewoptions.hxx>
 #include <vcl/builder.hxx>
 #include <vcl/IDialogRenderable.hxx>
@@ -52,7 +51,6 @@ using namespace ::com::sun::star::uno;
 struct TabPageImpl
 {
     bool                        mbStandard;
-    VclPtr<SfxTabDialog>        mxDialog;
     SfxOkDialogController*      mpDialogController;
     css::uno::Reference< css::frame::XFrame > mxFrame;
 
@@ -61,7 +59,6 @@ struct TabPageImpl
 
 struct Data_Impl
 {
-    sal_uInt16 const nId;               // The ID
     OString const sId;                  // The ID
     CreateTabPage fnCreatePage;   // Pointer to Factory
     GetTabPageRanges fnGetRanges; // Pointer to Ranges-Function
@@ -69,22 +66,15 @@ struct Data_Impl
     bool bRefresh;                // Flag: Page must be re-initialized
 
     // Constructor
-    Data_Impl( sal_uInt16 Id, const OString& rId, CreateTabPage fnPage,
+    Data_Impl( const OString& rId, CreateTabPage fnPage,
                GetTabPageRanges fnRanges ) :
 
-        nId         ( Id ),
         sId         ( rId ),
         fnCreatePage( fnPage ),
         fnGetRanges ( fnRanges ),
         pTabPage    ( nullptr ),
         bRefresh    ( false )
     {
-        if ( !fnCreatePage  )
-        {
-            SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
-            fnCreatePage = pFact->GetTabPageCreatorFunc( nId );
-            fnGetRanges = pFact->GetTabPageRangesFunc( nId );
-        }
     }
 };
 
@@ -119,25 +109,6 @@ struct TabDlg_Impl
     }
 };
 
-
-static Data_Impl* Find( const SfxTabDlgData_Impl& rArr, sal_uInt16 nId, sal_uInt16* pPos = nullptr)
-{
-    const sal_uInt16 nCount = rArr.size();
-
-    for ( sal_uInt16 i = 0; i < nCount; ++i )
-    {
-        Data_Impl* pObj = rArr[i];
-
-        if ( pObj->nId == nId )
-        {
-            if ( pPos )
-                *pPos = i;
-            return pObj;
-        }
-    }
-    return nullptr;
-}
-
 static Data_Impl* Find( const SfxTabDlgData_Impl& rArr, const OString& rId, sal_uInt16* pPos = nullptr)
 {
     const sal_uInt16 nCount = rArr.size();
@@ -320,16 +291,6 @@ void SfxTabPage::ChangesApplied()
 {
 }
 
-void SfxTabPage::SetTabDialog(SfxTabDialog* pDialog)
-{
-    pImpl->mxDialog = pDialog;
-}
-
-SfxTabDialog* SfxTabPage::GetTabDialog() const
-{
-    return pImpl->mxDialog;
-}
-
 void SfxTabPage::SetDialogController(SfxOkDialogController* pDialog)
 {
     pImpl->mpDialogController = pDialog;
@@ -361,918 +322,9 @@ const SfxItemSet* SfxTabPage::GetDialogExampleSet() const
 {
     if (pImpl->mpDialogController)
         return pImpl->mpDialogController->GetExampleSet();
-    if (pImpl->mxDialog)
-        return pImpl->mxDialog->GetExampleSet();
-    return nullptr;
-}
-
-SfxTabDialog::SfxTabDialog
-
-/*  [Description]
-
-    Constructor, temporary without Frame
-*/
-
-(
-    vcl::Window* pParent,              // Parent Window
-    const OUString& rID, const OUString& rUIXMLDescription, //Dialog Name, Dialog .ui path
-    const SfxItemSet* pItemSet    // Itemset with the data;
-                                  // can be NULL, when Pages are onDemand
-)
-    : TabDialog(pParent, rID, rUIXMLDescription)
-    , m_pSet(pItemSet ? new SfxItemSet(*pItemSet) : nullptr)
-    , m_nAppPageId(USHRT_MAX)
-    , m_bStandardPushed(false)
-    , m_pExampleSet(nullptr)
-{
-    Init_Impl();
-
-    sal_uInt16 nPageCount = m_pTabCtrl->GetPageCount();
-    for (sal_uInt16 nPage = 0; nPage < nPageCount; ++nPage)
-    {
-        sal_uInt16 nPageId = m_pTabCtrl->GetPageId(nPage);
-        m_pTabCtrl->SetTabPage(nPageId, nullptr);
-    }
-}
-
-SfxTabDialog::~SfxTabDialog()
-{
-    disposeOnce();
-}
-
-void SfxTabDialog::dispose()
-{
-    SavePosAndId();
-
-    for (auto & elem : m_pImpl->aData)
-    {
-        if ( elem->pTabPage )
-        {
-            // save settings of all pages (user data)
-            elem->pTabPage->FillUserData();
-            OUString aPageData( elem->pTabPage->GetUserData() );
-            if ( !aPageData.isEmpty() )
-            {
-                // save settings of all pages (user data)
-                OUString sConfigId = OStringToOUString(elem->pTabPage->GetConfigId(),
-                    RTL_TEXTENCODING_UTF8);
-                if (sConfigId.isEmpty())
-                {
-                    SAL_WARN("sfx.dialog", "Tabpage needs to be converted to .ui format");
-                    sConfigId = OUString::number(elem->nId);
-                }
-
-                SvtViewOptions aPageOpt(EViewType::TabPage, sConfigId);
-                aPageOpt.SetUserItem( USERITEM_NAME, makeAny( aPageData ) );
-            }
-
-            elem->pTabPage.disposeAndClear();
-        }
-        delete elem;
-        elem = nullptr;
-    }
-
-    m_pImpl.reset();
-    m_pSet.reset();
-    m_pOutSet.reset();
-    delete m_pExampleSet;
-    m_pExampleSet = nullptr;
-    m_pRanges.reset();
-
-    if (m_bOwnsBaseFmtBtn)
-        m_pBaseFmtBtn.disposeAndClear();
-    if (m_bOwnsResetBtn)
-        m_pResetBtn.disposeAndClear();
-    if (m_bOwnsHelpBtn)
-        m_pHelpBtn.disposeAndClear();
-    if (m_bOwnsCancelBtn)
-        m_pCancelBtn.disposeAndClear();
-    if (m_bOwnsOKBtn)
-        m_pOKBtn.disposeAndClear();
-    m_pBox.clear();
-    m_pTabCtrl.clear();
-    m_pOKBtn.clear();
-    m_pUserBtn.clear();
-    m_pCancelBtn.clear();
-    m_pHelpBtn.clear();
-    m_pResetBtn.clear();
-    m_pBaseFmtBtn.clear();
-    m_pActionArea.clear();
-
-    TabDialog::dispose();
-}
-
-void SfxTabDialog::Init_Impl()
-/*  [Description]
-
-    internal initialization of the dialogue
-*/
-{
-    m_pBox = get_content_area();
-    assert(m_pBox);
-    m_pUIBuilder->get(m_pTabCtrl, "tabcontrol");
-
-    m_pImpl.reset( new TabDlg_Impl(m_pTabCtrl->GetPageCount()) );
-
-    m_pActionArea = get_action_area();
-    assert(m_pActionArea);
-
-    m_pOKBtn = m_pUIBuilder->get<PushButton>("ok");
-    m_bOwnsOKBtn = m_pOKBtn == nullptr;
-    if (m_bOwnsOKBtn)
-        m_pOKBtn = VclPtr<OKButton>::Create(m_pActionArea);
-
-    m_pCancelBtn = m_pUIBuilder->get<CancelButton>("cancel");
-    m_bOwnsCancelBtn = m_pCancelBtn == nullptr;
-    if (m_bOwnsCancelBtn)
-        m_pCancelBtn = VclPtr<CancelButton>::Create(m_pActionArea);
-
-    m_pHelpBtn = m_pUIBuilder->get<HelpButton>("help");
-    m_bOwnsHelpBtn = m_pHelpBtn == nullptr;
-    if (m_bOwnsHelpBtn)
-        m_pHelpBtn = VclPtr<HelpButton>::Create(m_pActionArea);
-
-    m_pResetBtn = m_pUIBuilder->get<PushButton>("reset");
-    m_bOwnsResetBtn = m_pResetBtn == nullptr;
-    if (m_bOwnsResetBtn)
-    {
-        m_pResetBtn = VclPtr<PushButton>::Create(m_pActionArea.get());
-        m_pResetBtn->set_id("reset");
-    }
-    else
-        m_pImpl->bHideResetBtn = !m_pResetBtn->IsVisible();
-
-    m_pBaseFmtBtn = m_pUIBuilder->get<PushButton>("standard");
-    m_bOwnsBaseFmtBtn = m_pBaseFmtBtn == nullptr;
-    if (m_bOwnsBaseFmtBtn)
-    {
-        m_pBaseFmtBtn = VclPtr<PushButton>::Create(m_pActionArea.get());
-        m_pBaseFmtBtn->set_id("standard");
-    }
-
-    m_pOKBtn->SetClickHdl( LINK( this, SfxTabDialog, OkHdl ) );
-    m_pCancelBtn->SetClickHdl( LINK( this, SfxTabDialog, CancelHdl ) );
-    m_pResetBtn->SetClickHdl( LINK( this, SfxTabDialog, ResetHdl ) );
-    m_pResetBtn->SetText( SfxResId( STR_RESET ) );
-    m_pTabCtrl->SetActivatePageHdl(
-            LINK( this, SfxTabDialog, ActivatePageHdl ) );
-    m_pTabCtrl->SetDeactivatePageHdl(
-            LINK( this, SfxTabDialog, DeactivatePageHdl ) );
-    m_pActionArea->Show();
-    m_pBox->Show();
-    m_pTabCtrl->Show();
-    m_pOKBtn->Show();
-    m_pCancelBtn->Show();
-    m_pHelpBtn->Show();
-    m_pResetBtn->Show();
-    m_pResetBtn->SetHelpId( HID_TABDLG_RESET_BTN );
-
-    if ( m_pUserBtn )
-    {
-        m_pUserBtn->SetClickHdl( LINK( this, SfxTabDialog, UserHdl ) );
-        m_pUserBtn->Show();
-    }
-
-    if ( m_pSet )
-    {
-        m_pExampleSet = new SfxItemSet( *m_pSet );
-        m_pOutSet.reset(new SfxItemSet( *m_pSet->GetPool(), m_pSet->GetRanges() ));
-    }
-}
-
-short SfxTabDialog::Execute()
-{
-    if ( !m_pTabCtrl->GetPageCount() )
-        return RET_CANCEL;
-    Start_Impl();
-
-    return TabDialog::Execute();
-}
-
-bool SfxTabDialog::StartExecuteAsync( VclAbstractDialog::AsyncContext &rCtx )
-{
-    if ( !m_pTabCtrl->GetPageCount() )
-    {
-        rCtx.mxOwner.disposeAndClear();
-        return false;
-    }
-    Start_Impl();
-    return TabDialog::StartExecuteAsync( rCtx );
-}
-
-void SfxTabDialog::Start_Impl()
-{
-    assert(m_pImpl->aData.size() == m_pTabCtrl->GetPageCount()
-            && "not all pages registered");
-    sal_uInt16 nActPage = m_pTabCtrl->GetPageId( 0 );
-
-    // load old settings, when exists
-    SvtViewOptions aDlgOpt(EViewType::TabDialog, OStringToOUString(GetHelpId(),RTL_TEXTENCODING_UTF8));
-    if ( aDlgOpt.Exists() )
-    {
-        SetWindowState(OUStringToOString(aDlgOpt.GetWindowState(), RTL_TEXTENCODING_ASCII_US));
-
-        // initial TabPage from Program/Help/config
-        nActPage = m_pTabCtrl->GetPageId(aDlgOpt.GetPageID());
-
-        if ( USHRT_MAX != m_nAppPageId )
-            nActPage = m_nAppPageId;
-
-        if ( TAB_PAGE_NOTFOUND == m_pTabCtrl->GetPagePos( nActPage ) )
-            nActPage = m_pTabCtrl->GetPageId( 0 );
-    }
-    else if ( USHRT_MAX != m_nAppPageId && TAB_PAGE_NOTFOUND != m_pTabCtrl->GetPagePos( m_nAppPageId ) )
-        nActPage = m_nAppPageId;
-
-    m_pTabCtrl->SetCurPageId( nActPage );
-    ActivatePageHdl( m_pTabCtrl );
-}
-
-/*
-    Adds a page to the dialog. The Name must correspond to a entry in the
-    TabControl in the dialog .ui
-*/
-sal_uInt16 SfxTabDialog::AddTabPage
-(
-    const OString &rName,          // Page ID
-    CreateTabPage pCreateFunc     // Pointer to the Factory Method
-)
-{
-    sal_uInt16 nId = m_pTabCtrl->GetPageId(rName);
-    m_pImpl->aData.push_back(new Data_Impl(nId, rName, pCreateFunc, nullptr));
-    return nId;
-}
-
-void SfxTabDialog::AddTabPage
-
-/*  [Description]
-
-    Add a page to the dialog. The Rider text is passed on, the page has no
-    counterpart in the TabControl in the resource of the dialogue.
-*/
-
-(
-    sal_uInt16 nId,
-    const OUString& rRiderText,
-    CreateTabPage pCreateFunc,
-    sal_uInt16 nPos
-)
-{
-    DBG_ASSERT( TAB_PAGE_NOTFOUND == m_pTabCtrl->GetPagePos( nId ),
-                "Double Page-Ids in the Tabpage" );
-    m_pTabCtrl->InsertPage( nId, rRiderText, nPos );
-    m_pImpl->aData.push_back( new Data_Impl(nId, "", pCreateFunc, nullptr ) );
-}
-
-void SfxTabDialog::PageCreated
-
-/*  [Description]
-
-    Default implementation of the virtual method. This is called immediately
-    after creating a page. Here the dialogue can call the TabPage Method
-    directly.
-*/
-
-(
-    sal_uInt16,      // Id of the created page
-    SfxTabPage&  // Reference to the created page
-)
-{
-}
-
-
-SfxItemSet* SfxTabDialog::GetInputSetImpl()
-
-/*  [Description]
-
-    Derived classes may create new storage for the InputSet. This has to be
-    released in the Destructor. To do this, this method must be called.
-*/
-
-{
-    return m_pSet.get();
-}
-
-
-SfxTabPage* SfxTabDialog::GetTabPage( sal_uInt16 nPageId ) const
-
-/*  [Description]
-
-    Return TabPage with the specified Id.
-*/
-
-{
-    sal_uInt16 nPos = 0;
-    Data_Impl* pDataObject = Find( m_pImpl->aData, nPageId, &nPos );
-
-    if ( pDataObject )
-        return pDataObject->pTabPage;
     return nullptr;
 }
 
-void SfxTabDialog::SavePosAndId()
-{
-    // save settings (screen position and current page)
-    SvtViewOptions aDlgOpt(EViewType::TabDialog, OStringToOUString(GetHelpId(),RTL_TEXTENCODING_UTF8));
-    aDlgOpt.SetWindowState(OStringToOUString(GetWindowState(WindowStateMask::Pos),RTL_TEXTENCODING_ASCII_US));
-    // to-do replace with name of page when all pages are converted to .ui
-    aDlgOpt.SetPageID(m_pTabCtrl->GetPageName(m_pTabCtrl->GetCurPageId()));
-}
-
-
-short SfxTabDialog::Ok()
-
-/*  [Description]
-
-    Ok handler for the Dialogue.
-
-    Dialog's current location and current page are saved for the next time
-    the dialog is shown.
-
-    The OutputSet is created and for each page this or the special OutputSet
-    is set by calling the method <SfxTabPage::FillItemSet(SfxItemSet &)>, to
-    insert the entered data by the user into the set.
-
-    [Return value]
-
-    RET_OK:       if at least one page has returned from FillItemSet,
-                  otherwise RET_CANCEL.
-*/
-{
-    SavePosAndId(); //See fdo#38828 "Apply" resetting window position
-
-    if ( !m_pOutSet )
-    {
-        if ( m_pExampleSet )
-            m_pOutSet.reset(new SfxItemSet( *m_pExampleSet ));
-        else if ( m_pSet )
-            m_pOutSet = m_pSet->Clone( false );  // without Items
-    }
-    bool bModified = false;
-
-    for (auto const& elem : m_pImpl->aData)
-    {
-        SfxTabPage* pTabPage = elem->pTabPage;
-
-        if ( pTabPage )
-        {
-            if ( m_pSet && !pTabPage->HasExchangeSupport() )
-            {
-                SfxItemSet aTmp( *m_pSet->GetPool(), m_pSet->GetRanges() );
-
-                if ( pTabPage->FillItemSet( &aTmp ) )
-                {
-                    bModified = true;
-                    if (m_pExampleSet)
-                        m_pExampleSet->Put( aTmp );
-                    m_pOutSet->Put( aTmp );
-                }
-            }
-        }
-    }
-
-    if ( m_pOutSet && m_pOutSet->Count() > 0 )
-        bModified = true;
-
-    if (m_bStandardPushed)
-        bModified = true;
-    return bModified ? RET_OK : RET_CANCEL;
-}
-
-IMPL_LINK_NOARG(SfxTabDialog, CancelHdl, Button*, void)
-{
-    EndDialog( RET_USER_CANCEL );
-}
-
-
-SfxItemSet* SfxTabDialog::CreateInputItemSet( sal_uInt16 )
-
-/*  [Description]
-
-    Default implementation of the virtual Method.
-    This is called when pages create their sets onDemand.
-*/
-
-{
-    SAL_WARN( "sfx.dialog", "CreateInputItemSet not implemented" );
-    return new SfxAllItemSet( SfxGetpApp()->GetPool() );
-}
-
-
-IMPL_LINK_NOARG(SfxTabDialog, OkHdl, Button*, void)
-
-/*  [Description]
-
-    Handler of the Ok-Buttons
-    This calls the current page <SfxTabPage::DeactivatePage(SfxItemSet *)>.
-    Returns <DeactivateRC::LeavePage>, <SfxTabDialog::Ok()> is called
-    and the Dialog is ended.
-*/
-
-{
-    if (PrepareLeaveCurrentPage())
-    {
-        if ( m_pImpl->bModal )
-            EndDialog( Ok() );
-        else
-        {
-            Ok();
-            Close();
-        }
-    }
-}
-
-bool SfxTabDialog::PrepareLeaveCurrentPage()
-{
-    sal_uInt16 const nId = m_pTabCtrl->GetCurPageId();
-    SfxTabPage* pPage = dynamic_cast<SfxTabPage*> (m_pTabCtrl->GetTabPage( nId ));
-    bool bEnd = !pPage;
-
-    if ( pPage )
-    {
-        DeactivateRC nRet = DeactivateRC::LeavePage;
-        if ( m_pSet )
-        {
-            SfxItemSet aTmp( *m_pSet->GetPool(), m_pSet->GetRanges() );
-
-            if ( pPage->HasExchangeSupport() )
-                nRet = pPage->DeactivatePage( &aTmp );
-            else
-                nRet = pPage->DeactivatePage( nullptr );
-
-            if ( ( DeactivateRC::LeavePage & nRet ) == DeactivateRC::LeavePage
-                 && aTmp.Count() )
-            {
-                m_pExampleSet->Put( aTmp );
-                m_pOutSet->Put( aTmp );
-            }
-        }
-        else
-            nRet = pPage->DeactivatePage( nullptr );
-        bEnd = nRet != DeactivateRC::KeepPage;
-    }
-
-    return bEnd;
-}
-
-
-IMPL_LINK_NOARG(SfxTabDialog, UserHdl, Button*, void)
-
-/*  [Description]
-
-    Handler of the User-Buttons
-    This calls the current page <SfxTabPage::DeactivatePage(SfxItemSet *)>.
-    returns this <DeactivateRC::LeavePage> and  <SfxTabDialog::Ok()> is called.
-    Then the Dialog is ended with the Return value <SfxTabDialog::Ok()>
-*/
-
-{
-    if ( PrepareLeaveCurrentPage () )
-    {
-        short nRet = Ok();
-
-        if ( RET_OK == nRet )
-            nRet = RET_USER;
-        else
-            nRet = RET_USER_CANCEL;
-        EndDialog( nRet );
-    }
-}
-
-
-IMPL_LINK_NOARG(SfxTabDialog, ResetHdl, Button*, void)
-
-/*  [Description]
-
-    Handler behind the reset button.
-    The Current Page is new initialized with their initial data, all the
-    settings that the user has made on this page are repealed.
-*/
-
-{
-    const sal_uInt16 nId = m_pTabCtrl->GetCurPageId();
-    Data_Impl* pDataObject = Find( m_pImpl->aData, nId );
-    DBG_ASSERT( pDataObject, "Id not known" );
-
-    pDataObject->pTabPage->Reset( m_pSet.get() );
-    // Also reset relevant items of ExampleSet and OutSet to initial state
-    if (!pDataObject->fnGetRanges)
-        return;
-
-    if (!m_pExampleSet)
-        m_pExampleSet = new SfxItemSet(*m_pSet);
-
-    const SfxItemPool* pPool = m_pSet->GetPool();
-    const sal_uInt16* pTmpRanges = (pDataObject->fnGetRanges)();
-
-    while (*pTmpRanges)
-    {
-        const sal_uInt16* pU = pTmpRanges + 1;
-
-        // Correct Range with multiple values
-        sal_uInt16 nTmp = *pTmpRanges, nTmpEnd = *pU;
-        DBG_ASSERT(nTmp <= nTmpEnd, "Range is sorted the wrong way");
-
-        if (nTmp > nTmpEnd)
-        {
-            // If really sorted wrongly, then set new
-            std::swap(nTmp, nTmpEnd);
-        }
-
-        while (nTmp && nTmp <= nTmpEnd)
-        {
-            // Iterate over the Range and set the Items
-            sal_uInt16 nWh = pPool->GetWhich(nTmp);
-            const SfxPoolItem* pItem;
-            if (SfxItemState::SET == m_pSet->GetItemState(nWh, false, &pItem))
-            {
-                m_pExampleSet->Put(*pItem);
-                m_pOutSet->Put(*pItem);
-            }
-            else
-            {
-                m_pExampleSet->ClearItem(nWh);
-                m_pOutSet->ClearItem(nWh);
-            }
-            nTmp++;
-        }
-        // Go to the next pair
-        pTmpRanges += 2;
-    }
-}
-
-
-IMPL_LINK_NOARG(SfxTabDialog, BaseFmtHdl, Button*, void)
-
-/*  [Description]
-
-    Handler behind the Standard-Button.
-    This button is available when editing style sheets. All the set attributes
-    in the edited stylesheet are deleted.
-*/
-
-{
-    m_bStandardPushed = true;
-
-    const sal_uInt16 nId = m_pTabCtrl->GetCurPageId();
-    Data_Impl* pDataObject = Find( m_pImpl->aData, nId );
-    DBG_ASSERT( pDataObject, "Id not known" );
-
-    if ( !pDataObject->fnGetRanges )
-        return;
-
-    if ( !m_pExampleSet )
-        m_pExampleSet = new SfxItemSet( *m_pSet );
-
-    const SfxItemPool* pPool = m_pSet->GetPool();
-    const sal_uInt16* pTmpRanges = (pDataObject->fnGetRanges)();
-    SfxItemSet aTmpSet( *m_pExampleSet );
-
-    while ( *pTmpRanges )
-    {
-        const sal_uInt16* pU = pTmpRanges + 1;
-
-        // Correct Range with multiple values
-        sal_uInt16 nTmp = *pTmpRanges, nTmpEnd = *pU;
-        DBG_ASSERT( nTmp <= nTmpEnd, "Range is sorted the wrong way" );
-
-        if ( nTmp > nTmpEnd )
-        {
-            // If really sorted wrongly, then set new
-            std::swap(nTmp, nTmpEnd);
-        }
-
-        while ( nTmp && nTmp <= nTmpEnd ) // guard against overflow
-        {
-            // Iterate over the Range and set the Items
-            sal_uInt16 nWh = pPool->GetWhich( nTmp );
-            m_pExampleSet->ClearItem( nWh );
-            aTmpSet.ClearItem( nWh );
-            // At the Outset of InvalidateItem,
-            // so that the change takes effect
-            m_pOutSet->InvalidateItem( nWh );
-            nTmp++;
-        }
-        // Go to the next pair
-        pTmpRanges += 2;
-    }
-    // Set all Items as new  -> the call the current Page Reset()
-    DBG_ASSERT( pDataObject->pTabPage, "the Page is gone" );
-    pDataObject->pTabPage->Reset( &aTmpSet );
-    pDataObject->pTabPage->pImpl->mbStandard = true;
-}
-
-
-IMPL_LINK( SfxTabDialog, ActivatePageHdl, TabControl *, pTabCtrl, void )
-
-/*  [Description]
-
-    Handler that is called by StarView for switching to a different page.
-    If the page not exist yet then it is created and the virtual Method
-    <SfxTabDialog::PageCreated( sal_uInt16, SfxTabPage &)> is called. If the page
-    exist, then the if possible the <SfxTabPage::Reset(const SfxItemSet &)> or
-    <SfxTabPage::ActivatePage(const SfxItemSet &)> is called.
-*/
-
-{
-    sal_uInt16 nId = pTabCtrl->GetCurPageId();
-
-    DBG_ASSERT( m_pImpl->aData.size(), "no Pages registered" );
-
-    // Tab Page already there?
-    VclPtr<SfxTabPage> pTabPage = dynamic_cast<SfxTabPage*> (pTabCtrl->GetTabPage( nId ));
-    Data_Impl* pDataObject = Find( m_pImpl->aData, nId );
-
-    // fallback to 1st page when requested one does not exist
-    if(!pDataObject && pTabCtrl->GetPageCount())
-    {
-        pTabCtrl->SetCurPageId(pTabCtrl->GetPageId(0));
-        nId = pTabCtrl->GetCurPageId();
-        pTabPage = dynamic_cast< SfxTabPage* >(pTabCtrl->GetTabPage(nId));
-        pDataObject = Find(m_pImpl->aData, nId);
-    }
-
-    if (!pDataObject)
-    {
-        SAL_WARN("sfx.dialog", "Tab Page ID not known, this is pretty serious and needs investigation");
-        return;
-    }
-
-    // Create TabPage if possible:
-    if ( !pTabPage )
-    {
-        if ( m_pSet )
-            pTabPage = (pDataObject->fnCreatePage)(static_cast<vcl::Window*>(pTabCtrl), m_pSet.get());
-        else
-            pTabPage = (pDataObject->fnCreatePage)(pTabCtrl, CreateInputItemSet(nId));
-        DBG_ASSERT( nullptr == pDataObject->pTabPage, "create TabPage more than once" );
-        pDataObject->pTabPage = pTabPage;
-        pTabPage->SetTabDialog(this);
-
-        OUString sConfigId = OStringToOUString(pTabPage->GetConfigId(), RTL_TEXTENCODING_UTF8);
-        if (sConfigId.isEmpty())
-        {
-            SAL_WARN("sfx.dialog", "Tabpage needs to be converted to .ui format");
-            sConfigId = OUString::number(pDataObject->nId);
-        }
-        SvtViewOptions aPageOpt(EViewType::TabPage, sConfigId);
-        OUString sUserData;
-        Any aUserItem = aPageOpt.GetUserItem( USERITEM_NAME );
-        OUString aTemp;
-        if ( aUserItem >>= aTemp )
-            sUserData = aTemp;
-        pTabPage->SetUserData( sUserData );
-        Size aSiz = pTabPage->GetSizePixel();
-
-        Size aCtrlSiz = pTabCtrl->GetTabPageSizePixel();
-        // Only set Size on TabControl when < as TabPage
-        if ( aCtrlSiz.Width() < aSiz.Width() ||
-             aCtrlSiz.Height() < aSiz.Height() )
-        {
-            pTabCtrl->SetTabPageSizePixel( aSiz );
-        }
-
-        PageCreated( nId, *pTabPage );
-
-        pTabPage->Reset( m_pSet.get() );
-
-        pTabCtrl->SetTabPage( nId, pTabPage );
-    }
-    else if ( pDataObject->bRefresh )
-        pTabPage->Reset( m_pSet.get() );
-    pDataObject->bRefresh = false;
-
-    if ( m_pExampleSet )
-        pTabPage->ActivatePage( *m_pExampleSet );
-
-    if ( pTabPage->IsReadOnly() || m_pImpl->bHideResetBtn )
-        m_pResetBtn->Hide();
-    else
-        m_pResetBtn->Show();
-}
-
-
-IMPL_LINK( SfxTabDialog, DeactivatePageHdl, TabControl *, pTabCtrl, bool )
-
-/*  [Description]
-
-    Handler that is called by StarView before leaving a page.
-
-    [Cross-reference]
-
-    <SfxTabPage::DeactivatePage(SfxItemSet *)>
-*/
-
-{
-    sal_uInt16 nId = pTabCtrl->GetCurPageId();
-    SfxTabPage *pPage = dynamic_cast<SfxTabPage*> (pTabCtrl->GetTabPage( nId ));
-    DBG_ASSERT( pPage, "no active Page" );
-    if (!pPage)
-        return false;
-#ifdef DBG_UTIL
-    Data_Impl* pDataObject = Find( m_pImpl->aData, pTabCtrl->GetCurPageId() );
-    DBG_ASSERT( pDataObject, "no Data structure for current page" );
-#endif
-
-    DeactivateRC nRet = DeactivateRC::LeavePage;
-
-    if ( !m_pExampleSet && pPage->HasExchangeSupport() && m_pSet )
-        m_pExampleSet = new SfxItemSet( *m_pSet->GetPool(), m_pSet->GetRanges() );
-
-    if ( m_pSet )
-    {
-        SfxItemSet aTmp( *m_pSet->GetPool(), m_pSet->GetRanges() );
-
-        if ( pPage->HasExchangeSupport() )
-            nRet = pPage->DeactivatePage( &aTmp );
-        else
-            nRet = pPage->DeactivatePage( nullptr );
-        if ( ( DeactivateRC::LeavePage & nRet ) == DeactivateRC::LeavePage &&
-             aTmp.Count() && m_pExampleSet)
-        {
-            m_pExampleSet->Put( aTmp );
-            m_pOutSet->Put( aTmp );
-        }
-    }
-    else
-    {
-        if ( pPage->HasExchangeSupport() ) //!!!
-        {
-            if ( !m_pExampleSet )
-            {
-                SfxItemPool* pPool = pPage->GetItemSet().GetPool();
-                m_pExampleSet =
-                    new SfxItemSet( *pPool, GetInputRanges( *pPool ) );
-            }
-            nRet = pPage->DeactivatePage( m_pExampleSet );
-        }
-        else
-            nRet = pPage->DeactivatePage( nullptr );
-    }
-
-    if ( nRet & DeactivateRC::RefreshSet )
-    {
-        // Flag all Pages as to be initialized as new
-
-        for (auto const& elem : m_pImpl->aData)
-        {
-            elem->bRefresh = ( elem->pTabPage.get() != pPage ); // Do not refresh own Page anymore
-        }
-    }
-    return static_cast<bool>(nRet & DeactivateRC::LeavePage);
-}
-
-
-void SfxTabDialog::ShowPage( sal_uInt16 nId )
-
-/*  [Description]
-
-    The TabPage is activated with the specified Id.
-*/
-
-{
-    m_pTabCtrl->SetCurPageId( nId );
-    ActivatePageHdl( m_pTabCtrl );
-}
-
-OString SfxTabDialog::GetScreenshotId() const
-{
-    SfxTabPage *pActiveTabPage = GetCurTabPage();
-    OString aScreenshotId = GetHelpId();
-
-    if ( pActiveTabPage )
-    {
-        vcl::Window* pToplevelBox = pActiveTabPage->GetWindow( GetWindowType::FirstChild );
-
-        if ( pToplevelBox )
-            aScreenshotId = pToplevelBox->GetHelpId();
-    }
-
-    return aScreenshotId;
-}
-
-const sal_uInt16* SfxTabDialog::GetInputRanges( const SfxItemPool& rPool )
-
-/*  [Description]
-
-    Makes the set over the range of all pages of the dialogue. Pages have the
-    static method for querying their range in AddTabPage, ie deliver their
-    sets onDemand.
-
-    [Return value]
-
-    Pointer to a null-terminated array of sal_uInt16. This array belongs to the
-    dialog and is deleted when the dialogue is destroy.
-
-    [Cross-reference]
-
-    <SfxTabDialog::AddTabPage(sal_uInt16, CreateTabPage, GetTabPageRanges, bool)>
-    <SfxTabDialog::AddTabPage(sal_uInt16, const String &, CreateTabPage, GetTabPageRanges, bool, sal_uInt16)>
-    <SfxTabDialog::AddTabPage(sal_uInt16, const Bitmap &, CreateTabPage, GetTabPageRanges, bool, sal_uInt16)>
-*/
-
-{
-    if ( m_pSet )
-    {
-        SAL_WARN( "sfx.dialog", "Set already exists!" );
-        return m_pSet->GetRanges();
-    }
-
-    if ( m_pRanges )
-        return m_pRanges.get();
-    std::vector<sal_uInt16> aUS;
-
-    for (auto const& elem : m_pImpl->aData)
-    {
-
-        if ( elem->fnGetRanges )
-        {
-            const sal_uInt16* pTmpRanges = (elem->fnGetRanges)();
-            const sal_uInt16* pIter = pTmpRanges;
-
-            sal_uInt16 nLen;
-            for( nLen = 0; *pIter; ++nLen, ++pIter )
-                ;
-            aUS.insert( aUS.end(), pTmpRanges, pTmpRanges + nLen );
-        }
-    }
-
-    //! Remove duplicated Ids?
-    {
-        for (auto & elem : aUS)
-            elem = rPool.GetWhich(elem);
-    }
-
-    // sort
-    if ( aUS.size() > 1 )
-    {
-        std::sort( aUS.begin(), aUS.end() );
-    }
-
-    m_pRanges.reset(new sal_uInt16[aUS.size() + 1]);
-    std::copy( aUS.begin(), aUS.end(), m_pRanges.get() );
-    m_pRanges[aUS.size()] = 0;
-    return m_pRanges.get();
-}
-
-void SfxTabDialog::SetPageName(sal_uInt16 nPageId, const OString& rName) const
-{
-    m_pTabCtrl->SetPageName(nPageId, rName);
-}
-
-FactoryFunction SfxTabDialog::GetUITestFactory() const
-{
-    return SfxTabDialogUIObject::create;
-}
-
-std::vector<OString> SfxTabDialog::getAllPageUIXMLDescriptions() const
-{
-    std::vector<OString> aRetval;
-
-    for (auto const& elem : m_pImpl->aData)
-    {
-        SfxTabPage* pCandidate = GetTabPage(elem->nId);
-
-        if (!pCandidate)
-        {
-            // force SfxTabPage creation
-            const_cast<SfxTabDialog*>(this)->ShowPage(elem->nId);
-            pCandidate = GetTabPage(elem->nId);
-        }
-
-        if (pCandidate)
-        {
-            // use UIXMLDescription (without '.ui', with '/')
-            aRetval.push_back(pCandidate->getUIFile());
-        }
-    }
-
-    return aRetval;
-}
-
-bool SfxTabDialog::selectPageByUIXMLDescription(const OString& rUIXMLDescription)
-{
-    for (auto const& elem : m_pImpl->aData)
-    {
-        SfxTabPage* pCandidate = elem->pTabPage;
-
-        if (!pCandidate)
-        {
-            // force SfxTabPage creation
-            ShowPage(elem->nId);
-            pCandidate = GetTabPage(elem->nId);
-        }
-
-        if (pCandidate && pCandidate->getUIFile() == rUIXMLDescription)
-        {
-            ShowPage(elem->nId);
-            return true;
-        }
-    }
-
-    return false;
-}
-
 SfxTabDialogController::SfxTabDialogController
 (
     weld::Window* pParent,              // Parent Window
@@ -1817,7 +869,7 @@ void SfxTabDialogController::AddTabPage(const OString &rName /* Page ID */,
                                         CreateTabPage pCreateFunc  /* Pointer to the Factory Method */,
                                         GetTabPageRanges pRangesFunc /* Pointer to the Method for querying Ranges onDemand */)
 {
-    m_pImpl->aData.push_back(new Data_Impl(m_pImpl->aData.size(), rName, pCreateFunc, pRangesFunc));
+    m_pImpl->aData.push_back(new Data_Impl(rName, pCreateFunc, pRangesFunc));
 }
 
 void SfxTabDialogController::AddTabPage(const OString &rName /* Page ID */,
diff --git a/sfx2/source/uitest/sfx_uiobject.cxx b/sfx2/source/uitest/sfx_uiobject.cxx
deleted file mode 100644
index 5a56b4168e18..000000000000
--- a/sfx2/source/uitest/sfx_uiobject.cxx
+++ /dev/null
@@ -1,87 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-
-#include <memory>
-#include <uitest/sfx_uiobject.hxx>
-
-#include <sfx2/tabdlg.hxx>
-
-SfxTabDialogUIObject::SfxTabDialogUIObject(const VclPtr<SfxTabDialog>& xTabDialog):
-    WindowUIObject(xTabDialog),
-    mxTabDialog(xTabDialog)
-{
-}
-
-SfxTabDialogUIObject::~SfxTabDialogUIObject()
-{
-}
-
-StringMap SfxTabDialogUIObject::get_state()
-{
-    StringMap aMap = WindowUIObject::get_state();
-    sal_uInt16 nPageId = mxTabDialog->GetCurPageId();
-    std::vector<sal_uInt16> aPageIds = mxTabDialog->m_pTabCtrl->GetPageIDs();
-    OUString aStrIds;
-    OUString aStrNames;
-    for (auto const& pageId : aPageIds)
-    {
-        aStrIds = aStrIds + OUString::number(pageId) + ";";
-        aStrNames = aStrNames + mxTabDialog->GetPageText(pageId) + ";";
-    }
-
-    aMap["PageIds"] = aStrIds;
-    aMap["PageNames"] = aStrNames;
-    aMap["CurrentPageID"] = OUString::number(nPageId);
-    aMap["CurrentPageText"] = mxTabDialog->GetPageText(nPageId);
-    return aMap;
-}
-
-void SfxTabDialogUIObject::execute(const OUString& rAction,
-        const StringMap& rParameters)
-{
-    if (rAction != "SELECT")
-        return;
-
-    if (rParameters.find("POS") != rParameters.end())
-    {
-        auto itr = rParameters.find("POS");
-        sal_uInt32 nPos = itr->second.toUInt32();
-        std::vector<sal_uInt16> aIds = mxTabDialog->m_pTabCtrl->GetPageIDs();
-        sal_uInt16 nPageId = aIds[nPos];
-        mxTabDialog->ShowPage(nPageId);
-    }
-    else if (rParameters.find("NAME") != rParameters.end())
-    {
-        auto itr = rParameters.find("NAME");
-        OUString aName = itr->second;
-        std::vector<sal_uInt16> aIds = mxTabDialog->m_pTabCtrl->GetPageIDs();
-        for (auto const& elem : aIds)
-        {
-            if (mxTabDialog->GetPageText(elem) == aName)
-            {
-                mxTabDialog->ShowPage(elem);
-                break;
-            }
-        }
-    }
-}
-
-std::unique_ptr<UIObject> SfxTabDialogUIObject::create(vcl::Window* pWindow)
-{
-    SfxTabDialog* pDialog = dynamic_cast<SfxTabDialog*>(pWindow);
-    assert(pDialog);
-    return std::unique_ptr<UIObject>(new SfxTabDialogUIObject(pDialog));
-}
-
-OUString SfxTabDialogUIObject::get_name() const
-{
-    return OUString("SfxTabDialogUIObject");
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list