diff options
Diffstat (limited to 'lib/sisu/v5/odf_format.rb')
-rw-r--r-- | lib/sisu/v5/odf_format.rb | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/lib/sisu/v5/odf_format.rb b/lib/sisu/v5/odf_format.rb index 28c69c44..3d40f943 100644 --- a/lib/sisu/v5/odf_format.rb +++ b/lib/sisu/v5/odf_format.rb @@ -170,6 +170,10 @@ module SiSU_ODF_Format @@fns=@md.fns end end + def break_line + (@md.opt.act[:maintenance][:set]==:on) \ + ? "\n" : '' + end def table_head_open(count) type=(@dob.head_) \ ? 1 @@ -192,8 +196,8 @@ module SiSU_ODF_Format else 'D' end tag=SiSU_ODF_Format::Tags.new.set_bookmark_tag(@dob) - %{<table:table table:name="Table#{count}" table:style-name="Table#{type}">#{@p_num[:set_ref]}#{tag}#{@br}} + - %{<table:table-column table:style-name="Table#{type}.#{alpha}" table:number-columns-repeated="#{@dob.cols}"/>#{@br}} + %{<table:table table:name="Table#{count}" table:style-name="Table#{type}">#{@p_num[:set_ref]}#{tag}#{break_line}} + + %{<table:table-column table:style-name="Table#{type}.#{alpha}" table:number-columns-repeated="#{@dob.cols}"/>#{break_line}} end def table_close(tablefoot='') '</table:table>' \ @@ -206,16 +210,16 @@ module SiSU_ODF_Format else 'P_table_cell' end str=str.gsub(/^~$/,'') # tilde / empty cell - %{<table:table-cell office:value-type="string">#{@br}} + - %{<text:p text:style-name="#{txt_name_cell}">#{@br}} + + %{<table:table-cell office:value-type="string">#{break_line}} + + %{<text:p text:style-name="#{txt_name_cell}">#{break_line}} + %{#{str}} + - %{</text:p>#{@br}} + - %{</table:table-cell>#{@br}} + %{</text:p>#{break_line}} + + %{</table:table-cell>#{break_line}} end def table_tag_row(str,i) - %{<table:table-row>#{@br}} + + %{<table:table-row>#{break_line}} + %{#{str}} + - %{</table:table-row>#{@br}} + %{</table:table-row>#{break_line}} end def table_tag_row_dump(str,i) txt_name_row=if i==0 \ @@ -223,13 +227,13 @@ module SiSU_ODF_Format 'Table_Heading' else 'P_table_cell' end - %{<table:table-row>#{@br}} + - %{<table:table-cell office:value-type="string">#{@br}} + - %{<text:p text:style-name="#{txt_name_row}">#{@br}} + + %{<table:table-row>#{break_line}} + + %{<table:table-cell office:value-type="string">#{break_line}} + + %{<text:p text:style-name="#{txt_name_row}">#{break_line}} + %{#{str}} + - %{</text:p>#{@br}} + - %{</table:table-cell>#{@br}} + - %{</table:table-row>#{@br}} + %{</text:p>#{break_line}} + + %{</table:table-cell>#{break_line}} + + %{</table:table-row>#{break_line}} end def table_row(row,i) row='' if row =~/^<!$/ |