Bugzilla 51356: Support autoSizeColumn in SXSSF
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1134721 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
07253cbc8b
commit
7351a3794c
@ -34,6 +34,7 @@
|
|||||||
|
|
||||||
<changes>
|
<changes>
|
||||||
<release version="3.8-beta4" date="2011-??-??">
|
<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">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">51305 - Add sprmTCellPaddingDefault support in HWPF</action>
|
||||||
<action dev="poi-developers" type="add">51265 - Enhanced Handling of Picture Parts in XWPF</action>
|
<action dev="poi-developers" type="add">51265 - Enhanced Handling of Picture Parts in XWPF</action>
|
||||||
|
@ -26,6 +26,7 @@ import org.apache.poi.hpsf.IllegalPropertySetDataException;
|
|||||||
import org.apache.poi.ss.usermodel.*;
|
import org.apache.poi.ss.usermodel.*;
|
||||||
import org.apache.poi.ss.util.CellReference;
|
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.xssf.usermodel.XSSFSheet;
|
||||||
|
|
||||||
import org.apache.poi.hssf.util.PaneInformation;
|
import org.apache.poi.hssf.util.PaneInformation;
|
||||||
@ -1049,7 +1050,7 @@ public class SXSSFSheet implements Sheet, Cloneable
|
|||||||
*/
|
*/
|
||||||
public void autoSizeColumn(int column)
|
public void autoSizeColumn(int column)
|
||||||
{
|
{
|
||||||
_sh.autoSizeColumn(column);
|
autoSizeColumn(column, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1067,7 +1068,10 @@ public class SXSSFSheet implements Sheet, Cloneable
|
|||||||
*/
|
*/
|
||||||
public void autoSizeColumn(int column, boolean useMergedCells)
|
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));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user