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 2023/03/08 11:03:20 UTC
svn commit: r1908191 - /poi/trunk/poi-scratchpad/src/main/java/org/apache/poi/hssf/converter/AbstractExcelUtils.java
Author: fanningpj
Date: Wed Mar 8 11:03:19 2023
New Revision: 1908191
URL: http://svn.apache.org/viewvc?rev=1908191&view=rev
Log:
[bug-66518] fix issue in AbstractExcelUtils.getColor(HSSFColor)
Modified:
poi/trunk/poi-scratchpad/src/main/java/org/apache/poi/hssf/converter/AbstractExcelUtils.java
Modified: poi/trunk/poi-scratchpad/src/main/java/org/apache/poi/hssf/converter/AbstractExcelUtils.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi-scratchpad/src/main/java/org/apache/poi/hssf/converter/AbstractExcelUtils.java?rev=1908191&r1=1908190&r2=1908191&view=diff
==============================================================================
--- poi/trunk/poi-scratchpad/src/main/java/org/apache/poi/hssf/converter/AbstractExcelUtils.java (original)
+++ poi/trunk/poi-scratchpad/src/main/java/org/apache/poi/hssf/converter/AbstractExcelUtils.java Wed Mar 8 11:03:19 2023
@@ -113,13 +113,13 @@ class AbstractExcelUtils {
StringBuilder stringBuilder = new StringBuilder(7);
stringBuilder.append('#');
for (short s : color.getTriplet()) {
- if (s < 10) {
+ String hex = Integer.toHexString(s);
+ if (hex.length() == 1) {
stringBuilder.append('0');
}
-
- stringBuilder.append(Integer.toHexString(s));
+ stringBuilder.append(hex);
}
- String result = stringBuilder.toString();
+ String result = color.getHexString();
if (result.equals("#ffffff")) {
return "white";
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org