Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Hi Kendy,

Can you please point exactly to the code in question, like
filename:line_number, or ClassName::MethodName, or something similar?
It helps a lot to understand what you have in mind, and saves the
guessing if it was (in this case) MetricField::ConvertValue() from
vcl/source/control/field.cxx, or something different :-)


Well, I was indeed not too concrete. Sorry. I was debugging a bit and found
this.

The sourcefile was found yet: /core<http://opengrok.libreoffice.org/xref/core>
/vcl 
<http://opengrok.libreoffice.org/xref/core/vcl>/source<http://opengrok.libreoffice.org/xref/core/vcl/source>
/control <http://opengrok.libreoffice.org/xref/core/vcl/source/control>/
field.cxx<http://opengrok.libreoffice.org/xref/core/vcl/source/control/field.cxx>

First point is: void NumericFormatter::Reformat():
This function run, when the NumericBox loose focus.

It calls NumericFormatter::ImplNumericReformat(), which calls
ImplNumericGetValue().

And the problem was found in this function, in line 199:
double nValue = rtl::OUString(aStr).toDouble();

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.

Regards,
Tamás

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.