Lines 31-37
Link Here
|
31 |
import org.apache.poi.poifs.filesystem.DirectoryNode; |
31 |
import org.apache.poi.poifs.filesystem.DirectoryNode; |
32 |
import org.apache.poi.poifs.filesystem.Ole10Native; |
32 |
import org.apache.poi.poifs.filesystem.Ole10Native; |
33 |
import org.apache.poi.poifs.filesystem.POIFSFileSystem; |
33 |
import org.apache.poi.poifs.filesystem.POIFSFileSystem; |
34 |
import org.apache.poi.ss.usermodel.ClientAnchor; |
34 |
import org.apache.poi.ss.usermodel.ClientAnchor.AnchorType; |
35 |
import org.apache.poi.ss.usermodel.CreationHelper; |
35 |
import org.apache.poi.ss.usermodel.CreationHelper; |
36 |
import org.apache.poi.util.LocaleUtil; |
36 |
import org.apache.poi.util.LocaleUtil; |
37 |
import org.junit.Test; |
37 |
import org.junit.Test; |
Lines 88-112
Link Here
|
88 |
CreationHelper ch = wb1.getCreationHelper(); |
88 |
CreationHelper ch = wb1.getCreationHelper(); |
89 |
HSSFClientAnchor anchor = (HSSFClientAnchor)ch.createClientAnchor(); |
89 |
HSSFClientAnchor anchor = (HSSFClientAnchor)ch.createClientAnchor(); |
90 |
anchor.setAnchor((short)(2+coloffset), 1+rowoffset, 0, 0, (short)(3+coloffset), 5+rowoffset, 0, 0); |
90 |
anchor.setAnchor((short)(2+coloffset), 1+rowoffset, 0, 0, (short)(3+coloffset), 5+rowoffset, 0, 0); |
91 |
anchor.setAnchorType(ClientAnchor.DONT_MOVE_AND_RESIZE); |
91 |
anchor.setAnchorType(AnchorType.DONT_MOVE_AND_RESIZE); |
92 |
|
92 |
|
93 |
patriarch.createObjectData(anchor, pptIdx, imgPPT); |
93 |
patriarch.createObjectData(anchor, pptIdx, imgPPT); |
94 |
|
94 |
|
95 |
anchor = (HSSFClientAnchor)ch.createClientAnchor(); |
95 |
anchor = (HSSFClientAnchor)ch.createClientAnchor(); |
96 |
anchor.setAnchor((short)(5+coloffset), 1+rowoffset, 0, 0, (short)(6+coloffset), 5+rowoffset, 0, 0); |
96 |
anchor.setAnchor((short)(5+coloffset), 1+rowoffset, 0, 0, (short)(6+coloffset), 5+rowoffset, 0, 0); |
97 |
anchor.setAnchorType(ClientAnchor.DONT_MOVE_AND_RESIZE); |
97 |
anchor.setAnchorType(AnchorType.DONT_MOVE_AND_RESIZE); |
98 |
|
98 |
|
99 |
patriarch.createObjectData(anchor, xlsIdx, imgIdx); |
99 |
patriarch.createObjectData(anchor, xlsIdx, imgIdx); |
100 |
|
100 |
|
101 |
anchor = (HSSFClientAnchor)ch.createClientAnchor(); |
101 |
anchor = (HSSFClientAnchor)ch.createClientAnchor(); |
102 |
anchor.setAnchor((short)(3+coloffset), 10+rowoffset, 0, 0, (short)(5+coloffset), 11+rowoffset, 0, 0); |
102 |
anchor.setAnchor((short)(3+coloffset), 10+rowoffset, 0, 0, (short)(5+coloffset), 11+rowoffset, 0, 0); |
103 |
anchor.setAnchorType(ClientAnchor.DONT_MOVE_AND_RESIZE); |
103 |
anchor.setAnchorType(AnchorType.DONT_MOVE_AND_RESIZE); |
104 |
|
104 |
|
105 |
patriarch.createObjectData(anchor, txtIdx, imgIdx); |
105 |
patriarch.createObjectData(anchor, txtIdx, imgIdx); |
106 |
|
106 |
|
107 |
anchor = (HSSFClientAnchor)ch.createClientAnchor(); |
107 |
anchor = (HSSFClientAnchor)ch.createClientAnchor(); |
108 |
anchor.setAnchor((short)(1+coloffset), -2+rowoffset, 0, 0, (short)(7+coloffset), 14+rowoffset, 0, 0); |
108 |
anchor.setAnchor((short)(1+coloffset), -2+rowoffset, 0, 0, (short)(7+coloffset), 14+rowoffset, 0, 0); |
109 |
anchor.setAnchorType(ClientAnchor.DONT_MOVE_AND_RESIZE); |
109 |
anchor.setAnchorType(AnchorType.DONT_MOVE_AND_RESIZE); |
110 |
|
110 |
|
111 |
HSSFSimpleShape circle = patriarch.createSimpleShape(anchor); |
111 |
HSSFSimpleShape circle = patriarch.createSimpleShape(anchor); |
112 |
circle.setShapeType(HSSFSimpleShape.OBJECT_TYPE_OVAL); |
112 |
circle.setShapeType(HSSFSimpleShape.OBJECT_TYPE_OVAL); |