You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by ni...@apache.org on 2014/08/22 10:59:25 UTC

svn commit: r1619710 - /poi/trunk/src/java/org/apache/poi/ss/SpreadsheetVersion.java

Author: nick
Date: Fri Aug 22 08:59:25 2014
New Revision: 1619710

URL: http://svn.apache.org/r1619710
Log:
Include the maximum number of Cell Styles in the spreadsheet versions class

Modified:
    poi/trunk/src/java/org/apache/poi/ss/SpreadsheetVersion.java

Modified: poi/trunk/src/java/org/apache/poi/ss/SpreadsheetVersion.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/SpreadsheetVersion.java?rev=1619710&r1=1619709&r2=1619710&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/SpreadsheetVersion.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/SpreadsheetVersion.java Fri Aug 22 08:59:25 2014
@@ -36,10 +36,11 @@ public enum SpreadsheetVersion {
 	 * <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>
+     * <li>Number of cell styles is 4000</li>
      * <li>Length of text cell contents is 32767</li>
 	 * </ul>
 	 */
-	EXCEL97(0x10000, 0x0100, 30, 3, 32767),
+	EXCEL97(0x10000, 0x0100, 30, 3, 4000, 32767),
 
 	/**
 	 * Excel2007
@@ -50,22 +51,25 @@ public enum SpreadsheetVersion {
 	 * <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>
+     * <li>Number of cell styles is 64000</li>
      * <li>Length of text cell contents is 32767</li>
 	 * <ul>
 	 */
-	EXCEL2007(0x100000, 0x4000, 255, Integer.MAX_VALUE, 32767);
+	EXCEL2007(0x100000, 0x4000, 255, Integer.MAX_VALUE, 64000, 32767);
 
 	private final int _maxRows;
 	private final int _maxColumns;
 	private final int _maxFunctionArgs;
 	private final int _maxCondFormats;
+    private final int _maxCellStyles;
     private final int _maxTextLength;
 
-	private SpreadsheetVersion(int maxRows, int maxColumns, int maxFunctionArgs, int maxCondFormats, int maxText) {
+	private SpreadsheetVersion(int maxRows, int maxColumns, int maxFunctionArgs, int maxCondFormats, int maxCellStyles, int maxText) {
 		_maxRows = maxRows;
 		_maxColumns = maxColumns;
 		_maxFunctionArgs = maxFunctionArgs;
 		_maxCondFormats = maxCondFormats;
+		_maxCellStyles = maxCellStyles;
         _maxTextLength = maxText;
     }
 
@@ -105,13 +109,19 @@ public enum SpreadsheetVersion {
 	}
 
 	/**
-	 *
 	 * @return the maximum number of conditional format conditions on a cell
 	 */
 	public int getMaxConditionalFormats() {
 		return _maxCondFormats;
 	}
 
+    /**
+    * @return the maximum number of cell styles per spreadsheet
+    */
+   public int getMaxCellStyles() {
+       return _maxCellStyles;
+   }
+
 	/**
 	 *
 	 * @return the last valid column index in a ALPHA-26 representation
@@ -127,5 +137,4 @@ public enum SpreadsheetVersion {
     public int getMaxTextLength() {
         return _maxTextLength;
     }
-
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org