Created attachment 56509 [details] bugdoc with a bunch of text boxes shapes.odp/styles.xml[132,129]: Error: attribute "draw:fit-to-size" has a bad value. Possible values are: false,true but here we have: draw:fit-to-size="shrink-to-fit" in ODF 1.1 and 1.2 this attribute is of type boolean. This is a regression introduced with e479f47f7d48dbd0d701bf347b6a2d5121ba3d34.
Heh - seems this is missing from http://wiki.documentfoundation.org/Development/ODF_Implementer_Notes - then again, extensions to style properties are permitted under ODF1.0/1.1 conformance rules, which validator in particular is complaining?
perhaps adding new attributes may be allowed (probably not in ODF namespaces), but i'll believe that it is allowed to write values that are not specified into attributes that are specified when you cite the sentence in the spec that allows it :) fixed on master: 6c15b856242127ddca766da700002489ba287e21
have added something to the wiki page, please review...
(In reply to comment #2) > perhaps adding new attributes may be allowed (probably not in ODF namespaces), > but i'll believe that it is allowed to write values that are not specified > into attributes that are specified when you cite the sentence in the > spec that allows it :) > Here we go: http://docs.oasis-open.org/office/v1.1/OS/OpenDocument-v1.1-html/OpenDocument-v1.1.html#1.5.Document%20Processing%20and%20Conformance|outline "The various <style:*-properties> elements (see section 15) may have arbitrary attributes attached and may have arbitrary element content. All attributes attached to these elements and elements contained within these elements should be preserved (see section 15.1.3);" Also, there is this: "There are no rules regarding the elements and attributes that actually have to be supported by conforming applications, except that applications should not use foreign elements and attributes for features defined in the OpenDocument schema." Thanks for the fix though! :)
Sadly, 1.2 is eerily different (both stricter & more relaxed at the same time) - for unknown attribute values, though, there's this processing recommendation: http://docs.oasis-open.org/office/v1.2/part1/cd04/OpenDocument-v1.2-part1-cd04.html#a_21_1_Foreign_Elements_and_Attributes "OpenDocument consumers should be able to parse and interpret documents that contain attribute values not defined by the OpenDocument schema. If an attribute which has such a non defined value has a default value, then a conforming consumer should assume that the attribute has this value. Otherwise, a conforming consumer should ignore the attribute." So while for ODF1.2, the behaviour would fall under conformant extended, ODF1.1 has no such notion, writing that would simply be conformant.
fixed in libreoffice-3-5: http://cgit.freedesktop.org/libreoffice/core/commit/?h=libreoffice-3-5&id=dae8fff9289edbfda3317bd19acd233400528a95 fixed in libreoffice-3-4: http://cgit.freedesktop.org/libreoffice/libs-core/commit/?h=libreoffice-3-4&id=2fb5f7cf09f33b7ae924b07dac45bf3e698da90c
*** Bug 49618 has been marked as a duplicate of this bug. ***
*** Bug 49916 has been marked as a duplicate of this bug. ***
Thanks for fixing this bug
In an ODP file generated by LibreOffice 5.1 still failed to pass the https://odf-validator.rhcloud.com/ validator with the same problem: csunplugged.odp/styles.xml[2,43906]: Error: attribute "draw:fit-to-size" has a bad value. Possible values are: false,true csunplugged.odp/styles.xml[2,62084]: Error: attribute "draw:fit-to-size" has a bad value. Possible values are: false,true csunplugged.odp/styles.xml[2,81512]: Error: attribute "draw:fit-to-size" has a bad value. Possible values are: false,true csunplugged.odp/styles.xml[2,100421]: Error: attribute "draw:fit-to-size" has a bad value. Possible values are: false,true csunplugged.odp/styles.xml[2,166765]: Error: attribute "draw:fit-to-size" has a bad value. Possible values are: false,true csunplugged.odp/styles.xml[2,185713]: Error: attribute "draw:fit-to-size" has a bad value. Possible values are: false,true This may happen when copying slides from other (odp) files which would cause a dialog asking if it should fit the size of the current file. The file will be attached soon.
Created attachment 133667 [details] ODP file which contains "shrink-to-fit" value in attribute "fit-to-size"
Setting Assignee back to default. Please assign it back to yourself if you're still working on this issue
this bug was about the invalid value being exported to ODF 1.1 and ODF 1.2 documents - which was fixed by exporting "true" instead of "shrink-to-fit". the case that is still buggy is the export to ODF 1.2 extended, for which a different attribute should be used for the "shrink-to-fit" value - but for this there already is bug 97630.