diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-01-24 14:11:21 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-01-24 14:29:46 +0000 |
commit | 20371d26374b40fe28ac006d9392104b692fce32 (patch) | |
tree | 865979524ce4173b3912c04d312d67481deb18f0 /sfx2/inc | |
parent | bd272cd3daf873fcc69c2cc794ffda821be7fedf (diff) |
add a layout aware SfxSingleTabDialog
Change-Id: Ia4726eac4448dd22380d81d49c5e3b19aa097f73
Diffstat (limited to 'sfx2/inc')
-rw-r--r-- | sfx2/inc/sfx2/basedlgs.hxx | 42 |
1 files changed, 36 insertions, 6 deletions
diff --git a/sfx2/inc/sfx2/basedlgs.hxx b/sfx2/inc/sfx2/basedlgs.hxx index 141f082e1e2a..c3684e5a883c 100644 --- a/sfx2/inc/sfx2/basedlgs.hxx +++ b/sfx2/inc/sfx2/basedlgs.hxx @@ -64,6 +64,7 @@ protected: String& GetExtraData() { return aExtraData; } sal_uInt32 GetUniqId() const { return nUniqId; } + void SetUniqId(sal_uInt32 nSettingsId) { nUniqId = nSettingsId; } SfxItemSet* GetItemSet() { return pOutputSet; } void CreateOutputItemSet( SfxItemPool& rPool ); void CreateOutputItemSet( const SfxItemSet& rInput ); @@ -167,21 +168,24 @@ struct SingleTabDlgImpl typedef sal_uInt16* (*GetTabPageRanges)(); // liefert internationale Which-Werte -class SFX2_DLLPUBLIC SfxNoLayoutSingleTabDialog : public SfxModalDialog +class SFX2_DLLPUBLIC SfxSingleTabDialogBase : public SfxModalDialog { public: - SfxNoLayoutSingleTabDialog( Window* pParent, const SfxItemSet& rOptionsSet, sal_uInt16 nUniqueId ); - SfxNoLayoutSingleTabDialog( Window* pParent, sal_uInt16 nUniqueId, const SfxItemSet* pInSet = 0 ); + //layout ctor + SfxSingleTabDialogBase(Window* pParent, const SfxItemSet& rOptionsSet); - virtual ~SfxNoLayoutSingleTabDialog(); + //non-layout ctors + SfxSingleTabDialogBase( Window* pParent, const SfxItemSet& rOptionsSet, sal_uInt16 nUniqueId ); + SfxSingleTabDialogBase( Window* pParent, sal_uInt16 nUniqueId, const SfxItemSet* pInSet = 0 ); + + virtual ~SfxSingleTabDialogBase(); - void SetTabPage( SfxTabPage* pTabPage, GetTabPageRanges pRangesFunc = 0 ); SfxTabPage* GetTabPage() const { return pImpl->m_pSfxPage; } OKButton* GetOKButton() const { return pOKBtn; } CancelButton* GetCancelButton() const { return pCancelBtn; } -private: +protected: GetTabPageRanges fnGetRanges; OKButton* pOKBtn; @@ -193,6 +197,32 @@ private: DECL_DLLPRIVATE_LINK(OKHdl_Impl, void *); }; +class SFX2_DLLPUBLIC SfxSingleTabDialog : public SfxSingleTabDialogBase +{ +public: + SfxSingleTabDialog(Window* pParent, const SfxItemSet& rOptionsSet) + : SfxSingleTabDialogBase(pParent, rOptionsSet) + { + } + void setTabPage(SfxTabPage* pTabPage, GetTabPageRanges pRangesFunc = 0, sal_uInt32 nSettingsId = 0); +}; + +//Old school deprecated non-layout aware version +class SFX2_DLLPUBLIC SfxNoLayoutSingleTabDialog : public SfxSingleTabDialogBase +{ +public: + SfxNoLayoutSingleTabDialog(Window* pParent, const SfxItemSet& rOptionsSet, sal_uInt16 nUniqueId) + : SfxSingleTabDialogBase(pParent, rOptionsSet, nUniqueId) + { + } + SfxNoLayoutSingleTabDialog(Window* pParent, sal_uInt16 nUniqueId, const SfxItemSet* pInSet = 0) + : SfxSingleTabDialogBase(pParent, nUniqueId, pInSet) + { + } + ~SfxNoLayoutSingleTabDialog(); + void SetTabPage(SfxTabPage* pTabPage, GetTabPageRanges pRangesFunc = 0); +}; + #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |