diff options
Diffstat (limited to 'vcl/source/control/wizdlg.cxx')
-rw-r--r-- | vcl/source/control/wizdlg.cxx | 44 |
1 files changed, 24 insertions, 20 deletions
diff --git a/vcl/source/control/wizdlg.cxx b/vcl/source/control/wizdlg.cxx index be909bbdd92f..54b0e1f3df8a 100644 --- a/vcl/source/control/wizdlg.cxx +++ b/vcl/source/control/wizdlg.cxx @@ -374,6 +374,29 @@ void WizardDialog::Resize() Dialog::Resize(); } +void WizardDialog::CalcAndSetSize() +{ + Size aDlgSize = GetPageSizePixel(); + if ( !aDlgSize.Width() || !aDlgSize.Height() ) + { + ImplWizPageData* pPageData = mpFirstPage; + while ( pPageData ) + { + if ( pPageData->mpPage ) + { + Size aPageSize = pPageData->mpPage->GetSizePixel(); + if ( aPageSize.Width() > aDlgSize.Width() ) + aDlgSize.setWidth( aPageSize.Width() ); + if ( aPageSize.Height() > aDlgSize.Height() ) + aDlgSize.setHeight( aPageSize.Height() ); + } + + pPageData = pPageData->mpNext; + } + } + ImplCalcSize( aDlgSize ); + SetOutputSizePixel( aDlgSize ); +} void WizardDialog::StateChanged( StateChangedType nType ) { @@ -381,26 +404,7 @@ void WizardDialog::StateChanged( StateChangedType nType ) { if ( IsDefaultSize() ) { - Size aDlgSize = GetPageSizePixel(); - if ( !aDlgSize.Width() || !aDlgSize.Height() ) - { - ImplWizPageData* pPageData = mpFirstPage; - while ( pPageData ) - { - if ( pPageData->mpPage ) - { - Size aPageSize = pPageData->mpPage->GetSizePixel(); - if ( aPageSize.Width() > aDlgSize.Width() ) - aDlgSize.setWidth( aPageSize.Width() ); - if ( aPageSize.Height() > aDlgSize.Height() ) - aDlgSize.setHeight( aPageSize.Height() ); - } - - pPageData = pPageData->mpNext; - } - } - ImplCalcSize( aDlgSize ); - SetOutputSizePixel( aDlgSize ); + CalcAndSetSize(); } ImplPosCtrls(); |