[Libreoffice-commits] core.git: dbaccess/qa framework/qa qadevOOo/runner qadevOOo/tests sfx2/qa

Noel Grandin noel at peralex.com
Mon Nov 24 12:45:42 PST 2014


 dbaccess/qa/complex/dbaccess/CopyTableWizard.java              |    2 
 framework/qa/complex/framework/recovery/KlickButtonThread.java |    2 
 framework/qa/complex/framework/recovery/RecoveryTest.java      |    8 
 framework/qa/complex/framework/recovery/RecoveryTools.java     |    2 
 qadevOOo/runner/convwatch/ConvWatch.java                       |    5 
 qadevOOo/runner/convwatch/ConvWatchStarter.java                |    2 
 qadevOOo/runner/convwatch/GraphicalTestArguments.java          |    2 
 qadevOOo/runner/convwatch/HTMLOutputter.java                   |  294 ++++------
 qadevOOo/runner/convwatch/INIOutputter.java                    |    4 
 qadevOOo/runner/convwatch/IniFile.java                         |    1 
 qadevOOo/runner/util/DBTools.java                              |   35 -
 qadevOOo/runner/util/SysUtils.java                             |   12 
 qadevOOo/runner/util/UITools.java                              |   28 
 qadevOOo/tests/java/complex/unoapi/CheckModuleAPI.java         |    4 
 qadevOOo/tests/java/ifc/awt/_XMessageBoxFactory.java           |    1 
 qadevOOo/tests/java/ifc/task/_XInteractionHandler.java         |    4 
 qadevOOo/tests/java/mod/_remotebridge/various.java             |    2 
 qadevOOo/tests/java/mod/_sc/ScTableSheetsObj.java              |    2 
 qadevOOo/tests/java/mod/_sw/SwAccessibleTableCellView.java     |    2 
 qadevOOo/tests/java/mod/_sw/SwAccessibleTableView.java         |    2 
 qadevOOo/tests/java/mod/_sw/SwAccessibleTextFrameView.java     |    2 
 qadevOOo/tests/java/mod/_sw/SwXCell.java                       |    2 
 qadevOOo/tests/java/mod/_sw/SwXDocumentIndex.java              |    2 
 qadevOOo/tests/java/mod/_sw/SwXDocumentIndexes.java            |    2 
 qadevOOo/tests/java/mod/_sw/SwXTableRows.java                  |    2 
 qadevOOo/tests/java/mod/_sw/SwXTextFrameText.java              |    2 
 qadevOOo/tests/java/mod/_sw/SwXTextTableCursor.java            |    2 
 qadevOOo/tests/java/mod/_sw/SwXTextTableRow.java               |    2 
 qadevOOo/tests/java/mod/_sw/SwXTextTables.java                 |    2 
 sfx2/qa/complex/sfx2/GlobalEventBroadcaster.java               |    2 
 30 files changed, 155 insertions(+), 279 deletions(-)

New commits:
commit fe095dada4e83129d49c8cc50501aa224d61e0f9
Author: Noel Grandin <noel at peralex.com>
Date:   Tue Nov 18 13:32:37 2014 +0200

    java,qadev: remove unused parameters and local vars
    
    Change-Id: Ifb9f9374051fe88dc4cd5a7a28b2c8c992ced873
    Reviewed-on: https://gerrit.libreoffice.org/13097
    Tested-by: LibreOffice gerrit bot <gerrit at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/dbaccess/qa/complex/dbaccess/CopyTableWizard.java b/dbaccess/qa/complex/dbaccess/CopyTableWizard.java
index 7b7e2fd..3a0f013 100644
--- a/dbaccess/qa/complex/dbaccess/CopyTableWizard.java
+++ b/dbaccess/qa/complex/dbaccess/CopyTableWizard.java
@@ -172,7 +172,7 @@ public class CopyTableWizard extends CRMBasedTestCase
         try
         {
             final XWindow dialog = getActiveWindow();
-            final UITools uiTools = new UITools(getMSF(), dialog);
+            final UITools uiTools = new UITools(dialog);
             final XAccessible root = uiTools.getRoot();
             final XAccessibleContext accContext = root.getAccessibleContext();
             final int count = accContext.getAccessibleChildCount();
diff --git a/framework/qa/complex/framework/recovery/KlickButtonThread.java b/framework/qa/complex/framework/recovery/KlickButtonThread.java
index 0b7e2ce..d2dceb4 100644
--- a/framework/qa/complex/framework/recovery/KlickButtonThread.java
+++ b/framework/qa/complex/framework/recovery/KlickButtonThread.java
@@ -40,7 +40,7 @@ public class KlickButtonThread extends Thread {
     @Override
     public void run() {
         try{
-            UITools oUITools = new UITools(xMSF, xWindow);
+            UITools oUITools = new UITools(xWindow);
 
             oUITools.clickButton(buttonName);
 
diff --git a/framework/qa/complex/framework/recovery/RecoveryTest.java b/framework/qa/complex/framework/recovery/RecoveryTest.java
index b85f519..746ff82 100644
--- a/framework/qa/complex/framework/recovery/RecoveryTest.java
+++ b/framework/qa/complex/framework/recovery/RecoveryTest.java
@@ -236,7 +236,7 @@ public class RecoveryTest extends ComplexTestCase {
 
             XWindow xWindow = UnoRuntime.queryInterface(XWindow.class, oDialog);
 
-            UITools oUITools = new UITools(xMSF, xWindow);
+            UITools oUITools = new UITools(xWindow);
 
             oUITools.printAccessibleTree((PrintWriter) log, param.getBool(PropertyName.DEBUG_IS_ACTIVE));
 
@@ -275,7 +275,7 @@ public class RecoveryTest extends ComplexTestCase {
 
             log.println(oDialog.getTitle());
 
-            UITools oUITools = new UITools(xMSF, xWindow);
+            UITools oUITools = new UITools(xWindow);
 
             if (cancel) {
                 log.println("clicking 'Cancel' button...");
@@ -328,7 +328,7 @@ public class RecoveryTest extends ComplexTestCase {
             XWindow xWindow = UnoRuntime.queryInterface(XWindow.class, oDialog);
             log.println("got the following dialog: '" +oDialog.getTitle() + "'");
 
-            UITools oUITools = new UITools(xMSF, xWindow);
+            UITools oUITools = new UITools(xWindow);
 
             String listBoxName = "Status of recovered documents";
             String[] documents = oUITools.getListBoxItems(listBoxName);
@@ -429,7 +429,7 @@ public class RecoveryTest extends ComplexTestCase {
 
                 assure("could not get 'Save Documents' Dialog: ", (oDialog != null), CONTINUE);
 
-                UITools oUITools = new UITools(xMSF, oDialog);
+                UITools oUITools = new UITools(oDialog);
 
                 oUITools.printAccessibleTree((PrintWriter) log, param.getBool(PropertyName.DEBUG_IS_ACTIVE));
 
diff --git a/framework/qa/complex/framework/recovery/RecoveryTools.java b/framework/qa/complex/framework/recovery/RecoveryTools.java
index 8a2b034..91faec0 100644
--- a/framework/qa/complex/framework/recovery/RecoveryTools.java
+++ b/framework/qa/complex/framework/recovery/RecoveryTools.java
@@ -261,7 +261,7 @@ public class RecoveryTools {
         if (oDialog == null) throw new com.sun.star.accessibility.IllegalAccessibleComponentStateException("could not get modal Dialog");
 
 
-        UITools oUITools = new UITools(xMSF, oDialog);
+        UITools oUITools = new UITools(oDialog);
         oUITools.printAccessibleTree((PrintWriter) log, param.getBool(PropertyName.DEBUG_IS_ACTIVE));
 
         try{
diff --git a/qadevOOo/runner/convwatch/ConvWatch.java b/qadevOOo/runner/convwatch/ConvWatch.java
index b1591d4..1c4ac3d 100644
--- a/qadevOOo/runner/convwatch/ConvWatch.java
+++ b/qadevOOo/runner/convwatch/ConvWatch.java
@@ -157,7 +157,6 @@ public class ConvWatch
             }
 
             PRNCompare a = new PRNCompare();
-            String sInputPath = FileHelper.getPath(_sAbsoluteInputFile);
             String sReferencePath = FileHelper.getPath(_sAbsoluteReferenceFile);
 
             a.setReferencePath( sReferencePath );
@@ -203,7 +202,7 @@ public class ConvWatch
             // Status end
 
             String sINIFile = _sFilenamePrefix + sNameNoSuffix + ".ini";
-            INIOutputter INIoutput = INIOutputter.create(_sOutputPath, sINIFile, "");
+            INIOutputter INIoutput = INIOutputter.create(_sOutputPath, sINIFile);
             INIoutput.createHeader();
 //  TODO: version info was fine
 
@@ -265,7 +264,7 @@ public class ConvWatch
             String sNameNoSuffix = FileHelper.getNameNoSuffix(sBasename);
             String sINIFile = _sFilenamePrefix + sNameNoSuffix + ".ini";
 
-            INIOutputter INIoutput = INIOutputter.create(_sOutputPath, sINIFile, _sFilenamePrefix);
+            INIOutputter INIoutput = INIOutputter.create(_sOutputPath, sINIFile);
             INIoutput.createHeader();
             // LLA? what if the are no values in the list? true or false;
             INIoutput.writeSection("global");
diff --git a/qadevOOo/runner/convwatch/ConvWatchStarter.java b/qadevOOo/runner/convwatch/ConvWatchStarter.java
index 9c06162..520f850 100644
--- a/qadevOOo/runner/convwatch/ConvWatchStarter.java
+++ b/qadevOOo/runner/convwatch/ConvWatchStarter.java
@@ -200,7 +200,7 @@ public class ConvWatchStarter extends EnhancedComplexTestCase
                 sHTMLName = m_sInputPath.substring(n + 1);
                 sHTMLName += ".html";
             }
-            HTMLOutputter HTMLoutput = HTMLOutputter.create(m_sOutputPath, sHTMLName, "");
+            HTMLOutputter HTMLoutput = HTMLOutputter.create(m_sOutputPath, sHTMLName);
             HTMLoutput.header( m_sOutputPath );
             HTMLoutput.indexSection( m_sOutputPath );
             LISTOutputter LISToutput = LISTOutputter.create(m_sOutputPath, "allfiles.txt");
diff --git a/qadevOOo/runner/convwatch/GraphicalTestArguments.java b/qadevOOo/runner/convwatch/GraphicalTestArguments.java
index d5cc3c4..2d35b96 100644
--- a/qadevOOo/runner/convwatch/GraphicalTestArguments.java
+++ b/qadevOOo/runner/convwatch/GraphicalTestArguments.java
@@ -234,8 +234,6 @@ public class GraphicalTestArguments
                 // m_tWithBorderMove = TriState.UNSET;
             }
 
-            String sLeaveOutNames = (String)param.get(PropertyName.DOC_COMPARATOR_LEAVE_OUT_FILES);
-
             String sDBInfoString = (String)param.get(PropertyName.DOC_COMPARATOR_DB_INFO_STRING);
             if (sDBInfoString != null)
             {
diff --git a/qadevOOo/runner/convwatch/HTMLOutputter.java b/qadevOOo/runner/convwatch/HTMLOutputter.java
index 087101c..9f5b650 100644
--- a/qadevOOo/runner/convwatch/HTMLOutputter.java
+++ b/qadevOOo/runner/convwatch/HTMLOutputter.java
@@ -22,197 +22,157 @@ import java.io.File;
 import java.io.FileWriter;
 import helper.OSHelper;
 
-public class HTMLOutputter
-{
+public class HTMLOutputter {
     private FileWriter m_aOut;
     private String m_sFilename;
-    private String m_sNamePrefix;              // the HTML files used a suffix to build it's right name
 
     /**
      * ls is the current line separator (carridge return)
      */
     private String ls;
 
-    HTMLOutputter() {}
-    public static HTMLOutputter create( String _sOutputPath, String _sHTMLFilename, String _sNamePrefix )
-        {
-            FileHelper.makeDirectories("", _sOutputPath);
-            HTMLOutputter a = new HTMLOutputter();
-            String fs = System.getProperty("file.separator");
-            String sFilename = _sOutputPath + fs + _sHTMLFilename;
-
-            try
-            {
-                File outputFile = new File(sFilename);
-                a.m_aOut = new FileWriter(outputFile.toString());
-                a.ls = System.getProperty("line.separator");
-            }
-            catch (java.io.IOException e)
-            {
-                e.printStackTrace();
-                GlobalLogWriter.get().println("ERROR: Can't create HTML Outputter");
-                return null;
-            }
-            a.m_sFilename = sFilename;
-            a.m_sNamePrefix = _sNamePrefix;
-            return a;
+    HTMLOutputter() {
+    }
+
+    public static HTMLOutputter create(String _sOutputPath,
+            String _sHTMLFilename) {
+        FileHelper.makeDirectories("", _sOutputPath);
+        HTMLOutputter a = new HTMLOutputter();
+        String fs = System.getProperty("file.separator");
+        String sFilename = _sOutputPath + fs + _sHTMLFilename;
+
+        try {
+            File outputFile = new File(sFilename);
+            a.m_aOut = new FileWriter(outputFile.toString());
+            a.ls = System.getProperty("line.separator");
+        } catch (java.io.IOException e) {
+            e.printStackTrace();
+            GlobalLogWriter.get().println("ERROR: Can't create HTML Outputter");
+            return null;
         }
-    public String getFilename() {return m_sFilename;}
-
-    public void header(String _sTitle)
-        {
-            try
-            {
-                m_aOut.write( "<html>" + ls);
-                m_aOut.write( "<head>"  + ls);
-                m_aOut.write( "<title>" + _sTitle + "</title>" + ls);
-                m_aOut.write( "<link rel=\"stylesheet\" type=\"text/css\" href=\"/gfxcmp_ui/xmloff.css\" media=\"screen\" />" + ls);
-                m_aOut.write( "<link rel=\"stylesheet\" type=\"text/css\" href=\"/gfxcmp_ui/style.css\" media=\"screen\" />" + ls);
-                m_aOut.write( "</head>" + ls);
-                m_aOut.write( "<body bgcolor=white>" + ls);
-                m_aOut.flush();
-            }
-            catch (java.io.IOException e)
-            {
-            }
+        a.m_sFilename = sFilename;
+        return a;
+    }
+
+    public String getFilename() {
+        return m_sFilename;
+    }
+
+    public void header(String _sTitle) {
+        try {
+            m_aOut.write("<html>" + ls);
+            m_aOut.write("<head>" + ls);
+            m_aOut.write("<title>" + _sTitle + "</title>" + ls);
+            m_aOut.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"/gfxcmp_ui/xmloff.css\" media=\"screen\" />"
+                    + ls);
+            m_aOut.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"/gfxcmp_ui/style.css\" media=\"screen\" />"
+                    + ls);
+            m_aOut.write("</head>" + ls);
+            m_aOut.write("<body bgcolor=white>" + ls);
+            m_aOut.flush();
+        } catch (java.io.IOException e) {
         }
+    }
 
     private final static String TEST_TABLETITLE = "Test";
     private final static String VISUAL_STATUS_TABLETITLE = "Visual status";
     private final static String VISUAL_STATUS_MESSAGE_TABLETITLE = "Message";
 
-    public void indexSection(String _sOfficeInfo)
-        {
-            try
-            {
-                m_aOut.write( "<h2>Results for " + _sOfficeInfo + "</h2>" + ls);
-                m_aOut.write( "<p>Legend:<br>");
-                m_aOut.write( stronghtml(FIRSTGFX_TABLETITLE) + " contains the output printed via 'ghostscript' as a jpeg picture.<br>");
-
-                m_aOut.write( "<table class=\"infotable\">" + ls);
-                m_aOut.write( "<TR>");
-                m_aOut.write( tableHeaderCell(TEST_TABLETITLE));
-                m_aOut.write( tableHeaderCell(TEST_TABLETITLE));
-                m_aOut.write( tableHeaderCell(VISUAL_STATUS_TABLETITLE));
-                m_aOut.write( tableHeaderCell(VISUAL_STATUS_MESSAGE_TABLETITLE));
-                m_aOut.write( "</TR>" + ls);
-                m_aOut.flush();
-            }
-            catch (java.io.IOException e)
-            {
-            }
+    public void indexSection(String _sOfficeInfo) {
+        try {
+            m_aOut.write("<h2>Results for " + _sOfficeInfo + "</h2>" + ls);
+            m_aOut.write("<p>Legend:<br>");
+            m_aOut.write(stronghtml(FIRSTGFX_TABLETITLE)
+                    + " contains the output printed via 'ghostscript' as a jpeg picture.<br>");
+
+            m_aOut.write("<table class=\"infotable\">" + ls);
+            m_aOut.write("<TR>");
+            m_aOut.write(tableHeaderCell(TEST_TABLETITLE));
+            m_aOut.write(tableHeaderCell(TEST_TABLETITLE));
+            m_aOut.write(tableHeaderCell(VISUAL_STATUS_TABLETITLE));
+            m_aOut.write(tableHeaderCell(VISUAL_STATUS_MESSAGE_TABLETITLE));
+            m_aOut.write("</TR>" + ls);
+            m_aOut.flush();
+        } catch (java.io.IOException e) {
         }
+    }
+
+    private String getHREF(String _sHREF, String _sPathInfo) {
+        StringBuffer a = new StringBuffer();
+        if (!OSHelper.isWindows()) {
+            a.append("<A HREF=\"");
+            a.append(_sHREF);
+            a.append("\">");
+            a.append(_sPathInfo);
+            a.append("</A>");
+        } else {
+            // ! this should be replaced by a better method
+            // ! name(WIN|UNIX)
+            a.append("<A HREF=\"");
+            a.append(_sHREF);
+            a.append("\">");
+            a.append(_sPathInfo);
+            a.append("</A>");
 
-    private String getHREF(String _sHREF, String _sPathInfo)
-        {
-            StringBuffer a = new StringBuffer();
-            if (! OSHelper.isWindows())
-            {
-                a.append("<A HREF=\"");
-                a.append(_sHREF);
-                a.append("\">");
-                a.append(_sPathInfo);
-                a.append("</A>");
-            }
-            else
-            {
-                //! this should be replaced by a better method
-                //! name(WIN|UNIX)
-                a.append("<A HREF=\"");
-                a.append(_sHREF);
-                a.append("\">");
-                a.append(_sPathInfo);
-                a.append("</A>");
-
-            }
-            return a.toString();
         }
+        return a.toString();
+    }
+
+    private String tableDataCell(String _sValue) {
+        StringBuffer a = new StringBuffer();
+        a.append("<TD>");
+        a.append(_sValue);
+        a.append("</TD>");
+        return a.toString();
+    }
+
+    private String tableHeaderCell(String _sValue) {
+        StringBuffer a = new StringBuffer();
+        a.append("<TH>");
+        a.append(_sValue);
+        a.append("</TH>");
+        return a.toString();
+    }
+
+    public void indexLine(String _sHTMLFile, String _sHTMLName,
+            String _sHTMLFile2, String _sHTMLName2, String _sStatusRunThrough,
+            String _sStatusMessage) {
+        try {
+            m_aOut.write("<TR>");
+            m_aOut.write(tableDataCell(getHREF(_sHTMLFile, _sHTMLName)));
+            if (_sHTMLFile2.length() > 0) {
+                m_aOut.write(tableDataCell(getHREF(_sHTMLFile2, _sHTMLName2)));
+            } else {
+                m_aOut.write(tableDataCell(""));
+            }
 
-    private String tableDataCell(String _sValue)
-        {
-            StringBuffer a = new StringBuffer();
-            a.append("<TD>");
-            a.append(_sValue);
-            a.append("</TD>");
-            return a.toString();
-        }
+            m_aOut.write(tableDataCell(_sStatusRunThrough));
+            m_aOut.write(tableDataCell(_sStatusMessage));
+            m_aOut.write("</TR>" + ls);
 
-    private String tableHeaderCell(String _sValue)
-        {
-            StringBuffer a = new StringBuffer();
-            a.append("<TH>");
-            a.append(_sValue);
-            a.append("</TH>");
-            return a.toString();
-        }
-
-    public void indexLine(String _sHTMLFile, String _sHTMLName, String _sHTMLFile2, String _sHTMLName2, String _sStatusRunThrough, String _sStatusMessage)
-        {
-            try
-            {
-                m_aOut.write( "<TR>");
-                m_aOut.write(tableDataCell( getHREF(_sHTMLFile, _sHTMLName) ) );
-                if (_sHTMLFile2.length() > 0)
-                {
-                    m_aOut.write(tableDataCell( getHREF(_sHTMLFile2, _sHTMLName2) ) );
-                }
-                else
-                {
-                    m_aOut.write(tableDataCell( "" ) );
-                }
-
-                m_aOut.write( tableDataCell(_sStatusRunThrough) );
-                m_aOut.write( tableDataCell(_sStatusMessage) );
-                m_aOut.write( "</TR>" + ls);
-
-                m_aOut.flush();
-            }
-            catch (java.io.IOException e)
-            {
-            }
+            m_aOut.flush();
+        } catch (java.io.IOException e) {
         }
-
-    public void close()
-        {
-            try
-            {
-                m_aOut.write( "</TABLE>" + ls);
-                m_aOut.write( "</BODY></HTML>" + ls);
-                m_aOut.flush();
-                m_aOut.close();
-            }
-            catch (java.io.IOException e)
-            {
-            }
+    }
+
+    public void close() {
+        try {
+            m_aOut.write("</TABLE>" + ls);
+            m_aOut.write("</BODY></HTML>" + ls);
+            m_aOut.flush();
+            m_aOut.close();
+        } catch (java.io.IOException e) {
         }
+    }
 
-
-    private String stronghtml(String _sValue)
-        {
-            StringBuffer a = new StringBuffer();
-            a.append("<STRONG>");
-            a.append(_sValue);
-            a.append("</STRONG>");
-            return a.toString();
-        }
+    private String stronghtml(String _sValue) {
+        StringBuffer a = new StringBuffer();
+        a.append("<STRONG>");
+        a.append(_sValue);
+        a.append("</STRONG>");
+        return a.toString();
+    }
 
     private final static String FIRSTGFX_TABLETITLE = "Original print file as jpeg";
-    private final static String SECONDGFX_TABLETITLE = "New print file as jpeg";
-    private final static String DIFFER_TABLETITLE = "Difference file";
-    private final static String STATUS_TABLETITLE = "Status";
-    private final static String PIXELDIFF_TABLETITLE = "Pixel difference in %";
-
-    private final static String PIXELDIFF_BM_TABLETITLE = "P.diff. in % after remove border";
-    private final static String DIFFER_BM_TABLETITLE = "Diff file (RB)";
-
-    private final static String OK_TABLETITLE = "OK?";
-
-
-
-
-
-
-
-
 
 }
diff --git a/qadevOOo/runner/convwatch/INIOutputter.java b/qadevOOo/runner/convwatch/INIOutputter.java
index 416519b..63a6eec 100644
--- a/qadevOOo/runner/convwatch/INIOutputter.java
+++ b/qadevOOo/runner/convwatch/INIOutputter.java
@@ -28,11 +28,11 @@ public class INIOutputter
 
 
     /**
-     * ls is the current line separator (carridge return)
+     * ls is the current line separator (carriage return)
      */
     private String ls;
 
-    public static INIOutputter create( String _sOutputPath, String _sHTMLFilename, String _sNamePrefix )
+    public static INIOutputter create( String _sOutputPath, String _sHTMLFilename )
         {
             FileHelper.makeDirectories("", _sOutputPath);
             INIOutputter a = new INIOutputter();
diff --git a/qadevOOo/runner/convwatch/IniFile.java b/qadevOOo/runner/convwatch/IniFile.java
index 08e9629..ddab207 100644
--- a/qadevOOo/runner/convwatch/IniFile.java
+++ b/qadevOOo/runner/convwatch/IniFile.java
@@ -34,7 +34,6 @@ class IniFile
      */
     private final String m_sFilename;
     private final ArrayList<String> m_aList;
-    private final boolean m_bListContainUnsavedChanges = false;
 
     /**
        open a ini file by its name
diff --git a/qadevOOo/runner/util/DBTools.java b/qadevOOo/runner/util/DBTools.java
index 15aa1d9..e10a896 100644
--- a/qadevOOo/runner/util/DBTools.java
+++ b/qadevOOo/runner/util/DBTools.java
@@ -80,12 +80,6 @@ public class DBTools {
     } ;
 
     /**
-    * Array of lengths of streams for each row in of the
-    * <code>TST_TABLE_VALUES</code> constants.
-    */
-    private final static int[] TST_STREAM_LENGTHS = {0, 0, 0} ;
-
-    /**
     * It's just a structure with some useful methods for representing
     * <code>com.sun.star.sdb.DataSource</code> service. All this
     * service's properties are stored in appropriate class fields.
@@ -144,35 +138,6 @@ public class DBTools {
         }
 
         /**
-        * Creates an instance laying upon specified DataSource.
-        * @param dataSource All source properties are copied into
-        * class fields.
-        */
-        private DataSourceInfo(Object dataSource) {
-            XPropertySet xProps = UnoRuntime.queryInterface(XPropertySet.class, dataSource) ;
-
-            try {
-                Name = (String)xProps.getPropertyValue("Name") ;
-                URL = (String)xProps.getPropertyValue("URL") ;
-                Info = (PropertyValue[])xProps.getPropertyValue("Info") ;
-                User = (String)xProps.getPropertyValue("User") ;
-                Password = (String)xProps.getPropertyValue("Password") ;
-                IsPasswordRequired = (Boolean)xProps.getPropertyValue("IsPasswordRequired") ;
-                SuppressVersionColumns = (Boolean)
-                    xProps.getPropertyValue("SuppressVersionColumns") ;
-                IsReadOnly = (Boolean)xProps.getPropertyValue("IsReadOnly") ;
-                TableFilter = (String[])xProps.getPropertyValue("TableFilter") ;
-                TableTypeFilter = (String[])xProps.getPropertyValue("TableTypeFilter") ;
-            } catch (com.sun.star.beans.UnknownPropertyException e) {
-                System.err.println("util.DBTools.DataSourceInfo: Error retrieving property") ;
-                e.printStackTrace(System.err) ;
-            } catch (com.sun.star.lang.WrappedTargetException e) {
-                System.err.println("util.DBTools.DataSourceInfo: Error retrieving property") ;
-                e.printStackTrace(System.err) ;
-            }
-        }
-
-        /**
         * Creates new <code>com.sun.star.sdb.DataSource</code> service
         * instance and copies all fields (which are not null) to
         * appropriate service properties.
diff --git a/qadevOOo/runner/util/SysUtils.java b/qadevOOo/runner/util/SysUtils.java
index cf4b3b5..e74716f 100644
--- a/qadevOOo/runner/util/SysUtils.java
+++ b/qadevOOo/runner/util/SysUtils.java
@@ -18,8 +18,6 @@
 
 package util;
 
-import java.util.ArrayList;
-
 import com.sun.star.lang.XMultiServiceFactory;
 import com.sun.star.uno.UnoRuntime;
 import com.sun.star.datatransfer.clipboard.*;
@@ -27,16 +25,6 @@ import com.sun.star.datatransfer.*;
 
 public class SysUtils {
 
-
-
-  private static ArrayList<String> files = new ArrayList<String>();
-
-
-
-
-
-
-
   /**
    * Tries to obtain text data from cliboard if such one exists.
    * The method iterates through all 'text/plain' supported data
diff --git a/qadevOOo/runner/util/UITools.java b/qadevOOo/runner/util/UITools.java
index 073b749..48ed314 100644
--- a/qadevOOo/runner/util/UITools.java
+++ b/qadevOOo/runner/util/UITools.java
@@ -28,12 +28,7 @@ import com.sun.star.accessibility.XAccessibleContext;
 import com.sun.star.accessibility.XAccessibleEditableText;
 import com.sun.star.accessibility.XAccessibleText;
 import com.sun.star.accessibility.XAccessibleValue;
-
 import com.sun.star.awt.XWindow;
-import com.sun.star.frame.XModel;
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.text.XTextDocument;
-
 import com.sun.star.uno.UnoRuntime;
 import com.sun.star.uno.XInterface;
 
@@ -43,33 +38,12 @@ import com.sun.star.uno.XInterface;
 public class UITools {
 
     private final XAccessible mXRoot;
-    private final XMultiServiceFactory mMSF;
-
-    public UITools(XMultiServiceFactory msf, XModel xModel)
-    {
-        mMSF = msf;
-        mXRoot = makeRoot(xModel);
-    }
-
-    public UITools(XMultiServiceFactory msf, XTextDocument xTextDoc)
-    {
-        mMSF = msf;
-        XModel xModel = UnoRuntime.queryInterface(XModel.class, xTextDoc);
-        mXRoot = makeRoot(xModel);
-    }
 
-    public UITools(XMultiServiceFactory msf, XWindow xWindow)
+    public UITools(XWindow xWindow)
     {
-        mMSF = msf;
         mXRoot = makeRoot(xWindow);
     }
 
-    private static XAccessible makeRoot(XModel aModel)
-    {
-        XWindow xWindow = AccessibilityTools.getCurrentWindow(aModel);
-        return AccessibilityTools.getAccessibleObject(xWindow);
-    }
-
     private static String getString(XInterface xInt)
     {
         XAccessibleText oText = UnoRuntime.queryInterface(XAccessibleText.class, xInt);
diff --git a/qadevOOo/tests/java/complex/unoapi/CheckModuleAPI.java b/qadevOOo/tests/java/complex/unoapi/CheckModuleAPI.java
index 84c263e..11def39 100644
--- a/qadevOOo/tests/java/complex/unoapi/CheckModuleAPI.java
+++ b/qadevOOo/tests/java/complex/unoapi/CheckModuleAPI.java
@@ -289,8 +289,6 @@ public class CheckModuleAPI extends ComplexTestCase
         {
             try
             {
-                // cws version: all added modules must be tested
-                final String cws = version.substring(4, version.length());
                 final CwsDataExchangeImpl cde = new CwsDataExchangeImpl(param, log);
                 final ArrayList<String> addedModules = cde.getModules();
 
@@ -543,8 +541,6 @@ public class CheckModuleAPI extends ComplexTestCase
                 try
                 {
 
-                    // cws version: all added modules must be tested
-                    final String cws = version.substring(4, version.length());
                     final CwsDataExchangeImpl cde = new CwsDataExchangeImpl(param, log);
                     cde.setUnoApiCwsStatus(status);
                 }
diff --git a/qadevOOo/tests/java/ifc/awt/_XMessageBoxFactory.java b/qadevOOo/tests/java/ifc/awt/_XMessageBoxFactory.java
index 6bdd3e9..04f8808 100644
--- a/qadevOOo/tests/java/ifc/awt/_XMessageBoxFactory.java
+++ b/qadevOOo/tests/java/ifc/awt/_XMessageBoxFactory.java
@@ -48,7 +48,6 @@ public class _XMessageBoxFactory extends MultiMethodTest {
             com.sun.star.awt.MessageBoxType.ERRORBOX, 1, "The Title",
             "The Message");
         final UITools tools = new UITools(
-            tParam.getMSF(),
             UnoRuntime.queryInterface(XWindow.class, mb));
         final boolean[] done = new boolean[] { false };
         final boolean[] good = new boolean[] { false };
diff --git a/qadevOOo/tests/java/ifc/task/_XInteractionHandler.java b/qadevOOo/tests/java/ifc/task/_XInteractionHandler.java
index b118e26..9bfc91b 100644
--- a/qadevOOo/tests/java/ifc/task/_XInteractionHandler.java
+++ b/qadevOOo/tests/java/ifc/task/_XInteractionHandler.java
@@ -55,14 +55,12 @@ public class _XInteractionHandler extends MultiMethodTest {
     // oObj filled by MultiMethodTest
     public XInteractionHandler oObj = null ;
 
-    private XInteractionRequest request = null ;
-
     /**
     * Retrieves an object relation. <p>
     */
     @Override
     public void before() {
-        request = (XInteractionRequest)
+        XInteractionRequest request = (XInteractionRequest)
             tEnv.getObjRelation("XInteractionHandler.Request") ;
     }
 
diff --git a/qadevOOo/tests/java/mod/_remotebridge/various.java b/qadevOOo/tests/java/mod/_remotebridge/various.java
index 4983092..cccbe77 100644
--- a/qadevOOo/tests/java/mod/_remotebridge/various.java
+++ b/qadevOOo/tests/java/mod/_remotebridge/various.java
@@ -210,7 +210,7 @@ public class various extends TestCase {
             xBrdgFctr = UnoRuntime.queryInterface(XBridgeFactory.class, oBrdg);
 
             // create own implementation of XInstanceProvider
-            XInstanceProvider xInstProv = new MyInstanceProvider(xMSF);
+            new MyInstanceProvider(xMSF);
             // create waiting acceptor thread
             accThread = new AcceptorThread(xAcctr);
             accThread.start();
diff --git a/qadevOOo/tests/java/mod/_sc/ScTableSheetsObj.java b/qadevOOo/tests/java/mod/_sc/ScTableSheetsObj.java
index c167fd8..3610ea6 100644
--- a/qadevOOo/tests/java/mod/_sc/ScTableSheetsObj.java
+++ b/qadevOOo/tests/java/mod/_sc/ScTableSheetsObj.java
@@ -111,7 +111,7 @@ public class ScTableSheetsObj extends TestCase {
     @Override
     protected TestEnvironment createTestEnvironment(TestParameters Param, PrintWriter log) {
 
-        SOfficeFactory SOF = SOfficeFactory.getFactory( Param.getMSF());
+        SOfficeFactory.getFactory( Param.getMSF());
 
         log.println("getting sheets");
         XSpreadsheets xSpreadsheets = xSpreadsheetDoc.getSheets();
diff --git a/qadevOOo/tests/java/mod/_sw/SwAccessibleTableCellView.java b/qadevOOo/tests/java/mod/_sw/SwAccessibleTableCellView.java
index b83f801..8a972a1 100644
--- a/qadevOOo/tests/java/mod/_sw/SwAccessibleTableCellView.java
+++ b/qadevOOo/tests/java/mod/_sw/SwAccessibleTableCellView.java
@@ -68,7 +68,7 @@ public class SwAccessibleTableCellView extends TestCase {
         XAccessibleContext oObj = null;
         XTextTable oTable = null;
 
-        SOfficeFactory SOF = SOfficeFactory.getFactory( Param.getMSF());
+        SOfficeFactory.getFactory( Param.getMSF());
 
         oTable = SOfficeFactory.createTextTable(xTextDoc);
 
diff --git a/qadevOOo/tests/java/mod/_sw/SwAccessibleTableView.java b/qadevOOo/tests/java/mod/_sw/SwAccessibleTableView.java
index 3696797..73e0c5c 100644
--- a/qadevOOo/tests/java/mod/_sw/SwAccessibleTableView.java
+++ b/qadevOOo/tests/java/mod/_sw/SwAccessibleTableView.java
@@ -71,7 +71,7 @@ public class SwAccessibleTableView extends TestCase {
         XInterface oObj = null;
         XTextTable oTable = null;
 
-        SOfficeFactory SOF = SOfficeFactory.getFactory(Param.getMSF());
+        SOfficeFactory.getFactory(Param.getMSF());
         oTable = SOfficeFactory.createTextTable( xTextDoc );
 
         try {
diff --git a/qadevOOo/tests/java/mod/_sw/SwAccessibleTextFrameView.java b/qadevOOo/tests/java/mod/_sw/SwAccessibleTextFrameView.java
index 04aef60..421e3aa 100644
--- a/qadevOOo/tests/java/mod/_sw/SwAccessibleTextFrameView.java
+++ b/qadevOOo/tests/java/mod/_sw/SwAccessibleTextFrameView.java
@@ -79,7 +79,7 @@ public class SwAccessibleTextFrameView extends TestCase {
         XTextCursor oCursor = null;
 
         // get a soffice factory object
-        SOfficeFactory SOF = SOfficeFactory.getFactory( Param.getMSF() );
+        SOfficeFactory.getFactory( Param.getMSF() );
         // creating Frames
         log.println( "creating Frames" );
         try {
diff --git a/qadevOOo/tests/java/mod/_sw/SwXCell.java b/qadevOOo/tests/java/mod/_sw/SwXCell.java
index b1e9099..0769840 100644
--- a/qadevOOo/tests/java/mod/_sw/SwXCell.java
+++ b/qadevOOo/tests/java/mod/_sw/SwXCell.java
@@ -92,7 +92,7 @@ public class SwXCell extends TestCase {
         XInterface oObj = null;
         XTextContent oTable = null;
 
-        SOfficeFactory SOF = SOfficeFactory.getFactory( tParam.getMSF() );
+        SOfficeFactory.getFactory( tParam.getMSF() );
         log.println( "creating a test environment" );
         oTable = SOfficeFactory.createTextTable(xTextDoc, 3, 4);
         try {
diff --git a/qadevOOo/tests/java/mod/_sw/SwXDocumentIndex.java b/qadevOOo/tests/java/mod/_sw/SwXDocumentIndex.java
index 6d0b426..3880a51 100644
--- a/qadevOOo/tests/java/mod/_sw/SwXDocumentIndex.java
+++ b/qadevOOo/tests/java/mod/_sw/SwXDocumentIndex.java
@@ -97,7 +97,7 @@ public class SwXDocumentIndex extends TestCase {
         XTextContent xTC = null;
         Object instance = null;
 
-        SOfficeFactory SOF = SOfficeFactory.getFactory(tParam.getMSF());
+        SOfficeFactory.getFactory(tParam.getMSF());
         log.println( "creating a test environment" );
         try {
             xTC = SOfficeFactory.createIndex(xTextDoc, "com.sun.star.text.DocumentIndex");
diff --git a/qadevOOo/tests/java/mod/_sw/SwXDocumentIndexes.java b/qadevOOo/tests/java/mod/_sw/SwXDocumentIndexes.java
index fd6ae1c..f0408e9 100644
--- a/qadevOOo/tests/java/mod/_sw/SwXDocumentIndexes.java
+++ b/qadevOOo/tests/java/mod/_sw/SwXDocumentIndexes.java
@@ -91,7 +91,7 @@ public class SwXDocumentIndexes extends TestCase {
     public TestEnvironment createTestEnvironment(
             TestParameters tParam, PrintWriter log ) throws StatusException {
         XInterface oObj = null;
-        SOfficeFactory SOF = SOfficeFactory.getFactory( tParam.getMSF() );
+        SOfficeFactory.getFactory( tParam.getMSF() );
 
         log.println( "creating a test environment" );
         XTextContent xTC = null;
diff --git a/qadevOOo/tests/java/mod/_sw/SwXTableRows.java b/qadevOOo/tests/java/mod/_sw/SwXTableRows.java
index 877b53f..63a0ab6 100644
--- a/qadevOOo/tests/java/mod/_sw/SwXTableRows.java
+++ b/qadevOOo/tests/java/mod/_sw/SwXTableRows.java
@@ -89,7 +89,7 @@ public class SwXTableRows extends TestCase {
         XTextTable oTable = null;
 
         log.println( "creating a test environment" );
-        SOfficeFactory SOF = SOfficeFactory.getFactory( tParam.getMSF() );
+        SOfficeFactory.getFactory( tParam.getMSF() );
         oTable = SOfficeFactory.createTextTable( xTextDoc );
 
         try {
diff --git a/qadevOOo/tests/java/mod/_sw/SwXTextFrameText.java b/qadevOOo/tests/java/mod/_sw/SwXTextFrameText.java
index 9017578..19394f7 100644
--- a/qadevOOo/tests/java/mod/_sw/SwXTextFrameText.java
+++ b/qadevOOo/tests/java/mod/_sw/SwXTextFrameText.java
@@ -97,7 +97,7 @@ public class SwXTextFrameText extends TestCase {
         log.println( "creating a test environment" );
 
         // get a soffice factory object
-        SOfficeFactory SOF = SOfficeFactory.getFactory( tParam.getMSF() );
+        SOfficeFactory.getFactory( tParam.getMSF() );
 
         // create testobject here
 
diff --git a/qadevOOo/tests/java/mod/_sw/SwXTextTableCursor.java b/qadevOOo/tests/java/mod/_sw/SwXTextTableCursor.java
index 0755c1e..587dec3 100644
--- a/qadevOOo/tests/java/mod/_sw/SwXTextTableCursor.java
+++ b/qadevOOo/tests/java/mod/_sw/SwXTextTableCursor.java
@@ -84,7 +84,7 @@ public class SwXTextTableCursor extends TestCase {
         log.println( "creating a test environment" );
 
         // get a soffice factory object
-        SOfficeFactory SOF = SOfficeFactory.getFactory( tParam.getMSF() );
+        SOfficeFactory.getFactory( tParam.getMSF() );
 
         // create testobject here
 
diff --git a/qadevOOo/tests/java/mod/_sw/SwXTextTableRow.java b/qadevOOo/tests/java/mod/_sw/SwXTextTableRow.java
index c31b643..ba01f48 100644
--- a/qadevOOo/tests/java/mod/_sw/SwXTextTableRow.java
+++ b/qadevOOo/tests/java/mod/_sw/SwXTextTableRow.java
@@ -75,7 +75,7 @@ public class SwXTextTableRow extends TestCase {
         log.println( "Creating a test environment" );
 
         // get a soffice factory object
-        SOfficeFactory SOF = SOfficeFactory.getFactory( Param.getMSF() );
+        SOfficeFactory.getFactory( Param.getMSF() );
 
         try {
          log.println("creating a texttable");
diff --git a/qadevOOo/tests/java/mod/_sw/SwXTextTables.java b/qadevOOo/tests/java/mod/_sw/SwXTextTables.java
index 00446d9..60c1d85 100644
--- a/qadevOOo/tests/java/mod/_sw/SwXTextTables.java
+++ b/qadevOOo/tests/java/mod/_sw/SwXTextTables.java
@@ -90,7 +90,7 @@ public class SwXTextTables extends TestCase {
         log.println( "creating a test environment" );
 
         // get a soffice factory object
-        SOfficeFactory SOF = SOfficeFactory.getFactory( tParam.getMSF() );
+        SOfficeFactory.getFactory( tParam.getMSF() );
 
         // create testobject here
         TestEnvironment tEnv = null;
diff --git a/sfx2/qa/complex/sfx2/GlobalEventBroadcaster.java b/sfx2/qa/complex/sfx2/GlobalEventBroadcaster.java
index 754e0da..680afb7 100644
--- a/sfx2/qa/complex/sfx2/GlobalEventBroadcaster.java
+++ b/sfx2/qa/complex/sfx2/GlobalEventBroadcaster.java
@@ -163,7 +163,7 @@ public class GlobalEventBroadcaster {
             XTextDocument xTextDoc = wHelper.openFromDialog("private:factory/swriter?slot=21051", "", false);
             shortWait();
             XWindow xWindow = UnoRuntime.queryInterface(XWindow.class, wHelper.getToolkit().getActiveTopWindow());
-            UITools ut = new UITools(m_xMSF,xWindow);
+            UITools ut = new UITools(xWindow);
             notifyEvents.clear();
             System.out.println("pressing button 'New Document'");
             try{


More information about the Libreoffice-commits mailing list