diff options
author | Josh Micich <josh@apache.org> | 2009-05-19 16:29:51 +0000 |
---|---|---|
committer | Josh Micich <josh@apache.org> | 2009-05-19 16:29:51 +0000 |
commit | 6a7fc37e734c70cc7bbc3a8c30657700cdc88a3b (patch) | |
tree | fb36bc8922694f4c42e61dfbf4fda72d57542fa0 /src/java/org/apache/poi/ss/SpreadsheetVersion.java | |
parent | 25b954d792dfd4795f6ae6147eb6f1f3520eb436 (diff) | |
download | poi-6a7fc37e734c70cc7bbc3a8c30657700cdc88a3b.tar.gz poi-6a7fc37e734c70cc7bbc3a8c30657700cdc88a3b.zip |
Changed CRLF to LF in .java base src files. Minor reformatting fixes.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@776377 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/poi/ss/SpreadsheetVersion.java')
-rwxr-xr-x | src/java/org/apache/poi/ss/SpreadsheetVersion.java | 239 |
1 files changed, 119 insertions, 120 deletions
diff --git a/src/java/org/apache/poi/ss/SpreadsheetVersion.java b/src/java/org/apache/poi/ss/SpreadsheetVersion.java index 4a7b2bbe4f..316e5af06f 100755 --- a/src/java/org/apache/poi/ss/SpreadsheetVersion.java +++ b/src/java/org/apache/poi/ss/SpreadsheetVersion.java @@ -1,120 +1,119 @@ -/* ====================================================================
- 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;
-
-import org.apache.poi.ss.util.CellReference;
-
-/**
- * This enum allows spreadsheets from multiple Excel versions to be handled by the common code.
- * Properties of this enum correspond to attributes of the <i>spreadsheet</i> that are easily
- * discernable to the user. It is not intended to deal with low-level issues like file formats.
- * <p/>
- *
- * @author Josh Micich
- * @author Yegor Kozlov
- */
-public enum SpreadsheetVersion {
- /**
- * Excel97 format aka BIFF8
- * <ul>
- * <li>The total number of available columns is 256 (2^8)</li>
- * <li>The total number of available rows is 64k (2^16)</li>
- * <li>The maximum number of arguments to a function is 30</li>
- * <li>Number of conditional format conditions on a cell is 3</li>
- * </ul>
- */
- EXCEL97(0x10000, 0x0100, 30, 3),
-
- /**
- * Excel2007
- *
- * <ul>
- * <li>The total number of available columns is 16K (2^14)</li>
- * <li>The total number of available rows is 1M (2^20)</li>
- * <li>The maximum number of arguments to a function is 255</li>
- * <li>Number of conditional format conditions on a cell is unlimited
- * (actually limited by available memory in Excel)</li>
- * <ul>
- */
- EXCEL2007(0x100000, 0x4000, 255, Integer.MAX_VALUE);
-
- private final int _maxRows;
- private final int _maxColumns;
- private final int _maxFunctionArgs;
- private final int _maxCondFormats;
-
- private SpreadsheetVersion(int maxRows, int maxColumns, int maxFunctionArgs, int maxCondFormats) {
- _maxRows = maxRows;
- _maxColumns = maxColumns;
- _maxFunctionArgs = maxFunctionArgs;
- _maxCondFormats = maxCondFormats;
- }
-
- /**
- * @return the maximum number of usable rows in each spreadsheet
- */
- public int getMaxRows() {
- return _maxRows;
- }
-
- /**
- * @return the last (maximum) valid row index, equals to <code> getMaxRows() - 1 </code>
- */
- public int getLastRowIndex() {
- return _maxRows - 1;
- }
-
- /**
- * @return the maximum number of usable columns in each spreadsheet
- */
- public int getMaxColumns() {
- return _maxColumns;
- }
-
- /**
- * @return the last (maximum) valid column index, equals to <code> getMaxColumns() - 1 </code>
- */
- public int getLastColumnIndex() {
- return _maxColumns - 1;
- }
-
- /**
- * @return the maximum number arguments that can be passed to a multi-arg
- * function (e.g. COUNTIF)
- */
- public int getMaxFunctionArgs() {
- return _maxFunctionArgs;
- }
-
- /**
- *
- * @return the maximum number of conditional format conditions on a cell
- */
- public int getMaxConditionalFormats() {
- return _maxCondFormats;
- }
-
- /**
- *
- * @return the last valid column index in a ALPHA-26 representation
- * ( <code>IV</code> or <code>XFD</code>).
- */
- public String getLastColumnName() {
- return CellReference.convertNumToColString(getLastColumnIndex());
- }
-}
+/* ==================================================================== + 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; + +import org.apache.poi.ss.util.CellReference; + +/** + * This enum allows spreadsheets from multiple Excel versions to be handled by the common code. + * Properties of this enum correspond to attributes of the <i>spreadsheet</i> that are easily + * discernable to the user. It is not intended to deal with low-level issues like file formats. + * <p/> + * + * @author Josh Micich + * @author Yegor Kozlov + */ +public enum SpreadsheetVersion { + /** + * Excel97 format aka BIFF8 + * <ul> + * <li>The total number of available columns is 256 (2^8)</li> + * <li>The total number of available rows is 64k (2^16)</li> + * <li>The maximum number of arguments to a function is 30</li> + * <li>Number of conditional format conditions on a cell is 3</li> + * </ul> + */ + EXCEL97(0x10000, 0x0100, 30, 3), + + /** + * Excel2007 + * + * <ul> + * <li>The total number of available columns is 16K (2^14)</li> + * <li>The total number of available rows is 1M (2^20)</li> + * <li>The maximum number of arguments to a function is 255</li> + * <li>Number of conditional format conditions on a cell is unlimited + * (actually limited by available memory in Excel)</li> + * <ul> + */ + EXCEL2007(0x100000, 0x4000, 255, Integer.MAX_VALUE); + + private final int _maxRows; + private final int _maxColumns; + private final int _maxFunctionArgs; + private final int _maxCondFormats; + + private SpreadsheetVersion(int maxRows, int maxColumns, int maxFunctionArgs, int maxCondFormats) { + _maxRows = maxRows; + _maxColumns = maxColumns; + _maxFunctionArgs = maxFunctionArgs; + _maxCondFormats = maxCondFormats; + } + + /** + * @return the maximum number of usable rows in each spreadsheet + */ + public int getMaxRows() { + return _maxRows; + } + + /** + * @return the last (maximum) valid row index, equals to <code> getMaxRows() - 1 </code> + */ + public int getLastRowIndex() { + return _maxRows - 1; + } + + /** + * @return the maximum number of usable columns in each spreadsheet + */ + public int getMaxColumns() { + return _maxColumns; + } + + /** + * @return the last (maximum) valid column index, equals to <code> getMaxColumns() - 1 </code> + */ + public int getLastColumnIndex() { + return _maxColumns - 1; + } + + /** + * @return the maximum number arguments that can be passed to a multi-arg function (e.g. COUNTIF) + */ + public int getMaxFunctionArgs() { + return _maxFunctionArgs; + } + + /** + * + * @return the maximum number of conditional format conditions on a cell + */ + public int getMaxConditionalFormats() { + return _maxCondFormats; + } + + /** + * + * @return the last valid column index in a ALPHA-26 representation + * (<code>IV</code> or <code>XFD</code>). + */ + public String getLastColumnName() { + return CellReference.convertNumToColString(getLastColumnIndex()); + } +} |