summaryrefslogtreecommitdiff
path: root/sw/qa
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 /sw/qa
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 'sw/qa')
-rw-r--r--sw/qa/complex/writer/CheckTable.java10
-rw-r--r--sw/qa/complex/writer/LoadSaveTest.java14
2 files changed, 10 insertions, 14 deletions
diff --git a/sw/qa/complex/writer/CheckTable.java b/sw/qa/complex/writer/CheckTable.java
index 54d90afc302a..83b92da818f8 100644
--- a/sw/qa/complex/writer/CheckTable.java
+++ b/sw/qa/complex/writer/CheckTable.java
@@ -51,18 +51,16 @@ public class CheckTable
connection.tearDown();
}
- private XMultiServiceFactory m_xMSF = null;
- private XComponentContext m_xContext = null;
private XTextDocument m_xDoc = null;
@Before public void before() throws Exception
{
- m_xMSF = UnoRuntime.queryInterface(
+ XMultiServiceFactory xMSF = UnoRuntime.queryInterface(
XMultiServiceFactory.class,
connection.getComponentContext().getServiceManager());
- m_xContext = connection.getComponentContext();
- assertNotNull("could not get component context.", m_xContext);
- m_xDoc = util.WriterTools.createTextDoc(m_xMSF);
+ XComponentContext xContext = connection.getComponentContext();
+ assertNotNull("could not get component context.", xContext);
+ m_xDoc = util.WriterTools.createTextDoc(xMSF);
}
@After public void after()
diff --git a/sw/qa/complex/writer/LoadSaveTest.java b/sw/qa/complex/writer/LoadSaveTest.java
index 323eb8f4e8d5..34426256f8cf 100644
--- a/sw/qa/complex/writer/LoadSaveTest.java
+++ b/sw/qa/complex/writer/LoadSaveTest.java
@@ -63,9 +63,7 @@ public class LoadSaveTest
}
private XMultiServiceFactory m_xMSF = null;
- private XComponentContext m_xContext = null;
private XGlobalEventBroadcaster m_xGEB = null;
- private String m_TmpDir = null;
private String m_fileURL = "file://";
// these should be parameters or something?
@@ -74,13 +72,13 @@ public class LoadSaveTest
@Before public void before() throws Exception
{
- m_xContext = connection.getComponentContext();
- assertNotNull("could not get component context.", m_xContext);
+ XComponentContext xContext = connection.getComponentContext();
+ assertNotNull("could not get component context.", xContext);
m_xMSF = UnoRuntime.queryInterface(
- XMultiServiceFactory.class, m_xContext.getServiceManager());
- m_xGEB = theGlobalEventBroadcaster.get(m_xContext);
- m_TmpDir = util.utils.getOfficeTemp/*Dir*/(m_xMSF);
- System.out.println("tempdir: " + m_TmpDir);
+ XMultiServiceFactory.class, xContext.getServiceManager());
+ m_xGEB = theGlobalEventBroadcaster.get(xContext);
+ String sTmpDir = util.utils.getOfficeTemp/*Dir*/(m_xMSF);
+ System.out.println("tempdir: " + sTmpDir);
System.out.println("sourcedir: " + m_SourceDir);
System.out.println("targetdir: " + m_TargetDir);
}