diff options
Diffstat (limited to 'lib/sisu/v3/odf_format.rb')
-rw-r--r-- | lib/sisu/v3/odf_format.rb | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/lib/sisu/v3/odf_format.rb b/lib/sisu/v3/odf_format.rb index bf44613b..c6d4b504 100644 --- a/lib/sisu/v3/odf_format.rb +++ b/lib/sisu/v3/odf_format.rb @@ -56,11 +56,11 @@ ** Description: opendocument formatting, default opendocument template =end -module SiSU_ODF_format +module SiSU_ODF_Format require_relative 'param' # param.rb include SiSU_Param include SiSU_Viz - class Paragraph_number + class ParagraphNumber def initialize(paranum) @paranum=/(\d+)/m.match(paranum.to_s)[1] end @@ -74,7 +74,7 @@ module SiSU_ODF_format @paranum.gsub(/(\d+)/,'<a href="#\1">') end end - class Format_text_object + class FormatTextObject def initialize(md,t_o) @md,@t_o=md,t_o if t_o.class==Hash @@ -84,8 +84,8 @@ module SiSU_ODF_format p caller end rgx=/#{Mx[:en_a_o]}\d+\s+(.+?)#{Mx[:en_a_c]}/ - @txt.gsub!(rgx,'\1') if @txt =~rgx - @vz=SiSU_Env::Get_init.instance.skin + @txt=@txt.gsub(rgx,'\1') if @txt =~rgx + @vz=SiSU_Env::GetInit.instance.skin end def scr_endnote_body "<endnote>#{@txt}</endnote> " @@ -110,7 +110,7 @@ module SiSU_ODF_format def initialize(md,dob,p_num) @md,@dob,@p_num=md,dob,p_num @txt=dob.obj - @vz=SiSU_Env::Get_init.instance.skin + @vz=SiSU_Env::GetInit.instance.skin if @md.fns != @@fns @@table_counter=0 @@fns=@md.fns @@ -150,7 +150,7 @@ module SiSU_ODF_format 'Table_Heading' else 'P_table_cell' end - str.gsub!(/^~$/,'') # tilde / empty cell + str=str.gsub(/^~$/,'') # tilde / empty cell %{<table:table-cell office:value-type="string">#{@br}} + %{<text:p text:style-name="#{txt_name_cell}">#{@br}} + %{#{str}} + @@ -180,7 +180,7 @@ module SiSU_ODF_format row='' if row =~/^<!$/ m=row[/<!f(.+?)!>/,1] @@tablefoot << m if m - row.gsub!(/<!f.+?!>/,'') + row=row.gsub(/<!f.+?!>/,'') @cells=[] row.split(/\s*#{Mx[:tc_p]}/).each do |cell| @cells << table_tag_cell(cell,i) @@ -200,7 +200,7 @@ module SiSU_ODF_format @dob end end - class ODT_head_1_2 + class ODT_Head_1_2 def initialize(md) @md=md @generator="#{@md.sisu_version[:project]} #{@md.sisu_version[:version]} #{@md.sisu_version[:date_stamp]} (#{@md.sisu_version[:date]})" @@ -226,8 +226,8 @@ module SiSU_ODF_format </rdf:Description> </rdf:RDF> WOK - x.strip! - x.gsub!(/\n+/m,'') unless @md.opt.cmd=~/M/ + x=x.strip + x=x.gsub(/\n+/m,'') unless @md.opt.cmd=~/M/ x end def meta_inf_manifest_xml(md) @@ -256,8 +256,8 @@ WOK <manifest:file-entry manifest:media-type="application/vnd.sun.xml.ui.configuration" manifest:full-path="Configurations2/"/> </manifest:manifest> WOK - x.strip! - x.gsub!(/\n+/m,'') unless @md.opt.cmd=~/M/ + x=x.strip + x=x.gsub(/\n+/m,'') unless @md.opt.cmd=~/M/ x end def meta_xml @@ -272,8 +272,8 @@ WOK </office:meta> </office:document-meta> WOK - x.strip! - x.gsub!(/\n+/m,'') unless @md.opt.cmd=~/M/ + x=x.strip + x=x.gsub(/\n+/m,'') unless @md.opt.cmd=~/M/ x end def settings_xml @@ -375,8 +375,8 @@ WOK </office:settings> </office:document-settings> WOK - x.strip! - x.gsub!(/\n+/m,'') unless @md.opt.cmd=~/M/ + x=x.strip + x=x.gsub(/\n+/m,'') unless @md.opt.cmd=~/M/ x end def styles_xml @@ -576,18 +576,18 @@ WOK </office:master-styles> </office:document-styles> WOK - x.strip! - x.gsub!(/\n+/m,'') unless @md.opt.cmd=~/M/ + x=x.strip + x=x.gsub(/\n+/m,'') unless @md.opt.cmd=~/M/ x end def mimetype x=<<WOK application/vnd.oasis.opendocument.text WOK - x.strip! + x=x.strip end end - class Format_obj_break + class FormatObjBreak def initialize(md,t_o) @md,@t_o=md,t_o end |