From 2e2bd27127d2aa9f1a7c17e98f19155fc7c42187 Mon Sep 17 00:00:00 2001 From: Romain Courteaud <romain@nexedi.com> Date: Wed, 8 Nov 2006 10:33:14 +0000 Subject: [PATCH] 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 --- product/ERP5OOo/OOoTemplate.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/product/ERP5OOo/OOoTemplate.py b/product/ERP5OOo/OOoTemplate.py index ebcf794c6d..e61bd46080 100644 --- a/product/ERP5OOo/OOoTemplate.py +++ b/product/ERP5OOo/OOoTemplate.py @@ -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/"/> replacement = """<draw:image draw:style-name="%s" draw:name="ERP5Image%d" 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"/> """%(options_dict['style'], actual_idx, options_dict['x'], options_dict['y'], w, h, pic_name.split('/')[-1] ) 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>' return replacement -- 2.30.9