Issue 124652

Summary: css::ui::dialogs::XWizard: enableButton and setDefaultButton work only after the dialog is executed
Product: App Dev Reporter: Ariel Constenla-Haile <arielch>
Component: apiAssignee: AOO issues mailing list <issues>
Status: CONFIRMED --- QA Contact:
Severity: Normal    
Priority: P3    
Version: 3.3.0 or older (OOo)   
Target Milestone: ---   
Hardware: All   
OS: All   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---

Description Ariel Constenla-Haile 2014-04-10 16:10:18 UTC
enableButton and setDefaultButton work only after the dialog is executed, this doesn't make sense, as client code is likely to use these methods after dialog construction.

The bug is in the implementation, the UNO dialog implantation only works when its VCL dialog is already created:

WizardShell* pWizardImpl = dynamic_cast< WizardShell* >( m_pDialog );
ENSURE_OR_RETURN_VOID( pWizardImpl, "Wizard::setDefaultButton: invalid dialog implementation!" );

http://svn.apache.org/viewvc/openoffice/trunk/main/svtools/source/uno/wizard/unowizard.cxx?revision=1586340&view=markup#l327

http://svn.apache.org/viewvc/openoffice/trunk/main/svtools/source/uno/wizard/unowizard.cxx?revision=1586340&view=markup#l339

but this should be treated like the HelpURL attribute: if there is no VCL dialog, store the information in member variables and then set it when the VCL dialog is created.