summaryrefslogtreecommitdiff
path: root/wizards/com/sun/star/wizards/form/CallFormWizard.java
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2005-04-06 10:38:12 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2005-04-06 10:38:12 +0000
commit87c515f333642a9634bee8a6aa6917dc1cfc36b8 (patch)
tree32c80c9c047aeda7655e8efe5e131df4e7cbda11 /wizards/com/sun/star/wizards/form/CallFormWizard.java
parent654084da2ee0b041e9d9e37005871d52eb26b7ed (diff)
INTEGRATION: CWS dba31 (1.2.64); FILE MERGED
2005/04/05 08:10:09 oj 1.2.64.1: #i46465# return document defintion to controller
Diffstat (limited to 'wizards/com/sun/star/wizards/form/CallFormWizard.java')
-rw-r--r--wizards/com/sun/star/wizards/form/CallFormWizard.java27
1 files changed, 22 insertions, 5 deletions
diff --git a/wizards/com/sun/star/wizards/form/CallFormWizard.java b/wizards/com/sun/star/wizards/form/CallFormWizard.java
index d263e9f07254..f933a29bcab2 100644
--- a/wizards/com/sun/star/wizards/form/CallFormWizard.java
+++ b/wizards/com/sun/star/wizards/form/CallFormWizard.java
@@ -2,9 +2,9 @@
*
* $RCSfile: CallFormWizard.java,v $
*
-* $Revision: 1.2 $
+* $Revision: 1.3 $
*
-* last change: $Author: pjunck $ $Date: 2004-10-27 13:32:58 $
+* last change: $Author: hr $ $Date: 2005-04-06 11:38:12 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -61,7 +61,9 @@
package com.sun.star.wizards.form;
import com.sun.star.beans.PropertyValue;
+import com.sun.star.beans.PropertyAttribute;
import com.sun.star.uno.Type;
+import com.sun.star.lang.XComponent;
import com.sun.star.wizards.common.Properties;
/** This class capsulates the class, that implements the minimal component, a
@@ -107,15 +109,20 @@ public class CallFormWizard {
/** This class implements the component. At least the interfaces XServiceInfo,
* XTypeProvider, and XInitialization should be provided by the service.
*/
- public static class FormWizardImplementation implements com.sun.star.lang.XInitialization, com.sun.star.lang.XServiceInfo, com.sun.star.lang.XTypeProvider, com.sun.star.task.XJobExecutor {
+ public static class FormWizardImplementation extends com.sun.star.lib.uno.helper.PropertySet implements com.sun.star.lang.XInitialization, com.sun.star.lang.XServiceInfo, com.sun.star.lang.XTypeProvider, com.sun.star.task.XJobExecutor {
PropertyValue[] databaseproperties;
+ public XComponent DocumentDefinition = null;
+ public XComponent Document = null;
/** The constructor of the inner class has a XMultiServiceFactory parameter.
* @param xmultiservicefactoryInitialization A special service factory
* could be introduced while initializing.
*/
public FormWizardImplementation(com.sun.star.lang.XMultiServiceFactory xmultiservicefactoryInitialization) {
+ super();
xmultiservicefactory = xmultiservicefactoryInitialization;
+ registerProperty("Document", (short)(PropertyAttribute.READONLY|PropertyAttribute.MAYBEVOID));
+ registerProperty("DocumentDefinition", (short)(PropertyAttribute.READONLY|PropertyAttribute.MAYBEVOID));
}
public void trigger(String sEvent) {
@@ -123,7 +130,11 @@ public class CallFormWizard {
com.sun.star.frame.XComponentLoader xcomponentloader = (com.sun.star.frame.XComponentLoader) com.sun.star.uno.UnoRuntime.queryInterface(com.sun.star.frame.XComponentLoader.class, xmultiservicefactory.createInstance("com.sun.star.frame.Desktop"));
if (sEvent.compareTo("start") == 0) {
FormWizard CurFormWizard = new FormWizard(xmultiservicefactory);
- CurFormWizard.startFormWizard(xmultiservicefactory, databaseproperties);
+ XComponent[] obj = CurFormWizard.startFormWizard(xmultiservicefactory, databaseproperties);
+ if ( obj != null ){
+ DocumentDefinition = obj[0];
+ Document = obj[1];
+ }
}
} catch (Exception exception) {
System.err.println(exception);
@@ -215,7 +226,13 @@ public class CallFormWizard {
};
try {
- typeReturn = new Type[] { new Type(com.sun.star.task.XJobExecutor.class), new Type(com.sun.star.lang.XTypeProvider.class), new Type(com.sun.star.lang.XServiceInfo.class), new Type(com.sun.star.lang.XInitialization.class)};
+ typeReturn = new Type[] { new Type(com.sun.star.task.XJobExecutor.class)
+ , new Type(com.sun.star.lang.XTypeProvider.class)
+ , new Type(com.sun.star.lang.XServiceInfo.class)
+ , new Type(com.sun.star.beans.XPropertySet.class)
+ , new Type(com.sun.star.beans.XFastPropertySet.class)
+ , new Type(com.sun.star.beans.XMultiPropertySet.class)
+ , new Type(com.sun.star.lang.XInitialization.class)};
} catch (Exception exception) {
System.err.println(exception);
}