Allow files exported by LibreOffice to validate

Authored by pvuorela on Nov 19 2019, 1:42 PM.

Description

Allow files exported by LibreOffice to validate

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.

Reviewers: vandenoever, pvuorela, dcaliste

Reviewed By: pvuorela

Subscribers: davidllewellynjones

Differential Revision: https://phabricator.kde.org/D25259

Details

Committed
pvuorelaNov 19 2019, 1:42 PM
Reviewer
pvuorela
Differential Revision
D25259: Allow files exported by LibreOffice to validate
Parents
R664:703798020de7: Allow arrays only for struct members of type struct for now
Branches
Unknown
Tags
Unknown
References
HEAD -> master