Bug 144152 - XEnumerationAccess>XElementAccess doesn't have getCount
Summary: XEnumerationAccess>XElementAccess doesn't have getCount
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-08-29 09:14 UTC by edil
Modified: 2022-08-10 12:54 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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