Update ooo320-m1
[ooovba.git] / qadevOOo / runner / graphical / PostscriptCreator.java
blob0b708cddeaee90d29a54348febbfd1e744c96910
1 /*
2 * ************************************************************************
3 *
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 *
6 * Copyright 2008 by Sun Microsystems, Inc.
7 *
8 * OpenOffice.org - a multi-platform office productivity suite
9 *
10 * $RCSfile: PostscriptCreator.java,v $
11 * $Revision: 1.1.2.3 $
13 * This file is part of OpenOffice.org.
15 * OpenOffice.org is free software: you can redistribute it and/or modify
16 * it under the terms of the GNU Lesser General Public License version 3
17 * only, as published by the Free Software Foundation.
19 * OpenOffice.org is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU Lesser General Public License version 3 for more details
23 * (a copy is included in the LICENSE file that accompanied this code).
25 * You should have received a copy of the GNU Lesser General Public License
26 * version 3 along with OpenOffice.org. If not, see
27 * <http://www.openoffice.org/license.html>
28 * for a copy of the LGPLv3 License.
30 * ***********************************************************************
33 package graphical;
36 /**
38 * @author ll93751
40 public class PostscriptCreator extends EnhancedComplexTestCase
43 // @Override
44 public String[] getTestMethodNames()
46 return new String[]{"DocumentToPostscript"};
49 /**
50 * test function.
52 public void DocumentToPostscript()
54 GlobalLogWriter.set(log);
55 ParameterHelper aParam = new ParameterHelper(param);
57 param.put(util.PropertyName.OFFICE_CLOSE_TIME_OUT, 2000);
58 // run through all documents found in Inputpath
59 foreachDocumentinInputPath(aParam);
63 public void checkOneFile(String _sDocumentName, String _sResult, ParameterHelper _aParams) throws OfficeException
65 GlobalLogWriter.println("Document: " + _sDocumentName + " results: " + _sResult);
66 IOffice aOffice = new Office(_aParams, _sResult);
68 PerformanceContainer a = new PerformanceContainer();
69 a.startTime(PerformanceContainer.AllTime);
71 // _aParams.getTestParameters().put(util.PropertyName.DEBUG_IS_ACTIVE, Boolean.TRUE);
72 a.startTime(PerformanceContainer.OfficeStart);
73 aOffice.start();
74 a.stopTime(PerformanceContainer.OfficeStart);
76 // _aParams.getTestParameters().put(util.PropertyName.DEBUG_IS_ACTIVE, Boolean.FALSE);
78 // This force an error! _sDocumentName = helper.StringHelper.doubleQuote(_sDocumentName);
79 try
81 a.startTime(PerformanceContainer.Load);
82 aOffice.load(_sDocumentName);
83 a.stopTime(PerformanceContainer.Load);
85 a.startTime(PerformanceContainer.Print);
86 aOffice.storeAsPostscript();
87 a.stopTime(PerformanceContainer.Print);
89 finally
91 a.startTime(PerformanceContainer.OfficeStop);
92 aOffice.close();
93 a.stopTime(PerformanceContainer.OfficeStop);
95 a.stopTime(PerformanceContainer.AllTime);
97 a.print( System.out );
104 public static void main(String [] _args)
106 String args[] = {
107 "-TimeOut", "3600000",
108 "-tb", "java_complex",
109 "-o", "graphical.PostscriptCreator",
110 // "-DOC_COMPARATOR_INPUT_PATH", "D:\\temp\\input",
111 // "-DOC_COMPARATOR_OUTPUT_PATH", "D:\\temp\\output",
112 // "-DOC_COMPARATOR_REFERENCE_PATH", "D:\\temp\\output\\ref",
113 // "-DOC_COMPARATOR_PRINT_MAX_PAGE", "9999",
114 // "-DOC_COMPARATOR_GFX_OUTPUT_DPI_RESOLUTION", "180",
115 // "-DOC_COMPARATOR_HTML_OUTPUT_PREFIX", "http://so-gfxcmp-lin.germany.sun.com/gfxcmp_ui/cw.php?inifile=",
116 //// "-DOC_COMPARATOR_REFERENCE_CREATOR_TYPE", "PDF", /* default: "OOo" */
117 //// "-DOC_COMPARATOR_REFERENCE_CREATOR_TYPE", "msoffice", /* default: "OOo" */
118 //// "-OFFICE_VIEWABLE", "false",
119 // "-AppExecutionCommand", "\"C:/home/ll93751/staroffice9_DEV300_m25/Sun/StarOffice 9/program/soffice.exe\" -norestore -nocrashreport -accept=pipe,name=ll93751;urp;",
120 //// "-NoOffice"
121 "-DOC_COMPARATOR_PRINT_MAX_PAGE","9999",
122 "-DOC_COMPARATOR_GFX_OUTPUT_DPI_RESOLUTION","180",
123 "-DOC_COMPARATOR_HTML_OUTPUT_PREFIX","http://so-gfxcmp.germany.sun.com/gfxcmp_ui/cw.php?inifile=",
124 "-DOC_COMPARATOR_REFERENCE_CREATOR_TYPE","OOo",
125 "-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",
126 "-DISTINCT","2008-06-27_13-39-09_d6f22d4c-958d-10",
127 "-TEMPPATH","//so-gfxcmp-lin/gfxcmp-data/wntmsci/temp/2008-06-27_13-39-09_d6f22d4c-958d-10/34715",
128 // "ConnectionString","socket,host=localhost,port=8101",
129 "-OFFICE_VIEWABLE","true",
130 "-wntmsci.DOC_COMPARATOR_INPUT_PATH","\\\\so-gfxcmp-lin\\doc-pool\\LLA_test\\issue_79214.odb",
131 "-wntmsci.DOC_COMPARATOR_OUTPUT_PATH","\\\\so-gfxcmp-lin\\gfxcmp-data\\wntmsci\\convwatch-output\\LLA_test\\DEV300_m11",
132 "-wntmsci.AppExecutionCommand","\"C:\\gfxcmp\\programs\\staroffice8_DEV300_m11\\Sun\\StarOffice 9\\program\\soffice.exe\" -norestore -nocrashreport -accept=pipe,name=ll93751;urp;",
133 "-wntmsci.AppKillCommand","\"C:\\bin\\pskill.exe soffice.bin;C:\\bin\\pskill.exe winword;C:\\bin\\pskill.exe excel\"",
137 org.openoffice.Runner.main(args);