protected CTShape newCommentShape(){ CTShape shape = CTShape.Factory.newInstance(); shape.setId("_x0000_s" + (++_shapeId)); shape.setType("#" + _shapeTypeId); shape.setStyle("position:absolute; visibility:hidden"); shape.setFillcolor("#ffffe1"); shape.setInsetmode(STInsetMode.AUTO); shape.addNewFill().setColor("#ffffe1"); CTShadow shadow = shape.addNewShadow(); shadow.setOn(STTrueFalse.T); shadow.setColor("black"); shadow.setObscured(STTrueFalse.T); shape.addNewPath().setConnecttype(STConnectType.NONE); shape.addNewTextbox().setStyle("mso-direction-alt:auto"); CTClientData cldata = shape.addNewClientData(); cldata.setObjectType(STObjectType.NOTE); cldata.addNewMoveWithCells(); cldata.addNewSizeWithCells(); cldata.addNewAnchor().setStringValue("1, 15, 0, 2, 3, 15, 3, 16"); cldata.addNewAutoFill().setStringValue("False"); cldata.addNewRow().setBigIntegerValue(new BigInteger("0")); cldata.addNewColumn().setBigIntegerValue(new BigInteger("0")); _items.add(shape); _qnames.add(QNAME_SHAPE); return shape; }
protected CTShape newCommentShape(){ CTShape shape = CTShape.Factory.newInstance(); shape.setId("_x0000_s" + (++_shapeId)); shape.setType("#" + _shapeTypeId); shape.setStyle("position:absolute; visibility:hidden"); shape.setFillcolor("#ffffe1"); shape.setInsetmode(STInsetMode.AUTO); shape.addNewFill().setColor("#ffffe1"); CTShadow shadow = shape.addNewShadow(); shadow.setOn(STTrueFalse.T); shadow.setColor("black"); shadow.setObscured(STTrueFalse.T); shape.addNewPath().setConnecttype(STConnectType.NONE); shape.addNewTextbox().setStyle("mso-direction-alt:auto"); CTClientData cldata = shape.addNewClientData(); cldata.setObjectType(STObjectType.NOTE); cldata.addNewMoveWithCells(); cldata.addNewSizeWithCells(); cldata.addNewAnchor().setStringValue("1, 15, 0, 2, 3, 15, 3, 16"); cldata.addNewAutoFill().setStringValue("False"); cldata.addNewRow().setBigIntegerValue(new BigInteger("0")); cldata.addNewColumn().setBigIntegerValue(new BigInteger("0")); _items.add(shape); _qnames.add(QNAME_SHAPE); return shape; }
CTTxbxContent ctTxbxContent = ctShape.addNewTextbox().addNewTxbxContent(); XWPFParagraph textboxparagraph = new XWPFParagraph(ctTxbxContent.addNewP(), (IBody)header); XWPFRun textboxrun = textboxparagraph.createRun(); ctTxbxContent = ctShape.addNewTextbox().addNewTxbxContent(); textboxparagraph = new XWPFParagraph(ctTxbxContent.addNewP(), (IBody)header); textboxrun = textboxparagraph.createRun();