35
36
37
38
39
40
41
42
43
44
45
46
47
|
# File 'lib/odf/document.rb', line 35
def write_to(ods_file_name)
ods_file = Zip::File.open(ods_file_name, Zip::File::CREATE)
ods_file.get_output_stream('META-INF/manifest.xml') {|f| f << self.class.skeleton.manifest(self.class.doc_type) }
ods_file.get_output_stream('styles.xml') do |f|
f << self.class.skeleton.styles
f << self.office_styles_xml unless self.office_styles.empty?
f << "</office:styles> </office:document-styles>"
end
ods_file.get_output_stream('content.xml') {|f| f << self.xml}
ods_file.close
end
|