https://bugs.documentfoundation.org/show_bug.cgi?id=145702
Bug ID: 145702
Summary: Bad cint() behaviour for languages using comma as
separator before the decimal point
Product: LibreOffice
Version: 7.2.2.2 release
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: BASIC
Assignee: [email protected]
Reporter: [email protected]
Description:
The problem occurs when the cint (string to integer) function is used in a
macro on strings in which the system language (e.g. German) expects the decimal
place after a comma, but in the cell we have an (English) number with a point.
A system-compatible number (e.g. 530,3) is interpreted correctly (cint then
returns 530), while a point (like a thousand point inserted for readability) is
simply ignored. But the result for 530.3 is 5303! There can be an ambiguity in
cases with three digits after the point. But in the example above, I would
expect to either accept the point like a comma, or at least just ignore the
point and the digit after it.
Steps to Reproduce:
1. In a system, where the comma is used in front of the decimal place, write an
English number with a single decimal digit behind the point into a cell.
2. Call a macro on this cell, reading its string and calling the cint function
to get the corresponding integer for this string.
3.Check the result
Actual Results:
The result using 530.3 is 5303.
Expected Results:
The expected result would be 530
Reproducible: Always
User Profile Reset: No
Additional Info:
None
--
You are receiving this mail because:
You are the assignee for the bug.