Bug 45534 - ODF export: invalid "draw:fit-to-size" values in ODF 1.1/1.2 mode
Summary: ODF export: invalid "draw:fit-to-size" values in ODF 1.1/1.2 mode
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Libreoffice (show other bugs)
Version: Master old -3.6
Hardware: All All
: medium normal
Assignee: Michael Stahl
QA Contact:
URL:
Whiteboard: target:3.4.6 target:3.5.1 target:3.6....
Keywords: regression
: 49618 49916 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-02-02 03:42 UTC by Michael Stahl
Modified: 2014-12-09 20:27 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments
bugdoc with a bunch of text boxes (13.14 KB, application/vnd.oasis.opendocument.presentation)
2012-02-02 03:42 UTC, Michael Stahl
Details

Description Michael Stahl 2012-02-02 03:42:08 UTC
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.
Comment 1 Thorsten Behrens 2012-02-02 05:41:31 UTC
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?
Comment 2 Michael Stahl 2012-02-02 09:51:53 UTC
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
Comment 3 Michael Stahl 2012-02-02 10:05:07 UTC
have added something to the wiki page, please review...
Comment 4 Thorsten Behrens 2012-02-02 12:36:25 UTC
(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! :)
Comment 5 Thorsten Behrens 2012-02-02 12:47:40 UTC
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.
Comment 7 Michael Stahl 2012-09-13 14:12:01 UTC
*** Bug 49618 has been marked as a duplicate of this bug. ***
Comment 8 Michael Stahl 2012-09-13 14:20:04 UTC
*** Bug 49916 has been marked as a duplicate of this bug. ***
Comment 9 sasha.libreoffice 2012-09-13 15:28:53 UTC
Thanks for fixing this bug


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.