poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 60662] New: Slide import delete unrecognized elements in group shape
Date Mon, 30 Jan 2017 10:39:57 GMT
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


Mime
View raw message