diff options
author | Yegor Kozlov <yegor@apache.org> | 2012-02-12 11:14:23 +0000 |
---|---|---|
committer | Yegor Kozlov <yegor@apache.org> | 2012-02-12 11:14:23 +0000 |
commit | bc48e85daacb6a52e8c2376f56d23d95c8a5f74a (patch) | |
tree | 00fc249b60bfe36c9a34acc44c93ce11b45ed008 /src/testcases/org/apache/poi/ss/usermodel | |
parent | 7e7bde2595efc8b52531708c03326455a126ce80 (diff) | |
download | poi-bc48e85daacb6a52e8c2376f56d23d95c8a5f74a.tar.gz poi-bc48e85daacb6a52e8c2376f56d23d95c8a5f74a.zip |
Bugzilla 52626: fixed setting default row height in HSSF and XSSF
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1243240 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/testcases/org/apache/poi/ss/usermodel')
-rw-r--r-- | src/testcases/org/apache/poi/ss/usermodel/BaseTestRow.java | 1 | ||||
-rw-r--r-- | src/testcases/org/apache/poi/ss/usermodel/BaseTestSheet.java | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/testcases/org/apache/poi/ss/usermodel/BaseTestRow.java b/src/testcases/org/apache/poi/ss/usermodel/BaseTestRow.java index da40cd076b..eb185471f4 100644 --- a/src/testcases/org/apache/poi/ss/usermodel/BaseTestRow.java +++ b/src/testcases/org/apache/poi/ss/usermodel/BaseTestRow.java @@ -292,6 +292,7 @@ public abstract class BaseTestRow extends TestCase { assertEquals(20*20, row1.getHeight()); Row row2 = sheet.createRow(1); + assertEquals(sheet.getDefaultRowHeight(), row2.getHeight()); row2.setHeight((short)310); assertEquals(310, row2.getHeight()); assertEquals(310F/20, row2.getHeightInPoints(), 0F); diff --git a/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheet.java b/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheet.java index b7f7a783c5..bd2b8f3771 100644 --- a/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheet.java +++ b/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheet.java @@ -401,6 +401,10 @@ public abstract class BaseTestSheet extends TestCase { assertEquals((short) 300, sheet.getDefaultRowHeight()); assertEquals(15.0F, sheet.getDefaultRowHeightInPoints(), 0F); + Row row = sheet.createRow(1); + // new row inherits default height from the sheet + assertEquals(sheet.getDefaultRowHeight(), row.getHeight()); + // Set a new default row height in twips and test getting the value in points sheet.setDefaultRowHeight((short) 360); assertEquals(18.0f, sheet.getDefaultRowHeightInPoints(), 0F); |