From b676951ff261bd0fa868fcac55e115c018465f9b Mon Sep 17 00:00:00 2001 From: Josh Micich Date: Wed, 18 Nov 2009 08:39:17 +0000 Subject: [PATCH] added method format2DRefAsString() to interface ExternSheetReferenceToken to help with refactoring 3D ref code git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@881698 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/poi/hssf/record/formula/Area3DPtg.java | 4 +++- src/java/org/apache/poi/hssf/record/formula/Ref3DPtg.java | 4 +++- .../apache/poi/ss/formula/ExternSheetReferenceToken.java | 8 ++++++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/java/org/apache/poi/hssf/record/formula/Area3DPtg.java b/src/java/org/apache/poi/hssf/record/formula/Area3DPtg.java index 264b448ca6..2acbaf3e1e 100644 --- a/src/java/org/apache/poi/hssf/record/formula/Area3DPtg.java +++ b/src/java/org/apache/poi/hssf/record/formula/Area3DPtg.java @@ -89,7 +89,9 @@ public final class Area3DPtg extends AreaPtgBase implements WorkbookD public void setExternSheetIndex(int index) { field_1_index_extern_sheet = index; } - + public String format2DRefAsString() { + return formatReferenceAsString(); + } /** * @return text representation of this area reference that can be used in text * formulas. The sheet name will get properly delimited if required. diff --git a/src/java/org/apache/poi/hssf/record/formula/Ref3DPtg.java b/src/java/org/apache/poi/hssf/record/formula/Ref3DPtg.java index 13a7f05899..ece0e1c2c5 100644 --- a/src/java/org/apache/poi/hssf/record/formula/Ref3DPtg.java +++ b/src/java/org/apache/poi/hssf/record/formula/Ref3DPtg.java @@ -80,7 +80,9 @@ public final class Ref3DPtg extends RefPtgBase implements WorkbookDepe public void setExternSheetIndex(int index) { field_1_index_extern_sheet = index; } - + public String format2DRefAsString() { + return formatReferenceAsString(); + } /** * @return text representation of this cell reference that can be used in text * formulas. The sheet name will get properly delimited if required. diff --git a/src/java/org/apache/poi/ss/formula/ExternSheetReferenceToken.java b/src/java/org/apache/poi/ss/formula/ExternSheetReferenceToken.java index 0a4451f651..c3f9bc2e56 100644 --- a/src/java/org/apache/poi/ss/formula/ExternSheetReferenceToken.java +++ b/src/java/org/apache/poi/ss/formula/ExternSheetReferenceToken.java @@ -19,11 +19,15 @@ package org.apache.poi.ss.formula; /** * Should be implemented by any {@link org.apache.poi.hssf.record.formula.Ptg} subclass that needs has an extern sheet index
- * + * * For POI internal use only - * + * * @author Josh Micich */ public interface ExternSheetReferenceToken { int getExternSheetIndex(); + /** + * @return formula text for this reference token without the qualifying sheet name + */ + String format2DRefAsString(); } -- 2.39.5