poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From talli...@apache.org
Subject svn commit: r1875956 - in /poi/trunk: src/java/org/apache/poi/hssf/record/LbsDataSubRecord.java src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java test-data/spreadsheet/64261.xls
Date Tue, 31 Mar 2020 18:16:09 GMT
Author: tallison
Date: Tue Mar 31 18:16:09 2020
New Revision: 1875956

URL: http://svn.apache.org/viewvc?rev=1875956&view=rev
Log:
64261 -- fix handling of drop down list when items are selected

Added:
    poi/trunk/test-data/spreadsheet/64261.xls   (with props)
Modified:
    poi/trunk/src/java/org/apache/poi/hssf/record/LbsDataSubRecord.java
    poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/LbsDataSubRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/LbsDataSubRecord.java?rev=1875956&r1=1875955&r2=1875956&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/LbsDataSubRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/LbsDataSubRecord.java Tue Mar 31 18:16:09
2020
@@ -165,7 +165,7 @@ public class LbsDataSubRecord extends Su
 
         // From [MS-XLS].pdf 2.5.147 FtLbsData:
         // This array MUST exist if and only if the wListType field is not equal to 0.
-        if(((_flags >> 4) & 0x2) != 0) {
+        if(((_flags >> 4) & 0x1) + (_flags >> 5 & 0x1) != 0) {
             _bsels = new boolean[_cLines];
             for(int i=0; i < _cLines; i++) {
                 _bsels[i] = in.readByte() == 1;

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=1875956&r1=1875955&r2=1875956&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java Tue Mar 31 18:16:09
2020
@@ -2891,7 +2891,10 @@ public final class TestBugs extends Base
     public void test63940() throws IOException {
         simpleTest("SUBSTITUTE.xls");
     }
-
+    @Test
+    public void test64261() throws IOException {
+        simpleTest("64261.xls");
+    }
     // a simple test which rewrites the file once and evaluates its formulas
     private void simpleTest(String fileName) throws IOException {
         simpleTest(fileName, null);
@@ -2932,4 +2935,6 @@ public final class TestBugs extends Base
         HSSFFormulaEvaluator.setupEnvironment( files.toArray(new String[0]), evals.toArray(new
HSSFFormulaEvaluator[0]) );
         evals.get(0).evaluateAll();
     }
+
+
 }

Added: poi/trunk/test-data/spreadsheet/64261.xls
URL: http://svn.apache.org/viewvc/poi/trunk/test-data/spreadsheet/64261.xls?rev=1875956&view=auto
==============================================================================
Binary file - no diff available.

Propchange: poi/trunk/test-data/spreadsheet/64261.xls
------------------------------------------------------------------------------
    svn:mime-type = application/vnd.ms-excel



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


Mime
View raw message