hi.
when creating textbox, the below method is used.
HSSFPatriarch.java
HSSFTextbox createTextbox(HSSFClientAnchor anchor)
But HSSFTextbox(extended from HSSFShape) has only HSSFAnchor which don't have
row and column information.
So when people want to know the location of textbox, the way to do is
complicated.
http://mail-archives.apache.org/mod_mbox/poi-user/201006.mbox/%[email protected]%3e
in EsherAggregate.java
private void convertRecordsToUserModel(EscherContainerRecord shapeContainer,
Object model) {
for(Iterator it = shapeContainer.getChildIterator(); it.hasNext();) {
EscherRecord r = it.next();
else if(r instanceof EscherClientAnchorRecord) {
EscherClientAnchorRecord car = (EscherClientAnchorRecord)r;
if(model instanceof HSSFShape) {
HSSFShape g = (HSSFShape)model;
g.getAnchor().setDx1(car.getDx1());
g.getAnchor().setDx2(car.getDx2());
g.getAnchor().setDy1(car.getDy1());
g.getAnchor().setDy2(car.getDy2());
} else {
throw new IllegalStateException("Got top level anchor but not processing a
group or shape");
}
}
In EsherAggregate.java, HSSFAnchor is set without column, row information
althought EscherClientAnchorRecord has those.
How about this idea?
If there is something wrong, please inform me that.
thanks.