mirror of https://github.com/apache/poi.git
lgtm issue
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902804 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ad6af709b8
commit
f736e2c65b
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue