Apache OpenOffice (AOO) Bugzilla – Issue 100244
Saving PPT as ODP: Parent style not set
Last modified: 2013-08-07 15:20:06 UTC
The attached file, fonttest1.ppt, has a slide with some text in Arial. If this file is saved in ODP format using 3.0.1, it will not display correctly in 3.0.1: The font is shown as Times New Roman. The behaviour depends on the version of OOo used to save and load the document: Load fonttest1.ppt in OOo 2.4, save as fonttest1-oo24.odp -> file can be correctly read by OOo 2.4 and 3.0.1. Load fonttest1.ppt in OOo 3.0.1, save as fonttest1-oo3.odp -> file can be correctly read by OOo 2.4, but 3.0.1 displays the wrong font. I had a look at the changes in the file format. If I apply the following change to content.xml in fonttest1-oo3.odp, the font displays correctly in 3.0.1: --- test-oo3/content.xml 2009-03-13 17:58:26.000000000 +0000 +++ test-oo3hacked/content.xml 2009-03-13 18:03:55.000000000 +0000 @@ -9,7 +9,7 @@ <style:style style:name="dp2" style:family="drawing-page"> <style:drawing-page-properties presentation:display-header="true" presentation:display-footer="true" presentation:display-page-number="false" presentation:display-date-time="true"/> </style:style> - <style:style style:name="gr1" style:family="graphic"> + <style:style style:name="gr1" style:family="graphic" style:parent-style-name="standard"> <style:graphic-properties draw:stroke="none" draw:fill="solid" draw:fill-color="#ffffff" draw:textarea-horizontal-align="justify" draw:textarea-vertical-align="top" draw:auto-grow-height="true" fo:padding-top="0.13cm" fo:padding-bottom="0.13cm" fo:padding-left="0.25cm" fo:padding-right="0.25cm" fo:wrap-option="no-wrap" draw:shadow="hidden" draw:shadow-color="#808080"/> </style:style> <style:style style:name="gr2" style:family="graphic"> So adding the tag 'style:parent-style-name="standard"' would work, but there is another solution - to use the same import logic as in 2.4. I haven't looked at the XML for this in detail. I'll attach these files: fonttest1.ppt - original in PPT format fonttest1-oo24.odp - saved using OOo 2.4, loads correctly in 2.4 and 3.0.1 fonttest1-oo3.odp - saved using OOo 3.0.1, only loads correctly in 2.4 fonttest1-oo3-hacked.odp - added style:parent-style-name to fonttest1-oo3.odp, loads correctly in 2.4 and 3.0.1.
Created attachment 60956 [details] PPT testcase
Created attachment 60957 [details] PPT file exported using OOo 2.4
Created attachment 60958 [details] PPT file exported using OOo 3.0.1; shows bug when loaded in 3.0.1
Created attachment 60959 [details] Modified version of fonttest1-oo3.odp, patched by hand to load correctly in 3.0.1
Reproducible. Reassigned.
haggai->cl: Do you have any ideas which change could have caused this? If you can help narrow it down I can take another look.
cl->sj: I kind of already fixed this issue as I recently changed the behavior to always apply a style to a shape when loaded with xml by using the default style if none is set in the document. But anyway, the ppt import should not create documents where shapes have no style set.