Apache OpenOffice (AOO) Bugzilla – Issue 112874
Format is not compatible with CSng/Cdbl in Finnish locale/space separator
Last modified: 2017-05-20 11:29:32 UTC
I made some testing with numbers and Format function etc. Observation: Format and CSng functions are not working together in Finnish locale if number is over 1000 (with thousand separator) but result is error message when Standard format number string is the parameter of CSng function. Function Cdbl behaves quite same as CSng. Related problems: Issue 70236 Issue 78144 Issue 21413 Observed difference here is that it occur also in Windows so it may be new case or may not. A space as the separator seems to be key issue? Regards Risto PS. Here below is Basic macro testing program with results as (second) comments. Removing (first) comment you can test with other lines. I test also CLng function and it gives interesting results too. RJ. REM ***** BASIC ***** Sub Main REM testataan erottimia (ja ÀÀkkösiÀ) DIM vLuku as Variant vLuku = Format(1234.5,"Standard") REM Ubuntu 10.04 'Inputbox("Kopioi","Testi", CSng(vLuku)) 'Quite same as simple Print, but more easy to copy results 'Locale-> English - USA Finnish German (Germany) Print CSng(vLuku) '1234 ...type mismatch. 1234 'Print CSng("123.5") '123 ...type mismatch. 1235 'Print CSng("123,5") '1235 123 123 'Print CSng("123 5") '...type mismatch. ...type mismatch. ...type mismatch. 'Print CLng(vLuku) '1 1 1 'Print CLng("123 5") '123 123 123 'Print CLng("123,5") '123 123 123 'Print CLng("123.5") '123 123 123 REM Vista m82 'Inputbox("Kopioi","Testi", Csng("123 5")) 'Tästä saa kopioitua sen, mitä Print esittää näytölle 'Locale-> English - USA Finnish German (Germany) 'Print CSng(vLuku) '1234.5 ...type mismatch. 1234,5 'Print CSng("123.5") '123.5 ...type mismatch. 1235 'Print CSng("123,5") '1235 123,5 123,5 'Print CSng("123 5") '...type mismatch. ...type mismatch. ...type mismatch. End Sub
Andrease, please have a look.
STARTED
Reset assigne to the default "issues@openoffice.apache.org".