svn commit: r634318 - in /poi/trunk/src: documentation/content/xdocs/ java/org/apache/poi/poifs/storage/ testcases/org/apache/poi/poifs/storage/ testcases/org/apache/poi/util/

2008-03-06 Thread nick
Author: nick
Date: Thu Mar  6 07:54:06 2008
New Revision: 634318

URL: http://svn.apache.org/viewvc?rev=634318view=rev
Log:
Change the behaviour on short last blocks to be a warning not an exception, as 
some people seem to have real valid files that trigger this. Fixed bug #28231

Added:
poi/trunk/src/testcases/org/apache/poi/util/DummyPOILogger.java   (with 
props)
Modified:
poi/trunk/src/documentation/content/xdocs/changes.xml
poi/trunk/src/documentation/content/xdocs/status.xml
poi/trunk/src/java/org/apache/poi/poifs/storage/RawDataBlock.java
poi/trunk/src/testcases/org/apache/poi/poifs/storage/TestRawDataBlock.java

poi/trunk/src/testcases/org/apache/poi/poifs/storage/TestRawDataBlockList.java

Modified: poi/trunk/src/documentation/content/xdocs/changes.xml
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/documentation/content/xdocs/changes.xml?rev=634318r1=634317r2=634318view=diff
==
--- poi/trunk/src/documentation/content/xdocs/changes.xml (original)
+++ poi/trunk/src/documentation/content/xdocs/changes.xml Thu Mar  6 07:54:06 
2008
@@ -36,6 +36,7 @@
 
!-- Don't forget to update status.xml too! --
 release version=3.1-beta1 date=2008-??-??
+   action dev=POI-DEVELOPERS type=fix28231 - For apparently 
truncated files, which are somehow still valid, now issue a truncation warning 
but carry on, rather than giving an exception as before/action
action dev=POI-DEVELOPERS type=fix44504 - Added initial 
support for recognising external functions like YEARFRAC and ISEVEN (using 
NameXPtg), via LinkTable support/action
action dev=POI-DEVELOPERS type=fix44504 - Improvements to 
FormulaParser - operators, precedence, error literals, quotes in string 
literals, range checking on IntPtg, formulas with extra un-parsed stuff at the 
end, improved parse error handling/action
action dev=POI-DEVELOPERS type=fix44504 - Fixed number 
conversion inconsistencies in many functions, and improved RefEval/action

Modified: poi/trunk/src/documentation/content/xdocs/status.xml
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/documentation/content/xdocs/status.xml?rev=634318r1=634317r2=634318view=diff
==
--- poi/trunk/src/documentation/content/xdocs/status.xml (original)
+++ poi/trunk/src/documentation/content/xdocs/status.xml Thu Mar  6 07:54:06 
2008
@@ -36,6 +36,9 @@
action dev=POI-DEVELOPERS type=fix44504 - Added initial 
support for recognising external functions like YEARFRAC and ISEVEN (using 
NameXPtg), via LinkTable support/action
action dev=POI-DEVELOPERS type=fix44504 - Improvements to 
FormulaParser - operators, precedence, error literals, quotes in string 
literals, range checking on IntPtg, formulas with extra un-parsed stuff at the 
end, improved parse error handling/action
action dev=POI-DEVELOPERS type=fix44504 - Fixed number 
conversion inconsistencies in many functions, and improved RefEval/action
+   action dev=POI-DEVELOPERS type=fix44504 - Added initial 
support for recognising external functions like YEARFRAC and ISEVEN (using 
NameXPtg), via LinkTable support/action
+   action dev=POI-DEVELOPERS type=fix44504 - Improvements to 
FormulaParser - operators, precedence, error literals, quotes in string 
literals, range checking on IntPtg, formulas with extra un-parsed stuff at the 
end, improved parse error handling/action
+   action dev=POI-DEVELOPERS type=fix44504 - Fixed number 
conversion inconsistencies in many functions, and improved RefEval/action
action dev=POI-DEVELOPERS type=fix44508 - Fix formula 
evaluation with evaluateInCell on boolean formulas/action
action dev=POI-DEVELOPERS type=fix44510 - Fix how DVALRecord 
works with dropdowns/action
action dev=POI-DEVELOPERS type=fix44495 - Handle named cell 
ranges in formulas that have lower case parts/action

Modified: poi/trunk/src/java/org/apache/poi/poifs/storage/RawDataBlock.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/poifs/storage/RawDataBlock.java?rev=634318r1=634317r2=634318view=diff
==
--- poi/trunk/src/java/org/apache/poi/poifs/storage/RawDataBlock.java (original)
+++ poi/trunk/src/java/org/apache/poi/poifs/storage/RawDataBlock.java Thu Mar  
6 07:54:06 2008
@@ -21,6 +21,8 @@
 
 import org.apache.poi.poifs.common.POIFSConstants;
 import org.apache.poi.util.IOUtils;
+import org.apache.poi.util.POILogFactory;
+import org.apache.poi.util.POILogger;
 
 import java.io.*;
 
@@ -35,6 +37,7 @@
 {
 private byte[]  _data;
 private boolean _eof;
+private static POILogger log = POILogFactory.getLogger(RawDataBlock.class);
 
 /**
  * Constructor RawDataBlock
@@ -75,9 +78,12 @@
 String 

svn commit: r634372 - /poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java

2008-03-06 Thread nick
Author: nick
Date: Thu Mar  6 10:13:47 2008
New Revision: 634372

URL: http://svn.apache.org/viewvc?rev=634372view=rev
Log:
Add broken test for bug #43901

Modified:
poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java

Modified: poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java?rev=634372r1=634371r2=634372view=diff
==
--- poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java 
(original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java Thu Mar 
 6 10:13:47 2008
@@ -1104,6 +1104,29 @@
 
 assertEquals(1, wb.getNumberOfSheets());
 }
+
+/**
+ * POI is producing files with the wrong last-column
+ *  number on the row
+ */
+public void BROKENtest43901() {
+   HSSFWorkbook book = new HSSFWorkbook();
+   HSSFSheet sheet = book.createSheet(test);
+
+   // New row has last col -1
+   HSSFRow row = sheet.createRow(0);
+   assertEquals(-1, row.getLastCellNum());
+   if(row.getLastCellNum() == 0) {
+   fail(Identified bug 43901);
+   }
+   
+   // Create two cells, will return one higher
+   //  than that for the last number
+   row.createCell((short) 0);
+   assertEquals(1, row.getLastCellNum());
+   row.createCell((short) 255);
+   assertEquals(256, row.getLastCellNum());
+   }
 }
 
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]