Author: fanningpj
Date: Sun Jul 17 10:00:17 2022
New Revision: 1902804

URL: http://svn.apache.org/viewvc?rev=1902804&view=rev
Log:
lgtm issue

Modified:
    
poi/trunk/poi-examples/src/main/java/org/apache/poi/examples/ss/AddDimensionedImage.java

Modified: 
poi/trunk/poi-examples/src/main/java/org/apache/poi/examples/ss/AddDimensionedImage.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/poi-examples/src/main/java/org/apache/poi/examples/ss/AddDimensionedImage.java?rev=1902804&r1=1902803&r2=1902804&view=diff
==============================================================================
--- 
poi/trunk/poi-examples/src/main/java/org/apache/poi/examples/ss/AddDimensionedImage.java
 (original)
+++ 
poi/trunk/poi-examples/src/main/java/org/apache/poi/examples/ss/AddDimensionedImage.java
 Sun Jul 17 10:00:17 2022
@@ -949,10 +949,10 @@ public class AddDimensionedImage {
          * pixel units to excel width units(units of 1/256th of a character 
width)
          */
         public static short pixel2WidthUnits(int pxs) {
-            short widthUnits = (short) (EXCEL_COLUMN_WIDTH_FACTOR *
+            int widthUnits = (EXCEL_COLUMN_WIDTH_FACTOR *
                     (pxs / UNIT_OFFSET_LENGTH));
             widthUnits += UNIT_OFFSET_MAP[(pxs % UNIT_OFFSET_LENGTH)];
-            return widthUnits;
+            return (short) widthUnits;
         }
 
         /**



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to