diff options
author | Frank Schoenheit [fs] <frank.schoenheit@sun.com> | 2010-02-03 11:52:40 +0100 |
---|---|---|
committer | Frank Schoenheit [fs] <frank.schoenheit@sun.com> | 2010-02-03 11:52:40 +0100 |
commit | a31b27b704d5c669674afdf135a61cdf1f30ff3b (patch) | |
tree | 65081feed990f995fd8c67aef3c99e54fd91efc5 /wizards/com/sun/star/wizards/db/TableDescriptor.java | |
parent | 6242c77610b6d6c4206da895dfa430b781f60996 (diff) |
autorecovery: re-work the table wizard so that it does not open the table itself, but uses XDatabaseDocumentUI
Consequently, it does not need to return the created model/controller anymore. This way, the application controller
has full control over its sub components, which didn't work reliably before.
Other wizards (query/form/report) are to follow. For this purpose, they're also to be based on the newly introduced
DatabaseObjectWizard class.
Diffstat (limited to 'wizards/com/sun/star/wizards/db/TableDescriptor.java')
-rw-r--r-- | wizards/com/sun/star/wizards/db/TableDescriptor.java | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/wizards/com/sun/star/wizards/db/TableDescriptor.java b/wizards/com/sun/star/wizards/db/TableDescriptor.java index aa9986b8d9db..74930e6d1bb6 100644 --- a/wizards/com/sun/star/wizards/db/TableDescriptor.java +++ b/wizards/com/sun/star/wizards/db/TableDescriptor.java @@ -36,7 +36,6 @@ import com.sun.star.lang.IllegalArgumentException; import com.sun.star.lang.WrappedTargetException; import com.sun.star.sdbc.SQLException; import com.sun.star.wizards.common.JavaTools; -import com.sun.star.wizards.ui.WizardDialog; import java.util.Vector; import com.sun.star.awt.VclWindowPeerAttribute; @@ -120,13 +119,13 @@ public class TableDescriptor extends CommandMetaData implements XContainerListen { // XTablesSupplier xDBTables = (XTablesSupplier) UnoRuntime.queryInterface(XTablesSupplier.class, DBConnection); // xTableNames = xDBTables.getTables(); - xTableAppend = (XAppend) UnoRuntime.queryInterface(XAppend.class, getTableNamesAsNameAccess()); - xTableDrop = (XDrop) UnoRuntime.queryInterface(XDrop.class, getTableNamesAsNameAccess()); - xTableDataDescriptorFactory = (XDataDescriptorFactory) UnoRuntime.queryInterface(XDataDescriptorFactory.class, getTableNamesAsNameAccess()); + xTableAppend = UnoRuntime.queryInterface( XAppend.class, getTableNamesAsNameAccess() ); + xTableDrop = UnoRuntime.queryInterface( XDrop.class, getTableNamesAsNameAccess() ); + xTableDataDescriptorFactory = UnoRuntime.queryInterface( XDataDescriptorFactory.class, getTableNamesAsNameAccess() ); xPropTableDataDescriptor = xTableDataDescriptorFactory.createDataDescriptor(); - XColumnsSupplier xColumnsSupplier = (XColumnsSupplier) UnoRuntime.queryInterface(XColumnsSupplier.class, xPropTableDataDescriptor); + XColumnsSupplier xColumnsSupplier = UnoRuntime.queryInterface( XColumnsSupplier.class, xPropTableDataDescriptor ); xNameAccessColumns = xColumnsSupplier.getColumns(); - xColumnDataDescriptorFactory = (XDataDescriptorFactory) UnoRuntime.queryInterface(XDataDescriptorFactory.class, xNameAccessColumns); + xColumnDataDescriptorFactory = UnoRuntime.queryInterface( XDataDescriptorFactory.class, xNameAccessColumns ); try { createTypeInspector(); |