Method: IsoDoc::WordFunction::Body#new_fullcolspan_row
- Defined in:
- lib/isodoc/word_function/body.rb
#new_fullcolspan_row(t, tfoot) ⇒ Object
57 58 59 60 61 62 63 64 65 66 |
# File 'lib/isodoc/word_function/body.rb', line 57 def new_fullcolspan_row(t, tfoot) # how many columns in the table? cols = 0 t.at(".//tr").xpath("./td | ./th").each do |td| cols += (td["colspan"] ? td["colspan"].to_i : 1) end style = %{border-top:0pt;mso-border-top-alt:0pt;border-bottom:#{SW1} 1.5pt;mso-border-bottom-alt:#{SW1} 1.5pt;} tfoot.add_child("<tr><td colspan='#{cols}' style='#{style}'/></tr>") tfoot.xpath(".//td").last end |