aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/poi/hssf/model
diff options
context:
space:
mode:
authorJosh Micich <josh@apache.org>2009-11-27 21:01:59 +0000
committerJosh Micich <josh@apache.org>2009-11-27 21:01:59 +0000
commit43b3e52344930dfc61ef222841e8322a4303913c (patch)
tree3084be02f97328e793aed62fe7151fe0e12eddd0 /src/java/org/apache/poi/hssf/model
parent00173d79a15ecab47312e83125a04bac3192cc6a (diff)
downloadpoi-43b3e52344930dfc61ef222841e8322a4303913c.tar.gz
poi-43b3e52344930dfc61ef222841e8322a4303913c.zip
Patch 48284 - raise visibility of FormulaParseException
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@885007 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/poi/hssf/model')
-rw-r--r--src/java/org/apache/poi/hssf/model/HSSFFormulaParser.java11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/java/org/apache/poi/hssf/model/HSSFFormulaParser.java b/src/java/org/apache/poi/hssf/model/HSSFFormulaParser.java
index 026590d71d..d65943b564 100644
--- a/src/java/org/apache/poi/hssf/model/HSSFFormulaParser.java
+++ b/src/java/org/apache/poi/hssf/model/HSSFFormulaParser.java
@@ -20,6 +20,7 @@ package org.apache.poi.hssf.model;
import org.apache.poi.hssf.record.formula.Ptg;
import org.apache.poi.hssf.usermodel.HSSFEvaluationWorkbook;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.formula.FormulaParseException;
import org.apache.poi.ss.formula.FormulaParser;
import org.apache.poi.ss.formula.FormulaParsingWorkbook;
import org.apache.poi.ss.formula.FormulaRenderer;
@@ -41,17 +42,18 @@ public final class HSSFFormulaParser {
}
/**
- * Convenience method for parsing cell formulas. see {@link #parse(String, HSSFWorkbook, int)}
+ * Convenience method for parsing cell formulas. see {@link #parse(String, HSSFWorkbook, int, int)}
*/
- public static Ptg[] parse(String formula, HSSFWorkbook workbook) {
+ public static Ptg[] parse(String formula, HSSFWorkbook workbook) throws FormulaParseException {
return parse(formula, workbook, FormulaType.CELL);
}
/**
* @param formulaType a constant from {@link FormulaType}
* @return the parsed formula tokens
+ * @throws FormulaParseException if the formula has incorrect syntax or is otherwise invalid
*/
- public static Ptg[] parse(String formula, HSSFWorkbook workbook, int formulaType) {
+ public static Ptg[] parse(String formula, HSSFWorkbook workbook, int formulaType) throws FormulaParseException {
return parse(formula, workbook, formulaType, -1);
}
@@ -64,8 +66,9 @@ public final class HSSFFormulaParser {
* the scope of the name will be ignored and the parser will match named ranges only by name
*
* @return the parsed formula tokens
+ * @throws FormulaParseException if the formula has incorrect syntax or is otherwise invalid
*/
- public static Ptg[] parse(String formula, HSSFWorkbook workbook, int formulaType, int sheetIndex) {
+ public static Ptg[] parse(String formula, HSSFWorkbook workbook, int formulaType, int sheetIndex) throws FormulaParseException {
return FormulaParser.parse(formula, createParsingWorkbook(workbook), formulaType, sheetIndex);
}