You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openoffice.apache.org by bu...@apache.org on 2012/10/10 12:20:47 UTC
[Bug 121192] New: service EnumerableMap is too restrictive on data
types
https://issues.apache.org/ooo/show_bug.cgi?id=121192
Priority: P3
Bug ID: 121192
Assignee: ooo-issues@incubator.apache.org
Summary: service EnumerableMap is too restrictive on data types
Severity: normal
Issue Type: DEFECT
Classification: Code
OS: All
Reporter: marcelly@club-internet.fr
Hardware: All
Status: CONFIRMED
Version: AOO 3.4.1
Component: code
Product: api
If an enumerable map is declared as using a value of type long, it will not
accept in Basic a value like 1234, because it is interpreted as short.
This probably happens with other language bindings.
Example:
Option Explicit
Sub Main
' Needs AOO 3.4.1 that solves Bug 116184
Dim dico As Object, enu As Object, elem As Variant, ville As String
dico = com.sun.star.container.EnumerableMap.create("string", "long")
dico.put("Angers", 49000) ' key "Angers", Item 49000
dico.put("Foix", 9000) ' throws IllegalTypeException ***
dico.put("Foix", CreateUnoValue("long", 9000)) ' works, but cumbersome
End Sub
The same problem can also happen with keys.
Keys and values handling should use the service c.s.s.script.Converter to widen
from one type to another when it is possible (e.g. short > long or long >
double).
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 121192] service EnumerableMap is too restrictive on data types
Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=121192
bmarcelly <ma...@club-internet.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|CONFIRMED |UNCONFIRMED
CC| |marcelly@club-internet.fr
Ever confirmed|1 |0
--
You are receiving this mail because:
You are the assignee for the bug.