Fix for bug 46547 - Allow for addition of conditional formatting when data validations are present. Avoid creation of and empty conditional formatting table while shifting formulas.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@736175 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
73a498fb35
commit
07fd83a278
@ -37,7 +37,8 @@
|
|||||||
|
|
||||||
<!-- Don't forget to update status.xml too! -->
|
<!-- Don't forget to update status.xml too! -->
|
||||||
<release version="3.5-beta5" date="2008-??-??">
|
<release version="3.5-beta5" date="2008-??-??">
|
||||||
<action dev="POI-DEVELOPERS" type="fix">46548 - Print Settings Block fixes - continued PLS records and PSB in sheet sub-streams</action>
|
<action dev="POI-DEVELOPERS" type="fix">46547 - Allow addition of conditional formatting after data validation</action>
|
||||||
|
<action dev="POI-DEVELOPERS" type="fix">46548 - Page Settings Block fixes - continued PLS records and PSB in sheet sub-streams</action>
|
||||||
<action dev="POI-DEVELOPERS" type="add">46523 - added implementation for SUMIF function</action>
|
<action dev="POI-DEVELOPERS" type="add">46523 - added implementation for SUMIF function</action>
|
||||||
<action dev="POI-DEVELOPERS" type="add">Support for reading HSSF column styles</action>
|
<action dev="POI-DEVELOPERS" type="add">Support for reading HSSF column styles</action>
|
||||||
<action dev="POI-DEVELOPERS" type="fix">Hook up POIXMLTextExtractor.getMetadataTextExtractor() to the already written POIXMLPropertiesTextExtractor</action>
|
<action dev="POI-DEVELOPERS" type="fix">Hook up POIXMLTextExtractor.getMetadataTextExtractor() to the already written POIXMLPropertiesTextExtractor</action>
|
||||||
|
@ -34,7 +34,8 @@
|
|||||||
<!-- Don't forget to update changes.xml too! -->
|
<!-- Don't forget to update changes.xml too! -->
|
||||||
<changes>
|
<changes>
|
||||||
<release version="3.5-beta5" date="2008-??-??">
|
<release version="3.5-beta5" date="2008-??-??">
|
||||||
<action dev="POI-DEVELOPERS" type="fix">46548 - Print Settings Block fixes - continued PLS records and PSB in sheet sub-streams</action>
|
<action dev="POI-DEVELOPERS" type="fix">46547 - Allow addition of conditional formatting after data validation</action>
|
||||||
|
<action dev="POI-DEVELOPERS" type="fix">46548 - Page Settings Block fixes - continued PLS records and PSB in sheet sub-streams</action>
|
||||||
<action dev="POI-DEVELOPERS" type="add">46523 - added implementation for SUMIF function</action>
|
<action dev="POI-DEVELOPERS" type="add">46523 - added implementation for SUMIF function</action>
|
||||||
<action dev="POI-DEVELOPERS" type="add">Support for reading HSSF column styles</action>
|
<action dev="POI-DEVELOPERS" type="add">Support for reading HSSF column styles</action>
|
||||||
<action dev="POI-DEVELOPERS" type="fix">Hook up POIXMLTextExtractor.getMetadataTextExtractor() to the already written POIXMLPropertiesTextExtractor</action>
|
<action dev="POI-DEVELOPERS" type="fix">Hook up POIXMLTextExtractor.getMetadataTextExtractor() to the already written POIXMLPropertiesTextExtractor</action>
|
||||||
|
@ -91,7 +91,7 @@ final class RecordOrderer {
|
|||||||
sheetRecords.add(index, newRecord);
|
sheetRecords.add(index, newRecord);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static int findSheetInsertPos(List<RecordBase> records, Class recClass) {
|
private static int findSheetInsertPos(List<RecordBase> records, Class<? extends RecordBase> recClass) {
|
||||||
if (recClass == DataValidityTable.class) {
|
if (recClass == DataValidityTable.class) {
|
||||||
return findDataValidationTableInsertPos(records);
|
return findDataValidationTableInsertPos(records);
|
||||||
}
|
}
|
||||||
@ -160,6 +160,10 @@ final class RecordOrderer {
|
|||||||
if (rb instanceof MergedCellsTable) {
|
if (rb instanceof MergedCellsTable) {
|
||||||
return i + 1;
|
return i + 1;
|
||||||
}
|
}
|
||||||
|
if (rb instanceof DataValidityTable) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
Record rec = (Record) rb;
|
Record rec = (Record) rb;
|
||||||
switch (rec.getSid()) {
|
switch (rec.getSid()) {
|
||||||
case WindowTwoRecord.sid:
|
case WindowTwoRecord.sid:
|
||||||
@ -170,7 +174,10 @@ final class RecordOrderer {
|
|||||||
// MergedCellsTable usually here
|
// MergedCellsTable usually here
|
||||||
case UnknownRecord.LABELRANGES_015F:
|
case UnknownRecord.LABELRANGES_015F:
|
||||||
case UnknownRecord.PHONETICPR_00EF:
|
case UnknownRecord.PHONETICPR_00EF:
|
||||||
|
// ConditionalFormattingTable goes here
|
||||||
return i + 1;
|
return i + 1;
|
||||||
|
// HyperlinkTable (not aggregated by POI yet)
|
||||||
|
// DataValidityTable
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
throw new RuntimeException("Did not find Window2 record");
|
throw new RuntimeException("Did not find Window2 record");
|
||||||
|
@ -504,7 +504,9 @@ public final class Sheet implements Model {
|
|||||||
*/
|
*/
|
||||||
public void updateFormulasAfterCellShift(FormulaShifter shifter, int externSheetIndex) {
|
public void updateFormulasAfterCellShift(FormulaShifter shifter, int externSheetIndex) {
|
||||||
getRowsAggregate().updateFormulasAfterRowShift(shifter, externSheetIndex);
|
getRowsAggregate().updateFormulasAfterRowShift(shifter, externSheetIndex);
|
||||||
getConditionalFormattingTable().updateFormulasAfterCellShift(shifter, externSheetIndex);
|
if (condFormatting != null) {
|
||||||
|
getConditionalFormattingTable().updateFormulasAfterCellShift(shifter, externSheetIndex);
|
||||||
|
}
|
||||||
// TODO - adjust data validations
|
// TODO - adjust data validations
|
||||||
}
|
}
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user