You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by fa...@apache.org on 2022/07/10 14:38:04 UTC
svn commit: r1902635 - /poi/trunk/poi/src/main/java/org/apache/poi/ss/util/CellUtil.java
Author: fanningpj
Date: Sun Jul 10 14:38:04 2022
New Revision: 1902635
URL: http://svn.apache.org/viewvc?rev=1902635&view=rev
Log:
try to fix HSSF tests
Modified:
poi/trunk/poi/src/main/java/org/apache/poi/ss/util/CellUtil.java
Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/util/CellUtil.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/util/CellUtil.java?rev=1902635&r1=1902634&r2=1902635&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/util/CellUtil.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/util/CellUtil.java Sun Jul 10 14:38:04 2022
@@ -545,25 +545,24 @@ public final class CellUtil {
style.setDataFormat(getShort(properties, DATA_FORMAT));
style.setFillPattern(getFillPattern(properties, FILL_PATTERN));
+ style.setFillForegroundColor(getShort(properties, FILL_FOREGROUND_COLOR));
+ style.setFillBackgroundColor(getShort(properties, FILL_BACKGROUND_COLOR));
+
Color foregroundFillColor = getColor(properties, FILL_FOREGROUND_COLOR_COLOR);
Color backgroundFillColor = getColor(properties, FILL_BACKGROUND_COLOR_COLOR);
if (foregroundFillColor != null) {
try {
style.setFillForegroundColor(foregroundFillColor);
} catch (IllegalArgumentException iae) {
- style.setFillForegroundColor(getShort(properties, FILL_FOREGROUND_COLOR));
+ LOGGER.atDebug().log("Mismatched FillForegroundColor instance used", iae);
}
- } else {
- style.setFillForegroundColor(getShort(properties, FILL_FOREGROUND_COLOR));
}
if (backgroundFillColor != null) {
try {
style.setFillBackgroundColor(backgroundFillColor);
} catch (IllegalArgumentException iae) {
- style.setFillBackgroundColor(getShort(properties, FILL_BACKGROUND_COLOR));
+ LOGGER.atDebug().log("Mismatched FillBackgroundColor instance used", iae);
}
- } else {
- style.setFillBackgroundColor(getShort(properties, FILL_BACKGROUND_COLOR));
}
style.setFont(workbook.getFontAt(getInt(properties, FONT)));
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org