The native file format of LO files is simply a ZIP archive with various
types of files in it.
I intend to do some gymnastics with the ZIP files and the XML in them,
and I would like to know how far it can be stretched ;) In particular, I
want to explode the archive into git tree, mangle its contents in
various ways, and then generate an ODF file from the tree using git-archive.
Specifically:
1. Is the order of the files in the ZIP archive important? For example,
unzip -l lists the following:
39 02-02-2012 21:28 mimetype
...
899 02-02-2012 21:28 manifest.rdf
...
6699 02-02-2012 21:28 Object 44/settings.xml
457 02-02-2012 21:28 Object 44/content.xml
711200 02-02-2012 21:28 styles.xml
...
155 02-02-2012 21:28 Pictures/100000000000000B0000000E248D8E65.png
...
402 02-02-2012 21:28 ObjectReplacements/Object 44
...
2572 02-02-2012 21:28 Thumbnails/thumbnail.png
...
1347 02-02-2012 21:28 meta.xml
23040 02-02-2012 21:28 Object 6
3094362 02-02-2012 21:28 content.xml
10636 02-02-2012 21:28 settings.xml
...
22302 02-02-2012 21:28 META-INF/manifest.xml
When I package the resulting git tree with git-archive, it will be
sorted by ASCII codes:
META-INF/manifest.xml
Object 44/content.xml
Object 44/settings.xml
Object 6
ObjectReplacements/Object 44
Pictures/100000000000000B0000000E248D8E65.png
Thumbnails/thumbnail.png
content.xml
manifest.rdf
meta.xml
mimetype
settings.xml
styles.xml
Will this be a problem?
2) Another side effect of the detour via git will be that empty folders
will be absent in the package resulting from git-archive:
0 02-02-2012 21:28 Object 7/popupmenu/
6698 02-02-2012 21:28 Object 7/settings.xml
0 02-02-2012 21:28 Object 7/toolpanel/
365 02-02-2012 21:28 Object 7/content.xml
0 02-02-2012 21:28 Object 7/statusbar/
0 02-02-2012 21:28 Object 7/progressbar/
0 02-02-2012 21:28 Object 7/toolbar/
0 02-02-2012 21:28 Object 7/floater/
0 02-02-2012 21:28 Object 7/menubar/
will become
365 02-02-2012 21:28 Object 7/content.xml
6698 02-02-2012 21:28 Object 7/settings.xml
in the result. Again, is it a problem?
3) Can the styles listed in an <office:automatic-styles> section be
renamed? For example:
<style:style style:name="P9" style:family="paragraph"
style:parent-style-name="Standard">
would be renamed to
<style:style style:name="Standard_8cc20b56" style:family="paragraph"
style:parent-style-name="Standard">
(All references of "P4" in <office:body> and elsewhere would be renamed
accordingly, of course.)
Thanks for your response,
-- Hannes
Context
- How far can the LO file's contents be stretched? · Johannes Sixt
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.