Issue 100244 - Saving PPT as ODP: Parent style not set
Summary: Saving PPT as ODP: Parent style not set
Status: CONFIRMED
Alias: None
Product: Impress
Classification: Application
Component: save-export (show other issues)
Version: OOo 3.0.1
Hardware: PC All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-16 18:56 UTC by chris
Modified: 2013-08-07 15:20 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
PPT testcase (10.50 KB, application/vnd.ms-powerpoint)
2009-03-16 18:57 UTC, chris
no flags Details
PPT file exported using OOo 2.4 (11.91 KB, application/vnd.sun.xml.impress)
2009-03-16 18:57 UTC, chris
no flags Details
PPT file exported using OOo 3.0.1; shows bug when loaded in 3.0.1 (11.66 KB, application/vnd.sun.xml.impress)
2009-03-16 18:58 UTC, chris
no flags Details
Modified version of fonttest1-oo3.odp, patched by hand to load correctly in 3.0.1 (12.15 KB, application/vnd.sun.xml.impress)
2009-03-16 18:59 UTC, chris
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description chris 2009-03-16 18:56:21 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.
Comment 1 chris 2009-03-16 18:57:06 UTC
Created attachment 60956 [details]
PPT testcase
Comment 2 chris 2009-03-16 18:57:41 UTC
Created attachment 60957 [details]
PPT file exported using OOo 2.4
Comment 3 chris 2009-03-16 18:58:26 UTC
Created attachment 60958 [details]
PPT file exported using OOo 3.0.1; shows bug when loaded in 3.0.1
Comment 4 chris 2009-03-16 18:59:02 UTC
Created attachment 60959 [details]
Modified version of fonttest1-oo3.odp, patched by hand to load correctly in 3.0.1
Comment 5 wolframgarten 2009-03-17 09:09:24 UTC
Reproducible. Reassigned.
Comment 6 chris 2009-03-20 13:36:48 UTC
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.
Comment 7 clippka 2009-04-27 15:44:53 UTC
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.