read GutsRecord in in the Sheet(RecordStream rs)

constructor (see bugzilla 46186); always call sheet.setAlternativeExpression in conjuction with sheet.setRowSumsBelow, see bugzilla 46714 and 30714

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@766273 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Yegor Kozlov 2009-04-18 09:06:16 +00:00
parent 62b0595b83
commit db553fd510
6 changed files with 12 additions and 4 deletions

View File

@ -37,6 +37,8 @@
<!-- Don't forget to update status.xml too! -->
<release version="3.5-beta6" date="2009-??-??">
<action dev="POI-DEVELOPERS" type="fix">46186 - Fixed Sheet to read GutsRecord in the Sheet(RecordStream rs)</action>
<action dev="POI-DEVELOPERS" type="fix">46714 - Automatically call sheet.setAlternativeExpression when sheet.setRowSumsBelow is called </action>
<action dev="POI-DEVELOPERS" type="fix">46279 - Allow 255 arguments for excel functions in XSSF </action>
<action dev="POI-DEVELOPERS" type="fix">47028 - Fixed XSSFCell to preserve cell style when cell value is set to blank</action>
<action dev="POI-DEVELOPERS" type="fix">47026 - Avoid NPE in XSSFCell.setCellType() when workbook does not have SST</action>

View File

@ -34,6 +34,8 @@
<!-- Don't forget to update changes.xml too! -->
<changes>
<release version="3.5-beta6" date="2009-??-??">
<action dev="POI-DEVELOPERS" type="fix">46186 - Fixed Sheet to read GutsRecord in the Sheet(RecordStream rs)</action>
<action dev="POI-DEVELOPERS" type="fix">46714 - Automatically call sheet.setAlternativeExpression when sheet.setRowSumsBelow is called </action>
<action dev="POI-DEVELOPERS" type="fix">46279 - Allow 255 arguments for excel functions in XSSF </action>
<action dev="POI-DEVELOPERS" type="fix">47028 - Fixed XSSFCell to preserve cell style when cell value is set to blank</action>
<action dev="POI-DEVELOPERS" type="fix">47026 - Avoid NPE in XSSFCell.setCellType() when workbook does not have SST</action>

View File

@ -337,6 +337,10 @@ public final class Sheet implements Model {
{
password = (PasswordRecord) rec;
}
else if ( recSid == GutsRecord.sid )
{
_gutsRecord = (GutsRecord) rec;
}
records.add(rec);
}

View File

@ -774,6 +774,8 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
(WSBoolRecord) _sheet.findFirstRecordBySid(WSBoolRecord.sid);
record.setRowSumsBelow(b);
//setAlternateExpression must be set in conjuction with setRowSumsBelow
record.setAlternateExpression(b);
}
/**

View File

@ -125,7 +125,7 @@ public final class TestHSSFSheet extends BaseTestSheet {
s.setRowSumsRight(true);
// Check
assertEquals(false, record.getAlternateExpression());
assertEquals(true, record.getAlternateExpression()); //sheet.setRowSumsBelow alters this field too
assertEquals(false, record.getAlternateFormula());
assertEquals(true, record.getAutobreaks());
assertEquals(true, record.getDialog());
@ -133,7 +133,7 @@ public final class TestHSSFSheet extends BaseTestSheet {
assertEquals(false, record.getFitToPage());
assertEquals(true, record.getRowSumsBelow());
assertEquals(true, record.getRowSumsRight());
assertEquals(false, s.getAlternateExpression());
assertEquals(true, s.getAlternateExpression());
assertEquals(false, s.getAlternateFormula());
assertEquals(true, s.getAutobreaks());
assertEquals(true, s.getDialog());

View File

@ -17,11 +17,9 @@
package org.apache.poi.ss.usermodel;
import junit.framework.TestCase;
import junit.framework.AssertionFailedError;
import org.apache.poi.ss.ITestDataProvider;
import org.apache.poi.ss.SpreadsheetVersion;
import org.apache.poi.ss.util.CellRangeAddress;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
/**
* A base class for bugzilla issues that can be described in terms of common ss interfaces.