diff options
author | Vincent Hennebert <vhennebert@apache.org> | 2008-01-23 15:22:05 +0000 |
---|---|---|
committer | Vincent Hennebert <vhennebert@apache.org> | 2008-01-23 15:22:05 +0000 |
commit | 58868131c9b55c3bf8f91cad92304e118ab1de41 (patch) | |
tree | 07ec135eb57c3119b2517370ef14da1e958fc0eb /test/fotree | |
parent | 67c26ead2f80ffd25cd27a84023c2e922f173ce7 (diff) | |
download | xmlgraphics-fop-58868131c9b55c3bf8f91cad92304e118ab1de41.tar.gz xmlgraphics-fop-58868131c9b55c3bf8f91cad92304e118ab1de41.zip |
Added support for conditional borders (and paddings) in tables.
The proper borders are not selected yet between the header/footer and the body. There might still be a few glitches in some cases
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@614566 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/fotree')
-rwxr-xr-x | test/fotree/unittests/table/collapsed-conditional-borders_test-generator.py | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/test/fotree/unittests/table/collapsed-conditional-borders_test-generator.py b/test/fotree/unittests/table/collapsed-conditional-borders_test-generator.py index b3b697235..1bd5d441d 100755 --- a/test/fotree/unittests/table/collapsed-conditional-borders_test-generator.py +++ b/test/fotree/unittests/table/collapsed-conditional-borders_test-generator.py @@ -74,7 +74,7 @@ class TableGenerator: ] bordersBefore = None - resBefore = None + resBefore = {} """The comma between each table; nothing before the first one.""" separator = '' @@ -85,8 +85,8 @@ class TableGenerator: Params: borderSet: a list of 5 border specifications for resp. table, table-column, table-body, table-row and table-cell - resolution: the resolved border for the leading and rest cases (for the normal - case the resolution is always the same) + resolution: the resolved border for the rest case (for the normal and leading + cases the resolution is always the same) """ if not self.bordersBefore: self.bordersBefore = borderSet @@ -110,16 +110,14 @@ class TableGenerator: sys.stderr.write(self.separator + '{') comma = '' for beforeAfter in [self.resBefore, resolution]: - for leadRest in range(2): - sys.stderr.write(comma + '{border' + beforeAfter[leadRest]['length'] - + ', Color.' + beforeAfter[leadRest]['color'] - + '}') - comma = ', ' + sys.stderr.write(comma + '{border' + beforeAfter['length'] + + ', Color.' + beforeAfter['color'] + '}') + comma = ', ' sys.stderr.write('}') self.separator = ',\n' # Reset self.bordersBefore = None - self.resBefore = None + self.resBefore = {} class TableHFGenerator: """Generates on stdout tables with headers and footers, and the border specifications @@ -254,7 +252,7 @@ def generateTestCases(): defaultBorders.append({'length': '4pt', 'cond': 'discard', 'color': color}) defaultBorders[fo_table]['length'] = '8pt' - resolution = [{'length': '4pt', 'color': 'yellow'}, {'length': '0pt', 'color': 'black'}] + resolution = {'length': '0pt', 'color': 'black'} tableGenerator.addBorderSet(defaultBorders, resolution) for combinations in createAllCombinations()[1:]: for combination in combinations: @@ -266,9 +264,9 @@ def generateTestCases(): if index != fo_table: finalBorders[index]['length'] = '6pt' if fo_table in combination: - resolution = [{'length': '8pt', 'color': 'black'}] * 2 + resolution = {'length': '8pt', 'color': 'black'} else: - resolution = [{'length': '6pt', 'color': finalBorders[index]['color']}] * 2 + resolution = {'length': '6pt', 'color': finalBorders[index]['color']} tableGenerator.addBorderSet(finalBorders, resolution) printFOEnd() |