From 96c5649208c62d12f987f20a7ffbc420f09a80c7 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 264b448ca..2acbaf3e1 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 13a7f0589..ece0e1c2c 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 0a4451f65..c3f9bc2e5 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(); }