diff options
Diffstat (limited to 'qadevOOo/runner/graphical/JPEGCreator.java')
-rw-r--r-- | qadevOOo/runner/graphical/JPEGCreator.java | 67 |
1 files changed, 37 insertions, 30 deletions
diff --git a/qadevOOo/runner/graphical/JPEGCreator.java b/qadevOOo/runner/graphical/JPEGCreator.java index c35f89b39da8..5f6343d9780d 100644 --- a/qadevOOo/runner/graphical/JPEGCreator.java +++ b/qadevOOo/runner/graphical/JPEGCreator.java @@ -124,9 +124,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); } /** @@ -153,7 +158,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 = @@ -378,14 +385,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", @@ -396,28 +423,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); +// } } |