Apache OpenOffice (AOO) Bugzilla – Full Text Issue Listing |
Summary: | [From Symphony]the shape 3D property effect in MS PPT can't be load correctly. | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Impress | Reporter: | Du Jing <bjdujing> | ||||||||||
Component: | ui | Assignee: | AOO issues mailing list <issues> | ||||||||||
Status: | CLOSED FIXED | QA Contact: | |||||||||||
Severity: | Normal | ||||||||||||
Priority: | P3 | CC: | Armin.Le.Grand, debin.lei, doneyourself, lijiany, lijianyuan1983, liushenf | ||||||||||
Version: | 3.4.0 | ||||||||||||
Target Milestone: | 4.0.0 | ||||||||||||
Hardware: | PC | ||||||||||||
OS: | All | ||||||||||||
Issue Type: | DEFECT | Latest Confirmation in: | --- | ||||||||||
Developer Difficulty: | --- | ||||||||||||
Attachments: |
|
Description
Du Jing
2012-05-28 08:36:59 UTC
Created attachment 77628 [details]
sample file
ALG: Same in OOo3.3. I am looking at it change its status~ Investigating this issue... 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. Created attachment 78900 [details]
Patch for this issue
@Armin: 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). 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... @Armin: 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? Created attachment 78911 [details]
The second patch for this issue
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? 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). @Armin: I agree. Please go ahead. Thanks. "alg" committed SVN revision 1372832 into trunk: #119443# Import lines from ppt as one poin connectorsPatch by: Jianjuan LiRev... ALG: Comitted, done. For the bad 3D visualisation I wrote follow-up task #120569#. Created attachment 79006 [details]
capture.png
Verified on Windows7-64bit with AOO trunk r1374181 the 3-D transparency shape change to black shape,please refer capture.png @liupingtan: 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. Verified against rev r1377620 on windows 7. The problem is fixed. |