summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-02-07 09:20:47 +0000
committerCaolán McNamara <caolanm@redhat.com>2012-09-28 08:48:10 +0100
commit004369c76a3c43a478d668521bf7cee3176bf5d7 (patch)
treea30179147e9c3d1a7f46204a596668f388f59539 /sfx2
parent53aba9dff86e536b28c066a543e198ec672fc4ca (diff)
force all tabs to exist when layout enabled
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/dialog/tabdlg.cxx16
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 );