Apache OpenOffice (AOO) Bugzilla – Issue 109535
getParent() of a table control's list box control does not work anymore
Last modified: 2017-05-20 10:23:51 UTC
The ListBox subcomponent in grid control has broken automation in v3.2. It doesn't response to getParent() function correctly. The following code, triggered by ListBox column subcomponent in a grid control, works fine to the version 3.1.1 and stops working in 3.2: Sub blah(oEvent) dim oForm as object dim oMasterForm as object oForm = oEvent.Source oMasterForm = oForm.getParent().getParent().GetParent().GetParent() 'some following code end Sub Since 3.2, every try of using getParent() on ListBox subcontrol ends up with "illegal object given" message. I also used XRay on oEvent.Source and it also gave the same error when I tried to inspect getParent() method of the object. Since the code breaks in 3.2, I reverted to 3.1.1 and it resumed to work.
Created attachment 67993 [details] The OOo Base document containing the form affected
@fs: please have a look
putting into our pool for to-be-confirmed issues
I have found the same issue with a push button control on a main form (on Windows Vista 32bit OS). Several of my macros that have worked since v2.4 are broken in 3.2. I am using the "auto" property <Object>.source.model.parent
fs->kretek: The document you attached is not self-contained, it does not contain any actual tables or data, so the contained form does not work, so the macro is never triggered. fs->m90216: I tried to replicate the problem with a button, bound to the following macro: Sub hello(oEvent) dim oEventSource as object oEventSource = oEvent.Source MsgBox "event source: " & oEventSource.ImplementationName Dim oModel as Object oModel = oEventSource.Model MsgBox "event source's model: " & oModel.ImplementationName MsgBox "parent :" & oModel.getParent().ImplementationName MsgBox "parent.parent :" & oModel.getParent().getParent().ImplementationName MsgBox "parent.parent.parent :" & _ oModel.getParent().getParent().getParent().ImplementationName MsgBox "parent.parent.parent.parent :" & _ oModel.getParent().getParent().getParent().getParent().ImplementationName end Sub This works perfectly fine in OOo 3.2.
I may have jumped to conclusions. The actual code that failed was bound to a checkbox control in a sub-form (Item Status Changed event). This is it... Sub onClickUpdateMeal(Ob as Object) Dim bStat as Boolean, MenuID as double, sSQL as string bStat = (Ob.Selected=1) 'Xray Ob MenuID =Ob.source.model.parent.GetByName("ID").GetCurrentValue ... This gets the value from the selected row in the subform grid. I have used similar code as a quick reference to the form in macros bound to buttons but I must be wrong in assuming they suffer the same problem. I have reverted to 3.1.1 now so can't test further for the time being. If I uncommented the Xray, "Ob" had no name and gave the same error when Xraying the parent property. Looks as if the error is limited to controls within a grid control. Sorry if I raised a red herring.
Created attachment 68292 [details] document to reproduce the bug case
confirming. Targeting to 3.2.1 'cause it's a regression.
fixed in CWS dba321a find more information about this CWS, like when it is available in the master builds, in EIS, the Environment Information System: http://eis.services.openoffice.org/EIS2/cws.ShowCWS?Path=DEV300%2Fdba321a
I have the same problem with a Combobox control in a grid, in a subform the event parameter shows a null parent.
fs->msc: please verify in CWS dba321a
verified in CWS dba321a find more information about this CWS, like when it is available in the master builds, in EIS, the Environment Information System: http://eis.services.openoffice.org/EIS2/cws.ShowCWS?Path=DEV300%2Fdba321a
Hi Using Ubuntu with OpenOffice 3.2.0 build 9483 i get the same error when using a checkbox, and then using a Macro to reference it.
*** Issue 110555 has been marked as a duplicate of this issue. ***