diff options
author | Noel Grandin <noel@peralex.com> | 2012-06-27 16:22:54 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-06-29 22:03:01 +0200 |
commit | b707a707aae71f3e05dc096d8de14d2509e2b62f (patch) | |
tree | ea82bdb32f10a89fdd8c3c64596a179602c84466 /qadevOOo/runner/util | |
parent | Java - remove dead equals() methods (diff) | |
download | core-b707a707aae71f3e05dc096d8de14d2509e2b62f.tar.gz core-b707a707aae71f3e05dc096d8de14d2509e2b62f.zip |
Java cleanup - remove unused local variables
Change-Id: Ied9c8635cde96d2d00d66a68cd8387799455c2ec
Diffstat (limited to 'qadevOOo/runner/util')
-rw-r--r-- | qadevOOo/runner/util/DBTools.java | 4 | ||||
-rw-r--r-- | qadevOOo/runner/util/DesktopTools.java | 5 | ||||
-rw-r--r-- | qadevOOo/runner/util/FrameDsc.java | 3 | ||||
-rw-r--r-- | qadevOOo/runner/util/InstCreator.java | 2 | ||||
-rw-r--r-- | qadevOOo/runner/util/SOfficeFactory.java | 2 | ||||
-rw-r--r-- | qadevOOo/runner/util/UITools.java | 8 | ||||
-rw-r--r-- | qadevOOo/runner/util/ValueComparer.java | 2 | ||||
-rw-r--r-- | qadevOOo/runner/util/WaitUnreachable.java | 1 | ||||
-rw-r--r-- | qadevOOo/runner/util/XMLTools.java | 1 | ||||
-rw-r--r-- | qadevOOo/runner/util/db/DatabaseDocument.java | 2 | ||||
-rw-r--r-- | qadevOOo/runner/util/dbg.java | 2 | ||||
-rw-r--r-- | qadevOOo/runner/util/utils.java | 5 |
12 files changed, 9 insertions, 28 deletions
diff --git a/qadevOOo/runner/util/DBTools.java b/qadevOOo/runner/util/DBTools.java index 98e699cef28b..f54d2e5f2d8d 100644 --- a/qadevOOo/runner/util/DBTools.java +++ b/qadevOOo/runner/util/DBTools.java @@ -58,8 +58,6 @@ public class DBTools { private XMultiServiceFactory xMSF = null ; private XNamingService dbContext = null ; - private PrintWriter m_log = null; - //JDBC driver public final static String TST_JDBC_DRIVER = "org.gjt.mm.mysql.Driver"; @@ -268,8 +266,6 @@ public class DBTools { public DBTools(XMultiServiceFactory xMSF, PrintWriter _logger ) { this.xMSF = xMSF ; - this.m_log = _logger; - try { Object cont = xMSF.createInstance("com.sun.star.sdb.DatabaseContext") ; diff --git a/qadevOOo/runner/util/DesktopTools.java b/qadevOOo/runner/util/DesktopTools.java index 791052ffa768..771d5a55eeb1 100644 --- a/qadevOOo/runner/util/DesktopTools.java +++ b/qadevOOo/runner/util/DesktopTools.java @@ -139,7 +139,7 @@ public class DesktopTools public static Object[] getAllOpenDocuments(XMultiServiceFactory xMSF) { ArrayList<XComponent> components = new ArrayList<XComponent>(); - XDesktop xDesktop = UnoRuntime.queryInterface( + UnoRuntime.queryInterface( XDesktop.class, createDesktop(xMSF)); XEnumeration allComp = getAllComponents(xMSF); @@ -441,8 +441,7 @@ public class DesktopTools ConfigHelper aConfig = new ConfigHelper(xMSF, "org.openoffice.Office.Views", false); - // Is node "5539" (slot-id for navigator) available? If not, insert it - XNameReplace x5539 = aConfig.getOrInsertGroup("Windows", "5539"); + aConfig.getOrInsertGroup("Windows", "5539"); aConfig.updateGroupProperty( "Windows", "5539", "WindowState", "952,180,244,349;1;0,0,0,0;"); diff --git a/qadevOOo/runner/util/FrameDsc.java b/qadevOOo/runner/util/FrameDsc.java index e1c8fc7b0dd4..8f69fe710eae 100644 --- a/qadevOOo/runner/util/FrameDsc.java +++ b/qadevOOo/runner/util/FrameDsc.java @@ -34,9 +34,6 @@ public class FrameDsc extends InstDescr { private int height = 2000; private int width = 2000; private String name = null; - private int autoheigth = 0; - private int anchorType = 0;// bound at paragraph - final String ifcName = "com.sun.star.text.XTextFrame"; final String service = "com.sun.star.text.TextFrame"; diff --git a/qadevOOo/runner/util/InstCreator.java b/qadevOOo/runner/util/InstCreator.java index 684b93479dd8..2f131a263fea 100644 --- a/qadevOOo/runner/util/InstCreator.java +++ b/qadevOOo/runner/util/InstCreator.java @@ -55,8 +55,6 @@ public class InstCreator implements XInstCreator { public XInterface createInstance() { XInterface xIfc = null; - Object xObj = null; - xIfc = iDsc.createInstance( xMSF ); return xIfc; diff --git a/qadevOOo/runner/util/SOfficeFactory.java b/qadevOOo/runner/util/SOfficeFactory.java index df8b0ddfcf64..1ac29a23bdc9 100644 --- a/qadevOOo/runner/util/SOfficeFactory.java +++ b/qadevOOo/runner/util/SOfficeFactory.java @@ -609,7 +609,7 @@ public class SOfficeFactory { // query for XServiceInfo public Object queryXServiceInfo(Object oObj) { if (oObj != null) { - XServiceInfo oInfo = UnoRuntime.queryInterface( + UnoRuntime.queryInterface( XServiceInfo.class, oObj); System.out.println("!!!! XServiceInfo n.a. !!!! "); } else { diff --git a/qadevOOo/runner/util/UITools.java b/qadevOOo/runner/util/UITools.java index 779d1a861831..4c8f394ffcc7 100644 --- a/qadevOOo/runner/util/UITools.java +++ b/qadevOOo/runner/util/UITools.java @@ -443,8 +443,7 @@ public class UITools { try{ XInterface xNumericField =mAT.getAccessibleObjectForRole( mXRoot, AccessibleRole.TEXT, NumericFieldName); - //util.dbg.printInterfaces(xNumericField); - XAccessibleEditableText oValue = UnoRuntime.queryInterface( + UnoRuntime.queryInterface( XAccessibleEditableText.class, xNumericField); setString(xNumericField, cValue); @@ -480,7 +479,6 @@ public class UITools { try{ int beginIndex = 0; int endIndex = 0; - boolean startFound = false; // find the first numeric character in stringVal for(int i = 0; i < stringVal.length(); i++){ int numVal = Character.getNumericValue(stringVal.charAt(i)); @@ -702,7 +700,7 @@ public class UITools { utils.getImplName(xAcc)); if (aComp != null) { - Point location = aComp.getLocationOnScreen(); + aComp.getLocationOnScreen(); String bounds = "(" + aComp.getBounds().X + "," + aComp.getBounds().Y + ")" + " (" + aComp.getBounds().Width + "," + @@ -734,7 +732,7 @@ public class UITools { utils.getImplName(xAcc)); if (aComp != null) { - Point location = aComp.getLocationOnScreen(); + aComp.getLocationOnScreen(); String bounds = "(" + aComp.getBounds().X + "," + aComp.getBounds().Y + ")" + " (" + aComp.getBounds().Width + "," + diff --git a/qadevOOo/runner/util/ValueComparer.java b/qadevOOo/runner/util/ValueComparer.java index d4535bc6fde7..e9f9fa9d1473 100644 --- a/qadevOOo/runner/util/ValueComparer.java +++ b/qadevOOo/runner/util/ValueComparer.java @@ -98,7 +98,7 @@ public class ValueComparer { if((op1.getClass().getComponentType() == op2.getClass().getComponentType()) && (Array.getLength(op1) == Array.getLength(op2))) { - Class<?> zClass = op1.getClass().getComponentType(); + op1.getClass().getComponentType(); for(int i = 0; i < Array.getLength(op1); ++ i) result = result & compareObjects(Array.get(op1, i), Array.get(op2, i)); diff --git a/qadevOOo/runner/util/WaitUnreachable.java b/qadevOOo/runner/util/WaitUnreachable.java index 56046397e123..e2aa6ee28d5c 100644 --- a/qadevOOo/runner/util/WaitUnreachable.java +++ b/qadevOOo/runner/util/WaitUnreachable.java @@ -80,7 +80,6 @@ public final class WaitUnreachable { while (queue.poll() == null) { System.gc(); System.runFinalization(); - byte[] dummy = new byte[1024]; } } diff --git a/qadevOOo/runner/util/XMLTools.java b/qadevOOo/runner/util/XMLTools.java index 2e53cc993be6..9bac81515731 100644 --- a/qadevOOo/runner/util/XMLTools.java +++ b/qadevOOo/runner/util/XMLTools.java @@ -282,7 +282,6 @@ public class XMLTools { tagStack = new ArrayList<String>() ; wellFormed = true ; noOtherErrors = true ; - PrintWriter log = null ; printXMLData = false ; } diff --git a/qadevOOo/runner/util/db/DatabaseDocument.java b/qadevOOo/runner/util/db/DatabaseDocument.java index b045d50f0110..f67ad90485e1 100644 --- a/qadevOOo/runner/util/db/DatabaseDocument.java +++ b/qadevOOo/runner/util/db/DatabaseDocument.java @@ -34,7 +34,6 @@ public class DatabaseDocument { protected DatabaseDocument( final XMultiServiceFactory _orb, final DataSource _dataSource ) { - m_orb = _orb; m_dataSource = _dataSource; XDocumentDataSource docDataSource = UnoRuntime.queryInterface( @@ -74,7 +73,6 @@ public class DatabaseDocument m_storeDoc.storeAsURL( _url, new PropertyValue[] { } ); } - private XMultiServiceFactory m_orb; private DataSource m_dataSource; private XOfficeDatabaseDocument m_databaseDocument; private XModel m_model; diff --git a/qadevOOo/runner/util/dbg.java b/qadevOOo/runner/util/dbg.java index a97d6b12b4c2..6b8f26a4c281 100644 --- a/qadevOOo/runner/util/dbg.java +++ b/qadevOOo/runner/util/dbg.java @@ -164,7 +164,7 @@ public class dbg { PrintWriter out) { try { XPropertySetInfo PSI = PS.getPropertySetInfo(); - Property[] props = PSI.getProperties(); + PSI.getProperties(); Property prop = PSI.getPropertyByName(name); out.println("Property name is " + prop.Name); out.println("Property handle is " + prop.Handle); diff --git a/qadevOOo/runner/util/utils.java b/qadevOOo/runner/util/utils.java index c584db16eaa0..8e9f4fa7a2f4 100644 --- a/qadevOOo/runner/util/utils.java +++ b/qadevOOo/runner/util/utils.java @@ -313,7 +313,6 @@ public class utils { public static void setOfficeSettingsValue(XMultiServiceFactory msf, String setting, String value) { - String settingPath = null; try { Object settings = msf.createInstance("com.sun.star.comp.framework.PathSettings"); XPropertySet pthSettings = null; @@ -661,9 +660,7 @@ public class utils { continue; } try { - // now trying to establish a client-socket - // fails if there is no server on any connectable machine - Socket sock = new Socket("localhost", port); + new Socket("localhost", port); System.out.println(" -> socket: occupied port: " + port); } catch (IOException e) { System.out.println(" -> free port"); |