Browse Source

64261 -- fix handling of drop down list when items are selected

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1875956 13f79535-47bb-0310-9956-ffa450edef68
tags/before_ooxml_3rd_edition
Tim Allison 4 years ago
parent
commit
5976721660

+ 1
- 1
src/java/org/apache/poi/hssf/record/LbsDataSubRecord.java View File



// From [MS-XLS].pdf 2.5.147 FtLbsData: // From [MS-XLS].pdf 2.5.147 FtLbsData:
// This array MUST exist if and only if the wListType field is not equal to 0. // 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]; _bsels = new boolean[_cLines];
for(int i=0; i < _cLines; i++) { for(int i=0; i < _cLines; i++) {
_bsels[i] = in.readByte() == 1; _bsels[i] = in.readByte() == 1;

+ 6
- 1
src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java View File

public void test63940() throws IOException { public void test63940() throws IOException {
simpleTest("SUBSTITUTE.xls"); simpleTest("SUBSTITUTE.xls");
} }

@Test
public void test64261() throws IOException {
simpleTest("64261.xls");
}
// a simple test which rewrites the file once and evaluates its formulas // a simple test which rewrites the file once and evaluates its formulas
private void simpleTest(String fileName) throws IOException { private void simpleTest(String fileName) throws IOException {
simpleTest(fileName, null); simpleTest(fileName, null);
HSSFFormulaEvaluator.setupEnvironment( files.toArray(new String[0]), evals.toArray(new HSSFFormulaEvaluator[0]) ); HSSFFormulaEvaluator.setupEnvironment( files.toArray(new String[0]), evals.toArray(new HSSFFormulaEvaluator[0]) );
evals.get(0).evaluateAll(); evals.get(0).evaluateAll();
} }


} }

BIN
test-data/spreadsheet/64261.xls View File


Loading…
Cancel
Save