XSSFCellAlignment get/setTextRotation + get/setWrapText + tests

git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@645131 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Paolo Mottadelli 2008-04-05 16:30:17 +00:00
parent cdc57ab1b8
commit 8bc07881fb
3 changed files with 18 additions and 4 deletions

View File

@ -284,8 +284,7 @@ public class XSSFCellStyle implements CellStyle {
}
public void setRotation(short rotation) {
// TODO Auto-generated method stub
getCellAlignment().setTextRotation(rotation);
}
public void setTopBorderColor(short color) {
@ -302,8 +301,7 @@ public class XSSFCellStyle implements CellStyle {
}
public void setWrapText(boolean wrapped) {
// TODO Auto-generated method stub
getCellAlignment().setWrapText(wrapped);
}
private XSSFCellBorder getCellBorder() {

View File

@ -63,7 +63,15 @@ public class XSSFCellAlignment {
return cellAlignement.getTextRotation();
}
public void setTextRotation(long rotation) {
cellAlignement.setTextRotation(rotation);
}
public boolean getWrapText() {
return cellAlignement.getWrapText();
}
public void setWrapText(boolean wrapped) {
cellAlignement.setWrapText(wrapped);
}
}

View File

@ -183,4 +183,12 @@ public class TestXSSFCellStyle extends TestCase {
cellStyle.setVerticalAlignmentEnum(STVerticalAlignment.JUSTIFY);
assertEquals((short)4, cellStyle.getVerticalAlignment());
}
public void testGetSetWrapText() {
assertFalse(cellStyle.getWrapText());
cellXf.getAlignment().setWrapText(true);
assertTrue(cellStyle.getWrapText());
cellStyle.setWrapText(false);
assertFalse(cellXf.getAlignment().getWrapText());
}
}