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


I think it is necessary to look at round-trip out-in conversion preservation.

For out-in (which this is, presumably), you want to record a decimal expression of the internal 
value that will convert back to the exact internal value on re-input.  (The in-out case is that the 
input conversion provide whatever internal representation that will convert to the read value on 
re-output.  Without additional information, it is generally very difficult to have these be the 
same.)

It is also desirable, of course, that any other ODF consumer use the same technique so that its 
in-out conversion satisfies the out-in condition of the original source of the decimal expression 
of the value.  

There are old technical papers on how to have this work.  The name David Matula comes to mind.

There might be solutions in the conversions that exist in the basic Java classes for float data 
types.  I think this was addressed in Common Lisp also.  

-----Original Message-----
From: libreoffice-bounces+dennis.hamilton=acm.org@lists.freedesktop.org 
[mailto:libreoffice-bounces+dennis.hamilton=acm.org@lists.freedesktop.org] On Behalf Of Thorsten 
Behrens
Sent: Wednesday, June 20, 2012 05:49
To: Johannes Sixt
Cc: libreoffice-dev
Subject: Re: Difficulties with Flat XML under source control

Johannes Sixt wrote:
- Measurements change. E.g. (just to pick one case), in
<style:graphic-properties> the draw:visible-area-width changes from
6.088cm to 6.089cm. Is there a remedy to avoid changes of this kind?

    Ah; nasty, some rounding problem / internal representation issue -
possibly again looking at the code we could do better here to make it
more predictable; possibly using more precision we could do better
(doubles instead of floats) ?

Probably. Looking at this again, these changes seem to happen only for
draw:visible-area-*. Hence, it may also be a matter of conversion
between screen dimensions (pixels?) and cm/mm/in/etc.

Hrm, yeah - and we *really* don't want this slow drift - any chance
you can file a bug with a preferrably small sample doc?

Thanks,

-- Thorsten


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.