Bug 144152

Summary: XEnumerationAccess>XElementAccess doesn't have getCount
Product: LibreOffice Reporter: edil
Component: BASICAssignee: Not Assigned <libreoffice-bugs>
Status: RESOLVED NOTABUG    
Severity: enhancement    
Priority: medium    
Version: Inherited From OOo   
Hardware: All   
OS: All   
Whiteboard:
Crash report or crash signature: Regression By:

Description edil 2021-08-29 09:14:47 UTC
Description:
XElementAccess has hasElements() but no getCount().
For containers that have only XEnumerationAccess I know if hasElements but no how many elements has. If I want transform enumeration in array() more easy to handle with createEnumeration(), I don't know in advance the UBound of the array for Dim Array(UBound).
Why not add getCount() to XElementAccess ?


Actual Results:
XElementAccess has hasElements() but no getCount()

Expected Results:
XElementAccess has hasElements() also has getCount()


Reproducible: Always


User Profile Reset: No



Additional Info:
XElementAccess has hasElements() also has getCount()
Comment 1 himajin100000 2021-08-29 13:08:45 UTC
I don't believe this is a bug. getCount() should be provided by XIndexAccess, not XEnumerationAccess

https://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1container_1_1XIndexAccess.html
Comment 2 Andreas Heinisch 2022-08-10 09:00:29 UTC
Closing due to comment 1
Comment 3 edil 2022-08-10 12:54:42 UTC
It isn't a bug , but was better if getCount() would present in XEnumerationAccess.
Thank you