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