Apache OpenOffice (AOO) Bugzilla – Issue 4929
sal/rtl/strtmpl.c uses imprecise code for str to double calc.
Last modified: 2003-03-13 11:13:15 UTC
The existing code introduces some rounding errors on IRIX. Switching to use libc functions avoids this, and uses common code... which is only a good thing!
Created attachment 1669 [details] sal/rtl/source/strtmpl.c - if IRIX use libc functions
commited in rev 1.10.10.1 (OOO_STABLE_1)
er->nick: Are you sure this was a good idea? On most Unix systems the printf(), scanf(), atof() functions and similar are known to be localized (for example, different decimal separators under different locales). If this is the case with IRIX then the patch will break functionality since the methods were designed to always use a '.' point as decimal separator. For the rounding errors issue a code similar to the one used in SolarMath::StringToDouble() and SolarMath::DoubleToString() of tools/source/generic/solmath.cxx could be used. In fact it should be considered to move that functionality down to the rtl strings some day.
Since I don't think the solution is correct and there is no further comment on my remarks, I have to reopen this issue.
Ack, sorry, been a bit swamped lately. Yes, you are correct the libc localisation will cause problems. I will attach a new patch soon, either forcing the locale to C for the call to atold(), or using some code from tools/source/generic. Thanks for pointing out the problem.
reassigning to Eike, as he seems interested in the issue
Nice try ;-) ok, I'll take it as a "move SolarMath to rtl" issue
Target to OOo 1.1 Beta iBIS back-reference: #103888#
fixed on branch cws_srx644_rtlmath
reopen to reassign
reassign to QA. Note that the change affects the entire Office on all platforms.
restore status
Verified
As mentioned on the qa dev list on March 5th I will close all resolved <wontfix/duplicate/worksforme/invalid> issues. Please see this posting for details.