poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From one...@apache.org
Subject svn commit: r1716005 - /poi/trunk/src/java/org/apache/poi/ss/util/ImageUtils.java
Date Tue, 24 Nov 2015 01:11:57 GMT
Author: onealj
Date: Tue Nov 24 01:11:57 2015
New Revision: 1716005

URL: http://svn.apache.org/viewvc?rev=1716005&view=rev
Log:
FindBug warning: ICAST_IDIV_CAST_TO_DOUBLE: integral division result cast to double

Modified:
    poi/trunk/src/java/org/apache/poi/ss/util/ImageUtils.java

Modified: poi/trunk/src/java/org/apache/poi/ss/util/ImageUtils.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/util/ImageUtils.java?rev=1716005&r1=1716004&r2=1716005&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/util/ImageUtils.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/util/ImageUtils.java Tue Nov 24 01:11:57 2015
@@ -158,9 +158,9 @@ public class ImageUtils {
         //space in the leftmost cell
         w = sheet.getColumnWidthInPixels(col2++);
         if (isHSSF) {
-            w *= 1 - anchor.getDx1()/1024d;
+            w *= 1d - anchor.getDx1()/1024d;
         } else {
-            w -= anchor.getDx1()/EMU_PER_PIXEL;
+            w -= anchor.getDx1()/(double)EMU_PER_PIXEL;
         }
         
         while(w < scaledWidth){
@@ -280,6 +280,6 @@ public class ImageUtils {
     private static double getRowHeightInPixels(Sheet sheet, int rowNum) {
         Row r = sheet.getRow(rowNum);
         double points = (r == null) ? sheet.getDefaultRowHeightInPoints() : r.getHeightInPoints();
-        return Units.toEMU(points)/EMU_PER_PIXEL;
+        return Units.toEMU(points)/(double)EMU_PER_PIXEL;
     }
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message