summaryrefslogtreecommitdiff
path: root/qadevOOo/tests/java/mod/_sd/SdXImpressDocument.java
diff options
context:
space:
mode:
Diffstat (limited to 'qadevOOo/tests/java/mod/_sd/SdXImpressDocument.java')
-rw-r--r--qadevOOo/tests/java/mod/_sd/SdXImpressDocument.java42
1 files changed, 21 insertions, 21 deletions
diff --git a/qadevOOo/tests/java/mod/_sd/SdXImpressDocument.java b/qadevOOo/tests/java/mod/_sd/SdXImpressDocument.java
index 6e7652e13afd..39960d7e63a8 100644
--- a/qadevOOo/tests/java/mod/_sd/SdXImpressDocument.java
+++ b/qadevOOo/tests/java/mod/_sd/SdXImpressDocument.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -96,7 +96,7 @@ import util.utils;
public class SdXImpressDocument extends TestCase {
XComponent xImpressDoc;
XComponent xImpressDoc2;
-
+
/**
* Called while disposing a <code>TestEnvironment</code>.
* Disposes Impress document.
@@ -109,7 +109,7 @@ public class SdXImpressDocument extends TestCase {
util.DesktopTools.closeDoc(xImpressDoc);;
util.DesktopTools.closeDoc(xImpressDoc2);;
}
-
+
/**
* Creating a Testenvironment for the interfaces to be tested.
* Creates new impress document that is the instance of the service
@@ -120,11 +120,11 @@ public class SdXImpressDocument extends TestCase {
PrintWriter log)
throws StatusException {
log.println("creating a test environment");
-
+
// get a soffice factory object
SOfficeFactory SOF = SOfficeFactory.getFactory(
(XMultiServiceFactory) Param.getMSF());
-
+
try {
log.println("creating two impress documents");
xImpressDoc2 = SOF.createImpressDoc(null);
@@ -133,27 +133,27 @@ public class SdXImpressDocument extends TestCase {
e.printStackTrace(log);
throw new StatusException("Couldn't create documents", e);
}
-
+
XModel xModel1 = (XModel) UnoRuntime.queryInterface(XModel.class,
xImpressDoc);
XModel xModel2 = (XModel) UnoRuntime.queryInterface(XModel.class,
xImpressDoc2);
-
+
XController cont1 = xModel1.getCurrentController();
XController cont2 = xModel2.getCurrentController();
-
+
cont1.getFrame().setName("cont1");
cont2.getFrame().setName("cont2");
-
+
XSelectionSupplier sel = (XSelectionSupplier) UnoRuntime.queryInterface(
XSelectionSupplier.class, cont1);
-
+
XShape aShape = SOF.createShape(xImpressDoc, 5000, 3500, 7500, 5000,
"Rectangle");
-
-
+
+
XPropertySet xShapeProps = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, aShape);
-
+
try {
xShapeProps.setPropertyValue("FillStyle", com.sun.star.drawing.FillStyle.SOLID);
xShapeProps.setPropertyValue("FillTransparence", new Integer(50));
@@ -170,20 +170,20 @@ public class SdXImpressDocument extends TestCase {
ex.printStackTrace(log);
throw new StatusException("Couldn't make shape transparent", ex);
}
-
+
DrawTools.getDrawPage(xImpressDoc, 0).add(aShape);
-
+
log.println("creating a new environment for drawpage object");
-
+
TestEnvironment tEnv = new TestEnvironment(xImpressDoc);
-
+
log.println("adding Controller as ObjRelation for XModel");
tEnv.addObjRelation("CONT2", cont2);
-
+
log.println("Adding SelectionSupplier and Shape to select for XModel");
tEnv.addObjRelation("SELSUPP", sel);
tEnv.addObjRelation("TOSELECT", aShape);
-
+
// create object relation for XPrintJobBroadcaster
String fileName = utils.getOfficeTempDirSys((XMultiServiceFactory) Param.getMSF())+"printfile.prt" ;
File f = new File(fileName);
@@ -192,8 +192,8 @@ public class SdXImpressDocument extends TestCase {
}
_XPrintJobBroadcaster.MyPrintJobListener listener = new _XPrintJobBroadcaster.MyPrintJobListener(xImpressDoc, fileName);
tEnv.addObjRelation("XPrintJobBroadcaster.XPrintJobListener", listener);
-
+
return tEnv;
} // finish method getTestEnvironment
-
+
} // finish class SdDrawPage