You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by an...@apache.org on 2008/06/07 00:18:35 UTC

svn commit: r664158 - in /cocoon/branches/BRANCH_2_1_X: src/blocks/poi/java/org/apache/cocoon/components/elementprocessor/impl/poi/hssf/elements/EPStyleRegion.java status.xml

Author: antonio
Date: Fri Jun  6 15:18:35 2008
New Revision: 664158

URL: http://svn.apache.org/viewvc?rev=664158&view=rev
Log:

<action dev="AG" type="fix" fixes-bug="COCOON-2209" due-to="Reynaldo Porras" due-to-email="rporras@agssa.net">
  POI Block: formatted style regions stop creating style at 2000 rows.
</action>

Modified:
    cocoon/branches/BRANCH_2_1_X/src/blocks/poi/java/org/apache/cocoon/components/elementprocessor/impl/poi/hssf/elements/EPStyleRegion.java
    cocoon/branches/BRANCH_2_1_X/status.xml

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/poi/java/org/apache/cocoon/components/elementprocessor/impl/poi/hssf/elements/EPStyleRegion.java
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X/src/blocks/poi/java/org/apache/cocoon/components/elementprocessor/impl/poi/hssf/elements/EPStyleRegion.java?rev=664158&r1=664157&r2=664158&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/poi/java/org/apache/cocoon/components/elementprocessor/impl/poi/hssf/elements/EPStyleRegion.java (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/poi/java/org/apache/cocoon/components/elementprocessor/impl/poi/hssf/elements/EPStyleRegion.java Fri Jun  6 15:18:35 2008
@@ -5,9 +5,9 @@
  * 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.
@@ -58,8 +58,7 @@
 
     //kludge constant to fix gnumeric's love of declaring large stlye regions
     //for the blank sections of the sheet w/no apparent purpose that we can
-    //
-    private int MAX_AREA = 2001;
+    private int MAX_AREA = 65537;  // Use max row (2^16 + 1), see: http://markmail.org/message/j5svscx3dxo4zyej
 
     /**
      * constructor
@@ -86,10 +85,6 @@
         Region region = new Region(getStartRow(), (short)getStartCol(),
                 getEndRow(), (short)getEndCol());
 
-        //        if (region.getRowFrom() == 0 &&
-        //            region.getColumnFrom() ==0)
-        //            getLogger().debug("got 0,0");
-
         getLogger().debug("region area is " + region.getArea());
         if (region.getArea() < MAX_AREA) {
             //protect against stupid mega regions
@@ -98,6 +93,7 @@
             getLogger().debug("region added");
             _style = getSheet().addStyleRegion(region); //test
         } else {
+            getLogger().debug("Region NOT added!. Reason: region.getArea() = " + region.getArea() + " > " + MAX_AREA);
             invalid = true;
         }
         colorhash = ((EPStyles)parent).getColorHash();

Modified: cocoon/branches/BRANCH_2_1_X/status.xml
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X/status.xml?rev=664158&r1=664157&r2=664158&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/status.xml (original)
+++ cocoon/branches/BRANCH_2_1_X/status.xml Fri Jun  6 15:18:35 2008
@@ -182,6 +182,9 @@
 
   <changes>
   <release version="2.1.12" date="TBD">
+    <action dev="AG" type="fix" fixes-bug="COCOON-2209" due-to="Reynaldo Porras" due-to-email="rporras@agssa.net">
+      POI Block: formatted style regions stop creating style at 2000 rows.
+    </action>
     <action dev="AS" type="fix" fixes-bug="COCOON-2152" due-to="Ellis Pritchard" due-to-email="epritcha@wiley.com">
       Eventcache: Events are persisted and restored and sample works
     </action>