summaryrefslogtreecommitdiff
path: root/forms
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 /forms
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 'forms')
-rw-r--r--forms/qa/integration/forms/CellBinding.java7
-rw-r--r--forms/qa/integration/forms/FormControlTest.java5
-rw-r--r--forms/qa/integration/forms/XMLFormSettings.java5
-rw-r--r--forms/qa/org/openoffice/xforms/XMLDocument.java7
4 files changed, 10 insertions, 14 deletions
diff --git a/forms/qa/integration/forms/CellBinding.java b/forms/qa/integration/forms/CellBinding.java
index ff57b4873280..3a981f18c0c8 100644
--- a/forms/qa/integration/forms/CellBinding.java
+++ b/forms/qa/integration/forms/CellBinding.java
@@ -43,8 +43,6 @@ public class CellBinding extends complexlib.ComplexTestCase
private SpreadsheetDocument m_document;
/** our form layer */
private FormLayer m_formLayer;
- /** our service factory */
- private XMultiServiceFactory m_orb;
@Override
public String[] getTestMethodNames()
@@ -89,8 +87,9 @@ public class CellBinding extends complexlib.ComplexTestCase
/* ------------------------------------------------------------------ */
public void before() throws com.sun.star.uno.Exception, java.lang.Exception
{
- m_orb = param.getMSF();
- m_document = new SpreadsheetDocument( m_orb );
+ /* our service factory */
+ XMultiServiceFactory orb = param.getMSF();
+ m_document = new SpreadsheetDocument( orb );
m_formLayer = new FormLayer( m_document );
}
diff --git a/forms/qa/integration/forms/FormControlTest.java b/forms/qa/integration/forms/FormControlTest.java
index f697bc70b7f4..ba892e037608 100644
--- a/forms/qa/integration/forms/FormControlTest.java
+++ b/forms/qa/integration/forms/FormControlTest.java
@@ -54,7 +54,6 @@ public class FormControlTest extends complexlib.ComplexTestCase implements XSQLE
private DocumentHelper m_document;
private FormLayer m_formLayer;
private XPropertySet m_masterForm;
- private XFormController m_masterFormController;
private String m_sImageURL;
private SQLErrorEvent m_mostRecentErrorEvent;
@@ -548,9 +547,9 @@ public class FormControlTest extends complexlib.ComplexTestCase implements XSQLE
// switch the forms into data entry mode
m_document.getCurrentView( ).toggleFormDesignMode( );
- m_masterFormController = m_document.getCurrentView().getFormController( m_masterForm );
+ XFormController masterFormController = m_document.getCurrentView().getFormController( m_masterForm );
XSQLErrorBroadcaster errorBroadcaster = UnoRuntime.queryInterface( XSQLErrorBroadcaster.class,
- m_masterFormController );
+ masterFormController );
errorBroadcaster.addSQLErrorListener( this );
// set the focus to the ID control
diff --git a/forms/qa/integration/forms/XMLFormSettings.java b/forms/qa/integration/forms/XMLFormSettings.java
index ae8f99d10336..8b393d0943c4 100644
--- a/forms/qa/integration/forms/XMLFormSettings.java
+++ b/forms/qa/integration/forms/XMLFormSettings.java
@@ -38,7 +38,6 @@ import org.openoffice.xforms.XMLDocument;
public class XMLFormSettings extends complexlib.ComplexTestCase
{
- private XMultiServiceFactory m_orb;
private XMLDocument m_document;
private Model m_defaultModel;
private FormLayer m_formLayer;
@@ -66,8 +65,8 @@ public class XMLFormSettings extends complexlib.ComplexTestCase
public void before() throws java.lang.Exception
{
// create the document and assign related members
- m_orb = param.getMSF();
- m_document = new XMLDocument( m_orb );
+ XMultiServiceFactory orb = param.getMSF();
+ m_document = new XMLDocument( orb );
m_formLayer = new FormLayer( m_document );
// create a simple structure in the DOM tree: an element with two attributes
diff --git a/forms/qa/org/openoffice/xforms/XMLDocument.java b/forms/qa/org/openoffice/xforms/XMLDocument.java
index e2236767a346..d16ab5bd6047 100644
--- a/forms/qa/org/openoffice/xforms/XMLDocument.java
+++ b/forms/qa/org/openoffice/xforms/XMLDocument.java
@@ -32,7 +32,6 @@ import integration.forms.DocumentType;
public class XMLDocument extends integration.forms.DocumentHelper
{
- private XFormsSupplier m_formsSupplier;
private XNameContainer m_forms;
/* ------------------------------------------------------------------ */
@@ -52,13 +51,13 @@ public class XMLDocument extends integration.forms.DocumentHelper
/* ------------------------------------------------------------------ */
private void impl_initialize( XComponent _document )
{
- m_formsSupplier = UnoRuntime.queryInterface( XFormsSupplier.class,
+ XFormsSupplier formsSupplier = UnoRuntime.queryInterface( XFormsSupplier.class,
_document );
- if ( m_formsSupplier == null )
+ if ( formsSupplier == null )
throw new IllegalArgumentException();
- m_forms = m_formsSupplier.getXForms();
+ m_forms = formsSupplier.getXForms();
}
/* ------------------------------------------------------------------ */