Kaydet (Commit) 74a356c3 authored tarafından Thomas Arnhold's avatar Thomas Arnhold

dead java code in qa

üst 83a52676
...@@ -200,54 +200,12 @@ public class DBHelper ...@@ -200,54 +200,12 @@ public class DBHelper
return null; 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) protected synchronized void ExecSQL(Connection _aCon, String _sSQL)
{ {
MySQLThread aSQLThread = new MySQLThread(_aCon, _sSQL); MySQLThread aSQLThread = new MySQLThread(_aCon, _sSQL);
aSQLThread.start(); 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) public int QueryIntFromSQL(Connection _aCon, String _sSQL, String _sColumnName)
throws ValueNotFoundException throws ValueNotFoundException
{ {
......
...@@ -68,23 +68,9 @@ public class GraphicalDifferenceCheck ...@@ -68,23 +68,9 @@ public class GraphicalDifferenceCheck
*/ */
public static void createReferences(String _sInputPath, String _sReferencePath, GraphicalTestArguments _aGTA) throws ConvWatchException public static void createReferences(String _sInputPath, String _sReferencePath, GraphicalTestArguments _aGTA) throws ConvWatchException
{ {
//!
// System.out.println("createReferences() InputPath: " + _sInputPath + " refpath: " + _sReferencePath);
showVersion(); showVersion();
File aInputPath = new File(_sInputPath); 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()) if (aInputPath.isDirectory())
{ {
String fs = System.getProperty("file.separator"); String fs = System.getProperty("file.separator");
...@@ -102,7 +88,6 @@ public class GraphicalDifferenceCheck ...@@ -102,7 +88,6 @@ public class GraphicalDifferenceCheck
} }
else else
{ {
//!
// System.out.println("No directory."); // System.out.println("No directory.");
createOneReferenceFile(_sInputPath, _sReferencePath, _aGTA); createOneReferenceFile(_sInputPath, _sReferencePath, _aGTA);
} }
...@@ -288,36 +273,6 @@ public class GraphicalDifferenceCheck ...@@ -288,36 +273,6 @@ public class GraphicalDifferenceCheck
return convwatch.ConvWatch.check(_aGTA, _sOutputPath, sInputFile, _sReferencePath); 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) private static String createInputFile(XComponent xComponent, String _sOutputPath, String resultDocName)
throws ConvWatchCancelException throws ConvWatchCancelException
{ {
......
/*************************************************************************
*
* 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 }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment