[upstream] flat xml format inaccuracy
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
LibreOffice |
Invalid
|
Medium
|
|||
libreoffice (Ubuntu) |
Won't Fix
|
Medium
|
Unassigned |
Bug Description
Binary package hint: libreoffice
The flat XML formats of LibreOffice are very practical when working with version control systems like svn, mercurial, bazaar or cvs.
In lodraw saving files in the .fodt format seems currently to loose information, though:
After saving the file attached to this bug as flat xml and re-opening it
- the drawing is no longer aligned to the grid
- and some texts have whitespace attached that being of a much higher vertical size than the rest of the text (I think it was 12pt versus 6pt) ruin the layout.
If the file is saved in the .odt format in the ordinary .odt format instead on opening it will just look as it did before saving the file instead.
ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: libreoffice-draw 1:3.3.2-1ubuntu5
ProcVersionSign
Uname: Linux 3.0-1-generic i686
NonfreeKernelMo
Architecture: i386
Date: Mon Jun 20 06:23:46 2011
EcryptfsInUse: Yes
SourcePackage: libreoffice
UpgradeStatus: No upgrade log present (probably fresh install)
Changed in df-libreoffice: | |
importance: | Undecided → Unknown |
status: | Incomplete → Unknown |
Changed in df-libreoffice: | |
importance: | Unknown → Medium |
status: | Unknown → Confirmed |
Changed in df-libreoffice: | |
status: | Confirmed → Fix Released |
Changed in df-libreoffice: | |
status: | Fix Released → Invalid |
Extra spaces (not typed by the user) are inserted by between `<text:span>` elements.
The following testcase illustrates the problem (`*` for bold, '/' for italic):
----
A*B/C/D*E
----
When saved in the ODT format, 'contents.xml' contains
---- name="Standard" >A<text: span text:style- name="T1" >B</text: span><text: span text:style- name="T2" >C</text: span><text: span text:style- name="T1" >D</text: span>E< /text:p>
<text:p text:style-
----
The same document saved in FODT (flat ODT) format end up containing
---- name="Standard" >A<text: span text:style- name="T1" >B</text: span> name="T2" >C</text: span> name="T1" >D</text: span>E< /text:p>
<text:p text:style-
<text:span text:style-
<text:span text:style-
----
That is, spaces are added around the second `<text:span>` element, the one containing the text 'C' with an italic style. When this file is read back, the content of the document is changed to
----
A*B /C/ D*E
----
Probably some XML processors used in the save path are indenting those elements because they think that text between `<text:span>` elements is ignored and, thus, these elements can be indented on a new line. If that is the case, adding `xml:space` declarations should avoid such issues.