To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=70087
Issue #|70087
Summary|The empty string is an (undocumented) invalid item for
| a com.sun.star.TextField.DropDown
Component|Word processor
Version|OOo 2.0.3
Platform|All
URL|
OS/Version|All
Status|UNCONFIRMED
Status whiteboard|
Keywords|
Resolution|
Issue type|DEFECT
Priority|P3
Subcomponent|code
Assigned to|mru
Reported by|clutz
------- Additional comments from [EMAIL PROTECTED] Wed Oct 4 02:13:40 -0700
2006 -------
The following macro creates a new DropDown-Field in a textdocument and sets its
itemlist to the elements ["foo", ""]. After setting the SelectedItem property to
"", the DropDown displayes "foo" which is not the whished element.
So it seems to me that an emty string is treated like a invalid element, but I
can't see why empty string should not be allowed within dropdown fields. Also
this behaviour is even not documented in the idl and it is inconsistent with the
behaviour of other TextFields (e.g. InputField) which allow empty string. I
think one of the following two things should be done:
1) document the behaviour that an empty string is invalid in the idl-docu that
describes the properties "Items" and "SelectedItem"
OR
2) change the code in a form that an empty string is not longer a invalid item
and is accepted and displayed correct.
here the code:
Sub dropDownBoxMissbehaviour
dim items(2) as String
items(0) = "foo"
items(2) = ""
doc = ThisComponent
dd = doc.createInstance("com.sun.star.text.TextField.DropDown")
dd.Items = items()
dd.SelectedItem = ""
doc.Text.insertTextContent(doc.Text.Start, dd, true)
End Sub
---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]