Issue 122190 - Function getCurrentController.select() not selected all occurences of collection
Summary: Function getCurrentController.select() not selected all occurences of collection
Status: CONFIRMED
Alias: None
Product: Writer
Classification: Application
Component: programming (show other issues)
Version: 3.4.1
Hardware: All All
: P3 Normal (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-29 15:39 UTC by tombil
Modified: 2013-04-29 16:46 UTC (History)
2 users (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 tombil 2013-04-29 15:39:32 UTC
Try the following:
- create a new empty writer-document
- place a text:  text text text text 
- run the following Basic code:

oDesc = ThisComponent.createReplaceDescriptor()
oDesc.SearchString = "text"  ' find for string "text"
oFoundAll = ThisComponent.findAll(oDesc)   ' find all occurences 
msgbox oFoundAll.count   ' get 4 occurences 
ThisComponent.getCurrentController.select(oFoundAll())  ' select all occurences 
' You'll see there's only 3 occurences of collection oFoundAll is selected,
' the cursor is placed on end of first occurence of "text" string, without highlight

This behaviour has several unnatural consequenses:
1. the clipboard/transferable-content will not be the same if one tries to work
with it after performing a selection
2. more complicated and causing uncertainty in the mass processing of selected texts

This issue occurs with OOo 3.4.1., with OOo 3.2.0 works good.
Comment 1 Oliver Brinzing 2013-04-29 16:46:23 UTC
same problem in aoo4 rev. 1476029 - select(oFoundAll())  ignores oFoundAll(0) 
it's still posible to loop over the four ranges