ooxml_parser
ooxml_parser copied to clipboard
[7.5] Failure/Error: parser on editor incorrectly parses custom `table` properties
I was gathering files with a script for builder and found this scenario
The set shade property (correctly displayed in the document) is not an attribute of the ooxml-parser object
docx.elements[1].properties.table_style.table_style_properties_list
.first.table_cell_properties.shade
result
Failure/Error:
expect(docx.elements[1].properties.table_style.table_style_properties_list
.first.table_cell_properties.shade.color.upcase)
NoMethodError:
undefined method `color' for nil:NilClass
Looked inside the documents and found that the style id set for the first cell
<tblStyle w:val="1_634" />
Accordingly, in the styles.xml file we find out that in version 7.5 the supported properties have been significantly extended, but
table column property is written correctly
<tcPr>
<shd w:val="clear" w:color="ff0000" w:fill="ff0000" />
<tcBorders>
</tcBorders>
</tcPr>
Here are two files compiled by one script on different versions of the editor for comparison purposes