diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-02-07 09:20:47 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-09-28 08:48:10 +0100 |
commit | 004369c76a3c43a478d668521bf7cee3176bf5d7 (patch) | |
tree | a30179147e9c3d1a7f46204a596668f388f59539 /sfx2 | |
parent | manual font effect tab conversion (diff) | |
download | core-004369c76a3c43a478d668521bf7cee3176bf5d7.tar.gz core-004369c76a3c43a478d668521bf7cee3176bf5d7.zip |
force all tabs to exist when layout enabled
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/dialog/tabdlg.cxx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx index d820173e783b..e4df68bfb518 100644 --- a/sfx2/source/dialog/tabdlg.cxx +++ b/sfx2/source/dialog/tabdlg.cxx @@ -667,6 +667,22 @@ sal_Bool SfxTabDialog::IsApplyButtonEnabled() const void SfxTabDialog::Start_Impl() { + //If we're layout enabled, we need to force all tabs to + //exist to get overall optimal size for dialog + if (isLayoutEnabled()) + { + for ( sal_uInt16 n=0; n < aTabCtrl.GetPageCount(); ++n) + { + sal_uInt16 nPageId = aTabCtrl.GetPageId(n); + TabPage* pTabPage = aTabCtrl.GetTabPage(nPageId); + if (!pTabPage) + { + aTabCtrl.SetCurPageId(nPageId); + ActivatePageHdl(&aTabCtrl); + } + } + } + DBG_ASSERT( pImpl->pData->Count() == aTabCtrl.GetPageCount(), "not all pages registered" ); sal_uInt16 nActPage = aTabCtrl.GetPageId( 0 ); |