Description of problem:
Version-Release number of selected component (if applicable):3.2.0 and 3.4.0
How reproducible:Converting String to fx. Double, Single etc not functioning
Dim A As String
Dim B As Double
A = "222.22"
B = Cdbl(A)
Steps to Reproduce:
1.Open openoffice Calc
choose admin. macro
2.Enter macro as example
3.Save and run
Actual results: 222
Additional info:The function Val is also not functioning.
When installing openoffice 3.4.0 under windows the convertion functions are working perfectly.
So it is in the linux as the same result is performing in libreoffice on an Ubuntu 12.04 system.
System Fedora 13
System Fedora 16
In what locale are you running the application? I can't exactly reproduce this, but having tried with libreoffice-220.127.116.11-9.fc17 I experienced similar weird behavior in other locales with different separators. It works fine in an en-US locale. It may be that the underlying BASIC function uses a localized system library function to parse the string, which could also explain that it doesn't occur on Windows as there these functions are not localized.
Note however that F16 is EOL, I changed the Version field to F17.
The system works under DA-dk (Danish)
I have tried to change locale to us-en and now the functions are working.
In the description of Openoffice and Libreoffice is stated that the programs are using underlying system locale settings, which apparently is incorrect.
It is rather inconvienient to have to change locale when running written macros.
PROBLEM PARTLY SOLVED
CDbl() and CSng() are mainly used to scan user input so it makes sense to have them localized, but the current implementation is wrong.
Btw, if you want non-localized number scanning, use Val() instead that uses '.' as decimal separator and ',' as group separator.
Pending review for 4-0 as https://gerrit.libreoffice.org/2859
The case with converting failure is also a problem when using us-en locale in an localized system ex. da-dk.
Then you cannot use the spreadsheet where the result from converting are going as the decimal and group separator is wrong.
should be in 4.0.2
are we backporting this back to 3.5.X F-17, or punting it until F-18 ?
It should be possible to backport it.
Upstream 3-6 http://cgit.freedesktop.org/libreoffice/core/commit/?h=libreoffice-3-6&id=565c2dd3039a7c9aa1d82eadc4d5e54ea87cda9c
Modified for libreoffice-18.104.22.168-12.fc17 for f17-candidate.
libreoffice-22.214.171.124-12.fc17 has been submitted as an update for Fedora 17.
libreoffice-126.96.36.199-5.fc18 has been submitted as an update for Fedora 18.
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing libreoffice-188.8.131.52-5.fc18'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
libreoffice-184.108.40.206-12.fc17 has been pushed to the Fedora 17 stable repository. If problems still persist, please make note of it in this bug report.
libreoffice-220.127.116.11-5.fc18 has been pushed to the Fedora 18 stable repository. If problems still persist, please make note of it in this bug report.