* src/docgen/KwordDoc.py: fix margins and fonts.
svn: r5433
This commit is contained in:
parent
22d8f9bed1
commit
61865fed62
@ -1,3 +1,6 @@
|
||||
2005-11-23 Don Allingham <don@gramps-project.org>
|
||||
* src/docgen/KwordDoc.py: fix margins and fonts.
|
||||
|
||||
2005-11-23 Wayne Bergeron <wb@vallnet.com>
|
||||
* src/GenericFilter.py (IsLessThanNthGenerationAncestorOfBookmarked):
|
||||
Add new filter rule.
|
||||
|
@ -176,8 +176,9 @@ class KwordDoc(BaseDoc.BaseDoc):
|
||||
|
||||
p = self.style_list[name]
|
||||
|
||||
pad = points(p.get_padding())/2
|
||||
self.f.write('<OFFSETS before="%d" after="%d"/>\n' % (pad,pad))
|
||||
tpad = points(p.get_top_margin())
|
||||
bpad = points(p.get_bottom_margin())
|
||||
self.f.write('<OFFSETS before="%.4f" after="%.4f"/>\n' % (tpad,bpad))
|
||||
if p.get_alignment() == BaseDoc.PARA_ALIGN_CENTER:
|
||||
self.f.write('<FLOW value="center"/>\n')
|
||||
elif p.get_alignment() == BaseDoc.PARA_ALIGN_JUSTIFY:
|
||||
@ -196,9 +197,9 @@ class KwordDoc(BaseDoc.BaseDoc):
|
||||
font = p.get_font()
|
||||
self.f.write('<FORMAT>\n')
|
||||
if font.get_type_face==BaseDoc.FONT_SANS_SERIF:
|
||||
self.f.write('<FONT name="helvetica"/>\n')
|
||||
self.f.write('<FONT name="Bitstream Vera Serif"/>\n')
|
||||
else:
|
||||
self.f.write('<FONT name="times"/>\n')
|
||||
self.f.write('<FONT name="Bitstream Vera Sans"/>\n')
|
||||
self.f.write('<SIZE value="%d"/>\n' % font.get_size())
|
||||
self.f.write('<COLOR red="%d" green="%d" blue="%d"/>\n' % font.get_color())
|
||||
if font.get_bold():
|
||||
@ -274,9 +275,9 @@ class KwordDoc(BaseDoc.BaseDoc):
|
||||
self.p = self.style_list[self.style_name]
|
||||
self.font = self.p.get_font()
|
||||
if self.font.get_type_face() == BaseDoc.FONT_SERIF:
|
||||
self.font_face = "Arial"
|
||||
self.font_face = "Bitstream Vera Serif"
|
||||
else:
|
||||
self.font_face = "Times New Roman"
|
||||
self.font_face = "Bitstream Vera Sans"
|
||||
|
||||
if leader != None:
|
||||
self.text = leader + '\t'
|
||||
@ -306,8 +307,9 @@ class KwordDoc(BaseDoc.BaseDoc):
|
||||
self.f.write('<LAYOUT>\n')
|
||||
self.f.write('<NAME value="%s"/>\n' % self.style_name)
|
||||
|
||||
pad = points(self.p.get_padding())/2
|
||||
self.f.write('<OFFSETS before="%d" after="%d"/>\n' % (pad,pad))
|
||||
tpad = points(self.p.get_top_margin())
|
||||
bpad = points(self.p.get_bottom_margin())
|
||||
self.f.write('<OFFSETS before="%.4f" after="%.4f"/>\n' % (tpad,bpad))
|
||||
|
||||
if self.p.get_alignment() == BaseDoc.PARA_ALIGN_CENTER:
|
||||
self.f.write('<FLOW value="center"/>\n')
|
||||
|
Loading…
Reference in New Issue
Block a user