Issue 122190

Summary: Function getCurrentController.select() not selected all occurences of collection
Product: Writer Reporter: tombil <tombil>
Component: programmingAssignee: AOO issues mailing list <issues>
Status: CONFIRMED --- QA Contact:
Severity: Normal    
Priority: P3 CC: issues, oliver.brinzing
Version: 3.4.1   
Target Milestone: ---   
Hardware: All   
OS: All   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---

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