aboutsummaryrefslogtreecommitdiffstats
path: root/src/testcases/org/apache/poi/hssf/model/TestHSSFAnchor.java
diff options
context:
space:
mode:
authorJaven O'Neal <onealj@apache.org>2015-11-25 07:16:43 +0000
committerJaven O'Neal <onealj@apache.org>2015-11-25 07:16:43 +0000
commitef017d70c17b663c17bd52773b0b09a5f67c22fe (patch)
tree94f43ba39ca5a9e818e38243eb5d204d58f9f00b /src/testcases/org/apache/poi/hssf/model/TestHSSFAnchor.java
parent54c2a6bbce184e9dfa5771b0320988a9835cee82 (diff)
downloadpoi-ef017d70c17b663c17bd52773b0b09a5f67c22fe.tar.gz
poi-ef017d70c17b663c17bd52773b0b09a5f67c22fe.zip
bug 58636: upgrade anchor types from int to AnchorType enum
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1716313 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/testcases/org/apache/poi/hssf/model/TestHSSFAnchor.java')
-rw-r--r--src/testcases/org/apache/poi/hssf/model/TestHSSFAnchor.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/testcases/org/apache/poi/hssf/model/TestHSSFAnchor.java b/src/testcases/org/apache/poi/hssf/model/TestHSSFAnchor.java
index 481196e775..84ef3c4115 100644
--- a/src/testcases/org/apache/poi/hssf/model/TestHSSFAnchor.java
+++ b/src/testcases/org/apache/poi/hssf/model/TestHSSFAnchor.java
@@ -21,6 +21,7 @@ import junit.framework.TestCase;
import org.apache.poi.ddf.*;
import org.apache.poi.hssf.HSSFTestDataSamples;
import org.apache.poi.hssf.usermodel.*;
+import org.apache.poi.ss.usermodel.ClientAnchor.AnchorType;
/**
* @author Evgeniy Berlog
@@ -30,7 +31,7 @@ public class TestHSSFAnchor extends TestCase {
public void testDefaultValues(){
HSSFClientAnchor clientAnchor = new HSSFClientAnchor();
- assertEquals(clientAnchor.getAnchorType(), 0);
+ assertEquals(clientAnchor.getAnchorType(), AnchorType.MOVE_AND_RESIZE);
assertEquals(clientAnchor.getCol1(), 0);
assertEquals(clientAnchor.getCol2(), 0);
assertEquals(clientAnchor.getDx1(), 0);
@@ -41,7 +42,7 @@ public class TestHSSFAnchor extends TestCase {
assertEquals(clientAnchor.getRow2(), 0);
clientAnchor = new HSSFClientAnchor(new EscherClientAnchorRecord());
- assertEquals(clientAnchor.getAnchorType(), 0);
+ assertEquals(clientAnchor.getAnchorType(), AnchorType.MOVE_AND_RESIZE);
assertEquals(clientAnchor.getCol1(), 0);
assertEquals(clientAnchor.getCol2(), 0);
assertEquals(clientAnchor.getDx1(), 0);
@@ -143,7 +144,7 @@ public class TestHSSFAnchor extends TestCase {
HSSFPatriarch drawing = sheet.createDrawingPatriarch();
HSSFClientAnchor anchor = new HSSFClientAnchor(10, 10, 200, 200, (short)2, 2, (short)15, 15);
- anchor.setAnchorType(2);
+ anchor.setAnchorType(AnchorType.MOVE_DONT_RESIZE);
HSSFSimpleShape rectangle = drawing.createSimpleShape(anchor);
rectangle.setShapeType(HSSFSimpleShape.OBJECT_TYPE_RECTANGLE);
@@ -362,9 +363,9 @@ public class TestHSSFAnchor extends TestCase {
clientAnchor2.setRow2(7);
assertEquals(clientAnchor1, clientAnchor2);
- clientAnchor2.setAnchorType(3);
+ clientAnchor2.setAnchorType(AnchorType.DONT_MOVE_AND_RESIZE);
assertNotSame(clientAnchor1, clientAnchor2);
- clientAnchor2.setAnchorType(0);
+ clientAnchor2.setAnchorType(AnchorType.MOVE_AND_RESIZE);
assertEquals(clientAnchor1, clientAnchor2);
HSSFChildAnchor childAnchor1 = new HSSFChildAnchor(0, 1, 2, 3);