diff --git a/ChangeLog b/ChangeLog index 373aa1d23..4b3deb1a0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2007-02-10 Brian Matherly + * src/BaseDoc.py: remove unused functions + * src/docgen/KwordDoc.py: remove unused functions + * src/docgen/OpenOfficeDoc.py: remove unused functions + * src/docgen/HtmlDoc.py: remove unused functions + * src/docgen/LPRDoc.py: remove unused functions + * src/docgen/ODFDoc.py: remove unused functions + 2007-02-11 Zsolt Foldvari * src/MarkupText.py: added * src/DisplayTabs/_NoteTab.py: handling 'rich text' notes diff --git a/src/BaseDoc.py b/src/BaseDoc.py index d0dde455e..a09b928e1 100644 --- a/src/BaseDoc.py +++ b/src/BaseDoc.py @@ -1218,7 +1218,6 @@ class BaseDoc: self.lmargin = 2.54 self.rmargin = 2.54 self.title = "" - self.owner = '' self.draw_styles = {} self.font = FontStyle() @@ -1228,14 +1227,10 @@ class BaseDoc: self.name = "" self.media_list = [] self.print_req = 0 - self.mode = TEXT_MODE self.init_called = False def init(self): self.init_called = True - - def set_mode(self, mode): - self.mode = mode def start_page(self): pass @@ -1245,14 +1240,6 @@ class BaseDoc: def print_requested(self): self.print_req = 1 - - def set_owner(self, owner): - """ - Sets the name of the owner of the document. - - @param owner: User's name - """ - self.owner = owner def add_media_object(self, name, align, w_cm, h_cm): """ @@ -1367,17 +1354,6 @@ class BaseDoc: def end_superscript(self): pass - def start_listing(self, style_name): - """ - Starts a new listing block, using the specified style name. - - @param style_name: name of the ParagraphStyle to use for the block. - """ - pass - - def end_listing(self): - pass - def start_paragraph(self, style_name, leader=None): """ Starts a new paragraph, using the specified style name. @@ -1427,10 +1403,6 @@ class BaseDoc: "Ends the current table cell" pass - def horizontal_line(self): - "Creates a horizontal line" - pass - def write_note(self, text, format, style_name): """ Writes the note's text and take care of paragraphs, @@ -1452,18 +1424,6 @@ class BaseDoc: """ pass - def write_cmdstr(self, text): - """ - Writes the text in the current paragraph. Should only be used after a - start_paragraph and before an end_paragraph. - - @param text: text to write. - """ - pass - - def draw_arc(self, style, x1, y1, x2, y2, angle, extent): - pass - def draw_path(self, style, path): pass @@ -1540,15 +1500,3 @@ class BaseDoc: return ( (centerx + cos(sangle + delta) * rad), (centery + sin(sangle + delta) * rad)) - - def start_path(self, style, x, y): - pass - - def line_to(self, x, y): - pass - - def arc_to(self, x, y, angle, extent): - pass - - def end_path(self): - pass diff --git a/src/docgen/HtmlDoc.py b/src/docgen/HtmlDoc.py index 42250572e..91e0cf764 100644 --- a/src/docgen/HtmlDoc.py +++ b/src/docgen/HtmlDoc.py @@ -96,49 +96,28 @@ _bottom = [ #------------------------------------------------------------------------ class HtmlDoc(BaseDoc.BaseDoc): - def __init__(self,styles,type,template,orientation,source=None): + def __init__(self,styles,type,template,orientation): BaseDoc.BaseDoc.__init__(self,styles,BaseDoc.PaperStyle("",0,0),template,None) self.year = time.localtime(time.time())[0] self.ext = '.html' - if source == None: - self.meta = "" - self.copyright = 'Copyright © %d' % (self.year) - self.map = None - self.f = None - self.filename = None - self.top = [] - self.bottom = [] - self.base = "" - self.load_template() - self.build_header() - self.style_declaration = None - self.image_dir = "images" - else: - self.meta = source.meta - self.owner = source.owner - self.copyright = 'Copyright © %d %s' % (self.year,self.owner) - self.map = source.map - self.f = None - self.filename = source.filename - self.template = None - self.top = source.top - self.bottom = source.bottom - self.base = source.base - self.fix_title(source.file_header) - self.style_declaration = source.style_declaration - self.table_styles = source.table_styles; - self.cell_styles = source.cell_styles; - self.image_dir = source.image_dir + self.meta = "" + self.copyright = 'Copyright © %d' % (self.year) + self.map = None + self.f = None + self.filename = None + self.top = [] + self.bottom = [] + self.base = "" + self.load_template() + self.build_header() + self.style_declaration = None + self.image_dir = "images" def set_extension(self,val): if val[0] != '.': val = "." + val self.ext = val - - def set_owner(self,owner): - BaseDoc.BaseDoc.set_owner(self,owner) - self.copyright = 'Copyright © %d %s' % (self.year,self.owner) - + def set_image_dir(self,dirname): self.image_dir = dirname diff --git a/src/docgen/KwordDoc.py b/src/docgen/KwordDoc.py index 45e0dd064..107858efa 100644 --- a/src/docgen/KwordDoc.py +++ b/src/docgen/KwordDoc.py @@ -477,9 +477,6 @@ class KwordDoc(BaseDoc.BaseDoc): self.text = self.text + '#' - def horizontal_line(self): - pass - def write_note(self,text,format,style_name): if format == 1: self.start_paragraph(style_name) diff --git a/src/docgen/LPRDoc.py b/src/docgen/LPRDoc.py index 88614d75d..3ff81dfe5 100644 --- a/src/docgen/LPRDoc.py +++ b/src/docgen/LPRDoc.py @@ -1019,11 +1019,6 @@ class LPRDoc(BaseDoc.BaseDoc): # #------------------------------------------------------------------------ - def horizontal_line(self): - self.brand_new_page = 0 - self.gpc.moveto(self.left_margin, self.y) - self.gpc.lineto(self.right_margin, self.y) - def draw_path(self,style,path): self.brand_new_page = 0 stype = self.draw_styles[style] diff --git a/src/docgen/ODFDoc.py b/src/docgen/ODFDoc.py index c271a7a60..a02a530f0 100644 --- a/src/docgen/ODFDoc.py +++ b/src/docgen/ODFDoc.py @@ -84,9 +84,6 @@ class ODFDoc(BaseDoc.BaseDoc): self.page = 0 self.first_page = 1 - def set_mode(self, mode): - self.mode = mode - def open(self,filename): t = time.localtime(time.time()) self.time = "%04d-%02d-%02dT%02d:%02d:%02d" % \ diff --git a/src/docgen/OpenOfficeDoc.py b/src/docgen/OpenOfficeDoc.py index cc401c3c3..ed4dcec8d 100644 --- a/src/docgen/OpenOfficeDoc.py +++ b/src/docgen/OpenOfficeDoc.py @@ -81,9 +81,6 @@ class OpenOfficeDoc(BaseDoc.BaseDoc): self.page = 0 self.first_page = 1 - def set_mode(self, mode): - self.mode = mode - def open(self,filename): t = time.localtime(time.time()) self.time = "%04d-%02d-%02dT%02d:%02d:%02d" % \