summaryrefslogtreecommitdiff
path: root/wizards/com/sun/star/wizards/form/CallFormWizard.java
diff options
context:
space:
mode:
authorFrank Schoenheit [fs] <frank.schoenheit@sun.com>2010-02-04 16:04:06 +0100
committerFrank Schoenheit [fs] <frank.schoenheit@sun.com>2010-02-04 16:04:06 +0100
commitc0ea2fcd404cd3830c71752cf1a0c0ee6e5b4e76 (patch)
tree753da1f65cabcadd94cc5c60fa31f363c14f161e /wizards/com/sun/star/wizards/form/CallFormWizard.java
parent722556b9cd099cbb352cb11692ec1b27adfac5dd (diff)
autorecovery: form and report wizzard now also using XDatabaseDocumentUI, instead of manipulating document definitions
All database object wizards by now employ XDatabaseDocumentUI. This way, it is ensured that the controller has the full control over the opened sub components. Still, other third-party code could use direct access to the document definitions, and open sub documents this way. This would go unnoticed by the application controller at the moment. I would be possible to fix this, by introducing broadcasts from the document definitions, listened to by the controller. But as this sounds like a rare case, and XDatabaseDocumentUI is the preferred way for third-party components, too, such an implementation is deferred to Later ...
Diffstat (limited to 'wizards/com/sun/star/wizards/form/CallFormWizard.java')
-rw-r--r--wizards/com/sun/star/wizards/form/CallFormWizard.java30
1 files changed, 6 insertions, 24 deletions
diff --git a/wizards/com/sun/star/wizards/form/CallFormWizard.java b/wizards/com/sun/star/wizards/form/CallFormWizard.java
index 60b0b1705487..a7894ce281ca 100644
--- a/wizards/com/sun/star/wizards/form/CallFormWizard.java
+++ b/wizards/com/sun/star/wizards/form/CallFormWizard.java
@@ -30,9 +30,7 @@
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
@@ -85,10 +83,7 @@ public class CallFormWizard
*/
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 Document = null;
- public XComponent DocumentDefinition = null;
+ private PropertyValue[] m_wizardContext;
/** The constructor of the inner class has a XMultiServiceFactory parameter.
* @param xmultiservicefactoryInitialization A special service factory
@@ -97,9 +92,7 @@ public class CallFormWizard
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));
+ m_serviceFactory = xmultiservicefactoryInitialization;
}
public void trigger(String sEvent)
@@ -108,19 +101,8 @@ public class CallFormWizard
{
if (sEvent.compareTo("start") == 0)
{
- FormWizard CurFormWizard = new FormWizard(xmultiservicefactory);
- XComponent[] obj = CurFormWizard.startFormWizard(xmultiservicefactory, databaseproperties);
- if (obj != null)
- {
- DocumentDefinition = obj[0];
- Document = obj[1];
- }
- }
- else if (sEvent.compareTo("end") == 0)
- {
- DocumentDefinition = null;
- Document = null;
- databaseproperties = null;
+ FormWizard CurFormWizard = new FormWizard( m_serviceFactory, m_wizardContext );
+ CurFormWizard.startFormWizard();
}
}
catch (Exception exception)
@@ -134,7 +116,7 @@ public class CallFormWizard
private static final String __serviceName = "com.sun.star.wizards.form.CallFormWizard";
/** The service manager, that gives access to all registered services.
*/
- private com.sun.star.lang.XMultiServiceFactory xmultiservicefactory;
+ private com.sun.star.lang.XMultiServiceFactory m_serviceFactory;
/** This method is a member of the interface for initializing an object
* directly after its creation.
@@ -145,7 +127,7 @@ public class CallFormWizard
*/
public void initialize(Object[] object) throws com.sun.star.uno.Exception
{
- databaseproperties = Properties.convertToPropertyValueArray(object);
+ m_wizardContext = Properties.convertToPropertyValueArray(object);
}
/** This method returns an array of all supported service names.