Allow files exported by LibreOffice to validate
ClosedPublic

Authored by davidllewellynjones on Nov 11 2019, 1:19 PM.

Details

Summary

An apparent bug in the LibreOffice PPT exporter makes it output files which technically don't conform to the PPT specification.

When loading a drawing each text paragraph in the drawing has a TextPFRun structure ("A structure that specifies the paragraph-level formatting of a run of text"). This starts with a mask, followed by a sequence of fields. Only unmasked fields are included in the sequence.

According to Section 2.9.45 of the PPT specification version 6, the following fields must be masked out:

masks.leftMargin
masks.indent
masks.defaultTabSize
masks.tabStops

In spite of this LibreOffice incorrectly includes the leftMargin and indent fields (flags 0x100 and 0x400).

This patch loosens PPT requirements to allow files with these flags set to pass validation.

The corresponding Calligra patch to apply this change is here.

Diff Detail

Repository
R664 Binary Schema Handling
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
davidllewellynjones requested review of this revision.Nov 11 2019, 1:19 PM
davidllewellynjones created this revision.
davidllewellynjones edited the summary of this revision. (Show Details)

Seems reasonable to me. I'll approve later if no-one objects.

pvuorela accepted this revision.Nov 19 2019, 12:34 PM
This revision is now accepted and ready to land.Nov 19 2019, 12:34 PM
This revision was automatically updated to reflect the committed changes.