--- src/scratchpad/src/org/apache/poi/hslf/model/Picture.java (revision 569826)
+++ src/scratchpad/src/org/apache/poi/hslf/model/Picture.java (working copy)
@@ -75,10 +75,14 @@
* @param idx the index of the picture
*/
public Picture(int idx){
- super(null, null);
- _escherContainer = createSpContainer(idx);
+ this(idx, null);
}
+ public Picture(int idx, Shape parent) {
+ super(null, parent);
+ _escherContainer = createSpContainer(idx, parent instanceof ShapeGroup);
+ }
+
/**
* Create a Picture
object
*
@@ -109,8 +113,8 @@
* @param idx the index of the picture which referes to EscherBSE
container.
* @return the create Picture object
*/
- protected EscherContainerRecord createSpContainer(int idx) {
- EscherContainerRecord spContainer = super.createSpContainer(false);
+ protected EscherContainerRecord createSpContainer(int idx, boolean isChild) {
+ EscherContainerRecord spContainer = super.createSpContainer(isChild);
spContainer.setOptions((short)15);
EscherSpRecord spRecord = spContainer.getChildById(EscherSpRecord.RECORD_ID);