fix: Empty table handling (#2365)

* add table raw cells when no table structure model was used

Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>

* Add RichTableCell instance for tables with missing structure.

Signed-off-by: Christoph Auer <cau@zurich.ibm.com>

* Update test GT

Signed-off-by: Christoph Auer <cau@zurich.ibm.com>

* update test results

Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>

---------

Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>
Signed-off-by: Christoph Auer <cau@zurich.ibm.com>
Co-authored-by: Michele Dolfi <dol@zurich.ibm.com>
This commit is contained in:
Christoph Auer
2025-10-02 19:35:16 +02:00
committed by GitHub
parent e6c3b05e63
commit ca2be7ff3a
4 changed files with 19 additions and 60 deletions

View File

@@ -829,16 +829,6 @@
"content_layer": "body",
"name": "list",
"label": "list"
},
{
"self_ref": "#/groups/12",
"parent": {
"$ref": "#/tables/6"
},
"children": [],
"content_layer": "body",
"name": "rich_cell_group_7_0_0",
"label": "unspecified"
}
],
"texts": [
@@ -25418,11 +25408,7 @@
"parent": {
"$ref": "#/body"
},
"children": [
{
"$ref": "#/groups/12"
}
],
"children": [],
"content_layer": "body",
"label": "table",
"prov": [
@@ -25445,43 +25431,10 @@
"references": [],
"footnotes": [],
"data": {
"table_cells": [
{
"row_span": 1,
"col_span": 1,
"start_row_offset_idx": 0,
"end_row_offset_idx": 1,
"start_col_offset_idx": 0,
"end_col_offset_idx": 1,
"text": "",
"column_header": false,
"row_header": false,
"row_section": false,
"fillable": false,
"ref": {
"$ref": "#/groups/12"
}
}
],
"num_rows": 1,
"num_cols": 1,
"grid": [
[
{
"row_span": 1,
"col_span": 1,
"start_row_offset_idx": 0,
"end_row_offset_idx": 1,
"start_col_offset_idx": 0,
"end_col_offset_idx": 1,
"text": "",
"column_header": false,
"row_header": false,
"row_section": false,
"fillable": false
}
]
]
"table_cells": [],
"num_rows": 0,
"num_cols": 0,
"grid": []
},
"annotations": []
}