From 614dcc44894de4d8604b6ccd89ec2892e44fcab8 Mon Sep 17 00:00:00 2001 From: "Andrew C. Oliver" Date: Thu, 28 Nov 2002 18:57:35 +0000 Subject: [PATCH] patch from Dennis Doubleday http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13076 PR: Obtained from: Submitted by: Reviewed by: git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@352927 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/poi/hssf/record/FormulaRecord.java | 25 +++++++++++-------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/src/java/org/apache/poi/hssf/record/FormulaRecord.java b/src/java/org/apache/poi/hssf/record/FormulaRecord.java index e8466a49ee..ea8c9183d8 100644 --- a/src/java/org/apache/poi/hssf/record/FormulaRecord.java +++ b/src/java/org/apache/poi/hssf/record/FormulaRecord.java @@ -545,20 +545,23 @@ public class FormulaRecord .append("\n"); buffer.append(" .expressionlength= ").append(getExpressionLength()) .append("\n"); - buffer.append(" .numptgsinarray = ").append(field_8_parsed_expr.size()) - .append("\n"); + + if (field_8_parsed_expr != null) { + buffer.append(" .numptgsinarray = ").append(field_8_parsed_expr.size()) + .append("\n"); - for (int k = 0; k < field_8_parsed_expr.size(); k++ ) { + for (int k = 0; k < field_8_parsed_expr.size(); k++ ) { /* buffer.append("formula ").append(k).append(" ") - .append(((Ptg)field_8_parsed_expr.get(k)).toFormulaString());*/ - buffer.append("Formula ") - .append(k) - .append("=") - .append(field_8_parsed_expr.get(k).toString()) - .append("\n") - .append(((Ptg)field_8_parsed_expr.get(k)).toDebugString()) - .append("\n"); + .append(((Ptg)field_8_parsed_expr.get(k)).toFormulaString());*/ + buffer.append("Formula ") + .append(k) + .append("=") + .append(field_8_parsed_expr.get(k).toString()) + .append("\n") + .append(((Ptg)field_8_parsed_expr.get(k)).toDebugString()) + .append("\n"); + } } -- 2.39.5