Issue 108895 - Support new parameter for API: UserForm.Show(modal as boolean)
Summary: Support new parameter for API: UserForm.Show(modal as boolean)
Status: CONFIRMED
Alias: None
Product: App Dev
Classification: Unclassified
Component: vba (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: All All
: P3 Trivial
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-03 07:29 UTC by lihuiibm
Modified: 2013-02-24 20:56 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Changes for the API (24.32 KB, text/plain)
2010-02-03 07:30 UTC, lihuiibm
no flags Details
alternative patch (16.47 KB, patch)
2010-03-10 19:32 UTC, noel.power
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description lihuiibm 2010-02-03 07:29:53 UTC
Support new parameter for API: UserForm.Show(modal as boolean)
Comment 1 lihuiibm 2010-02-03 07:30:27 UTC
Created attachment 67575 [details]
Changes for the API
Comment 2 noel.power 2010-03-10 10:03:58 UTC
starting to look at this...
Comment 3 noel.power 2010-03-10 19:31:16 UTC
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 ???
Comment 4 noel.power 2010-03-10 19:32:54 UTC
Created attachment 68280 [details]
alternative patch
Comment 5 lihuiibm 2010-03-12 16:04:29 UTC
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.