[Libreoffice-commits] .: qadevOOo/runner

Thomas Arnhold tarnhold at kemper.freedesktop.org
Tue Jan 24 06:43:15 PST 2012


 qadevOOo/runner/convwatch/DBHelper.java                 |   42 ------
 qadevOOo/runner/convwatch/GraphicalDifferenceCheck.java |   45 ------
 qadevOOo/runner/convwatch/StringHelper.java             |  103 ----------------
 3 files changed, 190 deletions(-)

New commits:
commit 74a356c3464b56e94c2174a0e7a1d63de8f7071e
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Tue Jan 24 15:43:03 2012 +0100

    dead java code in qa

diff --git a/qadevOOo/runner/convwatch/DBHelper.java b/qadevOOo/runner/convwatch/DBHelper.java
index e28fafb..719920b 100644
--- a/qadevOOo/runner/convwatch/DBHelper.java
+++ b/qadevOOo/runner/convwatch/DBHelper.java
@@ -200,54 +200,12 @@ public class DBHelper
             return null;
         }
 
-
-    /**
-     * This method removes all entries of the given<br>
-     * module/platform combination
-     * @param mdl the name of the module, e.g. sal
-     * @param os the name of the platform, e.g. unxsols
-     */
-    // LLA: public static void SQLdeleteValues(Connection _aCon, String _sEnvironment, String _sUnitName, String _sMethodName, String _sCWS, String _sDate)
-    // LLA:     {
-    // LLA:         String sSQL =
-    // LLA:             "DELETE FROM states WHERE " +
-    // LLA:             "     unit=" + DatabaseEntry.Quote(_sUnitName) +
-    // LLA:             " AND pf="   + DatabaseEntry.Quote (_sEnvironment) +
-    // LLA:             " AND meth=" + DatabaseEntry.Quote (_sMethodName) +
-    // LLA:             " AND cws="  + DatabaseEntry.Quote(_sCWS) +
-    // LLA:             " AND dt="   + DatabaseEntry.Quote(_sDate);
-    // LLA:
-    // LLA:         // ExecSQL(_aCon, sSQL);
-    // LLA:     }
-
     protected synchronized void ExecSQL(Connection _aCon, String _sSQL)
             {
                 MySQLThread aSQLThread = new MySQLThread(_aCon, _sSQL);
                 aSQLThread.start();
             }
 
-
-
-    // public static int QueryIntFromSQL(String _sSQL, String _sColumnName, String _sValue)
-    //     {
-    //         boolean bNeedSecondTry = false;
-    //         int nValue = 0;
-    //         do
-    //         {
-    //             try
-    //             {
-    //                 nValue = QueryIntFromSQL(_sSQL, _sColumnName, _sValue);
-    //             }
-    //             catch (ValueNotFoundException e)
-    //             {
-    //                 bNeedSecondTry = true;
-    //                 String sSQL = "INSERT INTO " + _sTable + "(" + _sColumnName + ") VALUES (" + _sValue + ")";
-    //                 ExecSQL(sSQL);
-    //             }
-    //         } while (bNeedSecondTry);
-    //         return nValue;
-    //     }
-
     public int QueryIntFromSQL(Connection _aCon, String _sSQL, String _sColumnName)
         throws ValueNotFoundException
         {
diff --git a/qadevOOo/runner/convwatch/GraphicalDifferenceCheck.java b/qadevOOo/runner/convwatch/GraphicalDifferenceCheck.java
index efce96c..7dde9cb 100644
--- a/qadevOOo/runner/convwatch/GraphicalDifferenceCheck.java
+++ b/qadevOOo/runner/convwatch/GraphicalDifferenceCheck.java
@@ -68,23 +68,9 @@ public class GraphicalDifferenceCheck
      */
     public static void createReferences(String _sInputPath, String _sReferencePath, GraphicalTestArguments _aGTA) throws ConvWatchException
         {
-//!
-//            System.out.println("createReferences() InputPath: " + _sInputPath + " refpath: " + _sReferencePath);
             showVersion();
             File aInputPath = new File(_sInputPath);
 
-//            System.out.println("Inputpath in file: " + aInputPath.getAbsolutePath());
-//!
-//             if (aInputPath.exists())
-//             {
-//                 System.out.println("Inputpath exists");
-//             }
-//             else
-//             {
-//                 System.out.println("Inputpath doesn't exists");
-//                 return;
-//             }
-
             if (aInputPath.isDirectory())
             {
                 String fs = System.getProperty("file.separator");
@@ -102,7 +88,6 @@ public class GraphicalDifferenceCheck
             }
             else
             {
-//!
                 // System.out.println("No directory.");
                 createOneReferenceFile(_sInputPath, _sReferencePath, _aGTA);
             }
@@ -288,36 +273,6 @@ public class GraphicalDifferenceCheck
             return convwatch.ConvWatch.check(_aGTA, _sOutputPath, sInputFile, _sReferencePath);
         }
 
-
-// LLA: old!     /**
-// LLA: old!      * Returns 'true' if a reference document on the specific output path exists.
-// LLA: old!      * The name of the document is corresponding to the input document, which can be
-// LLA: old!      * provided by a single name or path.
-// LLA: old!      *
-// LLA: old!      * @param inputPath       the original document name (possibly including path)
-// LLA: old!      * @param referencePath   the directory where the reference document will be stored
-// LLA: old!
-// LLA: old!      */
-// LLA: old!     public static boolean isReferencExistent(String inputDocumentPath, String referencePath)
-// LLA: old!     {
-// LLA: old!        // isolate the document name
-// LLA: old!         if(inputDocumentPath.indexOf(File.separator) != -1)
-// LLA: old!             inputDocumentPath = inputDocumentPath.substring(inputDocumentPath.lastIndexOf(File.separator) + 1, inputDocumentPath.length());
-// LLA: old!
-// LLA: old!        // exchange any arbitray suffix against the refence suffix (.prn)
-// LLA: old!         if(inputDocumentPath.indexOf('.') != -1)
-// LLA: old!             inputDocumentPath = inputDocumentPath.substring(0, inputDocumentPath.lastIndexOf('.'));
-// LLA: old!         inputDocumentPath = inputDocumentPath + ".prn";
-// LLA: old! System.out.println("GraphicalDifference CheckReferenceDocument: " + inputDocumentPath);
-// LLA: old!
-// LLA: old!         File refFile = new File(referencePath + inputDocumentPath);
-// LLA: old!         if(refFile.exists()){
-// LLA: old!             return true;
-// LLA: old!         }else
-// LLA: old!             return false;
-// LLA: old!    }
-
-
     private static String createInputFile(XComponent xComponent, String _sOutputPath, String resultDocName)
         throws ConvWatchCancelException
     {
diff --git a/qadevOOo/runner/convwatch/StringHelper.java b/qadevOOo/runner/convwatch/StringHelper.java
deleted file mode 100644
index b20e3b6..0000000
--- a/qadevOOo/runner/convwatch/StringHelper.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org.  If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// LLA: moved to helper.StringHelper package convwatch;
-// LLA: moved to helper.StringHelper
-// LLA: moved to helper.StringHelper public class StringHelper {
-// LLA: moved to helper.StringHelper
-// LLA: moved to helper.StringHelper     public static String doubleQuote(String _sStr)
-// LLA: moved to helper.StringHelper         {
-// LLA: moved to helper.StringHelper             return "\"" + _sStr + "\"";
-// LLA: moved to helper.StringHelper         }
-// LLA: moved to helper.StringHelper
-// LLA: moved to helper.StringHelper     public static String singleQuote(String _sStr)
-// LLA: moved to helper.StringHelper         {
-// LLA: moved to helper.StringHelper             return "'" + _sStr + "'";
-// LLA: moved to helper.StringHelper         }
-// LLA: moved to helper.StringHelper
-// LLA: moved to helper.StringHelper     public static String removeQuoteIfNeed(String _sPath)
-// LLA: moved to helper.StringHelper         {
-// LLA: moved to helper.StringHelper             String sNewPath = _sPath;
-// LLA: moved to helper.StringHelper
-// LLA: moved to helper.StringHelper             if (_sPath.startsWith("\"") ||
-// LLA: moved to helper.StringHelper                 _sPath.startsWith("'"))
-// LLA: moved to helper.StringHelper             {
-// LLA: moved to helper.StringHelper                 // remove trailing quotes, if exists
-// LLA: moved to helper.StringHelper                 sNewPath = sNewPath.substring(1);
-// LLA: moved to helper.StringHelper             }
-// LLA: moved to helper.StringHelper
-// LLA: moved to helper.StringHelper             if (_sPath.endsWith("\"") ||
-// LLA: moved to helper.StringHelper                 _sPath.endsWith("'"))
-// LLA: moved to helper.StringHelper             {
-// LLA: moved to helper.StringHelper                 // remove trailing quotes, if exists
-// LLA: moved to helper.StringHelper                 sNewPath = sNewPath.substring(0, sNewPath.length() - 1);
-// LLA: moved to helper.StringHelper             }
-// LLA: moved to helper.StringHelper             return sNewPath;
-// LLA: moved to helper.StringHelper         }
-// LLA: moved to helper.StringHelper
-// LLA: moved to helper.StringHelper     public static String doubleQuoteIfNeed(String _sStr)
-// LLA: moved to helper.StringHelper         {
-// LLA: moved to helper.StringHelper             if (_sStr.startsWith("\"") && _sStr.endsWith("\""))
-// LLA: moved to helper.StringHelper             {
-// LLA: moved to helper.StringHelper                 // don't quote twice
-// LLA: moved to helper.StringHelper                 return _sStr;
-// LLA: moved to helper.StringHelper             }
-// LLA: moved to helper.StringHelper             if (_sStr.indexOf(" ") == -1)
-// LLA: moved to helper.StringHelper             {
-// LLA: moved to helper.StringHelper                 // don't quote, if there is no space in name
-// LLA: moved to helper.StringHelper                 return _sStr;
-// LLA: moved to helper.StringHelper             }
-// LLA: moved to helper.StringHelper             if (_sStr.indexOf("%") != -1)
-// LLA: moved to helper.StringHelper             {
-// LLA: moved to helper.StringHelper                 return singleQuote(_sStr);
-// LLA: moved to helper.StringHelper             }
-// LLA: moved to helper.StringHelper
-// LLA: moved to helper.StringHelper             return doubleQuote(_sStr);
-// LLA: moved to helper.StringHelper         }
-// LLA: moved to helper.StringHelper
-// LLA: moved to helper.StringHelper     /**
-// LLA: moved to helper.StringHelper      * Convert a value to a string with a given length, if the len is greater the len of the value string representation
-// LLA: moved to helper.StringHelper      * fill it's front with '0'
-// LLA: moved to helper.StringHelper      * So ("5", 4) will result in a string "0005"
-// LLA: moved to helper.StringHelper      * @param _nValue
-// LLA: moved to helper.StringHelper      * @param _nLen
-// LLA: moved to helper.StringHelper      * @return
-// LLA: moved to helper.StringHelper      */
-// LLA: moved to helper.StringHelper     public static String createValueString(int _nValue, int _nLen)
-// LLA: moved to helper.StringHelper         {
-// LLA: moved to helper.StringHelper             String sValue = String.valueOf(_nValue);
-// LLA: moved to helper.StringHelper             StringBuffer a = new StringBuffer();
-// LLA: moved to helper.StringHelper             while (_nLen > sValue.length())
-// LLA: moved to helper.StringHelper             {
-// LLA: moved to helper.StringHelper                 a.append('0');
-// LLA: moved to helper.StringHelper                 _nLen --;
-// LLA: moved to helper.StringHelper             }
-// LLA: moved to helper.StringHelper             a.append(sValue);
-// LLA: moved to helper.StringHelper             return a.toString();
-// LLA: moved to helper.StringHelper         }
-// LLA: moved to helper.StringHelper
-// LLA: moved to helper.StringHelper }


More information about the Libreoffice-commits mailing list