From 6d46257531b1384a3bff974e039b70f7a45c3ecc Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sat, 15 Oct 2011 13:57:29 -0400 Subject: v2 v3: odf:odt v1.0: make odt header easier to track; remove binary blob * make odt header changes easier to track (this commit maintains rough equivalence to sisu-3.1.0 headers) * sysenv, builds odf:odt directory structure instead of binary blob * get rid of odf:odt (binary changeset) blob zipfile (containing odf:odt directory structure) --- lib/sisu/v2/odf_format.rb | 251 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 251 insertions(+) (limited to 'lib/sisu/v2/odf_format.rb') diff --git a/lib/sisu/v2/odf_format.rb b/lib/sisu/v2/odf_format.rb index 77b5bbbc..1b5f2e9b 100644 --- a/lib/sisu/v2/odf_format.rb +++ b/lib/sisu/v2/odf_format.rb @@ -197,6 +197,257 @@ module SiSU_ODF_format @dob end end + class ODT_head + def initialize(md) + @md=md + @generator="#{@md.sisu_version[:project]} #{@md.sisu_version[:version]} #{@md.sisu_version[:date_stamp]} (#{@md.sisu_version[:date]})" + end + def meta_inf_manifest_xml + x=< + + + + + + + + + + + + +WOK + x.strip! + x.gsub!(/\n+/m,'') unless @md.opt.cmd=~/M/ + x + end + def meta_xml + x=< + + + #{@generator} + #{@md.generated} + #{@md.generated} + en-US + 4 + + +WOK + x.strip! + x.gsub!(/\n+/m,'') unless @md.opt.cmd=~/M/ + x + end + def settings_xml + x=< + + + + 0 + 0 + 21459 + 22068 + true + false + + + view2 + 3002 + 11008 + 0 + 0 + 21458 + 22066 + 0 + 100 + false + + + + + true + false + 1 + false + 0 + false + false + false + false + true + + true + true + true + + 0 + false + true + true + true + true + false + false + false + true + + + + false + true + false + false + true + false + false + true + true + 0 + false + false + high-resolution + false + true + + true + false + + + +WOK + x.strip! + x.gsub!(/\n+/m,'') unless @md.opt.cmd=~/M/ + x + end + def styles_xml + x=< + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +WOK + x.strip! + x.gsub!(/\n+/m,'') unless @md.opt.cmd=~/M/ + x + end + def mimetype + x=<