diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-01-18 13:33:18 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-01-18 14:35:11 +0000 |
commit | 4b529841d34ffdbcf6befe6f1eb70fe7ff8c159c (patch) | |
tree | e96e4517f086d5cb9b0581349b69aac969014cc9 /sfx2/inc | |
parent | f710a2db4c6d2994e2ab3d44bf5d3f825a8f5da4 (diff) |
add a way to select the current SfxTabPage by name
Change-Id: Ib7a07bc0e6ec9f47b83839fb3eb8f31c014dedff
Diffstat (limited to 'sfx2/inc')
-rw-r--r-- | sfx2/inc/sfx2/sfxdlg.hxx | 1 | ||||
-rw-r--r-- | sfx2/inc/sfx2/tabdlg.hxx | 15 |
2 files changed, 13 insertions, 3 deletions
diff --git a/sfx2/inc/sfx2/sfxdlg.hxx b/sfx2/inc/sfx2/sfxdlg.hxx index 0465dbbf002a..d119eb772216 100644 --- a/sfx2/inc/sfx2/sfxdlg.hxx +++ b/sfx2/inc/sfx2/sfxdlg.hxx @@ -67,6 +67,7 @@ class SfxAbstractTabDialog : virtual public SfxAbstractDialog { public: virtual void SetCurPageId( sal_uInt16 nId ) = 0; + virtual void SetCurPageId( const OString &rName ) = 0; virtual const sal_uInt16* GetInputRanges( const SfxItemPool& ) = 0; virtual void SetInputSet( const SfxItemSet* pInSet ) = 0; }; diff --git a/sfx2/inc/sfx2/tabdlg.hxx b/sfx2/inc/sfx2/tabdlg.hxx index d9593c053c39..d25a72cf39be 100644 --- a/sfx2/inc/sfx2/tabdlg.hxx +++ b/sfx2/inc/sfx2/tabdlg.hxx @@ -185,9 +185,18 @@ public: void RemoveTabPage( sal_uInt16 nId ); - void SetCurPageId( sal_uInt16 nId ) { nAppPageId = nId; } - sal_uInt16 GetCurPageId() const - { return m_pTabCtrl->GetCurPageId(); } + void SetCurPageId(sal_uInt16 nId) + { + nAppPageId = nId; + } + void SetCurPageId(const OString& rName) + { + nAppPageId = m_pTabCtrl->GetPageId(rName); + } + sal_uInt16 GetCurPageId() const + { + return m_pTabCtrl->GetCurPageId(); + } void ShowPage( sal_uInt16 nId ); // may provide local slots converted by Map |