Skip to content

Commit

Permalink
Checking rowspanned non hierarchical rows
Browse files Browse the repository at this point in the history
  • Loading branch information
albertmeronyo committed Apr 2, 2015
1 parent 0773f98 commit d89582e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/tablink.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,17 @@ def handleRowHeader(self, cell, rowDimensions, rowProperties) :
rowDimensions.setdefault(i, {})
rowDimensions[i].setdefault(prop, [])
rowDimensions[i][prop].append(cell['URI'])

# Look if we cover other cells verticaly
rows_spanned = cell['cell'].getAttrNS(TABLENS, 'number-rows-spanned')
if rows_spanned != None:
rows_spanned = int(rows_spanned)
for extra in range(1, rows_spanned):
spanned_row = cell['i'] + extra
self.log.debug("Span over ({},{})".format(spanned_row, cell['j']))
rowDimensions.setdefault(spanned_row, {})
rowDimensions[spanned_row].setdefault(prop, [])
rowDimensions[spanned_row][prop].append(cell['URI'])


def handleHRowHeader(self, cell, rowDimensions, rowProperties) :
Expand Down

0 comments on commit d89582e

Please sign in to comment.