You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2017/01/30 10:39:57 UTC

[Bug 60662] New: Slide import delete unrecognized elements in group shape

https://bz.apache.org/bugzilla/show_bug.cgi?id=60662

            Bug ID: 60662
           Summary: Slide import delete unrecognized elements in group
                    shape
           Product: POI
           Version: 3.16-dev
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HSLF
          Assignee: dev@poi.apache.org
          Reporter: amanteaux+bzapache@gmail.com
  Target Milestone: ---

If I try to import a slide that contains a group of shapes, these contained
shapes will lost all the properties that are not handled by POI: shadow (and
everything in a:effectLst) etc.

However, if contained shapes are ungrouped, then these non-handled properties
are kept and all is working fine.

The issue comes from XSLFGroupShape.copy(source): it removes all its shapes and
reconstruct it all. Whereas in XSLFSheet.importContent(), all the shapes are
kept but just "updated", not removed and recreated.

Is there a reason why the implementation of XSLFGroupShape.copy(source) is not
the same as XSLFSheet.importContent():
XSLFGroupShape gr = (XSLFGroupShape)src;

List<XSLFShape> tgtShapes = getShapes();
List<XSLFShape> srcShapes = gr.getShapes();
for(int i = 0; i < tgtShapes.size(); i++){
    XSLFShape s1 = srcShapes.get(i);
    XSLFShape s2 = tgtShapes.get(i);

    s2.copy(s1);
}


If I try to use this implementation all is working as expected. However I
wonder, did I miss something?

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 60662] Slide import delete unrecognized elements in group shape

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60662

Andreas Beeker <ki...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #2 from Andreas Beeker <ki...@apache.org> ---
Patched via r1783486

Thanks for the example files.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 60662] Slide import delete unrecognized elements in group shape

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60662

Aurélien <am...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|HSLF                        |XSLF
                 OS|                            |All

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 60662] Slide import delete unrecognized elements in group shape

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60662

Dmitry Pelevin <dp...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dpelevin@gmail.com

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 60662] Slide import delete unrecognized elements in group shape

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60662

--- Comment #1 from Dmitry Pelevin <dp...@gmail.com> ---
Created attachment 34756
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=34756&action=edit
Minimal project to reproduce the bug.

Please check this maven project to reproduce the bug.

You can run it with "mvn clean package && mvn exec:java".

It will insert slide from "src\main\resources\source.pptx" to
"src\main\resources\template.pptx" and output will be generated as
"merged.pptx" in the current directory.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org