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:
parent
cdc57ab1b8
commit
8bc07881fb
@ -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() {
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user