Commit 2e2bd271 authored by Romain Courteaud's avatar Romain Courteaud

Enable adding images in writer document.

Thanks to Mame Coumba Sall.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@11195 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e97dfa48
...@@ -364,14 +364,16 @@ xmlns:config="http://openoffice.org/2001/config" office:version="1.0"> ...@@ -364,14 +364,16 @@ xmlns:config="http://openoffice.org/2001/config" office:version="1.0">
# <manifest:file-entry manifest:media-type="" manifest:full-path="ObjBFE4F50D/Pictures/"/> # <manifest:file-entry manifest:media-type="" manifest:full-path="ObjBFE4F50D/Pictures/"/>
replacement = """<draw:image draw:style-name="%s" draw:name="ERP5Image%d" replacement = """<draw:image draw:style-name="%s" draw:name="ERP5Image%d"
text:anchor-type="paragraph" svg:x="%s" svg:y="%s" text:anchor-type="paragraph" svg:x="%s" svg:y="%s"
svg:width="%.3fcm" svg:height="%.3fcm" xlink:href="Pictures/%s" svg:width="%.3fcm" svg:height="%.3fcm" xlink:href="#Pictures/%s"
xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad"/> xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad"/>
"""%(options_dict['style'], actual_idx, """%(options_dict['style'], actual_idx,
options_dict['x'], options_dict['y'], options_dict['x'], options_dict['y'],
w, h, w, h,
pic_name.split('/')[-1] ) pic_name.split('/')[-1] )
if not ( self.content_type.endswith('draw') or if not ( self.content_type.endswith('draw') or
self.content_type.endswith('presentation') ): self.content_type.endswith('presentation') or
self.content_type.endswith('writer') or
self.content_type.endswith('text') ):
replacement = '<text:p text:style-name="Standard">'+replacement+'</text:p>' replacement = '<text:p text:style-name="Standard">'+replacement+'</text:p>'
return replacement return replacement
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment