From ddfedd167a45c7d651965195f2a761fa4a6a32cb Mon Sep 17 00:00:00 2001 From: Javen O'Neal Date: Tue, 24 Nov 2015 01:11:57 +0000 Subject: [PATCH] FindBug warning: ICAST_IDIV_CAST_TO_DOUBLE: integral division result cast to double git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1716005 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/poi/ss/util/ImageUtils.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/java/org/apache/poi/ss/util/ImageUtils.java b/src/java/org/apache/poi/ss/util/ImageUtils.java index 16176682ad..0e7de24eec 100644 --- a/src/java/org/apache/poi/ss/util/ImageUtils.java +++ b/src/java/org/apache/poi/ss/util/ImageUtils.java @@ -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; } } -- 2.39.5