From 75d11d8f2f10604b35c6b0fb4bb24660f32f8329 Mon Sep 17 00:00:00 2001 From: sb Date: Fri, 12 Feb 2010 14:51:00 +0100 Subject: sb118: minor code cleanup --- .../tests/java/ifc/beans/_XMultiPropertyStates.java | 7 +++---- qadevOOo/tests/java/ifc/beans/_XPropertySet.java | 17 +++++++---------- qadevOOo/tests/java/mod/_sw/CharacterStyle.java | 6 ++---- 3 files changed, 12 insertions(+), 18 deletions(-) (limited to 'qadevOOo/tests') diff --git a/qadevOOo/tests/java/ifc/beans/_XMultiPropertyStates.java b/qadevOOo/tests/java/ifc/beans/_XMultiPropertyStates.java index 4e9ca6ba136a..38094ba3ded0 100644 --- a/qadevOOo/tests/java/ifc/beans/_XMultiPropertyStates.java +++ b/qadevOOo/tests/java/ifc/beans/_XMultiPropertyStates.java @@ -58,9 +58,8 @@ public class _XMultiPropertyStates extends MultiMethodTest { public XMultiPropertyStates oObj = null; - Object[] defaults = null; - PropertyState[] states = null; - String[] names = null; + private PropertyState[] states = null; + private String[] names = null; public void before() { names = (String[]) tEnv.getObjRelation("PropertyNames"); @@ -86,7 +85,7 @@ public class _XMultiPropertyStates extends MultiMethodTest { public void _getPropertyDefaults() { boolean result = false; try { - defaults = oObj.getPropertyDefaults(names); + Object[] defaults = oObj.getPropertyDefaults(names); result = (defaults != null) && defaults.length == names.length; log.println("Number of default values: " + defaults.length); } catch (com.sun.star.beans.UnknownPropertyException e) { diff --git a/qadevOOo/tests/java/ifc/beans/_XPropertySet.java b/qadevOOo/tests/java/ifc/beans/_XPropertySet.java index a4720858f474..ccfd1db3ecf5 100644 --- a/qadevOOo/tests/java/ifc/beans/_XPropertySet.java +++ b/qadevOOo/tests/java/ifc/beans/_XPropertySet.java @@ -67,7 +67,7 @@ public class _XPropertySet extends MultiMethodTest { /** * Flag that indicates change listener was called. */ - boolean propertyChanged = false; + private boolean propertyChanged = false; /** * Listener that must be called on bound property changing. @@ -82,12 +82,12 @@ public class _XPropertySet extends MultiMethodTest { public void disposing (EventObject obj) {} }; - XPropertyChangeListener PClistener = new MyChangeListener(); + private final XPropertyChangeListener PClistener = new MyChangeListener(); /** * Flag that indicates veto listener was called. */ - boolean vetoableChanged = false; + private boolean vetoableChanged = false; /** * Listener that must be called on constrained property changing. @@ -102,19 +102,19 @@ public class _XPropertySet extends MultiMethodTest { public void disposing (EventObject obj) {} }; - XVetoableChangeListener VClistener = new MyVetoListener(); + private final XVetoableChangeListener VClistener = new MyVetoListener(); /** * Structure that collects three properties of each type to test : * Constrained, Bound and Normal. */ - public class PropsToTest { + private final class PropsToTest { String constrained = null; String bound = null; String normal = null; } - PropsToTest PTT = new PropsToTest(); + private final PropsToTest PTT = new PropsToTest(); /** * Tests method getPropertySetInfo. After test completed @@ -473,7 +473,7 @@ public class _XPropertySet extends MultiMethodTest { * Gets the properties being tested. Searches and stores by one * property of each kind (Bound, Vetoable, Normal). */ - public PropsToTest getPropsToTest(XPropertySetInfo xPSI) { + public void getPropsToTest(XPropertySetInfo xPSI) { Property[] properties = xPSI.getProperties(); String bound = ""; @@ -547,9 +547,6 @@ public class _XPropertySet extends MultiMethodTest { //get a random normal property PTT.normal=getRandomString(normal); - - return PTT; - } /** diff --git a/qadevOOo/tests/java/mod/_sw/CharacterStyle.java b/qadevOOo/tests/java/mod/_sw/CharacterStyle.java index 91ce4e8b09ad..2caab9671b39 100755 --- a/qadevOOo/tests/java/mod/_sw/CharacterStyle.java +++ b/qadevOOo/tests/java/mod/_sw/CharacterStyle.java @@ -58,15 +58,13 @@ import util.utils; * @see com.sun.star.style.CharacterStyle */ public class CharacterStyle extends TestCase { - - XTextDocument xTextDoc; - SOfficeFactory SOF = null; + private XTextDocument xTextDoc; /** * Creates text document. */ protected void initialize( TestParameters tParam, PrintWriter log ) { - SOF = SOfficeFactory.getFactory( (XMultiServiceFactory)tParam.getMSF() ); + SOfficeFactory SOF = SOfficeFactory.getFactory( (XMultiServiceFactory)tParam.getMSF() ); try { log.println( "creating a textdocument" ); xTextDoc = SOF.createTextDoc( null ); -- cgit v1.2.3