Issue 119443 - [From Symphony]the shape 3D property effect in MS PPT can't be load correctly.
Summary: [From Symphony]the shape 3D property effect in MS PPT can't be load correctly.
Alias: None
Product: Impress
Classification: Application
Component: ui (show other issues)
Version: 3.4.0
Hardware: PC All
: P3 Normal (vote)
Target Milestone: 4.0.0
Assignee: AOO issues mailing list
QA Contact:
Depends on:
Reported: 2012-05-28 08:36 UTC by Du Jing
Modified: 2012-12-26 08:53 UTC (History)
6 users (show)

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

sample file (103.00 KB, application/
2012-05-28 08:38 UTC, Du Jing
no flags Details
Patch for this issue (13.45 KB, patch)
2012-08-10 06:00 UTC, Jianyuan Li
lijianyuan1983: review? (Armin.Le.Grand)
Details | Diff
The second patch for this issue (1.57 KB, patch)
2012-08-13 01:46 UTC, Jianyuan Li
lijianyuan1983: review?
Details | Diff
capture.png (212.12 KB, image/png)
2012-08-20 07:04 UTC, liuping
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Du Jing 2012-05-28 08:36:59 UTC
build info:AOO3.4_1327774

1. open the attachment sample file in AOO3.4
2. check the shape display

it looks different with MS office,and the 3D effect of shape can't be loaded in AOO3.4
Comment 1 Du Jing 2012-05-28 08:38:12 UTC
Created attachment 77628 [details]
sample file
Comment 2 Armin Le Grand 2012-05-29 09:20:18 UTC
ALG: Same in OOo3.3.
Comment 3 Lei Debin 2012-06-05 00:48:49 UTC
I am looking at it
Comment 4 Du Jing 2012-07-13 02:43:26 UTC
change its status~
Comment 5 Jianyuan Li 2012-08-09 02:40:19 UTC
Investigating this issue...
Comment 6 Jianyuan Li 2012-08-09 12:09:31 UTC
Root cause: For line(with arrow) in AOO, 3D effect is not supported. While MS 2003 support this.
Resolution: When import, transform line into poly object and then apply 3D effect to it.
Comment 7 Jianyuan Li 2012-08-10 06:00:41 UTC
Created attachment 78900 [details]
Patch for this issue
Comment 8 Jianyuan Li 2012-08-10 06:05:20 UTC
In the patch, "EnhancedCustomShape3d::Create3DObject" is called to apply 3D effect. In this function, geometry properties(containing 3D) will be obtained directly from SdrObject(custom shape). But those properties cannot be obtained from new created 3D SdrObject(pRet). Actually those props have been set into the SdrObject(its itemset) in "ApplyCustomShapeGeometryAttributes". And then the itemset will be set into SdrObject with "SetMergedItemSet". I have tracked this function, seems that the SdrCustomShapeGeometryItem(directly related to the 3D effect) cannot be set into SdrObject because it is a SFX_ITEM_DEFAULT item(confused). So here I add a parameter for "EnhancedCustomShape3d::Create3DObject" to pass the correct geometry item(SdrCustomShapeGeometryItem).
Comment 9 Armin Le Grand 2012-08-10 08:34:44 UTC
ALG: Hi Jianyuan Li, what items can be set at an SdrObject depends on the range it did use when constructing it's ItemSet. An ItemSet cannot simply store all SfxItems which are registered at the SfxItemPool, but uses a sequence of range values which correspond to Item-IDs.
The ItemSet containing the SdrObjects properties is separated from SdrObject in sdr::properties::BaseProperties. The kind of BaseProperties constructed for an SdrObject depends on it's implementation of CreateObjectSpecificProperties().
The SdrCustomShapeGeometryItem uses the ID SDRATTR_CUSTOMSHAPE_GEOMETRY which is in the SDRATTR_CUSTOMSHAPE_FIRST .. SDRATTR_CUSTOMSHAPE_LAST range. That range is supported in CustomShapeProperties::CreateObjectSpecificItemSet where sdr::properties::CustomShapeProperties get created from SdrObjCustomShape::CreateObjectSpecificProperties(). Thus, your SdrObject needs to be a SdrObjCustomShape to hold a SdrCustomShapeGeometryItem. I would guess that the SdrShape you are using is not of that type. If the SfxItem is not supported by the SdrObject's SfxItemSet, it will be filtered out when SfxItems are put to that SfxItemSet. This is wanted and often used functionality of SfxItemSets.
So please check if the SdrObject where SdrCustomShapeGeometryItem is set is of type SdrObjCustomShape. If not, this is the problem. It should be of that type, other SdrObject types cannot handle this type of item.
HTH! I'll try to look into this issue...
Comment 10 Jianyuan Li 2012-08-13 01:44:50 UTC
Thanks for the clue. I have checked the SdrObject. It is an SdrPathObj which cannot contain a SdrCustomShapeGeometryItem.
According to this hint, I have another solution for this issue. I want to import the line with 3D effects as a SdrObjCustomShape. For its geometry, I simply used msoStraightConnector1. For this, below two advantages appears(comparing the first patch):
1. SdrCustomShapeGeometryItem will be set into item set by ApplyCustomShapeGeometryAttributes. So nothing additional needs be done for filter code.
2. No need to call EnhancedCustomShape3d::Create3DObject because it will be called for custom shape by core(not for line).

I also created the second patch for this. It is new patch which is not based on the first one.
But this patch still cannot import the 3D correctly. 3D effect has been imported. But the effect is not the same like in MS 2003. There are two possibilities: 
1. Custom object should be converted into a poly object. I have tried this with SdrObjCustomShape::ConvertToPolyObj(like the call in first patch). But it does not work. At the same time I think it is not reasonable to convert it into a poly because this will impact the line export for MS 2003(not a line any more). Just with the second patch, the imported 3D line can be exported correctly. Its 3D effect and shape type is the same as original line.
2. For line(custom), it seems that core function will not consider line width when applying 3D effects like MS 2003. Can you help check whether it is possible to consider line width(just for line shape) in EnhancedCustomShape3d::Create3DObject?
Comment 11 Jianyuan Li 2012-08-13 01:46:04 UTC
Created attachment 78911 [details]
The second patch for this issue
Comment 12 Armin Le Grand 2012-08-13 09:05:21 UTC
ALG: Hi Jianyuan Li,
I think the second patch is much better, keeping the data as standard custom shape is the best solution I think, the export will be better and the roundtrip is better. When it is not showing the same as in PPT it is another bug. I would use this patch, set this task to fixed and open another one for the wrong display. What do you think?
Comment 13 Armin Le Grand 2012-08-13 09:28:33 UTC
ALG: Hi Jianyuan Li,
checked the 2nd patch, it does what it should do, import the lines as line custom shapes. Only the first black one does not show the same. The original has only an outline, something we cannot (yet) do for lines. Looking with PPT2007 it seems to be a special style for 3D.
Besides from that when switching off 3d it looks as in the original (also switching off 3D).
I suggest to commit patch two and write a task for the remaining error (3D applied to line custom shapes does not take line attributes into account, or similar).
Comment 14 Jianyuan Li 2012-08-13 09:34:13 UTC
I agree. Please go ahead. Thanks.
Comment 15 SVN Robot 2012-08-14 10:35:44 UTC
"alg" committed SVN revision 1372832 into trunk:
#119443# Import lines from ppt as one poin connectorsPatch by: Jianjuan LiRev...
Comment 16 Armin Le Grand 2012-08-14 10:36:34 UTC
ALG: Comitted, done. For the bad 3D visualisation I wrote follow-up task #120569#.
Comment 17 liuping 2012-08-20 07:04:15 UTC
Created attachment 79006 [details]
Comment 18 liuping 2012-08-20 07:08:35 UTC
Verified on Windows7-64bit with AOO trunk r1374181
the 3-D transparency shape change to black shape,please refer capture.png
Comment 19 Jianyuan Li 2012-08-23 02:16:33 UTC
The issue you mentioned has been fixed by an extension fix for Bug 120569. Please see the comments in it by me and Armin. Please verify this one. Thanks.
Comment 20 Yan Ji 2012-08-28 07:01:15 UTC
Verified against rev r1377620 on windows 7. The problem is fixed.