summaryrefslogtreecommitdiff
path: root/qadevOOo/runner/convwatch/ImageHelper.java
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-11-12 09:55:57 +0200
committerNoel Grandin <noelgrandin@gmail.com>2014-11-12 11:03:29 +0000
commitbb437029c1e5331bcc3f8fb2fc87837142a52f33 (patch)
tree56bde4059792a5284e90ae3b10ee4388cc913a54 /qadevOOo/runner/convwatch/ImageHelper.java
parent84f7f412bfc9e18b1ff8b133ceda7757eae28c36 (diff)
java: convert fields to local variables where possible
found by PMD Change-Id: I05b45382b8fb1b734657ce9421a20e6ef6fbe542 Reviewed-on: https://gerrit.libreoffice.org/12376 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'qadevOOo/runner/convwatch/ImageHelper.java')
-rw-r--r--qadevOOo/runner/convwatch/ImageHelper.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/qadevOOo/runner/convwatch/ImageHelper.java b/qadevOOo/runner/convwatch/ImageHelper.java
index 914c70ef7a4f..2644223e2ebb 100644
--- a/qadevOOo/runner/convwatch/ImageHelper.java
+++ b/qadevOOo/runner/convwatch/ImageHelper.java
@@ -29,7 +29,6 @@ class ImageHelper
private Image m_aImage;
private int[] m_aPixels;
private int m_w = 0;
- private int m_h = 0;
private ImageHelper(Image _aImage)
@@ -38,11 +37,11 @@ class ImageHelper
// grab all (consume much memory)
m_w = getWidth();
- m_h = getHeight();
+ int h = getHeight();
int x = 0;
int y = 0;
- m_aPixels = new int[m_w * m_h];
- PixelGrabber pg = new PixelGrabber(m_aImage, x, y, m_w, m_h, m_aPixels, 0, m_w);
+ m_aPixels = new int[m_w * h];
+ PixelGrabber pg = new PixelGrabber(m_aImage, x, y, m_w, h, m_aPixels, 0, m_w);
try {
pg.grabPixels();
} catch (InterruptedException e) {