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:28:18 UTC

svn commit: r664163 - in /cocoon/trunk/blocks/cocoon-poi/cocoon-poi-impl/src: changes/changes.xml main/java/org/apache/cocoon/components/elementprocessor/impl/poi/hssf/elements/EPStyleRegion.java

Author: antonio
Date: Fri Jun  6 15:28:18 2008
New Revision: 664163

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

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

Modified:
    cocoon/trunk/blocks/cocoon-poi/cocoon-poi-impl/src/changes/changes.xml
    cocoon/trunk/blocks/cocoon-poi/cocoon-poi-impl/src/main/java/org/apache/cocoon/components/elementprocessor/impl/poi/hssf/elements/EPStyleRegion.java

Modified: cocoon/trunk/blocks/cocoon-poi/cocoon-poi-impl/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-poi/cocoon-poi-impl/src/changes/changes.xml?rev=664163&r1=664162&r2=664163&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-poi/cocoon-poi-impl/src/changes/changes.xml (original)
+++ cocoon/trunk/blocks/cocoon-poi/cocoon-poi-impl/src/changes/changes.xml Fri Jun  6 15:28:18 2008
@@ -24,15 +24,18 @@
     +-->
 <document>
   <body>
-    <release version="1.0.0-M1" date="2007-??-??" description="unreleased">    
+    <release version="1.0.0-M1" date="2008-??-??" description="unreleased">
+      <action dev="antonio" type="fix" fixes-bug="COCOON-2209" due-to="Reynaldo Porras" due-to-email="rporras@agssa.net">
+        Formatted style regions stop creating style at 2000 rows.
+      </action>
       <action dev="anathaniel" type="update">
         Update to poi-3.0.2.
-      </action> 
+      </action>
       <action dev="antonio" type="fix" fixes-bug="COCOON-1440" due-to="Krystian Nowak" due-to-email="krystian@man.poznan.pl">
         Color string normalization.
-      </action> 
+      </action>
       <action dev="felixk" type="update">
-        Cocoon-Poi-Block becomes a normal Spring application which means that it is 
+        Cocoon-Poi-Block becomes a normal Spring application which means that it is
         initialized by Spring and not the other way around.
       </action>
       <action dev="joerg" type="fix" fixes-bug="COCOON-1976" due-to="Rob Berens">
@@ -40,7 +43,7 @@
       </action>
       <action dev="reinhard" type="add">
         Initial creation.
-      </action>      
+      </action>
     </release>
   </body>
 </document>

Modified: cocoon/trunk/blocks/cocoon-poi/cocoon-poi-impl/src/main/java/org/apache/cocoon/components/elementprocessor/impl/poi/hssf/elements/EPStyleRegion.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-poi/cocoon-poi-impl/src/main/java/org/apache/cocoon/components/elementprocessor/impl/poi/hssf/elements/EPStyleRegion.java?rev=664163&r1=664162&r2=664163&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-poi/cocoon-poi-impl/src/main/java/org/apache/cocoon/components/elementprocessor/impl/poi/hssf/elements/EPStyleRegion.java (original)
+++ cocoon/trunk/blocks/cocoon-poi/cocoon-poi-impl/src/main/java/org/apache/cocoon/components/elementprocessor/impl/poi/hssf/elements/EPStyleRegion.java Fri Jun  6 15:28:18 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.
@@ -56,8 +56,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
@@ -84,10 +83,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
@@ -96,6 +91,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();