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/v3/odf_format.rb | 250 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 250 insertions(+) (limited to 'lib/sisu/v3/odf_format.rb') diff --git a/lib/sisu/v3/odf_format.rb b/lib/sisu/v3/odf_format.rb index 8736d7d1..7a9b267d 100644 --- a/lib/sisu/v3/odf_format.rb +++ b/lib/sisu/v3/odf_format.rb @@ -200,6 +200,256 @@ module SiSU_ODF_format @dob end end + class ODT_head_1_0 + 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 + + +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=< Date: Sat, 15 Oct 2011 13:59:07 -0400 Subject: v3: odf:odt, make odt style names more easily recognizable --- lib/sisu/v3/odf_format.rb | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'lib/sisu/v3/odf_format.rb') diff --git a/lib/sisu/v3/odf_format.rb b/lib/sisu/v3/odf_format.rb index 7a9b267d..5abf5090 100644 --- a/lib/sisu/v3/odf_format.rb +++ b/lib/sisu/v3/odf_format.rb @@ -65,7 +65,7 @@ module SiSU_ODF_format @paranum=/(\d+)/m.match(paranum.to_s)[1] end def display - @paranum.gsub(/(\d+)/,' [\1]') + @paranum.gsub(/(\d+)/,' [\1]') end def name @paranum.gsub(/(\d+)/,'') @@ -142,13 +142,13 @@ module SiSU_ODF_format end def table_close(tablefoot='') '' \ - + %{#{@p_num}} + + %{#{@p_num}} end def table_tag_cell(str,i) txt_name_cell=if i==0 \ and @dob.head_ - 'Table_20_Heading' - else 'P7' + 'Table_Heading' + else 'P_table_cell' end str.gsub!(/^~$/,'') # tilde / empty cell %{#{@br}} + @@ -165,8 +165,8 @@ module SiSU_ODF_format def table_tag_row_dump(str,i) txt_name_row=if i==0 \ and @dob.head_ - 'Table_20_Heading' - else 'P7' + 'Table_Heading' + else 'P_table_cell' end %{#{@br}} + %{#{@br}} + @@ -353,29 +353,29 @@ WOK - + - + - + - + - + - + - + - + @@ -455,12 +455,12 @@ WOK @md,@t_o=md,t_o end def br_page - @t_o.obj=' ' + @t_o.obj=' ' @t_o end def obj_sep #center later sep='--- ' - @t_o.obj=%{#{sep*20}} + @t_o.obj=%{#{sep*20}} @t_o end end -- cgit v1.2.3