INTEGRATION: CWS qadev11 (1.2.14); FILE MERGED
2003/09/03 15:29:59 sw 1.2.14.1: #112049#
This commit is contained in:
@@ -2,9 +2,9 @@
|
||||
*
|
||||
* $RCSfile: UnoControlFormattedFieldModel.java,v $
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Revision: 1.3 $
|
||||
*
|
||||
* last change:$Date: 2003-05-27 14:05:03 $
|
||||
* last change:$Date: 2003-09-08 13:07:41 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
@@ -58,65 +58,70 @@
|
||||
*
|
||||
*
|
||||
************************************************************************/
|
||||
|
||||
package mod._toolkit;
|
||||
|
||||
import com.sun.star.text.XTextDocument;
|
||||
import com.sun.star.lang.XMultiServiceFactory;
|
||||
import com.sun.star.uno.XInterface;
|
||||
import java.io.PrintWriter;
|
||||
import lib.StatusException;
|
||||
|
||||
import lib.TestCase;
|
||||
import lib.TestEnvironment;
|
||||
import lib.TestParameters;
|
||||
import util.WriterTools;
|
||||
import util.utils;
|
||||
|
||||
public class UnoControlFormattedFieldModel extends TestCase {
|
||||
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;
|
||||
|
||||
|
||||
public class UnoControlFormattedFieldModel extends TestCase {
|
||||
XTextDocument xTextDoc;
|
||||
|
||||
/**
|
||||
* Creates StarOffice Writer document.
|
||||
*/
|
||||
protected void initialize( TestParameters tParam, PrintWriter log ) {
|
||||
|
||||
log.println( "creating a textdocument" );
|
||||
xTextDoc = WriterTools.createTextDoc((XMultiServiceFactory)tParam.getMSF());
|
||||
protected void initialize(TestParameters tParam, PrintWriter log) {
|
||||
log.println("creating a textdocument");
|
||||
xTextDoc = WriterTools.createTextDoc( (XMultiServiceFactory) tParam.getMSF());
|
||||
}
|
||||
|
||||
/**
|
||||
* Disposes StarOffice Writer document.
|
||||
*/
|
||||
protected void cleanup( TestParameters tParam, PrintWriter log ) {
|
||||
log.println( " disposing xTextDoc " );
|
||||
xTextDoc.dispose();
|
||||
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");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public synchronized TestEnvironment createTestEnvironment
|
||||
(TestParameters Param, PrintWriter log ) {
|
||||
|
||||
public synchronized TestEnvironment createTestEnvironment(TestParameters Param,
|
||||
PrintWriter log) {
|
||||
XInterface oObj = null;
|
||||
|
||||
try {
|
||||
oObj = (XInterface) ((XMultiServiceFactory)Param.getMSF()).createInstance(
|
||||
"com.sun.star.awt.UnoControlFormattedFieldModel");
|
||||
oObj = (XInterface) ( (XMultiServiceFactory) Param.getMSF())
|
||||
.createInstance("com.sun.star.awt.UnoControlFormattedFieldModel");
|
||||
} catch (Exception e) {
|
||||
|
||||
}
|
||||
|
||||
log.println(
|
||||
"creating a new environment for UnoControlFormattedFieldModel object");
|
||||
|
||||
log.println( "creating a new environment for UnoControlFormattedFieldModel object" );
|
||||
TestEnvironment tEnv = new TestEnvironment( oObj );
|
||||
TestEnvironment tEnv = new TestEnvironment(oObj);
|
||||
|
||||
tEnv.addObjRelation("OBJNAME",
|
||||
"stardiv.vcl.controlmodel.FormattedField");
|
||||
System.out.println("ImplementationName: "+utils.getImplName(oObj));
|
||||
"stardiv.vcl.controlmodel.FormattedField");
|
||||
System.out.println("ImplementationName: " + utils.getImplName(oObj));
|
||||
|
||||
return tEnv;
|
||||
|
||||
} // finish method getTestEnvironment
|
||||
|
||||
} // finish class UnoControlFormattedFieldModel
|
||||
|
||||
} // finish class UnoControlFormattedFieldModel
|
||||
|
||||
Reference in New Issue
Block a user