aboutsummaryrefslogtreecommitdiffstats
path: root/src/testcases/org/apache/poi/hssf/usermodel
diff options
context:
space:
mode:
authorDominik Stadler <centic@apache.org>2014-01-01 22:15:44 +0000
committerDominik Stadler <centic@apache.org>2014-01-01 22:15:44 +0000
commitded360f2876d78a6d43cdccd3983fdb134c0179c (patch)
treeca9017b3ec483fd741cf8c6ba9441bbac3ee3169 /src/testcases/org/apache/poi/hssf/usermodel
parent62ec8b719bde6cf97caca2dbaa751729904a0fab (diff)
downloadpoi-ded360f2876d78a6d43cdccd3983fdb134c0179c.tar.gz
poi-ded360f2876d78a6d43cdccd3983fdb134c0179c.zip
Bug 55723: Make HSSFSheet.setAutoFilter() behave equal to XSSF, also make XSSF work when setAutoFilter is called multiple times
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1554688 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/testcases/org/apache/poi/hssf/usermodel')
-rw-r--r--src/testcases/org/apache/poi/hssf/usermodel/TestHSSFSheet.java17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFSheet.java b/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFSheet.java
index c2a579d266..9aa16d843a 100644
--- a/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFSheet.java
+++ b/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFSheet.java
@@ -35,6 +35,7 @@ import org.apache.poi.hssf.record.aggregates.WorksheetProtectionBlock;
import org.apache.poi.hssf.usermodel.RecordInspector.RecordCollector;
import org.apache.poi.ss.formula.ptg.Area3DPtg;
import org.apache.poi.ss.formula.ptg.Ptg;
+import org.apache.poi.ss.usermodel.AutoFilter;
import org.apache.poi.ss.usermodel.BaseTestSheet;
import org.apache.poi.ss.usermodel.DataValidation;
import org.apache.poi.ss.usermodel.DataValidationConstraint;
@@ -1066,4 +1067,20 @@ public final class TestHSSFSheet extends BaseTestSheet {
sheet.dumpDrawingRecords(true);*/
assertNull(sheet.getDrawingEscherAggregate());
}
+
+ public void testBug55723b() {
+ HSSFWorkbook wb = new HSSFWorkbook();
+ Sheet sheet = wb.createSheet();
+
+ // stored with a special name
+ assertNull(wb.getWorkbook().getSpecificBuiltinRecord(NameRecord.BUILTIN_FILTER_DB, 1));
+
+ CellRangeAddress range = CellRangeAddress.valueOf("A:B");
+ AutoFilter filter = sheet.setAutoFilter(range);
+ assertNotNull(filter);
+
+ // stored with a special name
+ NameRecord record = wb.getWorkbook().getSpecificBuiltinRecord(NameRecord.BUILTIN_FILTER_DB, 1);
+ assertNotNull(record);
+ }
}