Issue 107418

Summary: createEnumeration with array
Product: App Dev Reporter: hawe <hawe>
Component: scriptingAssignee: AOO issues mailing list <issues>
Status: RESOLVED NOT_AN_ISSUE QA Contact:
Severity: trivial    
Priority: P3 CC: hanya.runo, issues
Version: OOo 3.3 or older   
Target Milestone: ---   
Hardware: Unknown   
OS: Windows 7   
Issue Type: DEFECT Latest Confirmation on: ---
Developer Difficulty: ---

Description hawe 2009-12-03 16:45:54 UTC
I dont know it is a bug, but can you verify the code:
I get no enumeration in oListCells using the array CellList. With the line in
comment I get an enumeration... curious?
Debuging oRange, oRanges looks OK.

Sub MakeList
    CellList = Array("B5:D5","C6:H6")
    oSheet = ThisComponent.CurrentController.ActiveSheet
     
   for i = 0 to UBound(CellList)
      oRange  = oSheet.getCellRangeByName(CellList(i))
'     oRange  = oSheet.getCellRangeByName("C5:H6")
      oRanges = ThisComponent.createInstance("com.sun.star.sheet.SheetCellRanges")
      oRanges.insertByName(str(i), oRange)   
   
      oListCells = oRanges.Cells.createEnumeration
         While oListCells.hasMoreElements
            ReDim Preserve oVariables(i)
            oCell = oSearchCells.nextElement
            oVariables(i) = oCell.getCellAddress()
            i = i + 1
        Wend
     next
     
End Sub

BTW:
Can I first insert all Ranges in CellList to oRanges and then createEnumeration?

Gruß HW
Comment 1 hawe 2009-12-07 09:54:35 UTC
Solved 
"the enumeration of oRanges.Cells only retrieves cells which are[b] not empty[/b]"

Thanks to Berhard

HW
Comment 2 kay.ramme 2009-12-08 10:26:31 UTC
... so I am going to close this.
Comment 3 hanya 2013-12-08 17:41:36 UTC
As in the comment 1, closing.