Issue 23114

Summary: API: ScUniqueCellFormatsObj::XEnumerationAccess
Product: App Dev Reporter: stephan.wunderlich
Component: apiAssignee: stephan.wunderlich
Status: CLOSED FIXED QA Contact: issues@api <issues>
Severity: Trivial    
Priority: P3 CC: issues
Version: 3.3.0 or older (OOo)   
Target Milestone: ---   
Hardware: All   
OS: All   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---

Description stephan.wunderlich 2003-12-02 16:29:27 UTC
The resulting XEnumeration doesn't return the first of it's elements.

Additionally this component isn't yet part of the module-description for sc
Comment 1 sascha.ballach 2003-12-04 09:18:22 UTC
I take it
Comment 2 Oliver Brinzing 2003-12-16 17:10:20 UTC
Sub ContainerTest

    oDocument = StarDesktop.getCurrentComponent
    oSheet = oDocument.getCurrentController.getActiveSheet
    
    oSheet.getCellRangeByName("A1:A5").CellBackColor = RGB(0,255,0)
    oSheet.getCellRangeByName("A6:B10").CellBackColor = RGB(255,0,0)
    oSheet.getCellRangeByName("B1:B6").CellBackColor = RGB(0,0,255)
    oSheet.getCellRangeByName("B7").CellBackColor = RGB(0,255,0)
    oSheet.getCellRangeByName("B8:B10").CellBackColor = RGB(0,0,255)
    oSheet.getCellRangeByName("C1:C10").CellBackColor = RGB(0,0,255)
    oSheet.getCellRangeByName("D1:D10").CellBackColor = RGB(0,255,0)

    oContainer = oSheet.getCellRangeByName("A1:D10").CellFormatRanges

    ' index access
    For i = 0 to oContainer.Count -1
        Print i, oContainer.getByIndex(i).getRangeAddressesAsString
    Next i

    ' enumeration access
    oEnum = oContainer.createEnumeration
    
    While oEnum.hasMoreElements
        oRanges = oEnum.nextElement
        Print oRanges.getRangeAddressesAsString()
    Wend
End Sub


I am missing the first container with the enumeration access ...
What I am doing wrong ?
Comment 3 sascha.ballach 2004-01-14 17:21:58 UTC
A macro to reproduce this is:

Sub Main
	oDoc = ThisComponent
	oSheet = oDoc.Sheets(0)    
	
    oSheet.getCellRangeByName("A1:A5").CellBackColor = RGB(0,255,0)
    oSheet.getCellRangeByName("A6:B10").CellBackColor = RGB(255,0,0)
    oSheet.getCellRangeByName("B1:B6").CellBackColor = RGB(0,0,255)
    oSheet.getCellRangeByName("B7").CellBackColor = RGB(0,255,0)
    oSheet.getCellRangeByName("B8:B10").CellBackColor = RGB(0,0,255)
    oSheet.getCellRangeByName("C1:C10").CellBackColor = RGB(0,0,255)
    oSheet.getCellRangeByName("D1:D10").CellBackColor = RGB(0,255,0)

'	msgbox oSheet.getCellRangeByName("A1:D10").dbg_methods
    oContainer = oSheet.getCellRangeByName("A1:D10").getUniqueCellFormatRanges
    ' index access
    For i = 0 to oContainer.Count -1
        Print i, oContainer(i).getRangeAddressesAsString
    Next i

    ' enumeration access
    oEnum = oContainer.createEnumeration
    
    While oEnum.hasMoreElements
        oRanges = oEnum.nextElement
        Print oRanges.getRangeAddressesAsString
    Wend
End Sub

fixed in calcuno01
Comment 4 stephan.wunderlich 2004-02-02 15:02:07 UTC
SW: added java-testcases and corresponding objdsc to the cws
Comment 5 sascha.ballach 2004-03-01 12:14:22 UTC
please verify the complete API of Calc and Draw (I changed some things in the
XShape implementation and added XTollerantMultiPropertySet) I also added
XTollerantMultiPropertySet on some calc services.
Comment 6 stephan.wunderlich 2005-02-22 12:34:38 UTC
resetting the fixed state
Comment 7 stephan.wunderlich 2005-03-16 14:50:20 UTC
works fine in cws_calcuno01 => verified
Comment 8 stephan.wunderlich 2005-03-30 10:22:02 UTC
part of src680_m89 => closed