diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-09-28 12:17:33 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-09-28 20:58:15 +0100 |
commit | 35a16a88ebd7ea0a09f49d95e7cd6ae2e98381e8 (patch) | |
tree | 3aa1f19185086eb9039159fd249368a0839c00b3 /svtools/source/dialogs/wizdlg.cxx | |
parent | 63a8964ac6d34bb097cc20c0adf984f6380c0b01 (diff) |
route wizards child queue_resize requests to preexisting layout
As an interim measure, until wizards can only be constructed from .ui and then
always contain layout widgets, implement listening for layout widget children
announcing layout change requests and route that to pre-existing original
positioning code. That allows e.g. the mail merge output page in writer to
show/hide the alternative descriptions on selecting letter/email.
Change-Id: I086921f4d46b29756cf4f4fccdf3bdf632ea70b8
Diffstat (limited to 'svtools/source/dialogs/wizdlg.cxx')
-rw-r--r-- | svtools/source/dialogs/wizdlg.cxx | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/svtools/source/dialogs/wizdlg.cxx b/svtools/source/dialogs/wizdlg.cxx index 1a9191af5855..df05a6239cc1 100644 --- a/svtools/source/dialogs/wizdlg.cxx +++ b/svtools/source/dialogs/wizdlg.cxx @@ -61,6 +61,9 @@ void WizardDialog::ImplInitData() meViewAlign = WINDOWALIGN_LEFT; mbEmptyViewMargin = false; mnLeftAlignCount = 0; + + maWizardLayoutTimer.SetTimeout(50); + maWizardLayoutTimer.SetTimeoutHdl( LINK( this, WizardDialog, ImplHandleWizardLayoutTimerHdl ) ); } // ----------------------------------------------------------------------- @@ -111,7 +114,26 @@ void WizardDialog::ImplCalcSize( Size& rSize ) } } -// ----------------------------------------------------------------------- +bool WizardDialog::hasWizardPendingLayout() const +{ + return maWizardLayoutTimer.IsActive(); +} + +void WizardDialog::queue_layout() +{ + if (hasWizardPendingLayout()) + return; + if (IsInClose()) + return; + maWizardLayoutTimer.Start(); +} + +IMPL_LINK( WizardDialog, ImplHandleWizardLayoutTimerHdl, void*, EMPTYARG ) +{ + ImplPosCtrls(); + ImplPosTabPage(); + return 0; +} void WizardDialog::ImplPosCtrls() { @@ -357,8 +379,9 @@ WizardDialog::WizardDialog( Window* pParent, const ResId& rResId ) : WizardDialog::~WizardDialog() { - if ( mpFixedLine ) - delete mpFixedLine; + maWizardLayoutTimer.Stop(); + + delete mpFixedLine; // Remove all buttons while ( mpFirstBtn ) |