<div>Hi Kendy,</div><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Can you please point exactly to the code in question, like<br>
filename:line_number, or ClassName::MethodName, or something similar?<br>
It helps a lot to understand what you have in mind, and saves the<br>
guessing if it was (in this case) MetricField::ConvertValue() from<br>
vcl/source/control/field.cxx, or something different :-)</blockquote><div><br></div><div>Well, I was indeed not too concrete. Sorry. I was debugging a bit and found this.</div><div><br></div><div>The sourcefile was found yet: <span style="font-size:medium;font-family:monospace;background-color:rgb(255,255,255)">/</span><a href="http://opengrok.libreoffice.org/xref/core" style="font-size:medium;color:rgb(16,88,2);text-decoration:none;font-family:monospace;background-color:rgb(255,255,255)">core</a><span style="font-size:medium;font-family:monospace;background-color:rgb(255,255,255)">/</span><a href="http://opengrok.libreoffice.org/xref/core/vcl" style="font-size:medium;color:rgb(16,88,2);text-decoration:none;font-family:monospace;background-color:rgb(255,255,255)">vcl</a><span style="font-size:medium;font-family:monospace;background-color:rgb(255,255,255)">/</span><a href="http://opengrok.libreoffice.org/xref/core/vcl/source" style="font-size:medium;color:rgb(16,88,2);text-decoration:none;font-family:monospace;background-color:rgb(255,255,255)">source</a><span style="font-size:medium;font-family:monospace;background-color:rgb(255,255,255)">/</span><a href="http://opengrok.libreoffice.org/xref/core/vcl/source/control" style="font-size:medium;color:rgb(16,88,2);text-decoration:none;font-family:monospace;background-color:rgb(255,255,255)">control</a><span style="font-size:medium;font-family:monospace;background-color:rgb(255,255,255)">/</span><a href="http://opengrok.libreoffice.org/xref/core/vcl/source/control/field.cxx" style="font-size:medium;color:rgb(16,88,2);text-decoration:none;font-family:monospace;background-color:rgb(255,255,255)">field.cxx</a></div>
<div><br></div><div>First point is: void NumericFormatter::Reformat():</div><div>This function run, when the NumericBox loose focus.</div><div><br></div><div>It calls NumericFormatter::ImplNumericReformat(), which calls ImplNumericGetValue().</div>
<div><br></div><div>And the problem was found in this function, in line 199:</div><div>double nValue = rtl::OUString(aStr).toDouble();</div><div><br></div><div>In general the NumericBox store its data in an sal_Int64 variable, but here this OUString->double conversion cause changes in big numbers. The "aStr" variable comes from GetText() function, which gives the NumericBox's content, so it is a string representation of an sal_Int64 value. I don't know this behaviour is the expected from the OUString::toDouble() function, or it is a bug. </div>
<div><br></div><div>Regards,</div><div>Tamás</div><div><br></div></div>