* src/docgen/AsciiDoc.py: Correctly treat cells with span>1.
svn: r2939
This commit is contained in:
parent
f0ba622f1e
commit
795884a4b9
@ -1,5 +1,6 @@
|
|||||||
2004-02-29 Alex Roitman <shura@alex.neuro.umn.edu>
|
2004-02-29 Alex Roitman <shura@alex.neuro.umn.edu>
|
||||||
* src/docgen/LPRDoc.py: Add to CVS.
|
* src/docgen/LPRDoc.py: Add to CVS.
|
||||||
|
* src/docgen/AsciiDoc.py: Correctly treat cells with span>1.
|
||||||
|
|
||||||
2004-02-28 Alex Roitman <shura@alex.neuro.umn.edu>
|
2004-02-28 Alex Roitman <shura@alex.neuro.umn.edu>
|
||||||
* src/GrampsParser.py (start_childof): Call add_parent_family_id()
|
* src/GrampsParser.py (start_childof): Call add_parent_family_id()
|
||||||
|
@ -265,8 +265,7 @@ class AsciiDoc(BaseDoc.BaseDoc):
|
|||||||
#--------------------------------------------------------------------
|
#--------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# Start a row. Initialize lists for cell contents, number of lines,
|
# Start a row. Initialize lists for cell contents, number of lines,
|
||||||
# and the widths.
|
# and the widths. It is necessary to keep a list of cell contents
|
||||||
# It is necessary to keep a list of cell contents
|
|
||||||
# that is to be written after all the cells are defined.
|
# that is to be written after all the cells are defined.
|
||||||
#
|
#
|
||||||
#--------------------------------------------------------------------
|
#--------------------------------------------------------------------
|
||||||
@ -291,14 +290,16 @@ class AsciiDoc(BaseDoc.BaseDoc):
|
|||||||
self.in_cell = 0
|
self.in_cell = 0
|
||||||
cell_text = [None]*self.ncols
|
cell_text = [None]*self.ncols
|
||||||
for cell in range(self.ncols):
|
for cell in range(self.ncols):
|
||||||
blanks = ' '*self.cell_widths[cell] + '\n'
|
if self.cell_widths[cell]:
|
||||||
if self.cell_lines[cell] < self.maxlines and cell < self.ncols - 1:
|
blanks = ' '*self.cell_widths[cell] + '\n'
|
||||||
self.cellpars[cell] = self.cellpars[cell] \
|
if self.cell_lines[cell] < self.maxlines and cell < self.ncols - 1:
|
||||||
|
self.cellpars[cell] = self.cellpars[cell] \
|
||||||
+ blanks * (self.maxlines-self.cell_lines[cell])
|
+ blanks * (self.maxlines-self.cell_lines[cell])
|
||||||
cell_text[cell] = self.cellpars[cell].split('\n')
|
cell_text[cell] = self.cellpars[cell].split('\n')
|
||||||
for line in range(self.maxlines):
|
for line in range(self.maxlines):
|
||||||
for cell in range(self.ncols):
|
for cell in range(self.ncols):
|
||||||
self.f.write(cell_text[cell][line])
|
if self.cell_widths[cell]:
|
||||||
|
self.f.write(cell_text[cell][line])
|
||||||
self.f.write('\n')
|
self.f.write('\n')
|
||||||
|
|
||||||
#--------------------------------------------------------------------
|
#--------------------------------------------------------------------
|
||||||
@ -309,6 +310,11 @@ class AsciiDoc(BaseDoc.BaseDoc):
|
|||||||
def start_cell(self,style_name,span=1):
|
def start_cell(self,style_name,span=1):
|
||||||
self.in_cell = 1
|
self.in_cell = 1
|
||||||
self.cellnum = self.cellnum + span
|
self.cellnum = self.cellnum + span
|
||||||
|
span = span - 1
|
||||||
|
while span:
|
||||||
|
self.cell_widths[self.cellnum-span] = 0
|
||||||
|
span = span - 1
|
||||||
|
|
||||||
|
|
||||||
#--------------------------------------------------------------------
|
#--------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
|
Loading…
Reference in New Issue
Block a user