2 * This file is part of the LibreOffice project.
4 * This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 * This file incorporates work covered by the following license notice:
10 * Licensed to the Apache Software Foundation (ASF) under one or more
11 * contributor license agreements. See the NOTICE file distributed
12 * with this work for additional information regarding copyright
13 * ownership. The ASF licenses this file to you under the Apache
14 * License, Version 2.0 (the "License"); you may not use this file
15 * except in compliance with the License. You may obtain a copy of
16 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
21 public class PostscriptCreator
extends EnhancedComplexTestCase
24 public String
[] getTestMethodNames()
26 return new String
[]{"DocumentToPostscript"};
32 public void DocumentToPostscript()
34 GlobalLogWriter
.set(log
);
35 ParameterHelper aParam
= new ParameterHelper(param
);
37 param
.put(util
.PropertyName
.OFFICE_CLOSE_TIME_OUT
, 2000);
38 // run through all documents found in Inputpath
39 foreachDocumentinInputPath(aParam
);
43 public void checkOneFile(String _sDocumentName
, String _sResult
, ParameterHelper _aParams
) throws OfficeException
45 GlobalLogWriter
.println(" Document: " + _sDocumentName
);
46 GlobalLogWriter
.println(" results: " + _sResult
);
47 IOffice aOffice
= new Office(_aParams
, _sResult
);
49 PerformanceContainer a
= new PerformanceContainer();
50 a
.startTime(PerformanceContainer
.AllTime
);
52 a
.startTime(PerformanceContainer
.OfficeStart
);
54 a
.stopTime(PerformanceContainer
.OfficeStart
);
58 a
.startTime(PerformanceContainer
.Load
);
59 aOffice
.load(_sDocumentName
);
60 a
.stopTime(PerformanceContainer
.Load
);
62 a
.startTime(PerformanceContainer
.Print
);
63 aOffice
.storeAsPostscript();
64 a
.stopTime(PerformanceContainer
.Print
);
68 a
.startTime(PerformanceContainer
.OfficeStop
);
70 a
.stopTime(PerformanceContainer
.OfficeStop
);
72 a
.stopTime(PerformanceContainer
.AllTime
);
74 a
.print( System
.out
);