diff options
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); |