Issue 22558 - core down when passing a negative position for XListBox::addItem
Summary: core down when passing a negative position for XListBox::addItem
Status: CLOSED FIXED
Alias: None
Product: App Dev
Classification: Unclassified
Component: api (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: Other Linux, all
: P3 Trivial
Target Milestone: ---
Assignee: stephan.wunderlich
QA Contact: issues@api
URL:
Keywords:
: 24753 (view as issue list)
Depends on:
Blocks:
 
Reported: 2003-11-17 15:55 UTC by con.hennessy
Modified: 2013-02-24 21:08 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description con.hennessy 2003-11-17 15:55:41 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.
Comment 1 ooo 2003-11-18 08:20:13 UTC
Thomas, is it you, who is reponsible for this area?  Or Malte?
Comment 2 thomas.benisch 2003-11-19 12:10:59 UTC
TBE->MT: I guess this is yours.
Comment 3 malte_timmermann 2003-11-19 18:11:18 UTC
WIll fix for OOo 2.0
Comment 4 malte_timmermann 2004-01-27 11:43:13 UTC
Fixed in mt802
Comment 5 malte_timmermann 2004-01-28 11:20:42 UTC
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
Comment 6 stephan.wunderlich 2004-01-28 15:47:41 UTC
SW: fixed in cws_mt802
Comment 7 stephan.wunderlich 2004-01-28 15:48:53 UTC
SW: "2) to accept the param, but actually add the item at the end of the list"
is the behaviour in cws_mt802 => fixed
Comment 8 stephan.wunderlich 2004-01-28 15:51:04 UTC
verified
Comment 9 ab 2004-02-03 11:43:56 UTC
*** Issue 24753 has been marked as a duplicate of this issue. ***
Comment 10 stephan.wunderlich 2004-02-13 16:09:41 UTC
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.