Conversion.java (9edf8282) Conversion.java (a1693044)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 140 unchanged lines hidden (view full) ---

149 PropertyValue p = new PropertyValue();
150 p.Name = name;
151 p.Value= value;
152 return p;
153 }
154
155 @Test(timeout=10 * 60000)
156 public void testConversion() throws Exception {
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 140 unchanged lines hidden (view full) ---

149 PropertyValue p = new PropertyValue();
150 p.Name = name;
151 p.Value= value;
152 return p;
153 }
154
155 @Test(timeout=10 * 60000)
156 public void testConversion() throws Exception {
157
158 int nLevelInfo = Integer.parseInt(System.getProperty("conversion.limitationcheck", "0")); // Level info: starts from 1, 0 means no need for limitation check
159
157 // convert
158 long start = System.currentTimeMillis();
159 XComponent doc = app.loadDocumentFromURL(sourceFileUrl,
160 propertyValue("Hidden", true),
161 propertyValue("ReadOnly", true),
162 propertyValue("AsyncMode", false),
160 // convert
161 long start = System.currentTimeMillis();
162 XComponent doc = app.loadDocumentFromURL(sourceFileUrl,
163 propertyValue("Hidden", true),
164 propertyValue("ReadOnly", true),
165 propertyValue("AsyncMode", false),
163 propertyValue("MacroExecutionMode", MacroExecMode.NEVER_EXECUTE));
166 propertyValue("MacroExecutionMode", MacroExecMode.NEVER_EXECUTE),
167 propertyValue("LimitationCheckLevel", nLevelInfo));
164
165 loadTime = System.currentTimeMillis() - start;
166 app.saveDocumentToURL(doc, targetFileUrl,
167 propertyValue( "FilterName", targetFilterName),
168 propertyValue( "Overwrite", true));
169 saveTime = System.currentTimeMillis() - start;
170 XCloseable xCloseable = (XCloseable) UnoRuntime.queryInterface(XCloseable.class, doc);
171 xCloseable.close(true);
172 closeTime = System.currentTimeMillis() - start;
173 }
174
175}
168
169 loadTime = System.currentTimeMillis() - start;
170 app.saveDocumentToURL(doc, targetFileUrl,
171 propertyValue( "FilterName", targetFilterName),
172 propertyValue( "Overwrite", true));
173 saveTime = System.currentTimeMillis() - start;
174 XCloseable xCloseable = (XCloseable) UnoRuntime.queryInterface(XCloseable.class, doc);
175 xCloseable.close(true);
176 closeTime = System.currentTimeMillis() - start;
177 }
178
179}