Kaydet (Commit) d3f60c05 authored tarafından Marcos Paulo de Souza's avatar Marcos Paulo de Souza Kaydeden (comit) Noel Power

fdo#51304: Remove @author and more commented code

More tags removed and with it, more commented code was found. So remove it all.
Not functional changes here, just a cleanup.

Change-Id: Id4a6b3126ca32f3460dec3056b9caa370d0ee69c
Signed-off-by: 's avatarMarcos Paulo de Souza <marcos.souza.org@gmail.com>
üst c7374511
......@@ -41,10 +41,6 @@ import net.adaptivebox.knowledge.Library;
import net.adaptivebox.knowledge.SearchPoint;
import net.adaptivebox.problem.ProblemEncoder;
/**
*
* @author Andreas Schneider <Andreas.Schneider@Sun.COM>
*/
public abstract class BaseEvolutionarySolver extends BaseNLPSolver {
public BaseEvolutionarySolver(XComponentContext xContext, String name) {
......@@ -126,7 +122,6 @@ public abstract class BaseEvolutionarySolver extends BaseNLPSolver {
for (int i = 0; i < m_variables.size(); i++) {
CellMap variableMap = m_variables.get(i).CellMap;
m_variableData[variableMap.Range][variableMap.Row][variableMap.Col] = VX[i];
//m_variableCells[i].setValue(VX[i]);
}
for (int i = 0; i < m_cellRangeCount; i++)
m_cellRangeData[i].setData(m_variableData[i]);
......
......@@ -62,10 +62,6 @@ import java.util.HashMap;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
*
* @author Andreas Schneider <Andreas.Schneider@Sun.COM>
*/
public abstract class BaseNLPSolver extends WeakBase
implements com.sun.star.lang.XLocalizable,
com.sun.star.sheet.XSolver,
......
......@@ -31,10 +31,6 @@ import com.sun.star.beans.Property;
import com.sun.star.lang.IllegalArgumentException;
import com.sun.star.uno.Type;
/**
*
* @author Andreas Schneider
*/
public class PropertyInfo<PropType> {
private Property m_property;
......
......@@ -53,7 +53,6 @@ import java.util.logging.Logger;
/**
* The BaseDialog represents the base for all dialogs used within the addon.
* It automatically loads the necessary interfaces to access OpenOffice.org dialogs.
* @author Andreas Schneider
*/
public abstract class BaseDialog extends BaseControl {
......@@ -163,4 +162,4 @@ public abstract class BaseDialog extends BaseControl {
InvalidateStyle.UPDATE | InvalidateStyle.TRANSPARENT));
}
}
\ No newline at end of file
}
......@@ -27,10 +27,6 @@
package com.sun.star.comp.Calc.NLPSolver.dialogs;
/**
*
* @author Andreas Schneider <andreas.schneider@sun.com>
*/
public class DummyEvolutionarySolverStatusDialog
implements IEvolutionarySolverStatusDialog {
......
......@@ -40,10 +40,6 @@ import com.sun.star.comp.Calc.NLPSolver.dialogs.controls.Button;
import com.sun.star.comp.Calc.NLPSolver.dialogs.controls.Label;
import com.sun.star.comp.Calc.NLPSolver.dialogs.controls.ProgressBar;
/**
*
* @author Andreas Schneider <Andreas.Schneider@Sun.COM>
*/
public class EvolutionarySolverStatusUno extends BaseDialog
implements IEvolutionarySolverStatusDialog,
XActionListener {
......
......@@ -27,10 +27,6 @@
package com.sun.star.comp.Calc.NLPSolver.dialogs;
/**
*
* @author Andreas Schneider <Andreas.Schneider@Sun.COM>
*/
public interface IEvolutionarySolverStatusDialog {
public final static int WAITING = 0;
public final static int OK = 1;
......
......@@ -32,7 +32,6 @@ package com.sun.star.comp.Calc.NLPSolver.dialogs;
* "Exit" indicates no significant change (for example when the user presses
* Cancel or simply closes the dialog). "OK" indicates for example, that the
* user pressed the OK button.
* @author Andreas Schneider
*/
public enum ModalState {
Exit,
......
......@@ -41,10 +41,6 @@ import com.sun.star.uno.XComponentContext;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
*
* @author Andreas Schneider
*/
public abstract class BaseControl {
protected XComponentContext context;
......
......@@ -35,10 +35,6 @@ import java.util.logging.Level;
import java.util.logging.Logger;
import com.sun.star.comp.Calc.NLPSolver.dialogs.BaseDialog;
/**
*
* @author Andreas Schneider
*/
public class Button extends LabeledControl {
private String name;
......
......@@ -35,10 +35,6 @@ import java.util.logging.Level;
import java.util.logging.Logger;
import com.sun.star.comp.Calc.NLPSolver.dialogs.BaseDialog;
/**
*
* @author Andreas Schneider
*/
public class Label extends LabeledControl {
private String name;
......
......@@ -29,10 +29,6 @@ package com.sun.star.comp.Calc.NLPSolver.dialogs.controls;
import com.sun.star.uno.XComponentContext;
/**
*
* @author Andreas Schneider
*/
public abstract class LabeledControl extends BaseControl {
public LabeledControl(XComponentContext context) {
......
......@@ -33,10 +33,6 @@ import java.util.logging.Level;
import java.util.logging.Logger;
import com.sun.star.comp.Calc.NLPSolver.dialogs.BaseDialog;
/**
*
* @author Andreas Schneider <Andreas.Schneider@Sun.COM>
*/
public class ProgressBar extends BaseControl {
private String m_name;
......
......@@ -27,10 +27,6 @@
package com.sun.star.comp.Calc.NLPSolver.dialogs.controls;
/**
*
* @author Andreas Schneider
*/
public enum TextAlign {
Left(0),
Center(1),
......
......@@ -17,16 +17,13 @@
*/
/**
* @author: ll93751
* @copyright: Sun Microsystems Inc. 2010
*/
package complex.junitskeleton;
public class justatest /* extends *//* implements */ {
//public static void main( String[] argv ) {
//
// }
public class justatest {
public void justatest()
{
System.out.println("justatest CTor.");
......
......@@ -22,9 +22,6 @@ import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
/**
*
* @author ll93751
*
* I have removed the assure(...) functions from ComplexTestCase due to the fact now I can
* use the functions every where and don't need to be a ComplexTestCase any longer.
*/
......@@ -398,16 +395,6 @@ public class Assurance
assure(msg, false, cont);
}
// /**
// * @deprecated
// */
// protected void addResult(String message, boolean state) {
// String msg = message + " - " + state;
// this.state &= state;
// this.message += msg + "\r\n";
// log.println(msg);
// }
public class AssureException extends RuntimeException {
public AssureException(String msg) {
......
......@@ -20,10 +20,6 @@ package complexlib;
import java.util.ArrayList;
/**
*
* @author fs93730
*/
public class ShowTargets
{
/** Creates a new instance of ShowTargets */
......
......@@ -24,8 +24,6 @@ import java.util.ArrayList;
/**
* Helper for directory access
*
* @author Lars.Langhans@sun.com
*/
public class DirectoryHelper
{
......@@ -118,7 +116,6 @@ public class DirectoryHelper
try
{
// Composing the URL by replacing all backslashs
// String stringUrl = "file:///" + aFileEntries[ i ].getAbsolutePath().replace( '\\', '/' );
String aStr = aDirEntries[ i ].getAbsolutePath();
m_aFileList.add(aStr);
}
......@@ -130,18 +127,5 @@ public class DirectoryHelper
}
}
}
// tests
// public static void main(String[] args)
// {
// String sDirectory = "/misc/convwatch/gfxcmp/data/doc-pool/demo";
// Object[] aDirectoryList = DirectoryHelper.traverse( sDirectory, false );
//
// for (int i=0;i<aDirectoryList.length;i++)
// {
// String sEntry = (String)aDirectoryList[i];
// System.out.println(sEntry);
// }
// }
}
......@@ -24,8 +24,6 @@ import java.util.ArrayList;
/**
* Helper for directory access
*
* @author lla@openoffice.org
*/
public class DirectoryHelper
{
......@@ -122,7 +120,6 @@ public class DirectoryHelper
try
{
// Composing the URL by replacing all backslashs
// String stringUrl = "file:///" + aFileEntries[ i ].getAbsolutePath().replace( '\\', '/' );
String aStr = aDirEntries[ i ].getAbsolutePath();
m_aFileList.add(aStr);
}
......@@ -134,18 +131,5 @@ public class DirectoryHelper
}
}
}
// tests
// public static void main(String[] args)
// {
// String sDirectory = "/misc/convwatch/gfxcmp/data/doc-pool/demo";
// Object[] aDirectoryList = DirectoryHelper.traverse( sDirectory, false );
//
// for (int i=0;i<aDirectoryList.length;i++)
// {
// String sEntry = (String)aDirectoryList[i];
// System.out.println(sEntry);
// }
// }
}
......@@ -23,17 +23,12 @@ import java.io.File;
import java.io.FileFilter;
import java.util.ArrayList;
/**
*
* @author ll93751
*/
abstract public class EnhancedComplexTestCase extends ComplexTestCase implements IDocument
{
private void callEntry(String _sEntry, ParameterHelper _aParam)
{
// log.println("- next file is: ------------------------------");
log.println(" File: " + _sEntry);
// TODO: check if 'sEntry' is a guilty document.
File aFile = new File(_aParam.getInputPath());
......@@ -50,25 +45,14 @@ private void callEntry(String _sEntry, ParameterHelper _aParam)
}
String sNewSubDir = FileHelper.removeFirstDirectorysAndBasenameFrom(_sEntry, sPath);
// String sNewReferencePath = _aParam.getReferencePath();
String sNewOutputPath = _aParam.getOutputPath();
// String sNewDiffPath = m_sDiffPath;
// if there exist a subdirectory, add it to all result path
if (sNewSubDir.length() > 0)
{
// if (sNewReferencePath != null)
// {
// sNewReferencePath = FileHelper.appendPath(sNewReferencePath, sNewSubDir);
// }
sNewOutputPath = FileHelper.appendPath(sNewOutputPath, sNewSubDir);
// if (sNewDiffPath != null)
// {
// sNewDiffPath = FileHelper.appendPath(sNewDiffPath, sNewSubDir);
// }
}
// log.println("sEntry: " + _sEntry + " " /* + sNewReferencePath + " " */ + sNewOutputPath);
log.println("Outputpath: " + sNewOutputPath);
......@@ -135,11 +119,6 @@ private void callEntry(String _sEntry, ParameterHelper _aParam)
// TODO: auslagern in eine function, die ein Interface annimmt.
String sInputPath = _aParam.getInputPath();
File aInputPath = new File(sInputPath);
// if (!aInputPath.exists())
// {
// GlobalLogWriter.println("Error, InputPath or File in InputPath doesn't exists. Please check: '" + sInputPath + "'");
// assure("Error, InputPath or File in InputPath doesn't exists. Please check: '" + sInputPath + "'", false);
// }
if (aInputPath.isDirectory())
{
// check a whole directory
......@@ -328,11 +307,6 @@ private void callEntry(String _sEntry, ParameterHelper _aParam)
// TODO: auslagern in eine function, die ein Interface annimmt.
String sInputPath = _aParam.getInputPath();
File aInputPath = new File(sInputPath);
// if (!aInputPath.exists())
// {
// GlobalLogWriter.println("Error, InputPath or File in InputPath doesn't exists. Please check: '" + sInputPath + "'");
// assure("Error, InputPath or File in InputPath doesn't exists. Please check: '" + sInputPath + "'", false);
// }
if (aInputPath.isDirectory())
{
// check a whole directory
......@@ -392,7 +366,6 @@ private void callEntry(String _sEntry, ParameterHelper _aParam)
// TODO: unhandled yet.
GlobalLogWriter.println("Warning: caught OfficeException " + e.getMessage());
}
// callEntry(sInputPath, _aParam);
}
}
}
......@@ -462,7 +435,7 @@ private void callEntry(String _sEntry, ParameterHelper _aParam)
String sIndexFile2 = FileHelper.appendPath(sPath, sPSFile + ".ini");
IniFile aIniFile2 = new IniFile(sIndexFile2);
String sStatusRunThrough = aIniFile2.getValue("global", "state");
String sStatusMessage = ""; // aIniFile2.getValue("global", "info");
String sStatusMessage = "";
aIniFile2.close();
......@@ -471,34 +444,6 @@ private void callEntry(String _sEntry, ParameterHelper _aParam)
}
aOutputter.close();
// String sHTMLFile = FileHelper.appendPath(sPath, sBasename + ".ps.html");
// try
// {
//
// FileOutputStream out2 = new FileOutputStream(sHTMLFile);
// PrintStream out = new PrintStream(out2);
//
// out.println("<HTML>");
// out.println("<BODY>");
// for (int i=0;i<aList.size();i++)
// {
// // <A href="link">blah</A>
// String sPSFile = (String)aList.get(i);
// out.print("<A href=\"");
// out.print(sPSFile + ".html");
// out.print("\">");
// out.print(sPSFile);
// out.println("</A>");
// out.println("<BR>");
// }
// out.println("</BODY></HTML>");
// out.close();
// out2.close();
// }
// catch (java.io.IOException e)
// {
//
// }
}
}
aIniFile.close();
......
......@@ -16,23 +16,11 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package graphical;
// import graphical.EnhancedComplexTestCase;
/**
*
* @author ll93751
*/
public class GraphicalComparator extends EnhancedComplexTestCase
{
// @Override
public String[] getTestMethodNames() {
return new String[]{"check"};
}
......@@ -46,4 +34,3 @@ public class GraphicalComparator extends EnhancedComplexTestCase
}
}
......@@ -18,10 +18,6 @@
package graphical;
/**
*
* @author ll93751
*/
public interface IDocument
{
/**
......
......@@ -18,10 +18,6 @@
package graphical;
/**
*
* @author ll93751
*/
public interface IOffice
{
/**
......
......@@ -156,13 +156,8 @@ class CountNotBlackPixelsFromImage extends CountNotXXXPixelsFromImage
}
}
/**
*
* @author ll93751
*/
public class JPEGComparator extends EnhancedComplexTestCase
{
// @Override
public String[] getTestMethodNames()
{
......@@ -184,8 +179,6 @@ public class JPEGComparator extends EnhancedComplexTestCase
public void checkOneFile(String _sDocumentName, String _sResult, ParameterHelper _aParams) throws OfficeException
{
// private void callEveryPictureInIniFile(IniFile _aIniFile, String _sSectionName, ParameterHelper _aParam)
// {
String sPath = FileHelper.getPath(_sDocumentName);
String sSectionName = FileHelper.getBasename(_sDocumentName);
......@@ -209,14 +202,11 @@ public class JPEGComparator extends EnhancedComplexTestCase
for (int i = 1; i <= nPages; i++)
{
String sJPEGFilename = JPEGCreator.getFilenameForJPEGSchema(sJPEGSchema, i);
// String sPath = FileHelper.getPath(_aParam.getInputPath());
String sJPEGPath = FileHelper.getPath(sJPEGFilename);
if (!sPath.equals(sJPEGPath))
{
GlobalLogWriter.println("Path where to find the index and where to file the JPEG pictures are not the same.");
}
// String sEntry = FileHelper.appendPath(sPath, sSection);
File aFile = new File(sJPEGFilename);
assure("File '" + sJPEGFilename + "' doesn't exists.", aFile.exists(), true);
if (aFile.exists())
......@@ -408,7 +398,6 @@ public class JPEGComparator extends EnhancedComplexTestCase
// we want to have all in one Directory, Original, Reference and the Difference result.
// copy the original file to the reference path
String sNewSourceBasename = "Original_" + sSourceBasename;
// String sSource = FileHelper.appendPath(sSourcePath, sSourceBasename);
String sSource = _sDocumentName;
String sDestination = FileHelper.appendPath(sDestinationPath, sNewSourceBasename);
FileHelper.copy(sSource, sDestination);
......@@ -417,7 +406,6 @@ public class JPEGComparator extends EnhancedComplexTestCase
JPEGCreator.convertToNearSameFileWithWidth340(sDestination);
}
String sDifferenceBasename = "Difference_between_" + FileHelper.getNameNoSuffix(sSourceBasename) + "_and_" + FileHelper.getNameNoSuffix(sDestinationBasename) + ".jpg";
// String sDifferencePath = sDestinationPath;
String sSource = FileHelper.appendPath(sDestinationPath, sSourceBasename);
String sDestination = FileHelper.appendPath(sDestinationPath, sDestinationBasename);
......@@ -481,8 +469,6 @@ public class JPEGComparator extends EnhancedComplexTestCase
int nMaxPage = Math.max(nPage, aResultIni.getIntValue("global", "pages", 0));
aResultIni.insertValue("global", "pages", nMaxPage);
// INIoutput.writeValue("buildid", _sBuildID);
// INIoutput.writeValue("refbuildid", _sRefBuildID);
String sRefBuildId = (String) _aParams.getTestParameters().get("RefBuildId");
if (sRefBuildId == null)
{
......@@ -508,75 +494,6 @@ public class JPEGComparator extends EnhancedComplexTestCase
}
}
// // This creates a status for exact on document
// static boolean createINIStatus(StatusHelper[] aList, String _sFilenamePrefix, String _sOutputPath, String _sAbsoluteInputFile, String _sBuildID, String _sRefBuildID)
// {
// // Status
// String fs = System.getProperty("file.separator");
// String sBasename = FileHelper.getBasename(_sAbsoluteInputFile);
// String sNameNoSuffix = FileHelper.getNameNoSuffix(sBasename);
//// String sHTMLFile = _sFilenamePrefix + sNameNoSuffix + ".html";
//// HTMLOutputter HTMLoutput = HTMLOutputter.create(_sOutputPath, sHTMLFile, "", "");
//// HTMLoutput.header(sNameNoSuffix);
//// TODO: version info was fine
//// HTMLoutput.checkSection(sBasename);
// // Status end
//
// String sINIFile = _sFilenamePrefix + sNameNoSuffix + ".ini";
// INIOutputter INIoutput = INIOutputter.create(_sOutputPath, sINIFile, "", "");
// INIoutput.createHeader();
//// TODO: version info was fine
//
// INIoutput.writeSection("global");
// INIoutput.writeValue("pages", String.valueOf(aList.length));
// INIoutput.writeValue("buildid", _sBuildID);
// INIoutput.writeValue("refbuildid", _sRefBuildID);
// INIoutput.writeValue("diffdiff", "no");
// INIoutput.writeValue("basename", sBasename);
//
// boolean bResultIsOk = true; // result over all pages
// for (int i=0;i<aList.length; i++)
// {
// INIoutput.writeSection("page" + String.valueOf(i + 1)); // list start at point 0, but this is page 1 and so on... current_page = (i + 1)
// aList[i].printStatus();
//
// boolean bCurrentResult = true; // result over exact one page
//
// int nCurrentDiffStatus = aList[i].nDiffStatus;
//
// // check if the status is in a defined range
// if (nCurrentDiffStatus == StatusHelper.DIFF_NO_DIFFERENCES)
// {
// // ok.
// }
// else if (nCurrentDiffStatus == StatusHelper.DIFF_DIFFERENCES_FOUND && aList[i].nPercent < 5)
// {
// // ok.
// }
// else if (nCurrentDiffStatus == StatusHelper.DIFF_AFTER_MOVE_DONE_NO_PROBLEMS)
// {
// // ok.
// }
// else if (nCurrentDiffStatus == StatusHelper.DIFF_AFTER_MOVE_DONE_DIFFERENCES_FOUND && aList[i].nPercent2 < 5)
// {
// // ok.
// }
// else
// {
// // failed.
// bCurrentResult = false; // logic: nDiff==0 = true if there is no difference
// }
//
// // Status
//// HTMLoutput.checkLine(aList[i], bCurrentResult);
// INIoutput.checkLine(aList[i], bCurrentResult);
// bResultIsOk &= bCurrentResult;
// }
// // Status
//// HTMLoutput.close();
// INIoutput.close();
// return bResultIsOk;
// }
/**
* count how much pixel differ and between Old or New and the Difference graphics
*
......@@ -612,41 +529,6 @@ public class JPEGComparator extends EnhancedComplexTestCase
final int nNotWhiteCount_NewGraphic = PixelCounter.countNotWhitePixelsFromImage(_sNewGfx);
final int nNotBlackCount_DiffGraphic = PixelCounter.countNotBlackPixelsFromImage(_sDiffGfx);
// Count Pixels in different threads
// CountNotWhitePixelsFromImage t1 = new CountNotWhitePixelsFromImage(_sOldGfx);
// CountNotWhitePixelsFromImage t2 = new CountNotWhitePixelsFromImage(_sNewGfx);
// CountNotBlackPixelsFromImage t3 = new CountNotBlackPixelsFromImage(_sDiffGfx);
// t1.start();
// t2.start();
// t3.start();
// try
// {
// t1.join();
// }
// catch (InterruptedException ex)
// {
// GlobalLogWriter.get().println("Thread 1 failed: " + ex.getMessage());
// }
// try
// {
// t2.join();
// }
// catch (InterruptedException ex)
// {
// GlobalLogWriter.get().println("Thread 2 failed: " + ex.getMessage());
// }
// try
// {
// t3.join();
// }
// catch (InterruptedException ex)
// {
// GlobalLogWriter.get().println("Thread 3 failed: " + ex.getMessage());
// }
// final int nNotWhiteCount_OldGraphic = t1.getValue();
// final int nNotWhiteCount_NewGraphic = t2.getValue();
// final int nNotBlackCount_DiffGraphic = t3.getValue();
a.stop();
GlobalLogWriter.println("Thread Time is: " + a.getTime());
......@@ -680,11 +562,6 @@ public class JPEGComparator extends EnhancedComplexTestCase
}
}
// String sCommand = sComposite + " -compose difference " +
// StringHelper.doubleQuoteIfNeed(_sOldGfx) + " " +
// StringHelper.doubleQuoteIfNeed(_sNewGfx) + " " +
// StringHelper.doubleQuoteIfNeed(_sDiffGfx);
String[] sCommandArray =
{
sComposite,
......@@ -726,10 +603,6 @@ public class JPEGComparator extends EnhancedComplexTestCase
int nResult = 0;
// would like to know what the meaning of %k is for ImageMagick's 'identify'
String sIM_Format = "%k";
// if (OSHelper.isWindows())
// {
// sIM_Format = "%%k";
// }
String sIdentify = "identify";
if (OSHelper.isWindows())
......@@ -742,8 +615,6 @@ public class JPEGComparator extends EnhancedComplexTestCase
}
}
// String sCommand = sIdentify + " " + sIM_Format + " " + StringHelper.doubleQuoteIfNeed(_sDiffGfx);
String[] sCommandArray =
{
sIdentify,
......@@ -776,29 +647,4 @@ public class JPEGComparator extends EnhancedComplexTestCase
}
return nResult;
}
// public static void main(String [] _args)
// {
//// give an index.ini file, ok
//// give a directory, where exist jpeg files ok
//// inputpath (given file) doesn't exists
//// give a jpeg file.
//
// String args[] = {
// "-TimeOut", "3600000",
// "-tb", "java_complex",
// "-o", "graphical.JPEGComparator",
// "-DOC_COMPARATOR_INPUT_PATH", "C:\\CWS\\temp\\output\\index.ini",
// "-DOC_COMPARATOR_OUTPUT_PATH", "C:\\CWS\\temp\\output2",
//// "-DOC_COMPARATOR_INPUT_PATH", "C:\\CWS\\temp\\output\\GroupReport.odt.pdf_180DPI_0001.jpg",
//// "-DOC_COMPARATOR_OUTPUT_PATH", "C:\\CWS\\temp\\output2\\Report1.odt.pdf_180DPI_0001.jpg",
// "-DOC_COMPARATOR_HTML_OUTPUT_PREFIX", "http://so-gfxcmp-lin.germany.sun.com/gfxcmp_ui/cw.php?inifile=",
//// "-DOC_COMPARATOR_REFERENCE_CREATOR_TYPE", "PDF", /* default: "OOo" */
//// "-DOC_COMPARATOR_REFERENCE_CREATOR_TYPE", "msoffice", /* default: "OOo" */
//// "-OFFICE_VIEWABLE", "false",
//// "-AppExecutionCommand", "\"C:/Programme/sun/staroffice 9/program/soffice.exe\" --norestore --nocrashreport --accept=pipe,name=ll93751;urp;",
// "-NoOffice"
// };
//
// org.openoffice.Runner.main(args);
// }
}
......@@ -23,13 +23,8 @@ import helper.ProcessHandler;
import helper.StringHelper;
import java.io.File;
/**
*
* @author ll93751
*/
public class JPEGCreator extends EnhancedComplexTestCase
{
// @Override
public String[] getTestMethodNames()
{
return new String[]{"PostscriptOrPDFToJPEG"};
......@@ -52,11 +47,6 @@ public class JPEGCreator extends EnhancedComplexTestCase
{
GlobalLogWriter.println(" Document: " + _sDocumentName);
GlobalLogWriter.println(" results: " + _sResult);
// IOffice aOffice = new Office(_aParams, _sResult);
// aOffice.start();
// aOffice.load(_sDocumentName);
// aOffice.storeAsPostscript();
// aOffice.close();
String sJPEGNameSchema = createJPEG(_sDocumentName, "", _aParams);
// store information only if jpeg files exists
......@@ -140,10 +130,6 @@ public static void convertToNearSameFileWithWidth340(String _sJPEGFilename)
return;
}
String sJPEGFilename = _sJPEGFilename.replaceAll("\\\\", "/");
// if (OSHelper.isWindows())
// {
// sJPEGFilename = sJPEGFilename.replaceAll("/", "\\\\");
// }
String sNewJPEGFilename;
sNewJPEGFilename = util.utils.replaceAll13(sJPEGFilename, ".jpg", "_w340.jpg");
convertToWidth340(sJPEGFilename, sNewJPEGFilename);
......@@ -164,8 +150,6 @@ Catrom am besten
*/
private static void convertToWidth340(String _sFrom, String _To)
{
// int nResult = 0;
String sConvertEXE = "convert";
if (OSHelper.isLinuxIntel())
{
......@@ -201,23 +185,6 @@ private static void convertToWidth340(String _sFrom, String _To)
{
GlobalLogWriter.println("'" + sBack + "'");
}
// try to interpret the result, which we get as a String
// try
// {
// int nIdx = sBack.indexOf("\n");
// if (nIdx > 0)
// {
// sBack = sBack.substring(0, nIdx);
// }
//
// nResult = Integer.valueOf(sBack).intValue();
// }
// catch(java.lang.NumberFormatException e)
// {
// GlobalLogWriter.get().println("Number format exception");
// nResult = 0;
// }
// return nResult;
}
/**
......@@ -249,7 +216,6 @@ private static void convertToWidth340(String _sFrom, String _To)
}
String sFileDir = FileHelper.getPath(_sFile);
String sBasename = FileHelper.getBasename(_sFile);
// String sNameNoSuffix = FileHelper.getNameNoSuffix(sBasename);
String sTmpDir = util.utils.getUsersTempDir();
if (_aParam.getOutputPath() != null)
......@@ -282,7 +248,6 @@ private static void convertToWidth340(String _sFrom, String _To)
private String getJPEGName(String _sOutputPath, String _sBasename, int _nResolutionInDPI, String _sGS_PageOutput)
{
// String fs = System.getProperty("file.separator");
String sName = _sBasename + "_" + String.valueOf(_nResolutionInDPI) + "DPI_" + _sGS_PageOutput + ".jpg";
String sJPEGName = FileHelper.appendPath(_sOutputPath, sName);
return sJPEGName;
......@@ -303,9 +268,6 @@ private static void convertToWidth340(String _sFrom, String _To)
{
FileHelper.makeDirectories("", _sOutputPath);
// create a jpeg from original prn
// String fs = System.getProperty("file.separator");
String sJPEGNameSchema = getJPEGName(_sOutputPath, _sSourceFile, _nResolutionInDPI, m_sGS_PageOutput);
String sPostscriptOrPDFFile = FileHelper.appendPath(_sSourcePath, _sSourceFile);
String sGhostscriptEXE = "gs";
......@@ -324,7 +286,6 @@ private static void convertToWidth340(String _sFrom, String _To)
}
}
// String sCommand = sGhostscriptEXE + " -dNOPROMPT -dBATCH -sDEVICE=jpeg -r" + String.valueOf(_nResolutionInDPI) + " -dNOPAUSE -sOutputFile=" + StringHelper.doubleQuoteIfNeed(sJPGFilename) + " " + StringHelper.doubleQuoteIfNeed(sOriginalFile);
String[] sCommandArray =
{
sGhostscriptEXE,
......@@ -339,23 +300,13 @@ private static void convertToWidth340(String _sFrom, String _To)
};
// System.out.println("Start Command array");
// try
// {
// Runtime.getRuntime().exec(sCommandArray);
// } catch (Exception e) {
// System.out.println("FAILED");
// }
// System.out.println("done");
// TODO: gives ghostscript an error we can handle?
ProcessHandler aHandler = new ProcessHandler(sCommandArray);
boolean bBackValue = aHandler.executeSynchronously();
assure("There seems to be a problem with ghostscript", bBackValue, true);
int nExitCode = aHandler.getExitCode();
// ArrayList m_aFileList = new ArrayList();
// String sJPEGNameSchema = "";
if (nExitCode == 0)
{
// TODO: return a real filename, due to the fact we don't know how much files are created, maybe better to return a list
......@@ -372,8 +323,7 @@ private static void convertToWidth340(String _sFrom, String _To)
assure("There seems to be a problem with ghostscript and '" + sPostscriptOrPDFFile + "' exit code: " + nExitCode, false, true);
GlobalLogWriter.println("Warning: There seems to be a problem with '" + sGhostscriptEXE + "'...");
}
// String[] aList = new String[m_aFileList.size()];
// aList = (String[])m_aFileList.toArray(aList);
return sJPEGNameSchema; // sNewJPEGFilename;
}
......@@ -405,7 +355,6 @@ private static void convertToWidth340(String _sFrom, String _To)
String sNewJPEGFilename = getFilenameForJPEGSchema(_sJPEGSchema, i);
if (FileHelper.exists(sNewJPEGFilename))
{
// m_aFileList.add(sNewJPEGFilename); // as long as the files exist, fill the array
nPages ++;
}
else
......@@ -416,47 +365,4 @@ private static void convertToWidth340(String _sFrom, String _To)
}
return nPages;
}
// public static void main(String [] _args)
// {
//// DONE: give an index.ini file ok
//// String args[] = {
//// "-TimeOut", "3600000",
//// "-tb", "java_complex",
//// "-o", "graphical.JPEGCreator",
//// "-DOC_COMPARATOR_INPUT_PATH", "C:\\CWS\\temp\\output\\index.ini",
//// "-DOC_COMPARATOR_OUTPUT_PATH", "C:\\CWS\\temp\\output",
//// "-DOC_COMPARATOR_PRINT_MAX_PAGE", "9999",
//// "-DOC_COMPARATOR_GFX_OUTPUT_DPI_RESOLUTION", "180",
//// "-DOC_COMPARATOR_HTML_OUTPUT_PREFIX", "http://so-gfxcmp-lin.germany.sun.com/gfxcmp_ui/cw.php?inifile=",
////// "-DOC_COMPARATOR_REFERENCE_CREATOR_TYPE", "PDF", /* default: "OOo" */
////// "-DOC_COMPARATOR_REFERENCE_CREATOR_TYPE", "msoffice", /* default: "OOo" */
////// "-OFFICE_VIEWABLE", "false",
//// "-AppExecutionCommand", "\"C:/Programme/sun/staroffice 9/program/soffice.exe\" --norestore --nocrashreport --accept=pipe,name=ll93751;urp;",
//// "-NoOffice"
//// };
//
//// Done: give a directory, where exist pdf/ps files ok.
//// Done: inputpath (given file) doesn't exists, ok.
//// Done: give a ps/pdf file. ok.
//
// String args[] = {
// "-TimeOut", "3600000",
// "-tb", "java_complex",
// "-o", "graphical.JPEGCreator",
// "-DOC_COMPARATOR_INPUT_PATH", "C:\\CWS\\temp\\output\\Names7.odt.pdf",
// "-DOC_COMPARATOR_OUTPUT_PATH", "C:\\CWS\\temp\\output",
// "-DOC_COMPARATOR_PRINT_MAX_PAGE", "9999",
// "-DOC_COMPARATOR_GFX_OUTPUT_DPI_RESOLUTION", "180",
// "-DOC_COMPARATOR_HTML_OUTPUT_PREFIX", "http://so-gfxcmp-lin.germany.sun.com/gfxcmp_ui/cw.php?inifile=",
//// "-DOC_COMPARATOR_REFERENCE_CREATOR_TYPE", "PDF", /* default: "OOo" */
//// "-DOC_COMPARATOR_REFERENCE_CREATOR_TYPE", "msoffice", /* default: "OOo" */
//// "-OFFICE_VIEWABLE", "false",
// "-AppExecutionCommand", "\"C:/Programme/sun/staroffice 9/program/soffice.exe\" --norestore --nocrashreport --accept=pipe,name=ll93751;urp;",
// "-NoOffice"
// };
//
// org.openoffice.Runner.main(args);
// }
}
......@@ -18,15 +18,8 @@
package graphical;
// import java.io.File;
/**
*
* @author ll93751
*/
public class JPEGEvaluator extends EnhancedComplexTestCase
{
// @Override
public String[] getTestMethodNames()
{
return new String[]{"EvaluateResult"};
......@@ -40,47 +33,14 @@ public class JPEGEvaluator extends EnhancedComplexTestCase
GlobalLogWriter.set(log);
ParameterHelper aParam = new ParameterHelper(param);
// aParam.getTestParameters().put("current_ok_status", -1);
// run through all documents found in Inputpath
foreachResultCreateHTML(aParam);
}
public void checkOneFile(String _sDocument, String _sResult, ParameterHelper _aParams) throws OfficeException
{
// throw new UnsupportedOperationException("Not supported yet.");
// int dummy = 0;
String sBasename = FileHelper.getBasename(_sDocument);
String sResultIniFile = _sDocument + ".ini";
// File aFile = new File(sResultIniFile);
// assure("Result file doesn't exists " + sResultIniFile, aFile.exists());
//
// int good = 0;
// int bad = 0;
// int ugly = 0;
//
// IniFile aResultIniFile = new IniFile(sResultIniFile);
// int nPages = aResultIniFile.getIntValue("global", "pages", 0);
// for (int i=0;i<nPages;i++)
// {
// String sCurrentPage = "page" + String.valueOf(i + 1);
// int nPercent = aResultIniFile.getIntValue(sCurrentPage, "percent", -1);
// if (nPercent == 0)
// {
// good++;
// }
// else if (nPercent <= 5)
// {
// bad ++;
// }
// else
// {
// ugly ++;
// }
// }
//
// assure("Error: document doesn't contains pages", nPages > 0);
HTMLResult aOutputter = new HTMLResult(_sResult, sBasename + ".html" );
aOutputter.header(_sResult);
......@@ -90,65 +50,9 @@ public class JPEGEvaluator extends EnhancedComplexTestCase
String sStatusRunThrough = aResultIniFile.getValue("global", "state");
String sStatusMessage = aResultIniFile.getValue("global", "info");
// // TODO: this information has to come out of the ini files
// String sStatusRunThrough = "PASSED, ";
// String sPassed = "OK";
//
// String sStatusMessage = "From " + nPages + " page(s) are: ";
// String sGood = "";
// String sBad = "";
// String sUgly = "";
//
// if (good > 0)
// {
// sGood = " good:=" + good;
// sStatusMessage += sGood;
// }
// if (bad > 0)
// {
// sBad = " bad:=" + bad;
// sStatusMessage += sBad;
// }
// if (ugly > 0)
// {
// sUgly = " ugly:=" + ugly;
// sStatusMessage += sUgly;
// }
//
// // Failure matrix
// // 0 1
// // ugly OK FAILED
// // bad OK
// // good OK
//
// if (ugly > 0)
// {
// sPassed = "FAILED";
// }
// else
// {
// if (bad > 0)
// {
// sPassed = "NEED A LOOK";
// }
// else
// {
// sPassed = "OK";
// }
// }
// sStatusRunThrough += sPassed;
// aResultIniFile.insertValue("global", "state", sStatusRunThrough);
// aResultIniFile.insertValue("global", "info", sStatusMessage);
// aResultIniFile.close();
String sHTMLFile = _aParams.getHTMLPrefix(); // "http://so-gfxcmp-lin/gfxcmp_ui/cw.php?inifile=";
sHTMLFile += _sDocument + ".ini";
aOutputter.indexLine(sHTMLFile, sBasename, sStatusRunThrough, sStatusMessage);
aOutputter.close();
// IniFile aIniFile = new IniFile(_sDocument);
// aIniFile.
}
}
......@@ -20,10 +20,6 @@ package graphical;
import java.util.ArrayList;
/**
*
* @author ll93751
*/
public class Office implements IOffice
{
private ParameterHelper m_aParameterHelper;
......@@ -101,7 +97,6 @@ public class Office implements IOffice
// foreach Report found in the .odb file, create an entry 'report'<number> in the original <name>.odb Section
// so it is possible to run through all reports by the given .odb name
IniFile aIniFile = new IniFile(sIniFile);
// String sSection = FileHelper.getBasename(_sDocumentName); // name of the odb file
int nFileCount = aIniFile.getIntValue(sSection, "reportcount", 0);
String sValue = FileHelper.getBasename(sDocumentName); // name of the corresponding report
aIniFile.insertValue(sSection, "report" + nFileCount, sValue);
......@@ -133,8 +128,6 @@ public class Office implements IOffice
{
m_aOffice.storeAsPostscript();
}
// FileHelper.addBasenameToIndex(sOutputFilename);
}
}
......@@ -154,7 +147,4 @@ public class Office implements IOffice
}
}
}
......@@ -19,8 +19,6 @@
package graphical;
/**
*
* @author ll93751
* Exception which occur if something goes wrong at load document.
*/
......@@ -30,5 +28,4 @@ public class OfficeException extends Exception
{
super(_aMessage);
}
}
......@@ -41,11 +41,6 @@ import helper.URLHelper;
import java.io.File;
import java.util.ArrayList;
/**
*
* @author ll93751
*/
class PropertySetHelper
{
XPropertySet m_xPropertySet;
......@@ -139,32 +134,6 @@ public class OpenOfficeDatabaseReportExtractor extends Assurance
}
return m_xMultiServiceFactory;
}
// private void startOffice()
// {
// // int tempTime = m_aParameterHelper.getTestParameters().getInt("SingleTimeOut");
// param.put("TimeOut", new Integer(300000));
// System.out.println("TimeOut: " + param.getInt("TimeOut"));
// System.out.println("ThreadTimeOut: " + param.getInt("ThreadTimeOut"));
//
// // OfficeProvider aProvider = null;
// m_aProvider = new OfficeProvider();
// m_xXMultiServiceFactory = (XMultiServiceFactory) m_aProvider.getManager(param);
// param.put("ServiceFactory", m_xXMultiServiceFactory);
// }
//
// private void stopOffice()
// {
// if (m_aProvider != null)
// {
// m_aProvider.closeExistingOffice(param, true);
// m_aProvider = null;
// }
// TimeHelper.waitInSeconds(2, "Give close Office some time.");
// }
// private String m_sUPDMinor;
// private String m_sCWS_WORK_STAMP;
/**
* This is the main test Function of current ReportDesignerTest
......@@ -191,52 +160,20 @@ public class OpenOfficeDatabaseReportExtractor extends Assurance
ArrayList<PropertyValue> aPropertyList = new ArrayList<PropertyValue>();
// FYI: it is not allowed to open the document read only
// PropertyValue aReadOnly = new PropertyValue(); // always overwrite already exist files
// aReadOnly.Name = "ReadOnly";
// aReadOnly.Value = Boolean.TRUE;
// aPropertyList.add(aReadOnly);
XComponent xDocComponent = loadComponent(sFileURL, getXDesktop(), aPropertyList);
GlobalLogWriter.println("Load done");
// context = createUnoService("com.sun.star.sdb.DatabaseContext")
// oDataBase = context.getByName("hh")
// oDBDoc = oDataBase.DatabaseDocument
//
// dim args(1) as new com.sun.star.beans.PropertyValue
// args(0).Name = "ActiveConnection"
// args(0).Value = oDBDoc.getCurrentController().getPropertyValue("ActiveConnection")
// reportContainer = oDBDoc.getReportDocuments()
// report = reportContainer.loadComponentFromURL("Report40","",0,args)
ArrayList<String> aList = null;
try
{
// XInterface x = (XInterface)getMultiServiceFactory().createInstance("com.sun.star.sdb.DatabaseContext");
// assure("can't create instance of com.sun.star.sdb.DatabaseContext", x != null);
// GlobalLogWriter.println("createInstance com.sun.star.sdb.DatabaseContext done");
// XNameAccess xNameAccess = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, x);
// showElements(xNameAccess);
// Object aObj = xNameAccess.getByName(sFileURL);
// GlobalLogWriter.println("1");
// PropertySetHelper aHelper = new PropertySetHelper(aObj);
// XDocumentDataSource xDataSource = (XDocumentDataSource)UnoRuntime.queryInterface(XDocumentDataSource.class, aObj);
// Object aDatabaseDocument = aHelper.getPropertyValueAsObject("DatabaseDocument");
// XOfficeDatabaseDocument xOfficeDBDoc = xDataSource.getDatabaseDocument();
XOfficeDatabaseDocument xOfficeDBDoc = UnoRuntime.queryInterface(XOfficeDatabaseDocument.class, xDocComponent);
// XOfficeDatabaseDocument xOfficeDBDoc = (XOfficeDatabaseDocument)UnoRuntime.queryInterface(XOfficeDatabaseDocument.class, xDataSource);
assure("can't access DatabaseDocument", xOfficeDBDoc != null);
// GlobalLogWriter.println("2");
XModel xDBSource = UnoRuntime.queryInterface(XModel.class, xOfficeDBDoc);
Object aController = xDBSource.getCurrentController();
assure("Controller of xOfficeDatabaseDocument is empty!", aController != null);
// GlobalLogWriter.println("3");
XDatabaseDocumentUI aDBDocUI = UnoRuntime.queryInterface(XDatabaseDocumentUI.class, aController);
aDBDocUI.connect();
......@@ -250,19 +187,14 @@ public class OpenOfficeDatabaseReportExtractor extends Assurance
GlobalLogWriter.println("Connection is false");
}
// aHelper = new PropertySetHelper(aController);
XReportDocumentsSupplier xSupplier = UnoRuntime.queryInterface(XReportDocumentsSupplier.class, xOfficeDBDoc);
XNameAccess xNameAccess = xSupplier.getReportDocuments();
assure("xOfficeDatabaseDocument returns no Report Document", xNameAccess != null);
// GlobalLogWriter.println("5");
showElements(xNameAccess);
// Object aActiveConnectionObj = aHelper.getPropertyValueAsObject("ActiveConnection");
Object aActiveConnectionObj = aDBDocUI.getActiveConnection();
assure("ActiveConnection is empty", aActiveConnectionObj != null);
// GlobalLogWriter.println("5");
ArrayList<PropertyValue> aPropertyList2 = new ArrayList<PropertyValue>();
......@@ -271,58 +203,39 @@ public class OpenOfficeDatabaseReportExtractor extends Assurance
aActiveConnection.Value = aActiveConnectionObj;
aPropertyList2.add(aActiveConnection);
aList = loadAndStoreReports(xNameAccess, aPropertyList2 /*, _nType*/ );
createDBEntry(/*_nType*/);
aList = loadAndStoreReports(xNameAccess, aPropertyList2);
createDBEntry();
}
catch(Exception/*com.sun.star.uno.Exception*/ e)
catch(Exception e)
{
GlobalLogWriter.println("ERROR: Exception caught");
GlobalLogWriter.println("Message: " + e.getMessage());
}
// String mTestDocumentPath = (String) param.get("TestDocumentPath");
// System.out.println("mTestDocumentPath: '" + mTestDocumentPath + "'");
// // workaround for issue using deprecated "DOCPTH" prop
// System.setProperty("DOCPTH", mTestDocumentPath);
// Close the document
// util.utils.shortWait(2000);
closeComponent(xDocComponent);
return aList;
}
private String getDocumentPoolName(/*int _nType*/)
private String getDocumentPoolName()
{
return "AutogenReportDesignTest";
// return getFileFormat(_nType);
}
// -----------------------------------------------------------------------------
private void createDBEntry(/*int _nType*/)
private void createDBEntry()
{
// try to connect the database
String sDBConnection = (String)m_aParameterHelper.getTestParameters().get( convwatch.PropertyName.DB_CONNECTION_STRING );
if (sDBConnection != null && sDBConnection.length() > 0)
{
GlobalLogWriter.println("DBConnection: " + sDBConnection);
// TODO: DB
// DB.init(sDBConnection);
getOutputPath(/*_nType*/);
getDocumentPoolName(/*_nType*/);
// TODO: DB
// DB.insertinto_documentcompare(sSourceVersion, sSourceName, sSourceCreatorType,
// m_sDestinationVersion, sDestinationName, sDestinationCreatorType,
// sDocumentPoolDir, sDocumentPoolName, m_sMailAddress,
// sSpecial, m_sParentDistinct);
getOutputPath();
getDocumentPoolName();
TimeHelper.waitInSeconds(1, "wait for DB.");
// DB.test();
// System.exit(1);
}
}
private ArrayList<String> loadAndStoreReports(XNameAccess _xNameAccess, ArrayList<PropertyValue> _aPropertyList /*, int _nType*/ )
private ArrayList<String> loadAndStoreReports(XNameAccess _xNameAccess, ArrayList<PropertyValue> _aPropertyList)
{
ArrayList<String> aList = new ArrayList<String>();
if (_xNameAccess != null)
......@@ -334,13 +247,9 @@ public class OpenOfficeDatabaseReportExtractor extends Assurance
XComponent xDoc = loadComponent(sReportName, _xNameAccess, _aPropertyList);
if (xDoc != null)
{
// util.utils.shortWait(1000);
// print? or store?
String sDocumentPathName = storeComponent(sReportName, xDoc /*, _nType*/);
String sDocumentPathName = storeComponent(sReportName, xDoc);
aList.add(sDocumentPathName);
// util.utils.shortWait(1000);
closeComponent(xDoc);
// util.utils.shortWait(1000);
}
else
{
......@@ -352,7 +261,7 @@ public class OpenOfficeDatabaseReportExtractor extends Assurance
return aList;
}
private String getFormatExtension(Object _xComponent /* int _nType*/ )
private String getFormatExtension(Object _xComponent)
{
String sExtension;
XServiceInfo xServiceInfo = UnoRuntime.queryInterface( XServiceInfo.class, _xComponent );
......@@ -373,51 +282,16 @@ public class OpenOfficeDatabaseReportExtractor extends Assurance
return sExtension;
}
// switch(_nType)
// {
// case WRITER:
// sExtension = ".odt";
// break;
// case CALC:
// sExtension = ".ods";
// break;
// default:
// sExtension = ".UNKNOWN";
// }
// return sExtension;
// }
// private String getFileFormat(int _nType)
// {
// String sFileType;
// switch(_nType)
// {
// case WRITER:
// sFileType = "writer8";
// break;
// case CALC:
// sFileType = "calc8";
// break;
// default:
// sFileType = "UNKNOWN";
// }
// return sFileType;
// }
private String m_sOutputPath = null;
private String getOutputPath(/*int _nType*/)
private String getOutputPath()
{
if (m_sOutputPath == null)
{
String sOutputPath = (String)m_aParameterHelper.getTestParameters().get( convwatch.PropertyName.DOC_COMPARATOR_OUTPUT_PATH );
sOutputPath = helper.StringHelper.removeQuoteIfExists(sOutputPath);
// sOutputPath += "tmp_123";
sOutputPath = FileHelper.appendPath(sOutputPath, DateHelper.getDateTimeForFilename());
// sOutputPath += System.getProperty("file.separator");
// sOutputPath += getFileFormat(_nType);
// sOutputPath += System.getProperty("file.separator");
File aOutputFile = new File(sOutputPath); // create the directory of the given output path
aOutputFile.mkdirs();
......@@ -429,19 +303,11 @@ public class OpenOfficeDatabaseReportExtractor extends Assurance
/*
store given _xComponent under the given Name in DOC_COMPARATOR_INPUTPATH
*/
private String storeComponent(String _sName, Object _xComponent /*, int _nType*/ )
private String storeComponent(String _sName, Object _xComponent)
{
String sOutputPath = getOutputPath(/*_nType*/);
// // add DocumentPoolName
// sOutputPath = FileHelper.appendPath(sOutputPath, getDocumentPoolName(/*_nType*/));
// // sOutputPath += System.getProperty("file.separator");
//
// File aOutputFile = new File(sOutputPath); // create the directory of the given output path
// aOutputFile.mkdirs();
String sOutputPath = getOutputPath();
String sName = _sName + getFormatExtension(_xComponent /*_nType*/);
String sName = _sName + getFormatExtension(_xComponent);
sOutputPath = FileHelper.appendPath(sOutputPath, sName);
// we need the name and path
......@@ -451,11 +317,6 @@ public class OpenOfficeDatabaseReportExtractor extends Assurance
ArrayList<PropertyValue> aPropertyList = new ArrayList<PropertyValue>(); // set some properties for storeAsURL
// PropertyValue aFileFormat = new PropertyValue();
// aFileFormat.Name = "FilterName";
// aFileFormat.Value = getFileFormat(_nType);
// aPropertyList.add(aFileFormat);
PropertyValue aOverwrite = new PropertyValue(); // always overwrite already exist files
aOverwrite.Name = "Overwrite";
aOverwrite.Value = Boolean.TRUE;
......
......@@ -18,15 +18,9 @@
package graphical;
/**
*
* @author ll93751
*/
public class PostscriptCreator extends EnhancedComplexTestCase
{
// @Override
public String[] getTestMethodNames()
{
return new String[]{"DocumentToPostscript"};
......@@ -55,14 +49,10 @@ public class PostscriptCreator extends EnhancedComplexTestCase
PerformanceContainer a = new PerformanceContainer();
a.startTime(PerformanceContainer.AllTime);
// _aParams.getTestParameters().put(util.PropertyName.DEBUG_IS_ACTIVE, Boolean.TRUE);
a.startTime(PerformanceContainer.OfficeStart);
aOffice.start();
a.stopTime(PerformanceContainer.OfficeStart);
// _aParams.getTestParameters().put(util.PropertyName.DEBUG_IS_ACTIVE, Boolean.FALSE);
// This force an error! _sDocumentName = helper.StringHelper.doubleQuote(_sDocumentName);
try
{
a.startTime(PerformanceContainer.Load);
......@@ -84,44 +74,4 @@ public class PostscriptCreator extends EnhancedComplexTestCase
a.print( System.out );
}
}
// public static void main(String [] _args)
// {
// String args[] = {
// "-TimeOut", "3600000",
// "-tb", "java_complex",
// "-o", "graphical.PostscriptCreator",
//// "-DOC_COMPARATOR_INPUT_PATH", "D:\\temp\\input",
//// "-DOC_COMPARATOR_OUTPUT_PATH", "D:\\temp\\output",
//// "-DOC_COMPARATOR_REFERENCE_PATH", "D:\\temp\\output\\ref",
//// "-DOC_COMPARATOR_PRINT_MAX_PAGE", "9999",
//// "-DOC_COMPARATOR_GFX_OUTPUT_DPI_RESOLUTION", "180",
//// "-DOC_COMPARATOR_HTML_OUTPUT_PREFIX", "http://so-gfxcmp-lin.germany.sun.com/gfxcmp_ui/cw.php?inifile=",
////// "-DOC_COMPARATOR_REFERENCE_CREATOR_TYPE", "PDF", /* default: "OOo" */
////// "-DOC_COMPARATOR_REFERENCE_CREATOR_TYPE", "msoffice", /* default: "OOo" */
////// "-OFFICE_VIEWABLE", "false",
//// "-AppExecutionCommand", "\"C:/home/ll93751/staroffice9_DEV300_m25/Sun/StarOffice 9/program/soffice.exe\" --norestore --nocrashreport --accept=pipe,name=ll93751;urp;",
////// "-NoOffice"
// "-DOC_COMPARATOR_PRINT_MAX_PAGE","9999",
// "-DOC_COMPARATOR_GFX_OUTPUT_DPI_RESOLUTION","180",
// "-DOC_COMPARATOR_HTML_OUTPUT_PREFIX","http://so-gfxcmp.germany.sun.com/gfxcmp_ui/cw.php?inifile=",
// "-DOC_COMPARATOR_REFERENCE_CREATOR_TYPE","OOo",
// "-DOC_COMPARATOR_DB_INFO_STRING","p:DEV300_m18,c:,d:LLA_test,src:DEV300_m18,dest:,doc:LLA_test,id:34715,distinct:2008-06-27_13-39-09_d6f22d4c-958d-10",
// "-DISTINCT","2008-06-27_13-39-09_d6f22d4c-958d-10",
// "-TEMPPATH","//so-gfxcmp-lin/gfxcmp-data/wntmsci/temp/2008-06-27_13-39-09_d6f22d4c-958d-10/34715",
//// "ConnectionString","socket,host=localhost,port=8101",
// "-OFFICE_VIEWABLE","true",
// "-wntmsci.DOC_COMPARATOR_INPUT_PATH","\\\\so-gfxcmp-lin\\doc-pool\\LLA_test\\issue_79214.odb",
// "-wntmsci.DOC_COMPARATOR_OUTPUT_PATH","\\\\so-gfxcmp-lin\\gfxcmp-data\\wntmsci\\convwatch-output\\LLA_test\\DEV300_m11",
// "-wntmsci.AppExecutionCommand","\"C:\\gfxcmp\\programs\\staroffice8_DEV300_m11\\Sun\\StarOffice 9\\program\\soffice.exe\" --norestore --nocrashreport --accept=pipe,name=ll93751;urp;",
// "-wntmsci.AppKillCommand","\"C:\\bin\\pskill.exe soffice.bin;C:\\bin\\pskill.exe winword;C:\\bin\\pskill.exe excel\"",
//
// };
//
// org.openoffice.Runner.main(args);
// }
}
......@@ -18,20 +18,12 @@
package graphical;
/**
*
* @author ll93751
*/
public interface PropertyName
{
final public static String DOC_COMPARATOR_INPUT_PATH = "DOC_COMPARATOR_INPUT_PATH";
final public static String DOC_COMPARATOR_OUTPUT_PATH = "DOC_COMPARATOR_OUTPUT_PATH";
// final public static String DOC_COMPARATOR_DIFF_PATH = "DOC_COMPARATOR_DIFF_PATH";
// final public static String DOC_COMPARATOR_REFERENCE_PATH = "DOC_COMPARATOR_REFERENCE_PATH";
// final public static String DOC_COMPARATOR_REFERENCE_INPUT_PATH = "DOC_COMPARATOR_REFERENCE_INPUT_PATH";
final public static String DOC_COMPARATOR_REFERENCE_TYPE = "DOC_COMPARATOR_REFERENCE_CREATOR_TYPE";
final public static String DOC_COMPARATOR_PRINTER_NAME = "DOC_COMPARATOR_PRINTER_NAME";
// final public static String DOC_COMPARATOR_DEFAULT_XML_FORMAT_APP = "DOC_COMPARATOR_DEFAULT_XML_FORMAT_APP";
final public static String DOC_COMPARATOR_INCLUDE_SUBDIRS = "DOC_COMPARATOR_INCLUDE_SUBDIRS";
final public static String DOC_COMPARATOR_PRINT_MAX_PAGE = "DOC_COMPARATOR_PRINT_MAX_PAGE";
final public static String DOC_COMPARATOR_PRINT_ONLY_PAGE = "DOC_COMPARATOR_PRINT_ONLY_PAGE";
......@@ -39,24 +31,16 @@ public interface PropertyName
final public static String DOC_COMPARATOR_OVERWRITE_REFERENCE = "DOC_COMPARATOR_OVERWRITE_REFERENCE";
final public static String DOC_COMPARATOR_HTML_OUTPUT_PREFIX = "DOC_COMPARATOR_HTML_OUTPUT_PREFIX";
// final public static String DOC_COMPARATOR_GFXCMP_WITH_BORDERMOVE = "DOC_COMPARATOR_GFXCMP_WITH_BORDERMOVE";
final public static String DOC_CONVERTER_IMPORT_FILTER_NAME = "DOC_CONVERTER_IMPORT_FILTER_NAME";
final public static String DOC_CONVERTER_EXPORT_FILTER_NAME = "DOC_CONVERTER_EXPORT_FILTER_NAME";
final public static String DOC_CONVERTER_OFFICE_PROGRAM = "DOC_CONVERTER_OFFICE_PROGRAM";
// final public static String DOC_CONVERTER_REUSE_OFFICE = "DOC_CONVERTER_REUSE_OFFICE";
final public static String DOC_COMPARATOR_LEAVE_OUT_FILES = "DOC_COMPARATOR_LEAVE_OUT_FILES";
final public static String DOC_COMPARATOR_DB_INFO_STRING = "DOC_COMPARATOR_DB_INFO_STRING";
// final public static String TEMPPATH = "TEMPPATH";
// set this variable to "true" or "yes" and loadComponentFromURL works with property Hidden=false
final public static String OFFICE_VIEWABLE = "OFFICE_VIEWABLE";
// final public static String DB_CONNECTION_STRING = "DB_CONNECTION_STRING";
// final public static String CHECK_NEED_TOOLS = "CHECK_NEED_TOOLS";
// final public static String CREATE_DEFAULT = "CREATE_DEFAULT_REFERENCE";
final public static String NO_SMALL_PICTURES = "NoSmallPictures";
}
......@@ -20,10 +20,6 @@ package graphical;
import java.util.Calendar;
/**
*
* @author ll93751
*/
public class TimeHelper
{
/*
......@@ -72,5 +68,4 @@ public class TimeHelper
{
return String.valueOf(m_nRealMilliSeconds);
}
}
......@@ -23,10 +23,6 @@
package graphical;
/**
*
* @author ll93751
*/
public class Tolerance
{
private int m_nTolerance;
......
......@@ -18,10 +18,6 @@
package graphical;
/**
*
* @author ll93751
*/
public class WrongEnvironmentException extends OfficeException
{
public WrongEnvironmentException(String _aMessage)
......
......@@ -18,10 +18,6 @@
package graphical;
/**
*
* @author ll93751
*/
public class WrongSuffixException extends OfficeException
{
public WrongSuffixException(String _aMessage)
......
......@@ -20,7 +20,6 @@ package helper;
/**
* Helper object, to identify the current Operation System.
* @author ll93751
*/
public class OSHelper
{
......@@ -33,8 +32,6 @@ public class OSHelper
}
return false;
}
// not need
// public static boolean isUnix()
public static boolean isSolarisIntel()
{
if ( ( System.getProperty("os.name").toLowerCase().startsWith("solaris") ||
......
......@@ -22,10 +22,6 @@ import share.DescEntry;
import java.util.HashMap;
/**
*
* @author sg128468
*/
public abstract class DataBaseOutProducer implements LogWriter {
protected HashMap<String,Object> mSqlInput = null;
protected HashMap<String, String[]> mSqlOutput = null;
......@@ -78,14 +74,9 @@ public abstract class DataBaseOutProducer implements LogWriter {
return true;
}
/**
*
*
*/
public boolean summary(DescEntry entry) {
mSqlExec.openConnection();
findTypeInEntryTree(entry, entry.Logger);
// checkDataBase(entry.Logger);
mSqlExec.closeConnection();
return true;
}
......@@ -189,10 +180,4 @@ public abstract class DataBaseOutProducer implements LogWriter {
* Abstract method, so derived classes have to overwrite it.
*/
protected abstract boolean insertEntry(LogWriter log);
/**
*
protected abstract boolean checkDataBase(LogWriter log);
*/
}
......@@ -19,10 +19,7 @@
package stats;
import share.LogWriter;
/**
*
* @author sw93809
*/
public class SimpleOutProducer implements LogWriter {
......
......@@ -28,8 +28,6 @@ import com.sun.star.uno.XNamingService;
import lib.StatusException;
/** wraps a com.sun.star.sdb.DataSource
*
* @author fs93730
*/
public class DataSource
{
......
......@@ -22,8 +22,6 @@ import com.sun.star.beans.PropertyValue;
import com.sun.star.lang.XMultiServiceFactory;
/** a descriptor for creating a com.sun.star.sdb.DataSource
*
* @author fs93730
*/
public class DataSourceDescriptor
{
......
......@@ -34,11 +34,6 @@ import com.sun.star.uno.UnoRuntime;
import com.sun.star.uno.XInterface;
import com.sun.star.util.XTimeStamped;
/**
*
* @author sw93809
*/
public class JavaSystemBackend implements XSingleLayerStratum, XTypeProvider,
XServiceInfo, XTimeStamped, XComponent {
public final static String __serviceName = "com.sun.star.configuration.backend.PlatformBackend";
......@@ -246,4 +241,4 @@ public class JavaSystemBackend implements XSingleLayerStratum, XTypeProvider,
return "2004-03-31";
}
}
}
\ No newline at end of file
}
......@@ -26,11 +26,6 @@ import lib.MultiMethodTest;
import util.XLayerHandlerImpl;
import util.XLayerImpl;
/**
*
* @author sw93809
*/
public class _XUpdateHandler extends MultiMethodTest {
public XUpdateHandler oObj;
protected XLayerHandlerImpl xLayerHandler = null;
......
......@@ -26,10 +26,6 @@ import com.sun.star.sheet.XDataPilotFieldGrouping;
import com.sun.star.uno.UnoRuntime;
import lib.MultiMethodTest;
/**
*
* @author sw93809
*/
public class _XDataPilotFieldGrouping extends MultiMethodTest
{
public XDataPilotFieldGrouping oObj = null;
......
......@@ -29,10 +29,6 @@ import com.sun.star.table.CellRangeAddress;
import com.sun.star.table.XCell;
import com.sun.star.uno.UnoRuntime;
/**
*
* @author sw93809
*/
public class _XFormulaQuery extends MultiMethodTest {
public XFormulaQuery oObj;
......
......@@ -23,11 +23,6 @@ import com.sun.star.uno.UnoRuntime;
import lib.MultiMethodTest;
/**
*
* @author sw93809
*/
public class _XScenarioEnhanced extends MultiMethodTest {
public XScenarioEnhanced oObj = null;
......@@ -81,4 +76,4 @@ public class _XScenarioEnhanced extends MultiMethodTest {
tRes.tested("getRanges()", res);
}
}
\ No newline at end of file
}
......@@ -26,10 +26,6 @@ import lib.TestEnvironment;
import lib.TestParameters;
import util.utils;
/**
*
* @author sg128468
*/
public class UICommandDescription extends TestCase {
XInterface oObj = null;
......
......@@ -47,12 +47,6 @@ import com.sun.star.util.URL;
import com.sun.star.util.XURLTransformer;
import com.sun.star.view.XSelectionSupplier;
/**
*
* @author sw93809
* @version
*/
public class SvxGraphCtrlAccessibleContext extends TestCase{
static XComponent xDrawDoc = null;
......@@ -137,7 +131,6 @@ public class SvxGraphCtrlAccessibleContext extends TestCase{
XExtendedToolkit tk = UnoRuntime.queryInterface(XExtendedToolkit.class,oObj);
AccessibilityTools at = new AccessibilityTools();
XWindow xWindow = UnoRuntime.queryInterface(XWindow.class,tk.getActiveTopWindow());
......
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