diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-12-24 09:55:46 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-12-24 10:21:21 +0000 |
commit | 0dce3178fa75ad1d6f663ccd6548a1c54c6a93bd (patch) | |
tree | f129998fb0e8746f7418432481f373cb86a9c866 /cui/source | |
parent | 2544a2a810bc9182d5f062cafb41b5be96111982 (diff) |
convert gallery theme properties dialog to .ui
Change-Id: I32c3be9e12d1b3dafa0dc9876657844bd77c9e95
Diffstat (limited to 'cui/source')
-rw-r--r-- | cui/source/dialogs/cuigaldlg.cxx | 20 | ||||
-rw-r--r-- | cui/source/dialogs/gallery.src | 24 | ||||
-rw-r--r-- | cui/source/inc/cuigaldlg.hxx | 9 | ||||
-rw-r--r-- | cui/source/inc/gallery.hrc | 4 |
4 files changed, 17 insertions, 40 deletions
diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx index b49e8a57a1e9..ea9afc1d166a 100644 --- a/cui/source/dialogs/cuigaldlg.cxx +++ b/cui/source/dialogs/cuigaldlg.cxx @@ -589,17 +589,19 @@ IMPL_LINK_NOARG(GalleryIdDialog, ClickOkHdl) // - GalleryThemeProperties - // -------------------------- -GalleryThemeProperties::GalleryThemeProperties( Window* pParent, ExchangeData* _pData, SfxItemSet* pItemSet ) : - SfxTabDialog ( pParent, CUI_RES( RID_SVXTABDLG_GALLERYTHEME ), pItemSet ), - pData ( _pData ) +GalleryThemeProperties::GalleryThemeProperties(Window* pParent, + ExchangeData* _pData, SfxItemSet* pItemSet) + : SfxTabDialog( pParent, "GalleryThemeDialog", + "cui/ui/gallerythemedialog.ui", pItemSet) + , pData(_pData) + , m_nGeneralPageId(0) + , m_nFilesPageId(0) { - FreeResource(); - - AddTabPage( RID_SVXTABPAGE_GALLERY_GENERAL, TPGalleryThemeGeneral::Create, 0 ); - AddTabPage( RID_SVXTABPAGE_GALLERYTHEME_FILES, TPGalleryThemeProperties::Create, 0 ); + m_nGeneralPageId = AddTabPage("general", TPGalleryThemeGeneral::Create, 0); + m_nFilesPageId = AddTabPage("files", TPGalleryThemeProperties::Create, 0); if( pData->pTheme->IsReadOnly() ) - RemoveTabPage( RID_SVXTABPAGE_GALLERYTHEME_FILES ); + RemoveTabPage(m_nFilesPageId); OUString aText( GetText() ); @@ -615,7 +617,7 @@ GalleryThemeProperties::GalleryThemeProperties( Window* pParent, ExchangeData* _ void GalleryThemeProperties::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) { - if( RID_SVXTABPAGE_GALLERY_GENERAL == nId ) + if (nId == m_nGeneralPageId) ( (TPGalleryThemeGeneral&) rPage ).SetXChgData( pData ); else ( (TPGalleryThemeProperties&) rPage ).SetXChgData( pData ); diff --git a/cui/source/dialogs/gallery.src b/cui/source/dialogs/gallery.src index a80d60448d0e..d1a741359e09 100644 --- a/cui/source/dialogs/gallery.src +++ b/cui/source/dialogs/gallery.src @@ -24,30 +24,6 @@ #define MASKCOLOR MaskColor = Color { Red = 0xFFFF ; Green = 0x0000 ; Blue = 0xFFFF ; }; -TabDialog RID_SVXTABDLG_GALLERYTHEME -{ - OutputSize = TRUE ; - SVLook = TRUE ; - Text [ en-US ] = "Properties of " ; - Moveable = TRUE ; - TabControl 1 - { - OutputSize = TRUE ; - PageList = - { - PageItem - { - Identifier = RID_SVXTABPAGE_GALLERY_GENERAL ; - Text [ en-US ] = "General" ; - }; - PageItem - { - Identifier = RID_SVXTABPAGE_GALLERYTHEME_FILES ; - Text [ en-US ] = "Files" ; - }; - }; - }; -}; /******************************************************************************/ diff --git a/cui/source/inc/cuigaldlg.hxx b/cui/source/inc/cuigaldlg.hxx index 2e8d82970399..eb242ef7dece 100644 --- a/cui/source/inc/cuigaldlg.hxx +++ b/cui/source/inc/cuigaldlg.hxx @@ -197,12 +197,13 @@ class GalleryThemeProperties : public SfxTabDialog { ExchangeData* pData; - virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage ); + sal_uInt16 m_nGeneralPageId; + sal_uInt16 m_nFilesPageId; -public: + virtual void PageCreated(sal_uInt16 nId, SfxTabPage &rPage); - GalleryThemeProperties( Window* pParent, ExchangeData* pData, SfxItemSet* pItemSet ); - ~GalleryThemeProperties() {} +public: + GalleryThemeProperties(Window* pParent, ExchangeData* pData, SfxItemSet* pItemSet); }; class TPGalleryThemeGeneral : public SfxTabPage diff --git a/cui/source/inc/gallery.hrc b/cui/source/inc/gallery.hrc index 61b038a555ad..e255e7592c41 100644 --- a/cui/source/inc/gallery.hrc +++ b/cui/source/inc/gallery.hrc @@ -18,9 +18,7 @@ */ #include <cuires.hrc> -// Gallery TabDialogs/TabPages -#define RID_SVXTABDLG_GALLERYTHEME (RID_CUI_GALLERY_START + 2) - +// Gallery TabPages #define RID_SVXTABPAGE_GALLERY_GENERAL (RID_CUI_GALLERY_START + 1) #define RID_SVXTABPAGE_GALLERYTHEME_FILES (RID_CUI_GALLERY_START + 4) |