diff --git a/src/scratchpad/src/org/apache/poi/hslf/model/ActiveXShape.java b/src/scratchpad/src/org/apache/poi/hslf/model/ActiveXShape.java
index 3ba8f6f2d..d82555a80 100644
--- a/src/scratchpad/src/org/apache/poi/hslf/model/ActiveXShape.java
+++ b/src/scratchpad/src/org/apache/poi/hslf/model/ActiveXShape.java
@@ -41,9 +41,6 @@ import org.apache.poi.util.StringUtil;
/**
* Represents an ActiveX control in a PowerPoint document.
- *
- * TODO: finish
- * @author Yegor Kozlov
*/
public final class ActiveXShape extends HSLFPictureShape {
public static final int DEFAULT_ACTIVEX_THUMBNAIL = -1;
@@ -74,10 +71,11 @@ public final class ActiveXShape extends HSLFPictureShape {
*
* @return the created EscherContainerRecord
which holds shape data
*/
+ @Override
protected EscherContainerRecord createSpContainer(int idx, boolean isChild) {
- _escherContainer = super.createSpContainer(idx, isChild);
+ EscherContainerRecord ecr = super.createSpContainer(idx, isChild);
- EscherSpRecord spRecord = _escherContainer.getChildById(EscherSpRecord.RECORD_ID);
+ EscherSpRecord spRecord = ecr.getChildById(EscherSpRecord.RECORD_ID);
spRecord.setFlags(EscherSpRecord.FLAG_HAVEANCHOR | EscherSpRecord.FLAG_HASSHAPETYPE | EscherSpRecord.FLAG_OLESHAPE);
setShapeType(ShapeType.HOST_CONTROL);
@@ -90,7 +88,7 @@ public final class ActiveXShape extends HSLFPictureShape {
HSLFEscherClientDataRecord cldata = getClientData(true);
cldata.addChild(new ExObjRefAtom());
- return _escherContainer;
+ return ecr;
}
/**
@@ -148,6 +146,7 @@ public final class ActiveXShape extends HSLFPictureShape {
return ctrl;
}
+ @Override
protected void afterInsert(HSLFSheet sheet){
ExControl ctrl = getExControl();
ctrl.getExControlAtom().setSlideId(sheet._getSheetNumber());
diff --git a/src/scratchpad/src/org/apache/poi/hslf/model/MovieShape.java b/src/scratchpad/src/org/apache/poi/hslf/model/MovieShape.java
index 5650b2b2d..4452e758c 100644
--- a/src/scratchpad/src/org/apache/poi/hslf/model/MovieShape.java
+++ b/src/scratchpad/src/org/apache/poi/hslf/model/MovieShape.java
@@ -86,8 +86,9 @@ public final class MovieShape extends HSLFPictureShape {
*
* @return the created EscherContainerRecord
which holds shape data
*/
+ @Override
protected EscherContainerRecord createSpContainer(int idx, boolean isChild) {
- _escherContainer = super.createSpContainer(idx, isChild);
+ EscherContainerRecord ecr = super.createSpContainer(idx, isChild);
setEscherProperty(EscherProperties.PROTECTION__LOCKAGAINSTGROUPING, 0x1000100);
setEscherProperty(EscherProperties.FILL__NOFILLHITTEST, 0x10001);
@@ -107,7 +108,7 @@ public final class MovieShape extends HSLFPictureShape {
cldata.addChild(an);
cldata.addChild(info);
- return _escherContainer;
+ return ecr;
}
/**
diff --git a/src/scratchpad/src/org/apache/poi/hslf/model/OLEShape.java b/src/scratchpad/src/org/apache/poi/hslf/model/OLEShape.java
index 13de06d41..4a473ae73 100644
--- a/src/scratchpad/src/org/apache/poi/hslf/model/OLEShape.java
+++ b/src/scratchpad/src/org/apache/poi/hslf/model/OLEShape.java
@@ -33,6 +33,7 @@ import org.apache.poi.hslf.usermodel.HSLFShape;
import org.apache.poi.hslf.usermodel.HSLFSlideShow;
import org.apache.poi.hslf.usermodel.HSLFTextParagraph;
import org.apache.poi.sl.usermodel.ShapeContainer;
+import org.apache.poi.util.POILogFactory;
import org.apache.poi.util.POILogger;
@@ -40,6 +41,8 @@ import org.apache.poi.util.POILogger;
* A shape representing embedded OLE obejct.
*/
public final class OLEShape extends HSLFPictureShape {
+ private static final POILogger LOG = POILogFactory.getLogger(OLEShape.class);
+
private ExEmbed _exEmbed;
/**
@@ -133,7 +136,7 @@ public final class OLEShape extends HSLFPictureShape {
}
}
if (data==null) {
- logger.log(POILogger.WARN, "OLE data not found");
+ LOG.log(POILogger.WARN, "OLE data not found");
}
return data;
@@ -160,7 +163,7 @@ public final class OLEShape extends HSLFPictureShape {
ExObjList lst = ppt.getDocumentRecord().getExObjList(false);
if(lst == null){
- logger.log(POILogger.WARN, "ExObjList not found");
+ LOG.log(POILogger.WARN, "ExObjList not found");
return null;
}
diff --git a/src/scratchpad/src/org/apache/poi/hslf/model/Polygon.java b/src/scratchpad/src/org/apache/poi/hslf/model/Polygon.java
index 9c2cb24ed..5a0b4bff1 100644
--- a/src/scratchpad/src/org/apache/poi/hslf/model/Polygon.java
+++ b/src/scratchpad/src/org/apache/poi/hslf/model/Polygon.java
@@ -51,7 +51,7 @@ public final class Polygon extends HSLFAutoShape {
*/
public Polygon(ShapeContainer
EscherSpgrContainer
which represents a group of shapes
*/
+ @Override
protected EscherContainerRecord createSpContainer(boolean isChild) {
- EscherContainerRecord spgr = new EscherContainerRecord();
- spgr.setRecordId(EscherContainerRecord.SPGR_CONTAINER);
- spgr.setOptions((short)15);
+ EscherContainerRecord ecr = super.createSpContainer(isChild);
+ ecr.setRecordId(EscherContainerRecord.SPGR_CONTAINER);
//The group itself is a shape, and always appears as the first EscherSpContainer in the group container.
EscherContainerRecord spcont = new EscherContainerRecord();
@@ -156,8 +159,8 @@ implements HSLFShapeContainer, GroupShapePicture
@@ -63,7 +63,7 @@ public class HSLFPictureShape extends HSLFSimpleShape implements PictureShape
*/
public abstract class HSLFShape implements Shapenull
for the topmost shapes.
*/
- protected ShapeContainerSheet
this shape belongs to
*/
- protected HSLFSheet _sheet;
+ private HSLFSheet _sheet;
/**
* Fill
*/
- protected HSLFFill _fill;
+ private HSLFFill _fill;
/**
* Create a Shape object. This constructor is used when an existing Shape is read from from a PowerPoint document.
@@ -103,13 +102,20 @@ public abstract class HSLFShape implements ShapeSlideShow
this shape belongs to
*/
+ @Override
public HSLFSheet getSheet(){
return _sheet;
}
@@ -639,11 +647,11 @@ public abstract class HSLFShape implements Shapefalse
otherwise
* @return the record container which holds this shape
*/
+ @Override
protected EscherContainerRecord createSpContainer(boolean isChild) {
- _escherContainer = new EscherContainerRecord();
- _escherContainer.setRecordId( EscherContainerRecord.SP_CONTAINER );
- _escherContainer.setOptions((short)15);
+ EscherContainerRecord ecr = super.createSpContainer(isChild);
+ ecr.setRecordId( EscherContainerRecord.SP_CONTAINER );
EscherSpRecord sp = new EscherSpRecord();
int flags = EscherSpRecord.FLAG_HAVEANCHOR | EscherSpRecord.FLAG_HASSHAPETYPE;
- if (isChild) flags |= EscherSpRecord.FLAG_CHILD;
+ if (isChild) {
+ flags |= EscherSpRecord.FLAG_CHILD;
+ }
sp.setFlags(flags);
- _escherContainer.addChildRecord(sp);
+ ecr.addChildRecord(sp);
AbstractEscherOptRecord opt = new EscherOptRecord();
opt.setRecordId(EscherOptRecord.RECORD_ID);
- _escherContainer.addChildRecord(opt);
+ ecr.addChildRecord(opt);
EscherRecord anchor;
if(isChild) {
@@ -117,9 +119,9 @@ public abstract class HSLFSimpleShape extends HSLFShape implements SimpleShape