poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pa...@apache.org
Subject svn commit: r645131 - in /poi/branches/ooxml/src/ooxml: java/org/apache/poi/xssf/usermodel/XSSFCellStyle.java java/org/apache/poi/xssf/usermodel/extensions/XSSFCellAlignment.java testcases/org/apache/poi/xssf/usermodel/TestXSSFCellStyle.java
Date Sat, 05 Apr 2008 16:30:19 GMT
Author: paolo
Date: Sat Apr  5 09:30:17 2008
New Revision: 645131

URL: http://svn.apache.org/viewvc?rev=645131&view=rev
Log:
XSSFCellAlignment get/setTextRotation + get/setWrapText + tests

Modified:
    poi/branches/ooxml/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCellStyle.java
    poi/branches/ooxml/src/ooxml/java/org/apache/poi/xssf/usermodel/extensions/XSSFCellAlignment.java
    poi/branches/ooxml/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFCellStyle.java

Modified: poi/branches/ooxml/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCellStyle.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCellStyle.java?rev=645131&r1=645130&r2=645131&view=diff
==============================================================================
--- poi/branches/ooxml/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCellStyle.java (original)
+++ poi/branches/ooxml/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCellStyle.java Sat
Apr  5 09:30:17 2008
@@ -284,8 +284,7 @@
 	}
 
 	public void setRotation(short rotation) {
-		// TODO Auto-generated method stub
-		
+		getCellAlignment().setTextRotation(rotation);
 	}
 
 	public void setTopBorderColor(short color) {
@@ -302,8 +301,7 @@
 	}
 
 	public void setWrapText(boolean wrapped) {
-		// TODO Auto-generated method stub
-		
+		getCellAlignment().setWrapText(wrapped);
 	}
 
 	private XSSFCellBorder getCellBorder() {

Modified: poi/branches/ooxml/src/ooxml/java/org/apache/poi/xssf/usermodel/extensions/XSSFCellAlignment.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/ooxml/java/org/apache/poi/xssf/usermodel/extensions/XSSFCellAlignment.java?rev=645131&r1=645130&r2=645131&view=diff
==============================================================================
--- poi/branches/ooxml/src/ooxml/java/org/apache/poi/xssf/usermodel/extensions/XSSFCellAlignment.java
(original)
+++ poi/branches/ooxml/src/ooxml/java/org/apache/poi/xssf/usermodel/extensions/XSSFCellAlignment.java
Sat Apr  5 09:30:17 2008
@@ -63,7 +63,15 @@
 		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);
 	}
 }

Modified: poi/branches/ooxml/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFCellStyle.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFCellStyle.java?rev=645131&r1=645130&r2=645131&view=diff
==============================================================================
--- poi/branches/ooxml/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFCellStyle.java
(original)
+++ poi/branches/ooxml/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFCellStyle.java
Sat Apr  5 09:30:17 2008
@@ -183,4 +183,12 @@
 		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());
+	}
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message