summaryrefslogtreecommitdiffstats
path: root/poi
diff options
context:
space:
mode:
authorPJ Fanning <fanningpj@apache.org>2022-07-10 14:38:04 +0000
committerPJ Fanning <fanningpj@apache.org>2022-07-10 14:38:04 +0000
commit5386fe171d05e2af97c2e80c3e4a2a04d548a863 (patch)
treeea50816665ec66b1d4a188e578813fa22a0ab555 /poi
parent69036c64eaeff5dc01d8f28c4639ed886c3caf43 (diff)
downloadpoi-5386fe171d05e2af97c2e80c3e4a2a04d548a863.tar.gz
poi-5386fe171d05e2af97c2e80c3e4a2a04d548a863.zip
try to fix HSSF tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902635 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poi')
-rw-r--r--poi/src/main/java/org/apache/poi/ss/util/CellUtil.java11
1 files changed, 5 insertions, 6 deletions
diff --git a/poi/src/main/java/org/apache/poi/ss/util/CellUtil.java b/poi/src/main/java/org/apache/poi/ss/util/CellUtil.java
index bc47b10da0..e509dd2aaf 100644
--- a/poi/src/main/java/org/apache/poi/ss/util/CellUtil.java
+++ b/poi/src/main/java/org/apache/poi/ss/util/CellUtil.java
@@ -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)));