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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to