info/CWS mfdouble : NumericFormatter changes interface from long to sal_Int64
[email protected] Thu, 21 Dec 2006 15:17:10 +0100 (MET)
| Newsgroups | gmane.comp.openoffice.announce.interface |
|---|---|
| Message-ID | <5022763.1166710630821.JavaMail.root@so-web4> |
------=_Part_66_19815572.1166710630758
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
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.
------=_Part_66_19815572.1166710630758
Content-Type: text/plain; charset=us-ascii
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
------=_Part_66_19815572.1166710630758--