Bug 35190 - Invalid ODF markup saved in tables
Summary: Invalid ODF markup saved in tables
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
3.3.1 release
Hardware: All All
: medium normal
Assignee: Thorsten Behrens (allotropia)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-10 17:32 UTC by Chris Rae [MSFT]
Modified: 2011-10-28 07:00 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Sample file (details of how to create it also in description) (13.04 KB, application/vnd.oasis.opendocument.presentation)
2011-03-10 17:32 UTC, Chris Rae [MSFT]
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Rae [MSFT] 2011-03-10 17:32:12 UTC
Created attachment 44334 [details]
Sample file (details of how to create it also in description)

Impress saves invalid ODF markup in tables in certain circumstances.

Repro:

1. Create a new presentation in Impress
2. Insert a table (size doesn't matter)
3. Save as ODP

Unpack the file. Inside \styles.xml is:


    <table:table-template text:style-name="default">
      <table:first-row text:style-name="gray3"/>
      ...

This is invalid markup according to ODF 1.2. In the ODF 1.2 schemas, text:style-name cannot live in table:first-row (it should be table:style-name instead):

       <define name="table-first-row">
              <element name="table:first-row">
                     <ref name="common-table-template-attlist"/>
                     <empty/>
              </element>
       </define>

       ...

       <define name="common-table-template-attlist">
              <attribute name="table:style-name">
                     <ref name="styleNameRef"/>
              </attribute>
              <optional>
                     <attribute name="table:paragraph-style-name">
                           <ref name="styleNameRef"/>
                     </attribute>
              </optional>
       </define>


Suggested fix: Use table:style-name inside tables instead.
Comment 1 Thorsten Behrens (allotropia) 2011-03-11 01:21:54 UTC
Confirmed, Taking over.
Comment 2 Chris Rae [MSFT] 2011-03-16 15:13:40 UTC
I've also filed this for OpenOffice.org (http://openoffice.org/bugzilla/show_bug.cgi?id=117414).
Comment 3 Thorsten Behrens (allotropia) 2011-10-28 07:00:31 UTC
Fixed with f7d9e0526ce69e2fa9801a04137737046784cbe2 on master (to-be-3.5). Thanks Chris for noticing.