use of org.apache.poi.ddf.AbstractEscherOptRecord in project poi by apache.
the class HSLFTextShape method setTextRotation.
@Override
public void setTextRotation(Double rotation) {
AbstractEscherOptRecord opt = getEscherOptRecord();
if (rotation == null) {
opt.removeEscherProperty(EscherProperties.TEXT__FONTROTATION);
} else {
int rot = (int) (Math.round(rotation / 90.) % 4L);
setEscherProperty(EscherProperties.TEXT__FONTROTATION, rot);
}
}
use of org.apache.poi.ddf.AbstractEscherOptRecord in project poi by apache.
the class HSLFTableCell method createSpContainer.
@Override
protected EscherContainerRecord createSpContainer(boolean isChild) {
EscherContainerRecord ecr = super.createSpContainer(isChild);
AbstractEscherOptRecord opt = getEscherOptRecord();
setEscherProperty(opt, EscherProperties.TEXT__TEXTID, 0);
setEscherProperty(opt, EscherProperties.TEXT__SIZE_TEXT_TO_FIT_SHAPE, 0x20000);
setEscherProperty(opt, EscherProperties.FILL__NOFILLHITTEST, 0x150001);
setEscherProperty(opt, EscherProperties.SHADOWSTYLE__SHADOWOBSURED, 0x20000);
setEscherProperty(opt, EscherProperties.PROTECTION__LOCKAGAINSTGROUPING, 0x40000);
return ecr;
}
use of org.apache.poi.ddf.AbstractEscherOptRecord in project poi by apache.
the class TestBackground method getFillPictureRefCount.
private int getFillPictureRefCount(HSLFShape shape, HSLFFill fill) {
AbstractEscherOptRecord opt = shape.getEscherOptRecord();
EscherSimpleProperty p = HSLFShape.getEscherProperty(opt, EscherProperties.FILL__PATTERNTEXTURE);
if (p != null) {
int idx = p.getPropertyValue();
HSLFSheet sheet = shape.getSheet();
HSLFSlideShow ppt = sheet.getSlideShow();
Document doc = ppt.getDocumentRecord();
EscherContainerRecord dggContainer = doc.getPPDrawingGroup().getDggContainer();
EscherContainerRecord bstore = HSLFShape.getEscherChild(dggContainer, EscherContainerRecord.BSTORE_CONTAINER);
List<EscherRecord> lst = bstore.getChildRecords();
return ((EscherBSERecord) lst.get(idx - 1)).getRef();
}
return 0;
}
Aggregations