summaryrefslogtreecommitdiffstats
path: root/qadevOOo/runner
diff options
context:
space:
mode:
authorLars Langhans <lla@openoffice.org>2010-02-09 11:07:20 +0100
committerLars Langhans <lla@openoffice.org>2010-02-09 11:07:20 +0100
commit5cb986dc9a4e1de2320369b094928f9bf0bb4db3 (patch)
tree882dda720a6a3a2df155feffa47ef69f3191392f /qadevOOo/runner
parentqadev40: #161118# cleanups, new getter for major, minor, cwsname (diff)
downloadcore-5cb986dc9a4e1de2320369b094928f9bf0bb4db3.tar.gz
core-5cb986dc9a4e1de2320369b094928f9bf0bb4db3.zip
qadev40: #161118# cleanups, remove old main functions
Diffstat (limited to 'qadevOOo/runner')
-rw-r--r--qadevOOo/runner/graphical/IniFile.java46
-rw-r--r--qadevOOo/runner/graphical/JPEGComparator.java52
-rw-r--r--qadevOOo/runner/graphical/JPEGCreator.java67
-rw-r--r--qadevOOo/runner/graphical/MSOfficePostscriptCreator.java8
-rw-r--r--qadevOOo/runner/graphical/OpenOfficePostscriptCreator.java9
-rw-r--r--qadevOOo/runner/graphical/PostscriptCreator.java70
6 files changed, 132 insertions, 120 deletions
diff --git a/qadevOOo/runner/graphical/IniFile.java b/qadevOOo/runner/graphical/IniFile.java
index 1934dc39731a..c7ab2063c08d 100644
--- a/qadevOOo/runner/graphical/IniFile.java
+++ b/qadevOOo/runner/graphical/IniFile.java
@@ -591,29 +591,29 @@ public class IniFile implements Enumeration
/**
* some tests for this class
*/
- public static void main(String[] args)
- {
- String sTempFile = System.getProperty("java.io.tmpdir");
- sTempFile += "inifile";
-
-
- IniFile aIniFile = new IniFile(sTempFile);
- String sValue = aIniFile.getValue("Section", "Key");
- // insert a new value to a already exist section
- aIniFile.insertValue("Section", "Key2", "a new value in a existing section");
- // replace a value
- aIniFile.insertValue("Section", "Key", "replaced value");
- // create a new value
- aIniFile.insertValue("New Section", "Key", "a new key value pair");
- aIniFile.insertValue("New Section", "Key2", "a new second key value pair");
-
- String sValue2 = aIniFile.getValue("Section2", "Key");
-
- aIniFile.removeSection("Section");
- aIniFile.removeSection("New Section");
-
- aIniFile.close();
- }
+// public static void main(String[] args)
+// {
+// String sTempFile = System.getProperty("java.io.tmpdir");
+// sTempFile += "inifile";
+//
+//
+// IniFile aIniFile = new IniFile(sTempFile);
+// String sValue = aIniFile.getValue("Section", "Key");
+// // insert a new value to a already exist section
+// aIniFile.insertValue("Section", "Key2", "a new value in a existing section");
+// // replace a value
+// aIniFile.insertValue("Section", "Key", "replaced value");
+// // create a new value
+// aIniFile.insertValue("New Section", "Key", "a new key value pair");
+// aIniFile.insertValue("New Section", "Key2", "a new second key value pair");
+//
+// String sValue2 = aIniFile.getValue("Section2", "Key");
+//
+// aIniFile.removeSection("Section");
+// aIniFile.removeSection("New Section");
+//
+// aIniFile.close();
+// }
/**
* Enumeration Interface
diff --git a/qadevOOo/runner/graphical/JPEGComparator.java b/qadevOOo/runner/graphical/JPEGComparator.java
index 126d06e11ffc..01ded9891794 100644
--- a/qadevOOo/runner/graphical/JPEGComparator.java
+++ b/qadevOOo/runner/graphical/JPEGComparator.java
@@ -341,6 +341,8 @@ public class JPEGComparator extends EnhancedComplexTestCase
String sDestination = FileHelper.appendPath(sDestinationPath, sNewSourceBasename);
FileHelper.copy(sSource, sDestination);
sSourceBasename = sNewSourceBasename;
+ //
+ JPEGCreator.convertToNearSameFileWithWidth340(sDestination);
}
String sDifferenceBasename = "Difference_between_" + FileHelper.getNameNoSuffix(sSourceBasename) + "_and_" + FileHelper.getNameNoSuffix(sDestinationBasename) + ".jpg";
// String sDifferencePath = sDestinationPath;
@@ -646,30 +648,30 @@ public class JPEGComparator extends EnhancedComplexTestCase
- 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);
- }
+// 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);
+// }
}
diff --git a/qadevOOo/runner/graphical/JPEGCreator.java b/qadevOOo/runner/graphical/JPEGCreator.java
index afda4eb39b07..248226998bd8 100644
--- a/qadevOOo/runner/graphical/JPEGCreator.java
+++ b/qadevOOo/runner/graphical/JPEGCreator.java
@@ -127,9 +127,14 @@ public class JPEGCreator extends EnhancedComplexTestCase
*/
public static void convertToNearSameFileWithWidth340(String _sJPEGFilename)
{
+ String sJPEGFilename = _sJPEGFilename.replaceAll("\\\\", "/");
+// if (OSHelper.isWindows())
+// {
+// sJPEGFilename = sJPEGFilename.replaceAll("/", "\\\\");
+// }
String sNewJPEGFilename;
- sNewJPEGFilename = util.utils.replaceAll13(_sJPEGFilename, ".jpg", "_w340.jpg");
- convertToWidth340(_sJPEGFilename, sNewJPEGFilename);
+ sNewJPEGFilename = util.utils.replaceAll13(sJPEGFilename, ".jpg", "_w340.jpg");
+ convertToWidth340(sJPEGFilename, sNewJPEGFilename);
}
/**
@@ -156,7 +161,9 @@ private static void convertToWidth340(String _sFrom, String _To)
}
if (OSHelper.isWindows())
{
- sConvertEXE = "convert.exe";
+ // TODO!
+ // HACK Hard coded!
+ sConvertEXE = "C:\\Programme\\ImageMagick-6.0.3-q8\\convert.exe";
}
String[] sCommandArray =
@@ -381,14 +388,34 @@ private static void convertToWidth340(String _sFrom, String _To)
return nPages;
}
- public static void main(String [] _args)
- {
-// DONE: give an index.ini file ok
+// 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\\index.ini",
+// "-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",
@@ -399,28 +426,8 @@ private static void convertToWidth340(String _sFrom, String _To)
// "-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);
- }
+//
+// org.openoffice.Runner.main(args);
+// }
}
diff --git a/qadevOOo/runner/graphical/MSOfficePostscriptCreator.java b/qadevOOo/runner/graphical/MSOfficePostscriptCreator.java
index df88934652e1..f45f32b59105 100644
--- a/qadevOOo/runner/graphical/MSOfficePostscriptCreator.java
+++ b/qadevOOo/runner/graphical/MSOfficePostscriptCreator.java
@@ -983,8 +983,8 @@ public class MSOfficePostscriptCreator implements IOffice
return sType;
}
- public static void main(String [] _args)
- {
- String sTest = getXMLDocumentFormat("c:/cws/temp/input/Blah Fasel.xml");
- }
+// public static void main(String [] _args)
+// {
+// String sTest = getXMLDocumentFormat("c:/cws/temp/input/Blah Fasel.xml");
+// }
}
diff --git a/qadevOOo/runner/graphical/OpenOfficePostscriptCreator.java b/qadevOOo/runner/graphical/OpenOfficePostscriptCreator.java
index 9d430dad66f4..5e0dcf673e43 100644
--- a/qadevOOo/runner/graphical/OpenOfficePostscriptCreator.java
+++ b/qadevOOo/runner/graphical/OpenOfficePostscriptCreator.java
@@ -602,11 +602,12 @@ public class OpenOfficePostscriptCreator implements IOffice
{
XPropertySet xPropSet = (XPropertySet) UnoRuntime.queryInterface( XPropertySet.class, aSettings );
xPropSet.setPropertyValue( "PrintAllSheets", new Boolean( true ) );
+ GlobalLogWriter.get().println("PrintAllSheets := true");
}
}
ArrayList aPrintProps = new ArrayList();
- GlobalLogWriter.get().println("Property FileName:=" + _sPrintFileURL);
+ // GlobalLogWriter.get().println("Property FileName:=" + _sPrintFileURL);
// PropertyValue [] aPrintProps = new PropertyValue[nProperties];
PropertyValue Arg = new PropertyValue();
@@ -614,7 +615,7 @@ public class OpenOfficePostscriptCreator implements IOffice
Arg.Value = _sPrintFileURL;
// aPrintProps[nPropsCount ++] = Arg;
aPrintProps.add(Arg);
- // showProperty(Arg);
+ showProperty(Arg);
// generate pages string
@@ -638,8 +639,8 @@ public class OpenOfficePostscriptCreator implements IOffice
Arg.Name = "Pages";
Arg.Value = sPages;
aPrintProps.add(Arg);
+ showProperty(Arg);
}
- showProperty(Arg);
// GlobalLogWriter.get().println("Start printing.");
@@ -669,6 +670,8 @@ public class OpenOfficePostscriptCreator implements IOffice
throw new com.sun.star.uno.Exception("Convwatch exception, wait too long for printing.");
}
}
+ // TimeHelper.waitInSeconds(40, "Start waiting after print ready.");
+
_aGTA.getPerformance().stopTime(PerformanceContainer.Print);
GlobalLogWriter.get().println(DateHelper.getDateTimeForHumanreadableLog() + " Print document done.");
diff --git a/qadevOOo/runner/graphical/PostscriptCreator.java b/qadevOOo/runner/graphical/PostscriptCreator.java
index c4a3a77c7d6f..db830604b52b 100644
--- a/qadevOOo/runner/graphical/PostscriptCreator.java
+++ b/qadevOOo/runner/graphical/PostscriptCreator.java
@@ -101,40 +101,40 @@ public class PostscriptCreator extends EnhancedComplexTestCase
- 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);
- }
+// 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);
+// }
}