[Libreoffice-commits] core.git: qadevOOo/runner reportbuilder/java
Robert Antoni Buj i Gelonch
robert.buj at gmail.com
Sat Oct 18 01:40:42 PDT 2014
qadevOOo/runner/convwatch/BorderRemover.java | 2 +-
reportbuilder/java/org/libreoffice/report/SOImageService.java | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
New commits:
commit d807cba9ee60cb1404b54addf9cd3e54de89f331
Author: Robert Antoni Buj i Gelonch <robert.buj at gmail.com>
Date: Thu Oct 16 17:50:50 2014 +0200
java: loss of precission
Change-Id: I0563a76b1d2c838e6301bf7a9ed154c77a98c0d9
Reviewed-on: https://gerrit.libreoffice.org/12000
Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
Tested-by: Noel Grandin <noelgrandin at gmail.com>
diff --git a/qadevOOo/runner/convwatch/BorderRemover.java b/qadevOOo/runner/convwatch/BorderRemover.java
index 09cc785..87ba90a 100644
--- a/qadevOOo/runner/convwatch/BorderRemover.java
+++ b/qadevOOo/runner/convwatch/BorderRemover.java
@@ -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;
diff --git a/reportbuilder/java/org/libreoffice/report/SOImageService.java b/reportbuilder/java/org/libreoffice/report/SOImageService.java
index 1979c4f..7070038 100644
--- a/reportbuilder/java/org/libreoffice/report/SOImageService.java
+++ b/reportbuilder/java/org/libreoffice/report/SOImageService.java
@@ -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);
}
More information about the Libreoffice-commits
mailing list