aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/poi/ss/util/SheetReferences.java
diff options
context:
space:
mode:
authorNick Burch <nick@apache.org>2008-04-15 23:18:25 +0000
committerNick Burch <nick@apache.org>2008-04-15 23:18:25 +0000
commita874dfc1a69ed6a1563f2e9dd392171beaa8ca6b (patch)
treea7b838a130d0f51564c1a9ebaab6fb3eab5b6103 /src/java/org/apache/poi/ss/util/SheetReferences.java
parentb292ad07c3c7664d825a3e9277548560de14e463 (diff)
downloadpoi-a874dfc1a69ed6a1563f2e9dd392171beaa8ca6b.tar.gz
poi-a874dfc1a69ed6a1563f2e9dd392171beaa8ca6b.zip
In the ooxml branch, convert the formula stuff from using hssf.HSSFWorkbook to ss.Workbook, so that everything now works for XSSF too
git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@648454 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/poi/ss/util/SheetReferences.java')
-rw-r--r--src/java/org/apache/poi/ss/util/SheetReferences.java46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/java/org/apache/poi/ss/util/SheetReferences.java b/src/java/org/apache/poi/ss/util/SheetReferences.java
new file mode 100644
index 0000000000..74b84f5f26
--- /dev/null
+++ b/src/java/org/apache/poi/ss/util/SheetReferences.java
@@ -0,0 +1,46 @@
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+
+package org.apache.poi.ss.util;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Holds a collection of Sheet names and their associated
+ * reference numbers.
+ *
+ * @author Andrew C. Oliver (acoliver at apache dot org)
+ *
+ */
+public class SheetReferences
+{
+ Map map;
+ public SheetReferences()
+ {
+ map = new HashMap(5);
+ }
+
+ public void addSheetReference(String sheetName, int number) {
+ map.put(new Integer(number), sheetName);
+ }
+
+ public String getSheetName(int number) {
+ return (String)map.get(new Integer(number));
+ }
+
+}