Bug 282617 - <style:graphic-properties fo:padding-*/> support
Summary: <style:graphic-properties fo:padding-*/> support
Status: RESOLVED FIXED
Alias: None
Product: calligracommon
Classification: Applications
Component: text-layout (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Calligra Bugs
URL:
Keywords:
Depends on:
Blocks: 276188
  Show dependency treegraph
 
Reported: 2011-09-23 13:58 UTC by Matus Uzak
Modified: 2012-06-15 08:54 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
An ODP test file produced by the powerpoint filter. (4.68 KB, application/vnd.oasis.opendocument.presentation)
2011-09-23 13:58 UTC, Matus Uzak
Details
The original MS PowserPoint 2003 test file. (142.50 KB, application/vnd.ms-powerpoint)
2011-09-23 13:58 UTC, Matus Uzak
Details
Screen-shot of the original test file displayed by MS PowerPoint 2003 (75.63 KB, image/png)
2011-09-23 14:05 UTC, Matus Uzak
Details
Screen-shot of the test file displayed by Stage. (160.73 KB, image/png)
2011-09-23 14:06 UTC, Matus Uzak
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matus Uzak 2011-09-23 13:58:14 UTC
Created attachment 63890 [details]
An ODP test file produced by the powerpoint filter.

Version:           unspecified
OS:                Linux

At the moment fo:padding-* attributes do not seem to be supported.

Reproducible: Always

Steps to Reproduce:
1. Open the ODP file in stage.
2. Check the padding inside of the frame. Attributes fo:padding-left and fo:padding-right are set to 7.125039pt, attributes fo:padding-top and fo:padding-bottom are set to 14.4pt.

Actual Results:  
There's no padding inside of the frame. 

Expected Results:  
Correct padding should be set for the frame.
Comment 1 Matus Uzak 2011-09-23 13:58:52 UTC
Created attachment 63891 [details]
The original MS PowserPoint 2003 test file.
Comment 2 Matus Uzak 2011-09-23 14:05:32 UTC
Created attachment 63892 [details]
Screen-shot of the original test file displayed by MS PowerPoint 2003
Comment 3 Matus Uzak 2011-09-23 14:06:02 UTC
Created attachment 63893 [details]
Screen-shot of the test file displayed by Stage.
Comment 4 T Zachmann 2011-09-25 04:53:34 UTC
Analysis of the problem showed that the properties for the text frames are stored as graphic-properties. This is correct and should not be changed. However the paragraph only reads this properties from paragraph-properties. Changing this to read graphic-properties works for files created by the ppt filter but breaks loading of files created by OpenOffice which has graphic-properites but also sets some stuff in the parent in paragraph-properties. Let me check if there is a better was to approach this.
Comment 5 T Zachmann 2011-10-02 12:04:17 UTC
Git commit e99f47c4ad1c55bdfa251fac3992da00f1921e4e by Thorsten Zachmann.
Committed on 02/10/2011 at 13:43.
Pushed by zachmann into branch 'master'.

Add load style properties from multiple properties.

For embedded text shapes paragraph style properties can be saved in style:paragraph-properties
or in graphic:paragraph-properties. It is also possible that some values are in one and others
are in the other e.g. in parent styles.

This patch add the possibilty to load the properties from more then one property type.

This partly fixes bug 282617. It is not fully fixed as not all properties are used by the text
shape yet.

fo:padding-top and fo:padding-bottom seem to be not yet supported.

CCBUG: 282617
REVIEW: 102737

M  +11   -1    libs/kotext/styles/KoParagraphStyle.cpp
M  +59   -33   libs/odf/KoStyleStack.cpp
M  +8    -1    libs/odf/KoStyleStack.h

http://commits.kde.org/calligra/e99f47c4ad1c55bdfa251fac3992da00f1921e4e
Comment 6 Inge Wallin 2012-05-11 22:25:42 UTC
This is a textshape bug.
Comment 7 Camilla Boemann 2012-06-15 08:54:54 UTC
Git commit d5f576d2309a2f2360f7d99634b68a9924de6452 by C. Boemann.
Committed on 12/06/2012 at 02:47.
Pushed by boemann into branch 'master'.

paragraph style shouldn't read graphics-properties
This fixes a problem where the frame border is read to mean a paragraph border
We also load padding into the textshapedata and use it

M  +1    -12   libs/kotext/styles/KoParagraphStyle.cpp
M  +107  -0    libs/textlayout/KoTextShapeData.cpp
M  +10   -0    libs/textlayout/KoTextShapeData.h
M  +8    -2    plugins/textshape/SimpleRootAreaProvider.cpp
M  +1    -0    plugins/textshape/TextShape.cpp
M  +9    -4    words/part/KWRootAreaProvider.cpp

http://commits.kde.org/calligra/d5f576d2309a2f2360f7d99634b68a9924de6452