mirror of
https://github.com/apache/poi.git
synced 2026-02-27 20:40:08 +08:00
Bug 65260: Fix how we ignore errors when fonts are not installed
The implementation via bug 66230 was not fully working due to the caught exception. Also add this to the 2nd constructor as well. git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906218 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
7ba2f0fffa
commit
3ef2c45101
@ -62,7 +62,11 @@ public class SXSSFSheet implements Sheet, OoxmlSheetExtensions {
|
||||
_sh = xSheet;
|
||||
calculateLeftAndRightMostColumns(xSheet);
|
||||
setRandomAccessWindowSize(randomAccessWindowSize);
|
||||
_autoSizeColumnTracker = new AutoSizeColumnTracker(this);
|
||||
try {
|
||||
_autoSizeColumnTracker = new AutoSizeColumnTracker(this);
|
||||
} catch (InternalError e) {
|
||||
LOG.atWarn().log("Failed to create AutoSizeColumnTracker, possibly due to fonts not being installed in your OS", e);
|
||||
}
|
||||
}
|
||||
|
||||
private void calculateLeftAndRightMostColumns(XSSFSheet xssfSheet) {
|
||||
@ -93,7 +97,7 @@ public class SXSSFSheet implements Sheet, OoxmlSheetExtensions {
|
||||
setRandomAccessWindowSize(_workbook.getRandomAccessWindowSize());
|
||||
try {
|
||||
_autoSizeColumnTracker = new AutoSizeColumnTracker(this);
|
||||
} catch (Exception e) {
|
||||
} catch (InternalError e) {
|
||||
LOG.atWarn().log("Failed to create AutoSizeColumnTracker, possibly due to fonts not being installed in your OS", e);
|
||||
}
|
||||
}
|
||||
|
||||
@ -43,11 +43,10 @@ import org.junit.jupiter.api.Test;
|
||||
/**
|
||||
* Tests the auto-sizing behaviour of {@link SXSSFSheet} when not all
|
||||
* rows fit into the memory window size etc.
|
||||
*
|
||||
* <p>
|
||||
* see Bug #57450 which reported the original misbehaviour
|
||||
*/
|
||||
class TestAutoSizeColumnTracker {
|
||||
|
||||
private SXSSFSheet sheet;
|
||||
private SXSSFWorkbook workbook;
|
||||
private AutoSizeColumnTracker tracker;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user