[Libreoffice-commits] core.git: forms/qa framework/qa

Noel Grandin noel at peralex.com
Mon Nov 24 21:05:46 PST 2014


 forms/qa/integration/forms/CellBinding.java                                  |    3 -
 framework/qa/complex/contextMenuInterceptor/CheckContextMenuInterceptor.java |    3 -
 framework/qa/complex/disposing/GetServiceWhileDisposingOffice.java           |    2 -
 framework/qa/complex/framework/recovery/KlickButtonThread.java               |    7 +---
 framework/qa/complex/framework/recovery/RecoveryTest.java                    |    6 +--
 framework/qa/complex/framework/recovery/RecoveryTools.java                   |    4 +-
 framework/qa/complex/loadAllDocuments/InteractionHandler.java                |   16 +---------
 framework/qa/complex/path_settings/PathSettingsTest.java                     |    2 -
 8 files changed, 13 insertions(+), 30 deletions(-)

New commits:
commit 1658c017a27ac2cccb2af89f88a4cde8ffdbe531
Author: Noel Grandin <noel at peralex.com>
Date:   Tue Nov 18 14:13:55 2014 +0200

    java,framework: remove unused vars and parameters
    
    Change-Id: I7df5ff730436b95cb93af9f813d7bc572da2b951
    Reviewed-on: https://gerrit.libreoffice.org/13098
    Tested-by: LibreOffice gerrit bot <gerrit at libreoffice.org>
    Reviewed-by: Noel Grandin <noelgrandin at gmail.com>

diff --git a/forms/qa/integration/forms/CellBinding.java b/forms/qa/integration/forms/CellBinding.java
index 3a981f1..e71975a 100644
--- a/forms/qa/integration/forms/CellBinding.java
+++ b/forms/qa/integration/forms/CellBinding.java
@@ -539,8 +539,7 @@ public class CellBinding extends complexlib.ComplexTestCase
         XAccessible accessible = UnoRuntime.queryInterface(
             XAccessible.class, m_document.getCurrentView().getControl( controlModel ) );
 
-        XAccessibleContext context = accessible.getAccessibleContext();
-        XServiceInfo si = UnoRuntime.queryInterface( XServiceInfo.class,
+        UnoRuntime.queryInterface( XServiceInfo.class,
             accessible.getAccessibleContext() );
 
         XAccessibleEditableText textAccess = UnoRuntime.queryInterface(
diff --git a/framework/qa/complex/contextMenuInterceptor/CheckContextMenuInterceptor.java b/framework/qa/complex/contextMenuInterceptor/CheckContextMenuInterceptor.java
index 2f96fe7..2b361cd 100644
--- a/framework/qa/complex/contextMenuInterceptor/CheckContextMenuInterceptor.java
+++ b/framework/qa/complex/contextMenuInterceptor/CheckContextMenuInterceptor.java
@@ -275,8 +275,7 @@ public class CheckContextMenuInterceptor
         try
         {
             System.out.println("try to get first children of Help context...");
-            XAccessible xHelpChild = xHelpCont.getAccessibleChild(0);
-
+            xHelpCont.getAccessibleChild(0);
         }
         catch (IndexOutOfBoundsException e)
         {
diff --git a/framework/qa/complex/disposing/GetServiceWhileDisposingOffice.java b/framework/qa/complex/disposing/GetServiceWhileDisposingOffice.java
index 8600c02..418e229 100644
--- a/framework/qa/complex/disposing/GetServiceWhileDisposingOffice.java
+++ b/framework/qa/complex/disposing/GetServiceWhileDisposingOffice.java
@@ -56,7 +56,7 @@ public class GetServiceWhileDisposingOffice
             xDesktop.terminate();
             for (; step < 10000; step++)
             {
-                Object o = xMSF.createInstance("com.sun.star.frame.Desktop");
+                xMSF.createInstance("com.sun.star.frame.Desktop");
             }
         }
         catch (com.sun.star.lang.DisposedException e)
diff --git a/framework/qa/complex/framework/recovery/KlickButtonThread.java b/framework/qa/complex/framework/recovery/KlickButtonThread.java
index d2dceb4..90ecf68 100644
--- a/framework/qa/complex/framework/recovery/KlickButtonThread.java
+++ b/framework/qa/complex/framework/recovery/KlickButtonThread.java
@@ -19,21 +19,18 @@
 package complex.framework.recovery;
 
 import com.sun.star.awt.XWindow;
-import com.sun.star.lang.XMultiServiceFactory;
 import util.UITools;
 
 /**
  * Thread to crash the office. This thread dies after the office process
- * is nopt longer available.
+ * is no longer available.
  */
 public class KlickButtonThread extends Thread {
     private final XWindow xWindow;
-    private final XMultiServiceFactory xMSF;
     private final String buttonName;
 
-    public KlickButtonThread(XMultiServiceFactory xMSF, XWindow xWindow, String buttonName) {
+    public KlickButtonThread(XWindow xWindow, String buttonName) {
         this.xWindow = xWindow;
-        this.xMSF = xMSF;
         this.buttonName = buttonName;
     }
 
diff --git a/framework/qa/complex/framework/recovery/RecoveryTest.java b/framework/qa/complex/framework/recovery/RecoveryTest.java
index 746ff82..187b336 100644
--- a/framework/qa/complex/framework/recovery/RecoveryTest.java
+++ b/framework/qa/complex/framework/recovery/RecoveryTest.java
@@ -280,7 +280,7 @@ public class RecoveryTest extends ComplexTestCase {
             if (cancel) {
                 log.println("clicking 'Cancel' button...");
 
-                rt.clickThreadButton(xMSF, xWindow, "Cancel");
+                rt.clickThreadButton(xWindow, "Cancel");
             }
             else {
                 log.println("clicking 'Next' button...");
@@ -371,7 +371,7 @@ public class RecoveryTest extends ComplexTestCase {
                 if (cancel) {
                     log.println("clicking 'Cancel' button...");
 
-                     rt.clickThreadButton(xMSF, xWindow, "Cancel");
+                     rt.clickThreadButton(xWindow, "Cancel");
 
                 }
                 else {
@@ -384,7 +384,7 @@ public class RecoveryTest extends ComplexTestCase {
             } else {
                     log.println("do not recover: clicking 'Cancel' button...");
 
-                    rt.clickThreadButton(xMSF, xWindow, "Cancel");
+                    rt.clickThreadButton(xWindow, "Cancel");
             }
 
         } catch (Exception e){
diff --git a/framework/qa/complex/framework/recovery/RecoveryTools.java b/framework/qa/complex/framework/recovery/RecoveryTools.java
index 91faec0..b476ab0 100644
--- a/framework/qa/complex/framework/recovery/RecoveryTools.java
+++ b/framework/qa/complex/framework/recovery/RecoveryTools.java
@@ -273,9 +273,9 @@ public class RecoveryTools {
         pause();
     }
 
-    public void clickThreadButton(XMultiServiceFactory xMSF, XWindow xWindow, String buttonName)
+    public void clickThreadButton(XWindow xWindow, String buttonName)
     {
-        KlickButtonThread kbt = new KlickButtonThread(xMSF, xWindow, buttonName);
+        KlickButtonThread kbt = new KlickButtonThread(xWindow, buttonName);
         kbt.start();
         pause(param.getInt(PropertyName.SHORT_WAIT) * 10);
     }
diff --git a/framework/qa/complex/loadAllDocuments/InteractionHandler.java b/framework/qa/complex/loadAllDocuments/InteractionHandler.java
index 36790cb..d8e5091 100644
--- a/framework/qa/complex/loadAllDocuments/InteractionHandler.java
+++ b/framework/qa/complex/loadAllDocuments/InteractionHandler.java
@@ -39,13 +39,10 @@ public class InteractionHandler implements XInteractionHandler
 
 
     /**
-     * @member  m_aRequest      the original interaction request
-     *                          saved for later analyzing
-     * @member  m_bWasUsed      true if the interaction handler was used
-     * @member  m_nTry          count using of RETRY continuations
+     * count using of RETRY continuations
      */
-    private Object          m_aRequest  ;
     private int             m_nTry      ;
+    /** true if the interaction handler was used */
     private boolean         m_bWasUsed  ;
 
 
@@ -57,7 +54,6 @@ public class InteractionHandler implements XInteractionHandler
      */
     public InteractionHandler()
     {
-        m_aRequest  = null     ;
         m_nTry      = 0        ;
         m_bWasUsed = false;
     }
@@ -76,14 +72,6 @@ public class InteractionHandler implements XInteractionHandler
     {
         m_bWasUsed = true;
 
-        // first sav thje original request
-        // Our user can use this information later for some debug analyzing
-        Object aRequest = xRequest.getRequest();
-        synchronized(this)
-        {
-            m_aRequest = aRequest;
-        }
-
         // analyze the possible continuations.
         // We can abort all incoming interactions only.
         // But additional we can try to continue it several times too.
diff --git a/framework/qa/complex/path_settings/PathSettingsTest.java b/framework/qa/complex/path_settings/PathSettingsTest.java
index 995d430..a343758 100644
--- a/framework/qa/complex/path_settings/PathSettingsTest.java
+++ b/framework/qa/complex/path_settings/PathSettingsTest.java
@@ -242,7 +242,7 @@ public class PathSettingsTest
 
             try
             {
-                final String sValue = AnyConverter.toString(o);
+                AnyConverter.toString(o);
             }
             catch (com.sun.star.lang.IllegalArgumentException e)
             {


More information about the Libreoffice-commits mailing list