Apache OpenOffice (AOO) Bugzilla – Full Text Issue Listing |
Summary: | [From Symphony]ComboBox event can't work well in MacOSX | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | App Dev | Reporter: | lihuiibm <lihuibj> | ||||||
Component: | vba | Assignee: | AOO issues mailing list <issues> | ||||||
Status: | CONFIRMED --- | QA Contact: | |||||||
Severity: | Trivial | ||||||||
Priority: | P3 | CC: | issues | ||||||
Version: | 3.3.0 or older (OOo) | ||||||||
Target Milestone: | --- | ||||||||
Hardware: | All | ||||||||
OS: | All | ||||||||
Issue Type: | DEFECT | Latest Confirmation in: | --- | ||||||
Developer Difficulty: | --- | ||||||||
Attachments: |
|
Description
lihuiibm
2009-10-26 10:57:59 UTC
Created attachment 65612 [details]
Patch for this issue
Created attachment 65613 [details]
Test case sample file for this issue
The reason of this fix: In the VBA codes, we activate another sheet in the change event of ComboBox, that cause this ComboBox control being disposed, because in OOo, when we switch to another sheet, all the form control in current sheet will be disposed: Private Sub ComboBox1_Change() Worksheets(ComboBox1.Text).Activate End Sub We fire the ComboBox_Change VBA event in the method of ComboBox:: Modify(), after ComboBox:: Modify() was called, this ComboBox was disposed, so once Select() is called, OOo crash. We store the variable: ImplListBox* pOldLB = mpImplLB, before Modify() is called, after Modify() is called, we check if pOldLB == mpImplLB, if these two variables are not equal, that means, this ComboBox has been disposed. combobox.cxx: IMPL_LINK( ComboBox, ImplSelectHdl, void*, EMPTYARG ) { ... if ( bCallSelect ) { ImplListBox* pOldLB = mpImplLB; mpSubEdit->SetModifyFlag(); mbSyntheticModify = TRUE; Modify(); mbSyntheticModify = FALSE; if (ImplGetWindowImpl() != NULL && mpImplLB != NULL && pOldLB == mpImplLB) { Select(); } } ... } needs cws npower12 ( for the api ) and ab71 for the fake event handling to be in place before this can be upstreamed, after that probably pl ( vcl guru ) needs to review this fix, please take ownership for now >needs cws npower12 ( for the api ) and ab71 for the fake event handling
actually seems like it just needs ab71
Reset assigne to the default "issues@openoffice.apache.org". |