diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-09-24 14:10:48 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-09-26 09:54:49 +0200 |
commit | deb37c44ecfb8f6aa7c2ceec4771b0505fa7b6bb (patch) | |
tree | 3953ca620e27fed0442272fdabea9735fd6f3dcd /sfx2 | |
parent | a37e559ed123789f6bc8f7972242d6461ce692ab (diff) |
now drop TabPageParent intermediate
Change-Id: I47328f76342ac023628d9042bdfa8213a1c93d0c
Reviewed-on: https://gerrit.libreoffice.org/79469
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/appl/module.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/dialog/dinfdlg.cxx | 35 | ||||
-rw-r--r-- | sfx2/source/dialog/documentfontsdialog.cxx | 8 | ||||
-rw-r--r-- | sfx2/source/dialog/mgetempl.cxx | 10 | ||||
-rw-r--r-- | sfx2/source/dialog/printopt.cxx | 8 | ||||
-rw-r--r-- | sfx2/source/dialog/securitypage.cxx | 8 | ||||
-rw-r--r-- | sfx2/source/dialog/tabdlg.cxx | 11 | ||||
-rw-r--r-- | sfx2/source/inc/documentfontsdialog.hxx | 4 | ||||
-rw-r--r-- | sfx2/source/view/printer.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/view/viewprn.cxx | 2 |
10 files changed, 43 insertions, 47 deletions
diff --git a/sfx2/source/appl/module.cxx b/sfx2/source/appl/module.cxx index dbdf7b151ab4..9cd0dd0682fa 100644 --- a/sfx2/source/appl/module.cxx +++ b/sfx2/source/appl/module.cxx @@ -188,7 +188,7 @@ SfxChildWinFactArr_Impl* SfxModule::GetChildWinFactories_Impl() const return pImpl->pFactArr.get(); } -std::unique_ptr<SfxTabPage> SfxModule::CreateTabPage(sal_uInt16, TabPageParent, const SfxItemSet&) +std::unique_ptr<SfxTabPage> SfxModule::CreateTabPage(sal_uInt16, weld::Container*, weld::DialogController*, const SfxItemSet&) { return nullptr; } diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index b2beb7a7a679..a37f75144364 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -601,9 +601,9 @@ bool SfxDocumentInfoItem::PutValue( const Any& rVal, sal_uInt8 nMemberId ) return bRet; } -SfxDocumentDescPage::SfxDocumentDescPage(TabPageParent pParent, const SfxItemSet& rItemSet) - : SfxTabPage(pParent, "sfx/ui/descriptioninfopage.ui", "DescriptionInfoPage", &rItemSet) - , m_pInfoItem( nullptr) +SfxDocumentDescPage::SfxDocumentDescPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rItemSet) + : SfxTabPage(pPage, pController, "sfx/ui/descriptioninfopage.ui", "DescriptionInfoPage", &rItemSet) + , m_pInfoItem(nullptr) , m_xTitleEd(m_xBuilder->weld_entry("title")) , m_xThemaEd(m_xBuilder->weld_entry("subject")) , m_xKeywordsEd(m_xBuilder->weld_entry("keywords")) @@ -617,9 +617,9 @@ SfxDocumentDescPage::~SfxDocumentDescPage() { } -std::unique_ptr<SfxTabPage> SfxDocumentDescPage::Create(TabPageParent pParent, const SfxItemSet *rItemSet) +std::unique_ptr<SfxTabPage> SfxDocumentDescPage::Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet *rItemSet) { - return std::make_unique<SfxDocumentDescPage>(pParent, *rItemSet); + return std::make_unique<SfxDocumentDescPage>(pPage, pController, *rItemSet); } bool SfxDocumentDescPage::FillItemSet(SfxItemSet *rSet) @@ -699,8 +699,8 @@ void SfxDocumentDescPage::Reset(const SfxItemSet *rSet) } } -SfxDocumentPage::SfxDocumentPage(TabPageParent pParent, const SfxItemSet& rItemSet) - : SfxTabPage(pParent, "sfx/ui/documentinfopage.ui", "DocumentInfoPage", &rItemSet) +SfxDocumentPage::SfxDocumentPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rItemSet) + : SfxTabPage(pPage, pController, "sfx/ui/documentinfopage.ui", "DocumentInfoPage", &rItemSet) , bEnableUseUserData( false ) , bHandleDelete( false ) , m_xBmp(m_xBuilder->weld_image("icon")) @@ -856,9 +856,9 @@ void SfxDocumentPage::ImplCheckPasswordState() m_xChangePassBtn->set_sensitive(false); } -std::unique_ptr<SfxTabPage> SfxDocumentPage::Create( TabPageParent pParent, const SfxItemSet* rItemSet ) +std::unique_ptr<SfxTabPage> SfxDocumentPage::Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rItemSet) { - return std::make_unique<SfxDocumentPage>(pParent, *rItemSet); + return std::make_unique<SfxDocumentPage>(pPage, pController, *rItemSet); } void SfxDocumentPage::EnableUseUserData() @@ -1852,8 +1852,8 @@ void CustomPropertiesControl::SetCustomProperties(std::vector< std::unique_ptr<C } // class SfxCustomPropertiesPage ----------------------------------------- -SfxCustomPropertiesPage::SfxCustomPropertiesPage(TabPageParent pParent, const SfxItemSet& rItemSet ) - : SfxTabPage(pParent, "sfx/ui/custominfopage.ui", "CustomInfoPage", &rItemSet) +SfxCustomPropertiesPage::SfxCustomPropertiesPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rItemSet ) + : SfxTabPage(pPage, pController, "sfx/ui/custominfopage.ui", "CustomInfoPage", &rItemSet) , m_xPropertiesCtrl(new CustomPropertiesControl) , m_xAdd(m_xBuilder->weld_button("add")) { @@ -1946,9 +1946,9 @@ DeactivateRC SfxCustomPropertiesPage::DeactivatePage( SfxItemSet* /*pSet*/ ) return nRet; } -std::unique_ptr<SfxTabPage> SfxCustomPropertiesPage::Create( TabPageParent pParent, const SfxItemSet* rItemSet ) +std::unique_ptr<SfxTabPage> SfxCustomPropertiesPage::Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rItemSet) { - return std::make_unique<SfxCustomPropertiesPage>(pParent, *rItemSet); + return std::make_unique<SfxCustomPropertiesPage>(pPage, pController, *rItemSet); } CmisValue::CmisValue(weld::Widget* pParent, const OUString& aStr) @@ -2239,11 +2239,10 @@ void CmisPropertiesControl::AddLine( const OUString& sId, const OUString& sName, } // class SfxCmisPropertiesPage ----------------------------------------- -SfxCmisPropertiesPage::SfxCmisPropertiesPage(TabPageParent pParent, const SfxItemSet& rItemSet) - : SfxTabPage(pParent, "sfx/ui/cmisinfopage.ui", "CmisInfoPage", &rItemSet) +SfxCmisPropertiesPage::SfxCmisPropertiesPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rItemSet) + : SfxTabPage(pPage, pController, "sfx/ui/cmisinfopage.ui", "CmisInfoPage", &rItemSet) , m_xPropertiesCtrl(new CmisPropertiesControl(*m_xBuilder)) { - } SfxCmisPropertiesPage::~SfxCmisPropertiesPage() @@ -2339,9 +2338,9 @@ DeactivateRC SfxCmisPropertiesPage::DeactivatePage( SfxItemSet* /*pSet*/ ) return DeactivateRC::LeavePage; } -std::unique_ptr<SfxTabPage> SfxCmisPropertiesPage::Create( TabPageParent pParent, const SfxItemSet* rItemSet ) +std::unique_ptr<SfxTabPage> SfxCmisPropertiesPage::Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rItemSet) { - return std::make_unique<SfxCmisPropertiesPage>(pParent, *rItemSet); + return std::make_unique<SfxCmisPropertiesPage>(pPage, pController, *rItemSet); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/source/dialog/documentfontsdialog.cxx b/sfx2/source/dialog/documentfontsdialog.cxx index 8f5212579846..e64e0c5bba80 100644 --- a/sfx2/source/dialog/documentfontsdialog.cxx +++ b/sfx2/source/dialog/documentfontsdialog.cxx @@ -26,13 +26,13 @@ using namespace ::com::sun::star; -std::unique_ptr<SfxTabPage> SfxDocumentFontsPage::Create(TabPageParent pParent, const SfxItemSet* set) +std::unique_ptr<SfxTabPage> SfxDocumentFontsPage::Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* set) { - return std::make_unique<SfxDocumentFontsPage>(pParent, *set); + return std::make_unique<SfxDocumentFontsPage>(pPage, pController, *set); } -SfxDocumentFontsPage::SfxDocumentFontsPage(TabPageParent parent, const SfxItemSet& set) - : SfxTabPage(parent, "sfx/ui/documentfontspage.ui", "DocumentFontsPage", &set) +SfxDocumentFontsPage::SfxDocumentFontsPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& set) + : SfxTabPage(pPage, pController, "sfx/ui/documentfontspage.ui", "DocumentFontsPage", &set) , embedFontsCheckbox(m_xBuilder->weld_check_button("embedFonts")) , embedUsedFontsCheckbox(m_xBuilder->weld_check_button("embedUsedFonts")) , embedLatinScriptFontsCheckbox(m_xBuilder->weld_check_button("embedLatinScriptFonts")) diff --git a/sfx2/source/dialog/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx index eb430426b601..22e6b6165615 100644 --- a/sfx2/source/dialog/mgetempl.cxx +++ b/sfx2/source/dialog/mgetempl.cxx @@ -47,9 +47,9 @@ * * initializes the list box with the templates */ -SfxManageStyleSheetPage::SfxManageStyleSheetPage(TabPageParent pParent, const SfxItemSet& rAttrSet) - : SfxTabPage(pParent, "sfx/ui/managestylepage.ui", "ManageStylePage", &rAttrSet) - , pStyle(&static_cast<SfxStyleDialogController*>(pParent.pController)->GetStyleSheet()) +SfxManageStyleSheetPage::SfxManageStyleSheetPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rAttrSet) + : SfxTabPage(pPage, pController, "sfx/ui/managestylepage.ui", "ManageStylePage", &rAttrSet) + , pStyle(&static_cast<SfxStyleDialogController*>(pController)->GetStyleSheet()) , pItem(nullptr) , bModified(false) , aName(pStyle->GetName()) @@ -526,10 +526,10 @@ void SfxManageStyleSheetPage::Reset( const SfxItemSet* /*rAttrSet*/ ) } } -std::unique_ptr<SfxTabPage> SfxManageStyleSheetPage::Create( TabPageParent pParent, +std::unique_ptr<SfxTabPage> SfxManageStyleSheetPage::Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet *rAttrSet ) { - return std::make_unique<SfxManageStyleSheetPage>(pParent, *rAttrSet); + return std::make_unique<SfxManageStyleSheetPage>(pPage, pController, *rAttrSet); } void SfxManageStyleSheetPage::ActivatePage( const SfxItemSet& rSet) diff --git a/sfx2/source/dialog/printopt.cxx b/sfx2/source/dialog/printopt.cxx index cbd3d9408bfe..63313a5a09ba 100644 --- a/sfx2/source/dialog/printopt.cxx +++ b/sfx2/source/dialog/printopt.cxx @@ -34,8 +34,8 @@ static bool bOutputForPrinter = true; #define DPI_COUNT SAL_N_ELEMENTS(aDPIArray) -SfxCommonPrintOptionsTabPage::SfxCommonPrintOptionsTabPage(TabPageParent pParent, const SfxItemSet& rSet) - : SfxTabPage(pParent, "sfx/ui/optprintpage.ui", "OptPrintPage", &rSet) +SfxCommonPrintOptionsTabPage::SfxCommonPrintOptionsTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet) + : SfxTabPage(pPage, pController, "sfx/ui/optprintpage.ui", "OptPrintPage", &rSet) , m_xPrinterOutputRB(m_xBuilder->weld_radio_button("printer")) , m_xPrintFileOutputRB(m_xBuilder->weld_radio_button("file")) , m_xReduceTransparencyCB(m_xBuilder->weld_check_button("reducetrans")) @@ -86,9 +86,9 @@ SfxCommonPrintOptionsTabPage::~SfxCommonPrintOptionsTabPage() { } -std::unique_ptr<SfxTabPage> SfxCommonPrintOptionsTabPage::Create( TabPageParent pParent, const SfxItemSet* rAttrSet ) +std::unique_ptr<SfxTabPage> SfxCommonPrintOptionsTabPage::Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rAttrSet) { - return std::make_unique<SfxCommonPrintOptionsTabPage>(pParent, *rAttrSet); + return std::make_unique<SfxCommonPrintOptionsTabPage>(pPage, pController, *rAttrSet); } bool SfxCommonPrintOptionsTabPage::FillItemSet( SfxItemSet* /*rSet*/ ) diff --git a/sfx2/source/dialog/securitypage.cxx b/sfx2/source/dialog/securitypage.cxx index dfc3ddb8e71c..169bce179463 100644 --- a/sfx2/source/dialog/securitypage.cxx +++ b/sfx2/source/dialog/securitypage.cxx @@ -400,13 +400,13 @@ IMPL_LINK_NOARG(SfxSecurityPage_Impl, ChangeProtectionPBHdl, weld::Button&, void m_xProtectPB->set_visible(!bNewProtection); } -std::unique_ptr<SfxTabPage> SfxSecurityPage::Create(TabPageParent pParent, const SfxItemSet * rItemSet) +std::unique_ptr<SfxTabPage> SfxSecurityPage::Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet * rItemSet) { - return std::make_unique<SfxSecurityPage>(pParent, *rItemSet); + return std::make_unique<SfxSecurityPage>(pPage, pController, *rItemSet); } -SfxSecurityPage::SfxSecurityPage(TabPageParent pParent, const SfxItemSet& rItemSet) - : SfxTabPage(pParent, "sfx/ui/securityinfopage.ui", "SecurityInfoPage", &rItemSet) +SfxSecurityPage::SfxSecurityPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rItemSet) + : SfxTabPage(pPage, pController, "sfx/ui/securityinfopage.ui", "SecurityInfoPage", &rItemSet) { m_pImpl.reset(new SfxSecurityPage_Impl( *this )); } diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx index b3299c64ab4e..73338d864c95 100644 --- a/sfx2/source/dialog/tabdlg.cxx +++ b/sfx2/source/dialog/tabdlg.cxx @@ -137,8 +137,8 @@ css::uno::Reference< css::frame::XFrame > SfxTabPage::GetFrame() const return css::uno::Reference< css::frame::XFrame >(); } -SfxTabPage::SfxTabPage(TabPageParent pParent, const OUString& rUIXMLDescription, const OString& rID, const SfxItemSet *rAttrSet) - : BuilderPage(pParent.pPage, pParent.pController, rUIXMLDescription, rID) +SfxTabPage::SfxTabPage(weld::Container* pPage, weld::DialogController* pController, const OUString& rUIXMLDescription, const OString& rID, const SfxItemSet *rAttrSet) + : BuilderPage(pPage, pController, rUIXMLDescription, rID) , pSet ( rAttrSet ) , bHasExchangeSupport ( false ) , pImpl ( new TabPageImpl ) @@ -900,13 +900,10 @@ void SfxTabDialogController::CreatePages() if (pDataObject->xTabPage) continue; weld::Container* pPage = m_xTabCtrl->get_page(pDataObject->sId); - // TODO eventually pass DialogController as distinct argument instead of bundling into TabPageParent - - TabPageParent aParent(pPage, this); if (m_pSet) - pDataObject->xTabPage = (pDataObject->fnCreatePage)(aParent, m_pSet.get()); + pDataObject->xTabPage = (pDataObject->fnCreatePage)(pPage, this, m_pSet.get()); else - pDataObject->xTabPage = (pDataObject->fnCreatePage)(aParent, CreateInputItemSet(pDataObject->sId)); + pDataObject->xTabPage = (pDataObject->fnCreatePage)(pPage, this, CreateInputItemSet(pDataObject->sId)); pDataObject->xTabPage->SetDialogController(this); OUString sConfigId = OStringToOUString(pDataObject->xTabPage->GetConfigId(), RTL_TEXTENCODING_UTF8); SvtViewOptions aPageOpt(EViewType::TabPage, sConfigId); diff --git a/sfx2/source/inc/documentfontsdialog.hxx b/sfx2/source/inc/documentfontsdialog.hxx index c9de2b74f285..408c93ae6302 100644 --- a/sfx2/source/inc/documentfontsdialog.hxx +++ b/sfx2/source/inc/documentfontsdialog.hxx @@ -27,9 +27,9 @@ class SfxDocumentFontsPage: public SfxTabPage { public: - SfxDocumentFontsPage(TabPageParent parent, const SfxItemSet& set); + SfxDocumentFontsPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& set); virtual ~SfxDocumentFontsPage() override; - static std::unique_ptr<SfxTabPage> Create(TabPageParent parent, const SfxItemSet* set); + static std::unique_ptr<SfxTabPage> Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* set); protected: virtual bool FillItemSet( SfxItemSet* set ) override; virtual void Reset( const SfxItemSet* set ) override; diff --git a/sfx2/source/view/printer.cxx b/sfx2/source/view/printer.cxx index 802e6f07a799..7138caa0bab9 100644 --- a/sfx2/source/view/printer.cxx +++ b/sfx2/source/view/printer.cxx @@ -171,7 +171,7 @@ SfxPrintOptionsDialog::SfxPrintOptionsDialog(weld::Window *pParent, , pOptions(pSet->Clone()) , m_xHelpBtn(m_xBuilder->weld_widget("help")) , m_xContainer(m_xDialog->weld_content_area()) - , m_xPage(pViewShell->CreatePrintOptionsPage(TabPageParent(m_xContainer.get(), this), *pOptions)) // Insert TabPage + , m_xPage(pViewShell->CreatePrintOptionsPage(m_xContainer.get(), this, *pOptions)) // Insert TabPage { DBG_ASSERT( m_xPage, "CreatePrintOptions != SFX_VIEW_HAS_PRINTOPTIONS" ); if (m_xPage) diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx index 46a6842b466f..73f5e6e48546 100644 --- a/sfx2/source/view/viewprn.cxx +++ b/sfx2/source/view/viewprn.cxx @@ -900,7 +900,7 @@ sal_uInt16 SfxViewShell::SetPrinter( SfxPrinter* /*pNewPrinter*/, SfxPrinterChan return 0; } -std::unique_ptr<SfxTabPage> SfxViewShell::CreatePrintOptionsPage(TabPageParent /*pParent*/, const SfxItemSet& /*rOptions*/) +std::unique_ptr<SfxTabPage> SfxViewShell::CreatePrintOptionsPage(weld::Container*, weld::DialogController*, const SfxItemSet&) { return nullptr; } |