RED-8670: add table detection from idp result
* some 'slight' refactoring
This commit is contained in:
parent
c00363d8a8
commit
2e54a7b4e3
@ -114,6 +114,8 @@ public class TableGridStructureCalculator {
|
|||||||
}
|
}
|
||||||
List<List<Cell>> rows = buildRows(cells);
|
List<List<Cell>> rows = buildRows(cells);
|
||||||
if (isNotRectangular(rows)) {
|
if (isNotRectangular(rows)) {
|
||||||
|
// For some tables the result is not rectangular, this either happens if cells are missing or the algorithm would need more than the max iterations to solve it.
|
||||||
|
// This is unacceptable so we revert to the area sweep implementation, which by design will always produce a rectangular result.
|
||||||
return areaSweepFallback();
|
return areaSweepFallback();
|
||||||
}
|
}
|
||||||
rows = removeEmptyRows(rows);
|
rows = removeEmptyRows(rows);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user