summaryrefslogtreecommitdiffstats
path: root/wizards
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2008-01-29 07:42:23 +0000
committerVladimir Glazounov <vg@openoffice.org>2008-01-29 07:42:23 +0000
commitef71127f161845f65c81f0f6fa58801d1b0e9393 (patch)
treece2e44182d86a768a369ffa3212754944cd9b442 /wizards
parentINTEGRATION: CWS dba24e_SRC680 (1.4.120); FILE MERGED (diff)
downloadcore-ef71127f161845f65c81f0f6fa58801d1b0e9393.tar.gz
core-ef71127f161845f65c81f0f6fa58801d1b0e9393.zip
INTEGRATION: CWS dba24e_SRC680 (1.7.94); FILE MERGED
2007/12/19 12:28:44 oj 1.7.94.1: #i84339# handle refcount by releasing the objects as early as possible, gc is not alsways the best way to trust :-)
Diffstat (limited to 'wizards')
-rw-r--r--wizards/com/sun/star/wizards/query/Finalizer.java33
1 files changed, 19 insertions, 14 deletions
diff --git a/wizards/com/sun/star/wizards/query/Finalizer.java b/wizards/com/sun/star/wizards/query/Finalizer.java
index b5514c25e290..68ebeb74b400 100644
--- a/wizards/com/sun/star/wizards/query/Finalizer.java
+++ b/wizards/com/sun/star/wizards/query/Finalizer.java
@@ -4,9 +4,9 @@
*
* $RCSfile: Finalizer.java,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: obo $ $Date: 2006-07-10 16:05:08 $
+ * last change: $Author: vg $ $Date: 2008-01-29 08:42:23 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -38,12 +38,13 @@ import com.sun.star.wizards.common.*;
import com.sun.star.awt.XRadioButton;
import com.sun.star.wizards.db.*;
import com.sun.star.lang.IllegalArgumentException;
+import com.sun.star.lang.XComponent;
import com.sun.star.sdb.CommandType;
import com.sun.star.uno.*;
import com.sun.star.wizards.ui.*;
public class Finalizer {
- UnoDialog2 CurUnoDialog;
+ QueryWizard CurUnoDialog;
String resQuery;
Object txtSummary;
Object txtTitle;
@@ -52,7 +53,7 @@ public class Finalizer {
QuerySummary CurDBMetaData;
- public Finalizer(UnoDialog2 _CurUnoDialog, QuerySummary _CurDBMetaData) {
+ public Finalizer(QueryWizard _CurUnoDialog, QuerySummary _CurDBMetaData) {
short curtabindex = (short) (100 * QueryWizard.SOSUMMARYPAGE);
String reslblQueryTitle;
String resoptDisplayQuery;
@@ -116,25 +117,29 @@ public class Finalizer {
return (String) Helper.getUnoPropertyValue(UnoDialog.getModel(txtTitle), "Text");
}
- public void finish() {
+ public XComponent[] finish() {
+ XComponent[] ret = null;
try {
CurDBMetaData.oSQLQueryComposer = new SQLQueryComposer(CurDBMetaData);
String queryname = getTitle();
boolean bsuccess = CurDBMetaData.oSQLQueryComposer.setQueryCommand(queryname, CurUnoDialog.xWindow, true, true);
if (bsuccess) {
bsuccess = CurDBMetaData.createQuery(CurDBMetaData.oSQLQueryComposer, queryname);
- if ( !bsuccess )
- return;
-
- short igoon = AnyConverter.toShort(Helper.getUnoPropertyValue(UnoDialog.getModel(xRadioDisplayQuery), "State"));
- if (igoon == (short) 1)
- CurDBMetaData.switchtoDataViewmode(queryname, CommandType.QUERY);
- else
- CurDBMetaData.switchtoDesignmode(queryname, CommandType.QUERY);
- CurUnoDialog.xDialog.endExecute();
+ if ( bsuccess ){
+ short igoon = AnyConverter.toShort(Helper.getUnoPropertyValue(UnoDialog.getModel(xRadioDisplayQuery), "State"));
+ if (igoon == (short) 1)
+ ret = CurDBMetaData.switchtoDataViewmode(queryname, CommandType.QUERY,CurUnoDialog.getCurFrame());
+ else
+ ret = CurDBMetaData.switchtoDesignmode(queryname, CommandType.QUERY,CurUnoDialog.getCurFrame());
+ CurUnoDialog.xDialog.endExecute();
+ }
}
+ CurDBMetaData.oSQLQueryComposer = null;
+ CurDBMetaData = null;
+ CurUnoDialog = null;
} catch (IllegalArgumentException e) {
e.printStackTrace();
}
+ return ret;
}
}