Apache OpenOffice (AOO) Bugzilla – Issue 108895
Support new parameter for API: UserForm.Show(modal as boolean)
Last modified: 2013-02-24 20:56:49 UTC
Created attachment 67575 [details] Changes for the API
starting to look at this...
XDialog3.idl is missing from the patch, I don't understand the need for this interface at all, also I don't understand the changes either to toolkit or vcl ( except the mnCancelClose change which seems to be a bug fix ) Alot of these changes seem completely uncessesary. The changes to vcl and toolkit look like they affect normal Dialog operation so they make me nervous, they also would be harder to upstream, Additionally essentially duplicating the Eventlistener that is in sbxmod.cxx in vbauserform.cxx doesn't seem a good thing to do. With that in mind I rewrote the patch, it seems to work ( but I don't know what you have tested your implementation against ) it attach it here, but... I still wonder were there some reasons why the patch made the invasive changes to toolkit and vcl, perhaps I missed something ???
Created attachment 68280 [details] alternative patch
1. One change in vcl: if ( mpWindowImpl->mxWindowPeer.is() && IsCreatedWithToolkit() && !IsInExecute() && !IsInShow() ). Adding '!IsInShow()' in the 'if' statement, is used to fix the issue: When userform is showing in modeless, click the Close icon of the dialog can't close the dialog. 2. another change in vcl: else if ( IsInShow() ) { Hide(); mbInClose = FALSE; return TRUE; } Adding this 'else if' statement is used to fix the issue: When showing the userform in modeless, click the Close icon to close the dialog, the "Terminate" event of UserForm will be fired two times.