To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=106172


User fs changed the following:

                What    |Old value                 |New value
================================================================================
                  Status|NEW                       |RESOLVED
--------------------------------------------------------------------------------
              Resolution|                          |INVALID
--------------------------------------------------------------------------------




------- Additional comments from [email protected] Fri Oct 23 08:47:24 +0000 
2009 -------
sorry, invalid:
Your varSelectedItems array *always* has a length of 4. For instance, in the
"pbLastOnly" case, you set "varSelectedItems(3) = 3", which means that the item
number 3 (i.e. the third item) should be selected. Still, varSelectedItems(0),
varSelectedItems(1), varSelectedItems(2) exist, are default-initialized with 0,
and passed to the SelectedItems property.
So, what your code effectively requests in the "pbLastOnly" case is:
- select item at position 0 (because varSelectedItems(0) equals 0)
- select item at position 0 (because varSelectedItems(1) equals 0)
- select item at position 0 (because varSelectedItems(2) equals 0)
- select item at position 3 (because varSelectedItems(3) equals 3)
So, everything works fine, it's just you're using the SelectedItems property
improperly.

To select the, say, item number 3 *only*, your code would need to look like 
this:
  ReDim varSelectedItems(0)
  varSelectedItems(0) = 3
  <...>.SelectedItems = varSelectedItems()

---------------------------------------------------------------------
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]

Reply via email to