diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-03-20 11:56:03 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-03-22 14:21:02 +0100 |
commit | fbd79c6125fd302dde9af2d76171dd5ca794af4d (patch) | |
tree | dc5b94523c89d892c07544368643bad2eea4c3af /sfx2 | |
parent | 7d0bd54bad1782f74c156aa667e875c33efee0c1 (diff) |
weld SwFieldDlg
Change-Id: I324a581721e01c907113bb3ab1cc91a290bd71a7
Reviewed-on: https://gerrit.libreoffice.org/69475
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/dialog/tabdlg.cxx | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx index 3ccc31662287..4fcc3cc25653 100644 --- a/sfx2/source/dialog/tabdlg.cxx +++ b/sfx2/source/dialog/tabdlg.cxx @@ -1938,6 +1938,17 @@ void SfxTabDialogController::AddTabPage(const OString &rName, const OUString& rR AddTabPage(rName, nPageCreateId); } +/* [Description] + + Default implementation of the virtual Method. + This is called when pages create their sets onDemand. +*/ +SfxItemSet* SfxTabDialogController::CreateInputItemSet(const OString&) +{ + SAL_WARN( "sfx.dialog", "CreateInputItemSet not implemented" ); + return new SfxAllItemSet(SfxGetpApp()->GetPool()); +} + void SfxTabDialogController::CreatePages() { for (auto pDataObject : m_pImpl->aData) @@ -1946,9 +1957,13 @@ void SfxTabDialogController::CreatePages() continue; weld::Container* pPage = m_xTabCtrl->get_page(pDataObject->sId); // TODO eventually pass DialogController as distinct argument instead of bundling into TabPageParent - pDataObject->pTabPage = (pDataObject->fnCreatePage)(TabPageParent(pPage, this), m_pSet.get()); - pDataObject->pTabPage->SetDialogController(this); + TabPageParent aParent(pPage, this); + if (m_pSet) + pDataObject->pTabPage = (pDataObject->fnCreatePage)(aParent, m_pSet.get()); + else + pDataObject->pTabPage = (pDataObject->fnCreatePage)(aParent, CreateInputItemSet(pDataObject->sId)); + pDataObject->pTabPage->SetDialogController(this); OUString sConfigId = OStringToOUString(pDataObject->pTabPage->GetConfigId(), RTL_TEXTENCODING_UTF8); SvtViewOptions aPageOpt(EViewType::TabPage, sConfigId); OUString sUserData; @@ -2058,6 +2073,16 @@ void SfxTabDialogController::SetCurPageId(const OString& rIdent) m_xTabCtrl->set_current_page(m_sAppPageId); } +/* [Description] + + The TabPage is activated with the specified Id. +*/ +void SfxTabDialogController::ShowPage(const OString& rIdent) +{ + SetCurPageId(rIdent); + ActivatePageHdl(rIdent); +} + OString SfxTabDialogController::GetCurPageId() const { return m_xTabCtrl->get_current_page_ident(); |