summaryrefslogtreecommitdiff
path: root/wizards
diff options
context:
space:
mode:
authorFrank Schoenheit [fs] <frank.schoenheit@sun.com>2010-02-05 11:15:32 +0100
committerFrank Schoenheit [fs] <frank.schoenheit@sun.com>2010-02-05 11:15:32 +0100
commit269a73582e3703e82b128bc1c5a096097da4b2a9 (patch)
tree522c085026a0cccf83102d540775b8569b86b10d /wizards
parentb691607b3bda98cee1bb923ccf59cb248bf9cb25 (diff)
parent6c88996a2eef3ecf3a6bb5aa46912be40615d668 (diff)
autorecovery: merge after pulling CWS dba33e
Diffstat (limited to 'wizards')
-rw-r--r--wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.java7
-rw-r--r--wizards/com/sun/star/wizards/db/SQLQueryComposer.java2
-rw-r--r--wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.java6
-rw-r--r--wizards/com/sun/star/wizards/form/FormWizard.java4
-rw-r--r--wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java6
-rw-r--r--wizards/com/sun/star/wizards/query/Finalizer.java2
-rw-r--r--wizards/com/sun/star/wizards/query/QueryWizard.java12
-rw-r--r--wizards/com/sun/star/wizards/report/ReportWizard.java6
-rw-r--r--wizards/com/sun/star/wizards/table/TableWizard.java4
-rw-r--r--wizards/com/sun/star/wizards/ui/WizardDialog.java16
-rw-r--r--wizards/com/sun/star/wizards/web/WWD_Events.java3
11 files changed, 43 insertions, 25 deletions
diff --git a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.java b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.java
index 23dec6a80191..82f767a61ca4 100644
--- a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.java
+++ b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.java
@@ -459,7 +459,7 @@ public class AgendaWizardDialogImpl extends AgendaWizardDialog
running = false;
}
- public void finishWizard() {
+ public boolean finishWizard() {
boolean bSaveSuccess = false; // pesimistic :(
XTextDocument xTextDocument;
@@ -480,7 +480,7 @@ public class AgendaWizardDialogImpl extends AgendaWizardDialog
int answer = SystemDialog.showMessageBox(xMSF, xControl.getPeer(), "MessBox", VclWindowPeerAttribute.YES_NO + VclWindowPeerAttribute.DEF_NO, resources.resFileExists);
if (answer == 3) // user said: no, do not overwrite....
- return;
+ return false;
}
agendaTemplate.xTextDocument.lockControllers();
@@ -550,10 +550,11 @@ public class AgendaWizardDialogImpl extends AgendaWizardDialog
}
} else {
agendaTemplate.xTextDocument.unlockControllers();
- return;
+ return false;
}
xDialog.endExecute();
running = false;
+ return true;
}
private void closeDocument() {
diff --git a/wizards/com/sun/star/wizards/db/SQLQueryComposer.java b/wizards/com/sun/star/wizards/db/SQLQueryComposer.java
index db5ccd32b8f7..10677558488c 100644
--- a/wizards/com/sun/star/wizards/db/SQLQueryComposer.java
+++ b/wizards/com/sun/star/wizards/db/SQLQueryComposer.java
@@ -292,7 +292,7 @@ public class SQLQueryComposer
return sFromClause;
}
- public boolean setQueryCommand(String QueryName, XWindow _xParentWindow, boolean _bincludeGrouping, boolean _baddAliasFieldNames)
+ public boolean setQueryCommand(XWindow _xParentWindow, boolean _bincludeGrouping, boolean _baddAliasFieldNames)
{
try
{
diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.java b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.java
index a8dbe94e5db0..fe726c430a9b 100644
--- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.java
+++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.java
@@ -212,7 +212,7 @@ public class FaxWizardDialogImpl extends FaxWizardDialog
running = false;
}
- public void finishWizard()
+ public boolean finishWizard()
{
switchToStep(getCurrentStep(), getMaxStep());
myFaxDoc.setWizardTemplateDocInfo(resources.resFaxWizardDialog_title, resources.resTemplateDescription);
@@ -239,7 +239,7 @@ public class FaxWizardDialogImpl extends FaxWizardDialog
int answer = SystemDialog.showMessageBox(xMSF, xControl.getPeer(), "MessBox", VclWindowPeerAttribute.YES_NO + VclWindowPeerAttribute.DEF_NO, resources.resOverwriteWarning);
if (answer == 3) // user said: no, do not overwrite....
{
- return;
+ return false;
}
}
}
@@ -297,7 +297,7 @@ public class FaxWizardDialogImpl extends FaxWizardDialog
xDialog.endExecute();
running = false;
}
-
+ return true;
}
public void closeDocument()
diff --git a/wizards/com/sun/star/wizards/form/FormWizard.java b/wizards/com/sun/star/wizards/form/FormWizard.java
index 5b0a7939f6c2..678e5d55f3b1 100644
--- a/wizards/com/sun/star/wizards/form/FormWizard.java
+++ b/wizards/com/sun/star/wizards/form/FormWizard.java
@@ -308,7 +308,7 @@ public class FormWizard extends WizardDialog
}
// @Override
- public void finishWizard()
+ public boolean finishWizard()
{
int ncurStep = getCurrentStep();
if ((switchToStep(ncurStep, SOSTORE_PAGE)) || (ncurStep == SOSTORE_PAGE))
@@ -326,6 +326,7 @@ public class FormWizard extends WizardDialog
{
bcreateForm = true;
xDialog.endExecute();
+ return true;
}
}
}
@@ -335,6 +336,7 @@ public class FormWizard extends WizardDialog
showMessageBox("WarningBox", com.sun.star.awt.VclWindowPeerAttribute.OK, smessage);
}
}
+ return false;
}
// @Override
diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java
index 1a47712ca213..5e5ce985c0c4 100644
--- a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java
+++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java
@@ -253,7 +253,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog
running = false;
}
- public void finishWizard()
+ public boolean finishWizard()
{
switchToStep(getCurrentStep(), getMaxStep());
try
@@ -279,7 +279,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog
int answer = SystemDialog.showMessageBox(xMSF, xControl.getPeer(), "MessBox", VclWindowPeerAttribute.YES_NO + VclWindowPeerAttribute.DEF_NO, resources.resOverwriteWarning);
if (answer == 3) // user said: no, do not overwrite....
{
- return;
+ return false;
}
}
}
@@ -356,7 +356,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog
xDialog.endExecute();
running = false;
}
-
+ return true;
}
public void closeDocument()
diff --git a/wizards/com/sun/star/wizards/query/Finalizer.java b/wizards/com/sun/star/wizards/query/Finalizer.java
index 71fddc422d6a..7635425cf43f 100644
--- a/wizards/com/sun/star/wizards/query/Finalizer.java
+++ b/wizards/com/sun/star/wizards/query/Finalizer.java
@@ -174,7 +174,7 @@ public class Finalizer
{
CurDBMetaData.oSQLQueryComposer = new SQLQueryComposer(CurDBMetaData);
String queryName = getTitle();
- if ( CurDBMetaData.oSQLQueryComposer.setQueryCommand( queryName, m_queryWizard.xWindow, true, true )
+ if ( CurDBMetaData.oSQLQueryComposer.setQueryCommand( m_queryWizard.xWindow, true, true )
&& CurDBMetaData.createQuery( CurDBMetaData.oSQLQueryComposer, queryName )
)
return queryName;
diff --git a/wizards/com/sun/star/wizards/query/QueryWizard.java b/wizards/com/sun/star/wizards/query/QueryWizard.java
index c9e4148dd3e1..e2cb0763dca9 100644
--- a/wizards/com/sun/star/wizards/query/QueryWizard.java
+++ b/wizards/com/sun/star/wizards/query/QueryWizard.java
@@ -284,22 +284,22 @@ public class QueryWizard extends DatabaseObjectWizard
}
}
- public void finishWizard()
+ public boolean finishWizard()
{
int ncurStep = getCurrentStep();
- if ((switchToStep(ncurStep, SOSUMMARY_PAGE)) || (ncurStep == SOSUMMARY_PAGE))
+ if ( ( ncurStep == SOSUMMARY_PAGE )
+ || ( switchToStep( ncurStep, SOSUMMARY_PAGE ) )
+ )
{
m_createdQuery = CurFinalizer.finish();
if ( m_createdQuery.length() > 0 )
{
loadSubComponent( CommandType.QUERY, m_createdQuery, CurFinalizer.displayQueryDesign() );
xDialog.endExecute();
- }
- else
- {
- setControlProperty("btnWizardFinish", "Enabled", false);
+ return true;
}
}
+ return false;
}
protected void enterStep(int nOldStep, int nNewStep)
diff --git a/wizards/com/sun/star/wizards/report/ReportWizard.java b/wizards/com/sun/star/wizards/report/ReportWizard.java
index a4b4e3af18ad..a959c2dfd183 100644
--- a/wizards/com/sun/star/wizards/report/ReportWizard.java
+++ b/wizards/com/sun/star/wizards/report/ReportWizard.java
@@ -329,7 +329,7 @@ public class ReportWizard extends WizardDialog implements XTextListener, XComple
boolean bQueryCreated = false;
if (this.CurDBCommandFieldSelection.getSelectedCommandType() == CommandType.TABLE)
{
- bQueryCreated = CurReportDocument.getRecordParser().oSQLQueryComposer.setQueryCommand(sMsgWizardName, this.xWindow, false, false);
+ bQueryCreated = CurReportDocument.getRecordParser().oSQLQueryComposer.setQueryCommand(this.xWindow, false, false);
CurReportDocument.setCommandType(CommandType.COMMAND);
String sQuery = CurReportDocument.getRecordParser().oSQLQueryComposer.getQuery();
@@ -520,7 +520,7 @@ public class ReportWizard extends WizardDialog implements XTextListener, XComple
enableNavigationButtons(false, false, false);
}
- public void finishWizard()
+ public boolean finishWizard()
{
final int ncurStep = getCurrentStep();
if ((switchToStep(ncurStep, SOSTOREPAGE)) || (ncurStep == SOSTOREPAGE))
@@ -532,9 +532,11 @@ public class ReportWizard extends WizardDialog implements XTextListener, XComple
nReportMode = CurReportFinalizer.getReportOpenMode();
m_sReportName = CurReportFinalizer.getStoreName();
xDialog.endExecute();
+ return true;
}
}
}
+ return false;
}
public void cancelWizard()
diff --git a/wizards/com/sun/star/wizards/table/TableWizard.java b/wizards/com/sun/star/wizards/table/TableWizard.java
index 18a0a2a80e65..f72c73fd917c 100644
--- a/wizards/com/sun/star/wizards/table/TableWizard.java
+++ b/wizards/com/sun/star/wizards/table/TableWizard.java
@@ -288,7 +288,7 @@ public class TableWizard extends DatabaseObjectWizard implements XTextListener,
return bIsSuccessfull;
}
- public void finishWizard()
+ public boolean finishWizard()
{
super.switchToStep(super.getCurrentStep(), SOFINALPAGE);
tablename = curFinalizer.getTableName(curScenarioSelector.getFirstTableName());
@@ -308,6 +308,7 @@ public class TableWizard extends DatabaseObjectWizard implements XTextListener,
loadSubComponent( DatabaseObject.TABLE, curTableDescriptor.getComposedTableName(), editTableDesign );
m_tableName = curTableDescriptor.getComposedTableName();
super.xDialog.endExecute();
+ return true;
}
}
else
@@ -317,6 +318,7 @@ public class TableWizard extends DatabaseObjectWizard implements XTextListener,
curFinalizer.setFocusToTableNameControl();
}
}
+ return false;
}
private void callFormWizard()
diff --git a/wizards/com/sun/star/wizards/ui/WizardDialog.java b/wizards/com/sun/star/wizards/ui/WizardDialog.java
index 15b840fa9c89..01d97c4278ed 100644
--- a/wizards/com/sun/star/wizards/ui/WizardDialog.java
+++ b/wizards/com/sun/star/wizards/ui/WizardDialog.java
@@ -685,7 +685,7 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL
}
}
- public abstract void finishWizard();
+ public abstract boolean finishWizard();
/**
* This function will call if the finish button is pressed on the UI.
@@ -693,8 +693,18 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL
public void finishWizard_1()
{
enableFinishButton(false);
- finishWizard();
- removeTerminateListener();
+ boolean success = false;
+ try
+ {
+ success = finishWizard();
+ }
+ finally
+ {
+ if ( !success )
+ enableFinishButton( true );
+ }
+ if ( success )
+ removeTerminateListener();
}
public int getMaximalStep()
diff --git a/wizards/com/sun/star/wizards/web/WWD_Events.java b/wizards/com/sun/star/wizards/web/WWD_Events.java
index e396a46ddd30..88b986bb631c 100644
--- a/wizards/com/sun/star/wizards/web/WWD_Events.java
+++ b/wizards/com/sun/star/wizards/web/WWD_Events.java
@@ -942,9 +942,10 @@ public abstract class WWD_Events extends WWD_Startup
/**
* the user clicks the finish/create button.
*/
- public void finishWizard()
+ public boolean finishWizard()
{
finishWizard(true);
+ return true;
}
/**