Remove unused functions from BaseDoc
svn: r8100
This commit is contained in:
parent
9fb822fadd
commit
5230306111
@ -1,3 +1,11 @@
|
|||||||
|
2007-02-10 Brian Matherly <brian@gramps-project.org>
|
||||||
|
* 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-12 Don Allingham <don@gramps-project.org>
|
2007-02-12 Don Allingham <don@gramps-project.org>
|
||||||
* src/plugins/FindDupes.py: catch window already open message
|
* src/plugins/FindDupes.py: catch window already open message
|
||||||
|
|
||||||
|
@ -1218,7 +1218,6 @@ class BaseDoc:
|
|||||||
self.lmargin = 2.54
|
self.lmargin = 2.54
|
||||||
self.rmargin = 2.54
|
self.rmargin = 2.54
|
||||||
self.title = ""
|
self.title = ""
|
||||||
self.owner = ''
|
|
||||||
|
|
||||||
self.draw_styles = {}
|
self.draw_styles = {}
|
||||||
self.font = FontStyle()
|
self.font = FontStyle()
|
||||||
@ -1228,14 +1227,10 @@ class BaseDoc:
|
|||||||
self.name = ""
|
self.name = ""
|
||||||
self.media_list = []
|
self.media_list = []
|
||||||
self.print_req = 0
|
self.print_req = 0
|
||||||
self.mode = TEXT_MODE
|
|
||||||
self.init_called = False
|
self.init_called = False
|
||||||
|
|
||||||
def init(self):
|
def init(self):
|
||||||
self.init_called = True
|
self.init_called = True
|
||||||
|
|
||||||
def set_mode(self, mode):
|
|
||||||
self.mode = mode
|
|
||||||
|
|
||||||
def start_page(self):
|
def start_page(self):
|
||||||
pass
|
pass
|
||||||
@ -1245,14 +1240,6 @@ class BaseDoc:
|
|||||||
|
|
||||||
def print_requested(self):
|
def print_requested(self):
|
||||||
self.print_req = 1
|
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):
|
def add_media_object(self, name, align, w_cm, h_cm):
|
||||||
"""
|
"""
|
||||||
@ -1367,17 +1354,6 @@ class BaseDoc:
|
|||||||
def end_superscript(self):
|
def end_superscript(self):
|
||||||
pass
|
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):
|
def start_paragraph(self, style_name, leader=None):
|
||||||
"""
|
"""
|
||||||
Starts a new paragraph, using the specified style name.
|
Starts a new paragraph, using the specified style name.
|
||||||
@ -1427,10 +1403,6 @@ class BaseDoc:
|
|||||||
"Ends the current table cell"
|
"Ends the current table cell"
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def horizontal_line(self):
|
|
||||||
"Creates a horizontal line"
|
|
||||||
pass
|
|
||||||
|
|
||||||
def write_note(self, text, format, style_name):
|
def write_note(self, text, format, style_name):
|
||||||
"""
|
"""
|
||||||
Writes the note's text and take care of paragraphs,
|
Writes the note's text and take care of paragraphs,
|
||||||
@ -1452,18 +1424,6 @@ class BaseDoc:
|
|||||||
"""
|
"""
|
||||||
pass
|
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):
|
def draw_path(self, style, path):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@ -1540,15 +1500,3 @@ class BaseDoc:
|
|||||||
|
|
||||||
return ( (centerx + cos(sangle + delta) * rad),
|
return ( (centerx + cos(sangle + delta) * rad),
|
||||||
(centery + sin(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
|
|
||||||
|
@ -96,49 +96,28 @@ _bottom = [
|
|||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
class HtmlDoc(BaseDoc.BaseDoc):
|
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)
|
BaseDoc.BaseDoc.__init__(self,styles,BaseDoc.PaperStyle("",0,0),template,None)
|
||||||
self.year = time.localtime(time.time())[0]
|
self.year = time.localtime(time.time())[0]
|
||||||
self.ext = '.html'
|
self.ext = '.html'
|
||||||
if source == None:
|
self.meta = ""
|
||||||
self.meta = ""
|
self.copyright = 'Copyright © %d' % (self.year)
|
||||||
self.copyright = 'Copyright © %d' % (self.year)
|
self.map = None
|
||||||
self.map = None
|
self.f = None
|
||||||
self.f = None
|
self.filename = None
|
||||||
self.filename = None
|
self.top = []
|
||||||
self.top = []
|
self.bottom = []
|
||||||
self.bottom = []
|
self.base = ""
|
||||||
self.base = ""
|
self.load_template()
|
||||||
self.load_template()
|
self.build_header()
|
||||||
self.build_header()
|
self.style_declaration = None
|
||||||
self.style_declaration = None
|
self.image_dir = "images"
|
||||||
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
|
|
||||||
|
|
||||||
def set_extension(self,val):
|
def set_extension(self,val):
|
||||||
if val[0] != '.':
|
if val[0] != '.':
|
||||||
val = "." + val
|
val = "." + val
|
||||||
self.ext = 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):
|
def set_image_dir(self,dirname):
|
||||||
self.image_dir = dirname
|
self.image_dir = dirname
|
||||||
|
|
||||||
|
@ -477,9 +477,6 @@ class KwordDoc(BaseDoc.BaseDoc):
|
|||||||
|
|
||||||
self.text = self.text + '#'
|
self.text = self.text + '#'
|
||||||
|
|
||||||
def horizontal_line(self):
|
|
||||||
pass
|
|
||||||
|
|
||||||
def write_note(self,text,format,style_name):
|
def write_note(self,text,format,style_name):
|
||||||
if format == 1:
|
if format == 1:
|
||||||
self.start_paragraph(style_name)
|
self.start_paragraph(style_name)
|
||||||
|
@ -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):
|
def draw_path(self,style,path):
|
||||||
self.brand_new_page = 0
|
self.brand_new_page = 0
|
||||||
stype = self.draw_styles[style]
|
stype = self.draw_styles[style]
|
||||||
|
@ -84,9 +84,6 @@ class ODFDoc(BaseDoc.BaseDoc):
|
|||||||
self.page = 0
|
self.page = 0
|
||||||
self.first_page = 1
|
self.first_page = 1
|
||||||
|
|
||||||
def set_mode(self, mode):
|
|
||||||
self.mode = mode
|
|
||||||
|
|
||||||
def open(self,filename):
|
def open(self,filename):
|
||||||
t = time.localtime(time.time())
|
t = time.localtime(time.time())
|
||||||
self.time = "%04d-%02d-%02dT%02d:%02d:%02d" % \
|
self.time = "%04d-%02d-%02dT%02d:%02d:%02d" % \
|
||||||
|
@ -81,9 +81,6 @@ class OpenOfficeDoc(BaseDoc.BaseDoc):
|
|||||||
self.page = 0
|
self.page = 0
|
||||||
self.first_page = 1
|
self.first_page = 1
|
||||||
|
|
||||||
def set_mode(self, mode):
|
|
||||||
self.mode = mode
|
|
||||||
|
|
||||||
def open(self,filename):
|
def open(self,filename):
|
||||||
t = time.localtime(time.time())
|
t = time.localtime(time.time())
|
||||||
self.time = "%04d-%02d-%02dT%02d:%02d:%02d" % \
|
self.time = "%04d-%02d-%02dT%02d:%02d:%02d" % \
|
||||||
|
Loading…
Reference in New Issue
Block a user