poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r644509 - in /poi/trunk/src: java/org/apache/poi/hssf/record/cf/ testcases/org/apache/poi/hssf/usermodel/
Date Thu, 03 Apr 2008 21:17:27 GMT
Author: josh
Date: Thu Apr  3 14:17:26 2008
New Revision: 644509

URL: http://svn.apache.org/viewvc?rev=644509&view=rev
Log:
Follow up fix after r644473 (bug 44739) TestHSSFConditionalFormatting had a bug and wasn't
yet included in the test suite hierarchy

Added:
    poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFConditionalFormatting.java
      - copied, changed from r644488, poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFConfditionalFormatting.java
Removed:
    poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFConfditionalFormatting.java
Modified:
    poi/trunk/src/java/org/apache/poi/hssf/record/cf/CellRange.java
    poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/AllUserModelTests.java

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/cf/CellRange.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/cf/CellRange.java?rev=644509&r1=644508&r2=644509&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/cf/CellRange.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/cf/CellRange.java Thu Apr  3 14:17:26 2008
@@ -78,8 +78,8 @@
 		return _firstColumn == 0 && _lastColumn == LAST_COLUMN_INDEX;
 	}
 	
-	public CellRange(Region r) {
-		this(r.getRowFrom(), r.getRowTo(), r.getColumnFrom(), r.getColumnTo());
+	private static CellRange createFromRegion(Region r) {
+		return new CellRange(r.getRowFrom(), r.getRowTo(), r.getColumnFrom(), r.getColumnTo());
 	}
 
 	private static boolean isValid(int firstRow, int lastRow, int firstColumn, int lastColumn)
@@ -358,7 +358,7 @@
 		CellRange[] result = new CellRange[regions.length];
 		for( int i=0; i<regions.length; i++)
 		{
-			result[i] = new CellRange(regions[i]);
+			result[i] = createFromRegion(regions[i]);
 		}
 		return result;
 	}

Modified: poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/AllUserModelTests.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/AllUserModelTests.java?rev=644509&r1=644508&r2=644509&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/AllUserModelTests.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/AllUserModelTests.java Thu Apr 
3 14:17:26 2008
@@ -40,6 +40,7 @@
 		result.addTestSuite(TestFormulas.class);
 		result.addTestSuite(TestHSSFCell.class);
 		result.addTestSuite(TestHSSFClientAnchor.class);
+		result.addTestSuite(TestHSSFConditionalFormatting.class);
 		result.addTestSuite(TestHSSFComment.class);
 		result.addTestSuite(TestHSSFDateUtil.class);
 		result.addTestSuite(TestHSSFHeaderFooter.class);

Copied: poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFConditionalFormatting.java
(from r644488, poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFConfditionalFormatting.java)
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFConditionalFormatting.java?p2=poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFConditionalFormatting.java&p1=poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFConfditionalFormatting.java&r1=644488&r2=644509&rev=644509&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFConfditionalFormatting.java
(original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFConditionalFormatting.java
Thu Apr  3 14:17:26 2008
@@ -26,7 +26,7 @@
  * 
  * @author Dmitriy Kumshayev
  */
-public final class TestHSSFConfditionalFormatting extends TestCase
+public final class TestHSSFConditionalFormatting extends TestCase
 {
 	public void testLastAndFirstColumns() 
 	{
@@ -55,7 +55,7 @@
 		short col = 1;
 		Region [] regions =
 		{
-			new Region(0,col,-1,col)
+			new Region(0,col,65535,col)
 		};
 
 		sheet.addConditionalFormatting(regions, cfRules);
@@ -75,7 +75,7 @@
 		assertEquals(1, r.getColumnFrom());
 		assertEquals(1, r.getColumnTo());
 		assertEquals(0, r.getRowFrom());
-		assertEquals(-1, r.getRowTo());
+		assertEquals(65535, r.getRowTo());
 
 		assertEquals(2, cf.getNumberOfRules());
 



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


Mime
View raw message