diff options
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/dialog/tabdlg.cxx | 41 |
1 files changed, 29 insertions, 12 deletions
diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx index e91ad194932e..37df9f36e67b 100644 --- a/sfx2/source/dialog/tabdlg.cxx +++ b/sfx2/source/dialog/tabdlg.cxx @@ -1996,22 +1996,15 @@ void SfxTabDialogController::SavePosAndId() Adds a page to the dialog. The Name must correspond to a entry in the TabControl in the dialog .ui */ -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 -) +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)); } -void SfxTabDialogController::AddTabPage -( - const OString &rName, // Page ID - sal_uInt16 nPageCreateId // Identifier of the Factory Method to create the page -) +void SfxTabDialogController::AddTabPage(const OString &rName /* Page ID */, + sal_uInt16 nPageCreateId /* Identifier of the Factory Method to create the page */) { SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); CreateTabPage pCreateFunc = pFact->GetTabPageCreatorFunc(nPageCreateId); @@ -2019,6 +2012,30 @@ void SfxTabDialogController::AddTabPage AddTabPage(rName, pCreateFunc, pRangesFunc); } +/* [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. +*/ + +void SfxTabDialogController::AddTabPage(const OString &rName, /* Page ID */ + const OUString& rRiderText, + CreateTabPage pCreateFunc /* Pointer to the Factory Method */, + GetTabPageRanges pRangesFunc /* Pointer to the Method for querying Ranges onDemand */) +{ + assert(!m_xTabCtrl->get_page(rName) && "Double Page-Ids in the Tabpage"); + m_xTabCtrl->append_page(rName, rRiderText); + AddTabPage(rName, pCreateFunc, pRangesFunc); +} + +void SfxTabDialogController::AddTabPage(const OString &rName, const OUString& rRiderText, + sal_uInt16 nPageCreateId /* Identifier of the Factory Method to create the page */) +{ + assert(!m_xTabCtrl->get_page(rName) && "Double Page-Ids in the Tabpage"); + m_xTabCtrl->append_page(rName, rRiderText); + AddTabPage(rName, nPageCreateId); +} + void SfxTabDialogController::CreatePages() { for (auto pDataObject : m_pImpl->aData) |