poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ye...@apache.org
Subject svn commit: r1134721 - in /poi/trunk/src: documentation/content/xdocs/status.xml ooxml/java/org/apache/poi/xssf/streaming/SXSSFSheet.java
Date Sat, 11 Jun 2011 18:17:16 GMT
Author: yegor
Date: Sat Jun 11 18:17:15 2011
New Revision: 1134721

URL: http://svn.apache.org/viewvc?rev=1134721&view=rev
Log:
Bugzilla 51356: Support autoSizeColumn in SXSSF

Modified:
    poi/trunk/src/documentation/content/xdocs/status.xml
    poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFSheet.java

Modified: poi/trunk/src/documentation/content/xdocs/status.xml
URL: http://svn.apache.org/viewvc/poi/trunk/src/documentation/content/xdocs/status.xml?rev=1134721&r1=1134720&r2=1134721&view=diff
==============================================================================
--- poi/trunk/src/documentation/content/xdocs/status.xml (original)
+++ poi/trunk/src/documentation/content/xdocs/status.xml Sat Jun 11 18:17:15 2011
@@ -34,6 +34,7 @@
 
     <changes>
         <release version="3.8-beta4" date="2011-??-??">
+           <action dev="poi-developers" type="add">51356 - Support autoSizeColumn in
SXSSF</action>
            <action dev="poi-developers" type="add">51335 - Parse picture goal and crop
sizes in HWPF</action>
            <action dev="poi-developers" type="add">51305 - Add sprmTCellPaddingDefault
support in HWPF</action>
            <action dev="poi-developers" type="add">51265 - Enhanced Handling of Picture
Parts in XWPF</action>

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFSheet.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFSheet.java?rev=1134721&r1=1134720&r2=1134721&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFSheet.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFSheet.java Sat Jun 11 18:17:15
2011
@@ -26,6 +26,7 @@ import org.apache.poi.hpsf.IllegalProper
 import org.apache.poi.ss.usermodel.*;
 import org.apache.poi.ss.util.CellReference;
 
+import org.apache.poi.ss.util.SheetUtil;
 import org.apache.poi.xssf.usermodel.XSSFSheet;
 
 import org.apache.poi.hssf.util.PaneInformation;
@@ -1049,7 +1050,7 @@ public class SXSSFSheet implements Sheet
      */
     public void autoSizeColumn(int column)
     {
-        _sh.autoSizeColumn(column);
+        autoSizeColumn(column, false);
     }
 
     /**
@@ -1067,7 +1068,10 @@ public class SXSSFSheet implements Sheet
      */
     public void autoSizeColumn(int column, boolean useMergedCells)
     {
-        _sh.autoSizeColumn(column, useMergedCells);
+        double width = SheetUtil.getColumnWidth(this, column, useMergedCells);
+        if(width != -1){
+            setColumnWidth(column, (int)(width*256));
+        }
     }
 
     /**



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


Mime
View raw message