Open Document : Issue 4018 and 4017 : random page break + top and bottom margin for paragraphs.
svn: r15490
This commit is contained in:
parent
7d998edc95
commit
59ab92808d
@ -346,7 +346,7 @@ class ODFDoc(BaseDoc, TextDoc, DrawDoc):
|
||||
if style.get_padding() != 0.0:
|
||||
self.cntnt.write('fo:padding="%.2fcm" ' % style.get_padding())
|
||||
if style.get_header_level() > 0:
|
||||
self.cntnt.write('fo:keep-with-next="true" ')
|
||||
self.cntnt.write('fo:keep-with-next="auto" ')
|
||||
|
||||
align = style.get_alignment()
|
||||
if align == PARA_ALIGN_LEFT:
|
||||
@ -382,8 +382,10 @@ class ODFDoc(BaseDoc, TextDoc, DrawDoc):
|
||||
style.get_right_margin())
|
||||
self.cntnt.write('fo:margin-left="%.2fcm"\n' %
|
||||
style.get_left_margin())
|
||||
self.cntnt.write('fo:margin-top="0.00cm"\n')
|
||||
self.cntnt.write('fo:margin-bottom="0.212cm" ')
|
||||
self.cntnt.write('fo:margin-top="%.2fcm"\n' %
|
||||
style.get_top_margin())
|
||||
self.cntnt.write('fo:margin-bottom="%.2fcm"\n' %
|
||||
style.get_bottom_margin())
|
||||
self.cntnt.write('/>\n')
|
||||
self.cntnt.write('</style:style>\n')
|
||||
|
||||
@ -967,13 +969,15 @@ class ODFDoc(BaseDoc, TextDoc, DrawDoc):
|
||||
style.get_left_margin())
|
||||
self.sfile.write('fo:margin-right="%.2fcm"\n' %
|
||||
style.get_right_margin())
|
||||
self.sfile.write('fo:margin-top="0.00cm"\n')
|
||||
self.sfile.write('fo:margin-bottom="0.212cm"\n')
|
||||
self.sfile.write('fo:margin-top="%.2fcm"\n' %
|
||||
style.get_top_margin())
|
||||
self.sfile.write('fo:margin-bottom="%.2fcm"\n' %
|
||||
style.get_bottom_margin())
|
||||
|
||||
if style.get_padding() != 0.0:
|
||||
self.sfile.write('fo:padding="%.2fcm" ' % style.get_padding())
|
||||
if style.get_header_level() > 0:
|
||||
self.sfile.write('fo:keep-with-next="always" ')
|
||||
self.sfile.write('fo:keep-with-next="auto" ')
|
||||
|
||||
align = style.get_alignment()
|
||||
if align == PARA_ALIGN_LEFT:
|
||||
@ -1012,8 +1016,10 @@ class ODFDoc(BaseDoc, TextDoc, DrawDoc):
|
||||
style.get_right_margin())
|
||||
self.sfile.write('fo:margin-left="%.2fcm" ' %
|
||||
style.get_left_margin())
|
||||
self.sfile.write('fo:margin-top="0cm" ')
|
||||
self.sfile.write('fo:margin-bottom="0.212cm"')
|
||||
self.sfile.write('fo:margin-top="%.2fcm"\n' %
|
||||
style.get_top_margin())
|
||||
self.sfile.write('fo:margin-bottom="%.2fcm"\n' %
|
||||
style.get_bottom_margin())
|
||||
self.sfile.write('/>\n')
|
||||
self.sfile.write('</style:style>\n')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user