#6931 closed defect (wontfix)
replace_keyword ingored in odt template
Reported by: | entend | Owned by: | Aurélien Bompard |
---|---|---|---|
Priority: | normal | Component: | OdtExportPlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 0.11 |
Description
I used OpenOffice 3.2.0 Build: 9483. My template file template.odt is attached below. replace_keyword (in my case it is TRAC-ODT-INSERT) is ignored by export plugin. Btw, cut_start_keyword and cut_stop_keyword works fine.
P.S. I suspect that the problem in insert_content(self, content) function between http://trac-hacks.org/browser/odtexportplugin/0.11/odtexport/odtexport.py?rev=7811#L354 and http://trac-hacks.org/browser/odtexportplugin/0.11/odtexport/odtexport.py?rev=7811#L357 lines:
#... self.xml["content"] = re.sub( "<text:p[^>]*>" + re.escape(self.options["replace_keyword"]) +"</text:p>", content, self.xml["content"]) #...
You believe that replace_keyword will be between <text:p...> and </text:p> tags, but in my case replace_keyword is placed between <text:span...> and </text:span> if i not mistaken.
Attachments (1)
Change History (7)
Changed 15 years ago by
Attachment: | template.odt added |
---|
comment:3 Changed 15 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Yes, I have (found) no way to predict all the formattings people could apply to the INSERT keyword, so I just assume it's alone on its own line.
Maybe that should be added to the documentation on the wiki.
comment:4 follow-up: 6 Changed 15 years ago by
As workaround, you can replace 'replace_keyword' by replace_start_keyword and replace_stop_keyword, how you think ?