diff options
author | Oliver Bolte <obo@openoffice.org> | 2006-07-10 15:05:08 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2006-07-10 15:05:08 +0000 |
commit | a26b326beff61e479bf8b76efb1078cff586acd7 (patch) | |
tree | 3852c992824c01be0a6501fe58c78e3046f4209b /wizards/com/sun | |
parent | 39cac0287f43c8e2e6015ddc58f7219c2754633a (diff) |
INTEGRATION: CWS qiq (1.6.20); FILE MERGED
2006/06/20 14:39:56 bc 1.6.20.3: #i51143# Querywizards made ready for queries in queries
2006/05/30 08:38:40 fs 1.6.20.2: #i51143# createQuery: don't silently change the name, and respect and display error messages thrown upon creation
2006/05/30 08:29:49 fs 1.6.20.1: #i51143# createQuery: don't silently change the name, and respect and display error messages thrown upon creation
Diffstat (limited to 'wizards/com/sun')
-rw-r--r-- | wizards/com/sun/star/wizards/query/Finalizer.java | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/wizards/com/sun/star/wizards/query/Finalizer.java b/wizards/com/sun/star/wizards/query/Finalizer.java index 79fca126fcf9..b5514c25e290 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.6 $ + * $Revision: 1.7 $ * - * last change: $Author: vg $ $Date: 2006-04-07 12:48:51 $ + * last change: $Author: obo $ $Date: 2006-07-10 16:05:08 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -31,7 +31,8 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * MA 02111-1307 USA * - ************************************************************************/package com.sun.star.wizards.query; + ************************************************************************/ +package com.sun.star.wizards.query; import com.sun.star.wizards.common.*; import com.sun.star.awt.XRadioButton; @@ -88,8 +89,8 @@ public class Finalizer { } /* TODO: The title textbox always has to be updated when - a new Table has been selected if it is clear that the user has not made any input meanwhile - * */ + a new Table has been selected if it is clear that the user has not made any input meanwhile + */ protected String initialize() { try { String sCurQueryName = AnyConverter.toString(Helper.getUnoPropertyValue(UnoDialog.getModel(txtTitle), "Text")); @@ -97,10 +98,11 @@ public class Finalizer { if (sCurQueryName.equals("")) { String[] sCommandNames = CurDBMetaData.getIncludedCommandNames(); sCurQueryName = resQuery + "_" + sCommandNames[0]; - sCurQueryName = Desktop.getUniqueName(CurDBMetaData.xQueryNames, sCurQueryName); + sCurQueryName = CurDBMetaData.ConnectionTools.getObjectNames().suggestName(CommandType.QUERY,sCurQueryName); Helper.setUnoPropertyValue(UnoDialog.getModel(txtTitle), "Text", sCurQueryName); } } + CurDBMetaData.setSummaryString(); CurUnoDialog.setControlProperty("txtSummary", "Text", CurDBMetaData.getSummaryString()); return sCurQueryName; @@ -120,14 +122,16 @@ public class Finalizer { String queryname = getTitle(); boolean bsuccess = CurDBMetaData.oSQLQueryComposer.setQueryCommand(queryname, CurUnoDialog.xWindow, true, true); if (bsuccess) { - String sfinalname = CurDBMetaData.createQuery(CurDBMetaData.oSQLQueryComposer, getTitle()); + 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(sfinalname, CommandType.QUERY); + CurDBMetaData.switchtoDataViewmode(queryname, CommandType.QUERY); else - CurDBMetaData.switchtoDesignmode(sfinalname, CommandType.QUERY); + CurDBMetaData.switchtoDesignmode(queryname, CommandType.QUERY); CurUnoDialog.xDialog.endExecute(); - } } catch (IllegalArgumentException e) { e.printStackTrace(); |