To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=89872
User aw changed the following:
What |Old value |New value
================================================================================
Status|NEW |STARTED
--------------------------------------------------------------------------------
------- Additional comments from [email protected] Thu Jan 15 12:42:44 +0000
2009 -------
AW: Checked again and digged deeper. Problem is SdrModel::ImpSetUIUnit() where
the ancient ones prepare a aUIUnitFact fraction, bUIOnlyKomma and nUIUnitKomma
values at the SdrModel to have all data for quick string conversion of numbers
for UI presentation. For that, SdrModel::TakeMetricStr() uses those prepared
values (this also means all other users of TakeMetricStr() show the same error).
As You may see when looking at SdrModel::ImpSetUIUnit(), it's not well
documented and i will have to guess what is done why (short: it's a mess).
The error happens where the dividend and divisor are forced to be less than 1000
by looping, dividing them by 10 and correcting the comma value. With the values
from the given task, this reduces the divisor (in nBigDiv) from 3048 by division
by 10 to 304 which loses the trailing '8'.
My guess is that this 'shortening' is done because below a switch..case is used
which tests the dividend and divisor being one of three cases, 10, 100, or 1000
(as You may have noticed, 1000 cannot even happen diue to the reduction loop
before forcing the values to be smaller than 1000).
I will try to replace this stuff using sal_Int64 to get rid of BigInt and to
reduce only when %10 == 0, so that no info is lost. This will also lead to the
switch..case to have to be done in a loop, too. I do not want to change too much
(e.g. completely rewrite using doubles) since i am currently not too sure what
that comma value exactly does...
---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]