forked from amazingfate/loongoffice
INTEGRATION: CWS qadev15 (1.3.18); FILE MERGED
2003/12/18 17:20:31 sw 1.3.18.1: #114449#
This commit is contained in:
@ -2,9 +2,9 @@
|
||||
*
|
||||
* $RCSfile: UnoControlFileControlModel.java,v $
|
||||
*
|
||||
* $Revision: 1.3 $
|
||||
* $Revision: 1.4 $
|
||||
*
|
||||
* last change:$Date: 2003-09-08 13:06:46 $
|
||||
* last change:$Date: 2004-01-05 20:50:19 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
@ -60,20 +60,21 @@
|
||||
************************************************************************/
|
||||
package mod._toolkit;
|
||||
|
||||
import java.io.PrintWriter;
|
||||
|
||||
import lib.TestCase;
|
||||
import lib.TestEnvironment;
|
||||
import lib.TestParameters;
|
||||
import util.WriterTools;
|
||||
import util.utils;
|
||||
|
||||
import com.sun.star.lang.XMultiServiceFactory;
|
||||
import com.sun.star.text.XTextDocument;
|
||||
import com.sun.star.uno.UnoRuntime;
|
||||
import com.sun.star.uno.XInterface;
|
||||
import com.sun.star.util.XCloseable;
|
||||
|
||||
import java.io.PrintWriter;
|
||||
|
||||
import lib.TestCase;
|
||||
import lib.TestEnvironment;
|
||||
import lib.TestParameters;
|
||||
|
||||
import util.WriterTools;
|
||||
import util.utils;
|
||||
|
||||
|
||||
public class UnoControlFileControlModel extends TestCase {
|
||||
XTextDocument xTextDoc;
|
||||
@ -83,7 +84,8 @@ public class UnoControlFileControlModel extends TestCase {
|
||||
*/
|
||||
protected void initialize(TestParameters tParam, PrintWriter log) {
|
||||
log.println("creating a textdocument");
|
||||
xTextDoc = WriterTools.createTextDoc( (XMultiServiceFactory) tParam.getMSF());
|
||||
xTextDoc = WriterTools.createTextDoc(
|
||||
(XMultiServiceFactory) tParam.getMSF());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -92,15 +94,7 @@ public class UnoControlFileControlModel extends TestCase {
|
||||
protected void cleanup(TestParameters tParam, PrintWriter log) {
|
||||
log.println(" disposing xTextDoc ");
|
||||
|
||||
try {
|
||||
XCloseable closer = (XCloseable) UnoRuntime.queryInterface(
|
||||
XCloseable.class, xTextDoc);
|
||||
closer.close(true);
|
||||
} catch (com.sun.star.util.CloseVetoException e) {
|
||||
log.println("couldn't close document");
|
||||
} catch (com.sun.star.lang.DisposedException e) {
|
||||
log.println("couldn't close document");
|
||||
}
|
||||
util.DesktopTools.closeDoc(xTextDoc);
|
||||
}
|
||||
|
||||
public synchronized TestEnvironment createTestEnvironment(TestParameters Param,
|
||||
@ -108,8 +102,8 @@ public class UnoControlFileControlModel extends TestCase {
|
||||
XInterface oObj = null;
|
||||
|
||||
try {
|
||||
oObj = (XInterface) ( (XMultiServiceFactory) Param.getMSF())
|
||||
.createInstance("com.sun.star.awt.UnoControlFileControlModel");
|
||||
oObj = (XInterface) ((XMultiServiceFactory) Param.getMSF()).createInstance(
|
||||
"com.sun.star.awt.UnoControlFileControlModel");
|
||||
} catch (Exception e) {
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user