lib/powerpoint/slide/pictorial.rb in powerpoint-1.7 vs lib/powerpoint/slide/pictorial.rb in powerpoint-1.8
- old
+ new
@@ -16,11 +16,11 @@
@coords = default_coords unless @coords.any?
@image_name = File.basename(@image_path)
end
def save(extract_path, index)
- copy_media(extract_path)
+ copy_media(extract_path, @image_path)
save_rel_xml(extract_path, index)
save_slide_xml(extract_path, index)
end
def file_type
@@ -37,14 +37,9 @@
ratio = new_width / image_width.to_f
new_height = (image_height.to_f * ratio).round
{x: (slide_width / 2) - (new_width/2), y: pixle_to_pt(120), cx: new_width, cy: new_height}
end
private :default_coords
-
- def copy_media(extract_path)
- FileUtils.copy_file(@image_path, "#{extract_path}/ppt/media/#{@image_name}")
- end
- private :copy_media
def save_rel_xml(extract_path, index)
render_view('pictorial_rel.xml.erb', "#{extract_path}/ppt/slides/_rels/slide#{index}.xml.rels")
end
private :save_rel_xml