[trunk] Issues with tag "offsetType" read/write (w/ patch)

• Dec 29, 2010 - 18:19
Type
Functional
Severity
S4 - Minor
Status
closed
Project

This patch addresses 2 issues:

Issue 1: the <offsetType> tag is written to file as a string (either "absolute" or "spatium") but read back as a number (either 0 or 1); (cfr. function ElementLayout::writeProperties() with function ElementLayout::readProperties() in file elementlayout.cpp). As a consequence, this tag is always read back as OFFSET_ABS, whatever the original value.

Issue 2: older versions stored this tag sometime as a number (in style definitions) sometime as a string (in text fragments). When older files are read, the former are properly recognized, the latter do not.

Patch: The attached patch modifies the function ElementLayout::readProperties() in file elementlayout.cpp so that it accepts values for this tag both as strings and as numbers. Alpha tested.

Attachment Size
text_offsettype-r3816.patch 1.07 KB

Comments