diff --git a/src/BaseDoc.py b/src/BaseDoc.py index 07c4ca93a..4be252f9f 100644 --- a/src/BaseDoc.py +++ b/src/BaseDoc.py @@ -1191,6 +1191,12 @@ class BaseDoc: def add_draw_style(self,name,style): self.draw_styles[name] = GraphicsStyle(style) + def get_draw_style(self,name): + return self.draw_styles[name] + + def get_style(self,name): + return self.style_list[name] + def add_table_style(self,name,style): """ Adds the TableStyle with the specfied name. diff --git a/src/docgen/OpenOfficeDoc.py b/src/docgen/OpenOfficeDoc.py index a3ca12545..f3a888ff8 100644 --- a/src/docgen/OpenOfficeDoc.py +++ b/src/docgen/OpenOfficeDoc.py @@ -950,6 +950,28 @@ class OpenOfficeDoc(BaseDoc.BaseDoc): self.cntnt.write('\n') self.cntnt.write('\n') + def write_at(self,style,text,x,y): + box_style = self.draw_styles[style] + para_name = box_style.get_paragraph_style() + pstyle = self.style_list[para_name] + font = pstyle.get_font() + + size = 1.1*(FontScale.string_width(font,text)/72.0) * 2.54 + + self.cntnt.write('\n' % float(y)) + + if text != "": + self.cntnt.write('' % para_name) + self.cntnt.write(text) + self.cntnt.write('\n') + self.cntnt.write('\n') + #------------------------------------------------------------------------ # # point to centimeter convertion