lgtm issue

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902804 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
PJ Fanning 2022-07-17 10:00:17 +00:00
parent ad6af709b8
commit f736e2c65b
1 changed files with 2 additions and 2 deletions

View File

@ -949,10 +949,10 @@ public class AddDimensionedImage {
* pixel units to excel width units(units of 1/256th of a character width) * pixel units to excel width units(units of 1/256th of a character width)
*/ */
public static short pixel2WidthUnits(int pxs) { public static short pixel2WidthUnits(int pxs) {
short widthUnits = (short) (EXCEL_COLUMN_WIDTH_FACTOR * int widthUnits = (EXCEL_COLUMN_WIDTH_FACTOR *
(pxs / UNIT_OFFSET_LENGTH)); (pxs / UNIT_OFFSET_LENGTH));
widthUnits += UNIT_OFFSET_MAP[(pxs % UNIT_OFFSET_LENGTH)]; widthUnits += UNIT_OFFSET_MAP[(pxs % UNIT_OFFSET_LENGTH)];
return widthUnits; return (short) widthUnits;
} }
/** /**