diff options
author | PJ Fanning <fanningpj@apache.org> | 2022-08-18 18:29:04 +0000 |
---|---|---|
committer | PJ Fanning <fanningpj@apache.org> | 2022-08-18 18:29:04 +0000 |
commit | fafadd5037cd051e5ed34393d8c2c73ec5ece201 (patch) | |
tree | 1ce47292b030d8297d460dee0ab8ce1768d84a11 /poi | |
parent | 6ed51c1db29c310fbeef9d1fbe5beab5861dd684 (diff) | |
download | poi-fafadd5037cd051e5ed34393d8c2c73ec5ece201.tar.gz poi-fafadd5037cd051e5ed34393d8c2c73ec5ece201.zip |
[bug-66230] don't fail to create SXSSFSheet if auto size tracker can't be initialized
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903530 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poi')
-rw-r--r-- | poi/src/main/java/org/apache/poi/ss/util/SheetUtil.java | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/poi/src/main/java/org/apache/poi/ss/util/SheetUtil.java b/poi/src/main/java/org/apache/poi/ss/util/SheetUtil.java index 5ade711dee..130169999c 100644 --- a/poi/src/main/java/org/apache/poi/ss/util/SheetUtil.java +++ b/poi/src/main/java/org/apache/poi/ss/util/SheetUtil.java @@ -233,7 +233,7 @@ public class SheetUtil { AffineTransform trans = new AffineTransform(); trans.concatenate(AffineTransform.getRotateInstance(style.getRotation()*2.0*Math.PI/360.0)); trans.concatenate( - AffineTransform.getScaleInstance(1, fontHeightMultiple) + AffineTransform.getScaleInstance(1, fontHeightMultiple) ); bounds = layout.getOutline(trans).getBounds(); } else { @@ -245,7 +245,8 @@ public class SheetUtil { } /** - * Compute width of a column and return the result + * Compute width of a column and return the result. + * Note that this fall can fail if you do not have the right fonts installed in your OS. * * @param sheet the sheet to calculate * @param column 0-based index of the column @@ -257,7 +258,8 @@ public class SheetUtil { } /** - * Compute width of a column based on a subset of the rows and return the result + * Compute width of a column based on a subset of the rows and return the result. + * Note that this fall can fail if you do not have the right fonts installed in your OS. * * @param sheet the sheet to calculate * @param column 0-based index of the column @@ -283,7 +285,8 @@ public class SheetUtil { } /** - * Get default character width using the Workbook's default font + * Get default character width using the Workbook's default font. Note that this can + * fail if your OS does not have the right fonts installed. * * @param wb the workbook to get the default character width from * @return default character width in pixels |