westonganger/rodf

Incompatible ODS generation (float cell)

krzykos opened this issue · 7 comments

The library generates following XML for float cells:

<table:table-cell office:value-type="float" office:value="1">
</table:table-cell>

On the other hand, LibreOffice does the following:

<table:table-cell office:value-type="float" office:value="11010" calcext:value-type="float">
<text:p>11010</text:p>
</table:table-cell>

As a consequence, some libraries (like https://github.com/roo-rb/roo) fail to load such incompatible ODS.

Please add the p element inside the table-cell element.
The content might be copied from the value attribute.

I haven't checked whether the extra content is required by the ODS specification, but it will definitely improve the compatibility.

Version: 1.1.0

Hmm I just read now that this regarding the inner tag, not calcext I will dig into this.

@krzykos can you please verify if this required change applies to any other cell types?

@westonganger the problem affects only float cells.

@krzykos I have now updated master with the requested changes in d29e6f3. Please test and let me know how it works out.

@westonganger The solution in d29e6f3 works like a charm! :-) Thank you!

I would also be pleased if you released the working version to rubygems.

v1.1.1 is now released which contains these changes.