https://bugs.documentfoundation.org/show_bug.cgi?id=144245
Bug ID: 144245
Summary: Unlike VBA, the 'Key' string parameter of the 'Add'
method of the 'Collection' object, although case
insensitive, is only for ANSII characters.
Product: LibreOffice
Version: 7.2.0.4 release
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: BASIC
Assignee: [email protected]
Reporter: [email protected]
Description:
The heading reflects the problem.
The Collection object is not documented, but works well in native mode.
Steps to Reproduce:
1. Create an instance of the 'Collection' object.
2. Add two items to the collection using the key as non-ANSII characters, such
as "Д" and "д" (Cyrillic).
3. Sample code is shown below.
Actual Results:
Both items will be added without error.
Expected Results:
Duplicate key error should occur when adding the second item.
Reproducible: Always
User Profile Reset: No
Additional Info:
A similar problem:
https://bugs.documentfoundation.org/show_bug.cgi?id=132389
VBA code. Compare:
Sub Test_Collection()
Dim c As Collection, item
On Error Resume Next
Set c = New Collection
c.Add 1, "D"
c.Add 2, "d"
c.Add 3, "Д" 'Cyrillic
c.Add 4, "д" 'Cyrillic; for LibreOffice you have to set: UCase("д")
On Error GoTo 0
Debug.Print "Count: " & c.Count
For Each item In c
Debug.Print item
Next
End Sub
OUTPUT
Count: 2
1
3
--
You are receiving this mail because:
You are the assignee for the bug.