summaryrefslogtreecommitdiff
path: root/wizards/com/sun/star/wizards/table/CallTableWizard.java
diff options
context:
space:
mode:
Diffstat (limited to 'wizards/com/sun/star/wizards/table/CallTableWizard.java')
-rw-r--r--wizards/com/sun/star/wizards/table/CallTableWizard.java43
1 files changed, 16 insertions, 27 deletions
diff --git a/wizards/com/sun/star/wizards/table/CallTableWizard.java b/wizards/com/sun/star/wizards/table/CallTableWizard.java
index 6d8a2d4a28dd..4aeb66cf66ca 100644
--- a/wizards/com/sun/star/wizards/table/CallTableWizard.java
+++ b/wizards/com/sun/star/wizards/table/CallTableWizard.java
@@ -28,7 +28,6 @@ package com.sun.star.wizards.table;
import com.sun.star.beans.PropertyAttribute;
import com.sun.star.beans.PropertyValue;
-import com.sun.star.lang.XComponent;
import com.sun.star.uno.Type;
import com.sun.star.wizards.common.Properties;
@@ -83,41 +82,31 @@ public class CallTableWizard
public static class TableWizardImplementation 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;
+ // <properties>
+ public String Command;
+ public final Integer CommandType = com.sun.star.sdb.CommandType.TABLE;
+ // </properties>
/** The constructor of the inner class has a XMultiServiceFactory parameter.
- * @param xmultiservicefactoryInitialization A special service factory
- * could be introduced while initializing.
+ * @param i_serviceFactory
*/
- public TableWizardImplementation(com.sun.star.lang.XMultiServiceFactory xmultiservicefactoryInitialization)
+ public TableWizardImplementation(com.sun.star.lang.XMultiServiceFactory i_serviceFactory)
{
super();
- xmultiservicefactory = xmultiservicefactoryInitialization;
- registerProperty("Document", (short) (PropertyAttribute.READONLY | PropertyAttribute.MAYBEVOID));
- registerProperty("DocumentDefinition", (short) (PropertyAttribute.READONLY | PropertyAttribute.MAYBEVOID));
+ m_serviceFactory = i_serviceFactory;
+ registerProperty( "Command", (short)( PropertyAttribute.READONLY | PropertyAttribute.MAYBEVOID ) );
+ registerProperty( "CommandType", PropertyAttribute.READONLY );
}
- public void trigger(String sEvent)
+ public void trigger( String sEvent )
{
try
{
- if (sEvent.compareTo("start") == 0)
+ if ( sEvent.compareTo("start") == 0 )
{
- TableWizard CurTableWizard = new TableWizard(xmultiservicefactory);
- XComponent[] obj = CurTableWizard.startTableWizard(xmultiservicefactory, databaseproperties);
- if (obj != null)
- {
- DocumentDefinition = obj[1];
- Document = obj[0];
- }
- }
- else if (sEvent.compareTo("end") == 0)
- {
- DocumentDefinition = null;
- Document = null;
- databaseproperties = null;
+ TableWizard CurTableWizard = new TableWizard( m_serviceFactory, m_wizardContext );
+ Command = CurTableWizard.startTableWizard();
}
}
catch (Exception exception)
@@ -131,7 +120,7 @@ public class CallTableWizard
private static final String __serviceName = "com.sun.star.wizards.table.CallTableWizard";
/** 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.
@@ -142,7 +131,7 @@ public class CallTableWizard
*/
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.