lib/documenter/ooo/odt.rb in documenter-0.0.3 vs lib/documenter/ooo/odt.rb in documenter-0.0.4
- old
+ new
@@ -42,10 +42,17 @@
def to_xml
@xml.to_html
end
+ def fill_table params
+ edit_table(params) do |row, content|
+ row.replace_form content
+ row
+ end
+ end
+
def edit_table params
@name = params[:name]
@rows = params[:data]
raise 'cannot edit table rows without datarows' if !@rows || @rows.size==0
@@ -67,23 +74,19 @@
end
#puts @xml
end
- def fill_table params
- edit_table_rows(params) do |row, row_date|
- row.replace_form(row_data)
- end
- end
+
end
class OdtFile < OdfFile
attr_accessor :text
def initialize filename
- super
+ super filename
load
end
def load
@@ -95,13 +98,9 @@
end
def save filename
save_changes
- name, extention = filename.split('.')
- extention = 'odt' if !extention
- raise "Wrong extention #{extention} for odt file" if extention != 'odt'
- filename = "#{name}.#{extention}"
super filename
end
end
\ No newline at end of file