Patch from bug #51785 - Allow XSSF setForceFormulaRecalculation to work with the minimal ooxml-schemas jar

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1167241 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Nick Burch 2011-09-09 15:11:20 +00:00
parent 5b11460c66
commit 41f656b6c8
2 changed files with 22 additions and 0 deletions

View File

@ -34,6 +34,7 @@
<changes>
<release version="3.8-beta5" date="2011-??-??">
<action dev="poi-developers" type="fix">51785 - Allow XSSF setForceFormulaRecalculation to work with the minimal ooxml-schemas jar</action>
<action dev="poi-developers" type="fix">51772 - IllegalArgumentException Parsing MS Word 97 - 2003</action>
<action dev="poi-developers" type="add">XSLFPowerPointExtractor support for including comment authors with comment text</action>
<action dev="poi-developers" type="fix">Converted XSLFPowerPointExtractor to use UserModel for all text extraction</action>

View File

@ -1063,4 +1063,25 @@ public final class TestXSSFSheet extends BaseTestSheet {
XSSFSheet s3 = wb.getSheetAt(2);
assertEquals(0, s3.getTables().size());
}
/**
* Test to trigger OOXML-LITE generating to include org.openxmlformats.schemas.spreadsheetml.x2006.main.CTSheetCalcPr
*/
public void testSetForceFormulaRecalculation() {
XSSFWorkbook workbook = new XSSFWorkbook();
XSSFSheet sheet = workbook.createSheet("Sheet 1");
// Set
sheet.setForceFormulaRecalculation(true);
assertEquals(true, sheet.getForceFormulaRecalculation());
// Check
sheet.setForceFormulaRecalculation(false);
assertEquals(false, sheet.getForceFormulaRecalculation());
// Save, re-load, and re-check
workbook = XSSFTestDataSamples.writeOutAndReadBack(workbook);
sheet = workbook.getSheet("Sheet 1");
assertEquals(false, sheet.getForceFormulaRecalculation());
}
}