diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-10-18 13:00:41 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-10-20 13:52:34 +0200 |
commit | 8947c9b1d8cd407131fdfb6fc3c77c8532e9d2a0 (patch) | |
tree | f47becc099d139ae601fc41d9e8f49f24672f0e0 /sfx2 | |
parent | b361413eef7e46f340d921708faca9986c63c9f8 (diff) |
weld SchAttribTabDlg
Change-Id: Ia53547b7b42a3ff8848085ab8f8d214259d5cc7b
Reviewed-on: https://gerrit.libreoffice.org/61959
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 | 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) |