Hi Tamás,
Zolnai Tamás píše v St 20. 03. 2013 v 22:33 +0100:
Yes, I give it a try.
Great, thanks a lot! :-)
I think the mentioned multiplication is in
MetricField::ConvertDoubleValue(), which not need to change, as I see.
So whenever we are converting to and from double, there is the risk of
losing precision. I guess the best would be to change
ConvertDoubleValue() to sal_Int64 too [and change the name
accordingly ;-)], and use BigInt (see tools/inc/tools/bigint.hxx) for
the computations not to overflow.
Though - looking at BigInt - I am afraid you will have to add
BigInt( long long nVal ) constructor in order to make 32bit
architectures happy when you provide them with sal_Int64.
Similarly, you will have to create an operator long long() const; that
would return the long long - and would do that even in the bIsBig case
when the value is larger than long, but still fits sal_Int64.
I am sorry this is getting complicated - but I believe this is a cleanup
that is still worth doing :-)
All the best,
Kendy
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.