diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-12-19 14:47:17 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-12-19 15:23:16 +0000 |
commit | 0290ff79eacb02c800976ac13408354624811008 (patch) | |
tree | 597ea01eb36b0a1ca56511ad1d8fd6cc556fd8f3 /sfx2/source/dialog/dinfdlg.cxx | |
parent | ae4f2c72b7a93085025859cbf1698651831e1b44 (diff) |
convert document properties tabdialog to .ui format
this includes allow us to add tabpages to SfxTabDialogs by name (and getting
back the matching pageid) where the name of a tabpage is the name of the label
widget for the page in the .ui notebook.
Change-Id: I48bfaa9ac8daa443ca72540e2024ddb9df34faa5
Diffstat (limited to 'sfx2/source/dialog/dinfdlg.cxx')
-rw-r--r-- | sfx2/source/dialog/dinfdlg.cxx | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index 6de396d7d8da..20f7bb70b122 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -1428,14 +1428,12 @@ int SfxInternetPage::DeactivatePage( SfxItemSet* /*pSet*/ ) //------------------------------------------------------------------------ SfxDocumentInfoDialog::SfxDocumentInfoDialog( Window* pParent, - const SfxItemSet& rItemSet ) : - - SfxTabDialog( 0, pParent, SfxResId( SID_DOCINFO ), &rItemSet ) - + const SfxItemSet& rItemSet ) + : SfxTabDialog(0, pParent, "DocumentPropertiesDialog", + "sfx/ui/documentpropertiesdialog.ui", &rItemSet) + , m_nDocInfoId(0) { - FreeResource(); - - const SfxDocumentInfoItem* m_pInfoItem = + const SfxDocumentInfoItem* m_pInfoItem = &(const SfxDocumentInfoItem &)rItemSet.Get( SID_DOCINFO ); #ifdef DBG_UTIL @@ -1475,18 +1473,18 @@ SfxDocumentInfoDialog::SfxDocumentInfoDialog( Window* pParent, SetText( aTitle ); // Property Pages - AddTabPage(TP_DOCINFODESC, SfxDocumentDescPage::Create, 0); - AddTabPage(TP_DOCINFODOC, SfxDocumentPage::Create, 0); - AddTabPage(TP_CUSTOMPROPERTIES, SfxCustomPropertiesPage::Create, 0); - AddTabPage(TP_DOCINFORELOAD, SfxInternetPage::Create, 0); - AddTabPage(TP_DOCINFOSECURITY, SfxSecurityPage::Create, 0); + m_nDocInfoId = AddTabPage("general", SfxDocumentPage::Create, 0); + AddTabPage("description", SfxDocumentDescPage::Create, 0); + AddTabPage("customprops", SfxCustomPropertiesPage::Create, 0); + AddTabPage("internet", SfxInternetPage::Create, 0); + AddTabPage("security", SfxSecurityPage::Create, 0); } // ----------------------------------------------------------------------- void SfxDocumentInfoDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) { - if ( TP_DOCINFODOC == nId ) + if ( m_nDocInfoId == nId ) ( (SfxDocumentPage&)rPage ).EnableUseUserData(); } |