Difficulties with Flat XML under source control

Dennis E. Hamilton dennis.hamilton at acm.org
Wed Jun 20 06:07:33 PDT 2012


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 at lists.freedesktop.org [mailto:libreoffice-bounces+dennis.hamilton=acm.org at 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



More information about the LibreOffice mailing list