Kaydet (Commit) d807cba9 authored tarafından Robert Antoni Buj i Gelonch's avatar Robert Antoni Buj i Gelonch Kaydeden (comit) Noel Grandin

java: loss of precission

Change-Id: I0563a76b1d2c838e6301bf7a9ed154c77a98c0d9
Reviewed-on: https://gerrit.libreoffice.org/12000Reviewed-by: 's avatarNoel Grandin <noelgrandin@gmail.com>
Tested-by: 's avatarNoel Grandin <noelgrandin@gmail.com>
üst b6c32f3f
......@@ -77,7 +77,7 @@ class BorderRemover
}
// calculate tolerance halve
double nTolerable = (_nTolerance * 256 / 100);
int nTolerable = (int) (_nTolerance * 256.0 / 100.0);
if (nTolerable < 0)
{
nTolerable = 0;
......
......@@ -103,7 +103,7 @@ public class SOImageService implements ImageService
{
final Size imageSize = (Size) xImage.getPropertyValue("SizePixel");
final int dpi = java.awt.Toolkit.getDefaultToolkit().getScreenResolution();
final double fac = 2540 / dpi;
final double fac = 2540.0 / dpi;
dim.Width = (int) (imageSize.Width * fac);
dim.Height = (int) (imageSize.Height * fac);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment