aboutsummaryrefslogtreecommitdiffstats
path: root/poi-examples/src
diff options
context:
space:
mode:
authorPJ Fanning <fanningpj@apache.org>2022-07-17 10:00:17 +0000
committerPJ Fanning <fanningpj@apache.org>2022-07-17 10:00:17 +0000
commitf736e2c65bf916b1ac124f99f82b972cdd0b0368 (patch)
tree86cacaee95cea172dad6bb51a217cc9833cac906 /poi-examples/src
parentad6af709b8bba90512f51319f63966fdc9619592 (diff)
downloadpoi-f736e2c65bf916b1ac124f99f82b972cdd0b0368.tar.gz
poi-f736e2c65bf916b1ac124f99f82b972cdd0b0368.zip
lgtm issue
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902804 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poi-examples/src')
-rw-r--r--poi-examples/src/main/java/org/apache/poi/examples/ss/AddDimensionedImage.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/poi-examples/src/main/java/org/apache/poi/examples/ss/AddDimensionedImage.java b/poi-examples/src/main/java/org/apache/poi/examples/ss/AddDimensionedImage.java
index c41e4c0007..67fbb68142 100644
--- a/poi-examples/src/main/java/org/apache/poi/examples/ss/AddDimensionedImage.java
+++ b/poi-examples/src/main/java/org/apache/poi/examples/ss/AddDimensionedImage.java
@@ -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;
}
/**