From c62c8ab50388c6503bfd8a1a3a282b45dd9918ea Mon Sep 17 00:00:00 2001 From: Max Thonagel <12283268+thoniTUB@users.noreply.github.com> Date: Mon, 11 Oct 2021 11:45:48 +0200 Subject: [PATCH] use withSkipMergedCells instead of withUseMergedCells to determine maximum width of unmerged cell --- .../org/apache/poi/xssf/streaming/AutoSizeColumnTracker.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/AutoSizeColumnTracker.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/AutoSizeColumnTracker.java index 43bfdf9f834..82359fe80bf 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/AutoSizeColumnTracker.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/AutoSizeColumnTracker.java @@ -102,7 +102,7 @@ public double getMaxColumnWidth(final boolean useMergedCells) { */ public void setMaxColumnWidths(double unmergedWidth, double mergedWidth) { withUseMergedCells = Math.max(withUseMergedCells, mergedWidth); - withSkipMergedCells = Math.max(withUseMergedCells, unmergedWidth); + withSkipMergedCells = Math.max(withSkipMergedCells, unmergedWidth); } }