aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/poi/ss/formula/LazyAreaEval.java
diff options
context:
space:
mode:
authorGreg Woolsey <gwoolsey@apache.org>2019-03-18 19:09:11 +0000
committerGreg Woolsey <gwoolsey@apache.org>2019-03-18 19:09:11 +0000
commit82f9c292589bc9dd84c4b9b699129cc191513a03 (patch)
tree5102045fbc39c4a89c29a3d231ddca580835e4ee /src/java/org/apache/poi/ss/formula/LazyAreaEval.java
parent19005a4e63b6855c6cb889ba546781cb43fc22f5 (diff)
downloadpoi-82f9c292589bc9dd84c4b9b699129cc191513a03.tar.gz
poi-82f9c292589bc9dd84c4b9b699129cc191513a03.zip
#60724 - Partial implementation for SUBTOTAL() 'ignore hidden rows' variations
The function still doesn't deal with auto-filtering, but it now handles variations that should skip hidden rows. Taught the evaluation framework to know about hidden rows similar to what was already there for skipping subtotals within subtotal ranges. Added unit test cases. git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1855789 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/poi/ss/formula/LazyAreaEval.java')
-rw-r--r--src/java/org/apache/poi/ss/formula/LazyAreaEval.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/java/org/apache/poi/ss/formula/LazyAreaEval.java b/src/java/org/apache/poi/ss/formula/LazyAreaEval.java
index 4bfbf41d30..f10cfe6de9 100644
--- a/src/java/org/apache/poi/ss/formula/LazyAreaEval.java
+++ b/src/java/org/apache/poi/ss/formula/LazyAreaEval.java
@@ -94,4 +94,14 @@ final class LazyAreaEval extends AreaEvalBase {
SheetRefEvaluator _sre = _evaluator.getSheetEvaluator(_evaluator.getFirstSheetIndex());
return _sre.isSubTotal(getFirstRow() + rowIndex, getFirstColumn() + columnIndex);
}
+
+ /**
+ * @return whether the row at rowIndex is hidden
+ * @see org.apache.poi.ss.formula.eval.AreaEvalBase#isRowHidden(int)
+ */
+ public boolean isRowHidden(int rowIndex) {
+ // delegate the query to the sheet evaluator which has access to internal ptgs
+ SheetRefEvaluator _sre = _evaluator.getSheetEvaluator(_evaluator.getFirstSheetIndex());
+ return _sre.isRowHidden(getFirstRow() + rowIndex);
+ }
}