diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-08-31 14:23:41 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-09-02 10:12:04 +0200 |
commit | 4a95ae505d48e6d1096889150a01f5c756889752 (patch) | |
tree | 305e155d33b82104fc8e407d67beecdddc0547c2 /vcl/source/control/wizdlg.cxx | |
parent | 00b3c2240bb2f86299e3ddeea75a16e8e9877489 (diff) |
weld cluster of database form wizards
Change-Id: If40eec5ec00ad96088c0dda96c4733d2a1134f68
Reviewed-on: https://gerrit.libreoffice.org/78368
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
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(); |