Type: info
Title: NumericFormatter changes interface from long to sal_Int64
Posted by: [EMAIL PROTECTED]
Affected: all
Effective from: CWS mfdouble
*Summary*
--------
NumericFormatter, NumericField, MetricField change interface from long to
sal_In64
*Description*
-------------
NumericFormatter and its derived classes currently have a long based
interface. On 32bit platforms this can lead easily to overflows since
NumericFormatter uses a precision that simply multiplies
10**(precision) to its value. With the current long based interface
this means that you cannot enter LONG_MAX while precision is greater
than 0. This is not normally a problem, but can lead to overflow
issues in the derived classes MetricFormatter and MetricField since
here a conversion to different units takes place which ahs to take
this precision factor into account. Changing the interface from long
to sal_Int64 will ease the pain of overflow issues a bit.
All occurences where this change led to a warning were changed to use
the old behaviour (that is usually a static_cast<long> was used)
unless there were obvious improvements possible, e.g. in cases where
GetValue, change value, SetValue took place.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]