Apache OpenOffice (AOO) Bugzilla – Issue 22558
core down when passing a negative position for XListBox::addItem
Last modified: 2013-02-24 21:08:39 UTC
As the summary line states when a negative value is passed to XListBox::addItem it causes a core dump. Should the behaviour be : 1) to raise a RuntimeException; or 2) to accept the param, but actually add the item at the end of the list; or 3) add an IllegalArgument exception to the interface. If I knew what the correct behaviour should be, then I could supply a patch.
Thomas, is it you, who is reponsible for this area? Or Malte?
TBE->MT: I guess this is yours.
WIll fix for OOo 2.0
Fixed in mt802
Create a Dialogs with a ListBox and use this macro: BasicLibraries.LoadLibrary("Tools") oDialog1 = LoadDialog("Standard", "Dialog1") oListBox = oDialog1.GetControl("ListBox1") oListbox.additem("New Item",-13) oDialog1.Execute Fixed in mt802
SW: fixed in cws_mt802
SW: "2) to accept the param, but actually add the item at the end of the list" is the behaviour in cws_mt802 => fixed
verified
*** Issue 24753 has been marked as a duplicate of this issue. ***
SW: works as expected in src680_m24 => closed oDialog1 = createUnoDialog(DialogLibraries.Standard.Dialog1) oListBox = oDialog1.GetControl("ListBox1") oListbox.additem("New Item",-13) oDialog1.Execute demonstrates that the item with the wrong index is added at the end of the list.