Kaydet (Commit) 6c88996a authored tarafından Ocke Janssen [oj]'s avatar Ocke Janssen [oj]

Merge from DEv300:m71

...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
#include "controltype.hxx" #include "controltype.hxx"
#include "propctrlr.hrc" #include "propctrlr.hrc"
#include "extensio.hrc"
#include "fontdialog.hxx" #include "fontdialog.hxx"
#include "formcomponenthandler.hxx" #include "formcomponenthandler.hxx"
#include "formlinkdialog.hxx" #include "formlinkdialog.hxx"
...@@ -2538,17 +2539,38 @@ namespace pcr ...@@ -2538,17 +2539,38 @@ namespace pcr
Reference< XQueriesSupplier > xSupplyQueries( m_xRowSetConnection, UNO_QUERY ); Reference< XQueriesSupplier > xSupplyQueries( m_xRowSetConnection, UNO_QUERY );
Reference< XNameAccess > xQueryNames; Reference< XNameAccess > xQueryNames;
if ( xSupplyQueries.is() ) if ( xSupplyQueries.is() )
{
xQueryNames = xSupplyQueries->getQueries(); xQueryNames = xSupplyQueries->getQueries();
DBG_ASSERT( xQueryNames.is(), "FormComponentPropertyHandler::impl_fillQueryNames_throw: no way to obtain the queries of the connection!" ); impl_fillQueryNames_throw(xQueryNames,_out_rNames);
if ( !xQueryNames.is() ) }
}
//------------------------------------------------------------------------
void FormComponentPropertyHandler::impl_fillQueryNames_throw( const Reference< XNameAccess >& _xQueryNames,::std::vector< ::rtl::OUString >& _out_rNames,const ::rtl::OUString& _sName ) const
{
DBG_ASSERT( _xQueryNames.is(), "FormComponentPropertyHandler::impl_fillQueryNames_throw: no way to obtain the queries of the connection!" );
if ( !_xQueryNames.is() )
return; return;
Sequence< ::rtl::OUString> aQueryNames = xQueryNames->getElementNames(); Sequence< ::rtl::OUString> aQueryNames = _xQueryNames->getElementNames();
sal_uInt32 nCount = aQueryNames.getLength(); sal_uInt32 nCount = aQueryNames.getLength();
const ::rtl::OUString* pQueryNames = aQueryNames.getConstArray(); const ::rtl::OUString* pQueryNames = aQueryNames.getConstArray();
sal_Bool bAdd = _sName.getLength();
for ( sal_uInt32 i=0; i<nCount; i++, ++pQueryNames ) for ( sal_uInt32 i=0; i<nCount; i++, ++pQueryNames )
_out_rNames.push_back( *pQueryNames ); {
::rtl::OUStringBuffer sTemp;
if ( bAdd )
{
sTemp.append(_sName);
sTemp.appendAscii("/");
}
sTemp.append(*pQueryNames);
Reference< XNameAccess > xSubQueries(_xQueryNames->getByName(*pQueryNames),UNO_QUERY);
if ( xSubQueries.is() )
impl_fillQueryNames_throw(xSubQueries,_out_rNames,sTemp.makeStringAndClear());
else
_out_rNames.push_back( sTemp.makeStringAndClear() );
}
} }
//------------------------------------------------------------------------ //------------------------------------------------------------------------
...@@ -2710,7 +2732,7 @@ namespace pcr ...@@ -2710,7 +2732,7 @@ namespace pcr
SvNumberFormatter* pFormatter = pSupplier->GetNumberFormatter(); SvNumberFormatter* pFormatter = pSupplier->GetNumberFormatter();
double dPreviewVal = OFormatSampleControl::getPreviewValue(pFormatter,nFormatKey); double dPreviewVal = OFormatSampleControl::getPreviewValue(pFormatter,nFormatKey);
SvxNumberInfoItem aFormatter( pFormatter, dPreviewVal, SID_ATTR_NUMBERFORMAT_INFO ); SvxNumberInfoItem aFormatter( pFormatter, dPreviewVal, String( PcrRes( RID_STR_TEXT_FORMAT ) ), SID_ATTR_NUMBERFORMAT_INFO );
aCoreSet.Put( aFormatter ); aCoreSet.Put( aFormatter );
// a tab dialog with a single page // a tab dialog with a single page
......
...@@ -238,6 +238,15 @@ namespace pcr ...@@ -238,6 +238,15 @@ namespace pcr
*/ */
void impl_fillQueryNames_throw( ::std::vector< ::rtl::OUString >& _out_rNames ) const; void impl_fillQueryNames_throw( ::std::vector< ::rtl::OUString >& _out_rNames ) const;
/** describes the UI for selecting a query name
@precond
m_xRowSetConnection is not <NULL/>
*/
void impl_fillQueryNames_throw( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& _xQueryNames
,::std::vector< ::rtl::OUString >& _out_rNames
,const ::rtl::OUString& _sName = ::rtl::OUString() ) const;
/** describes the UI for selecting a ListSource (for list-like form controls) /** describes the UI for selecting a ListSource (for list-like form controls)
@precond @precond
->m_xRowSetConnection is not <NULL/> ->m_xRowSetConnection is not <NULL/>
......
...@@ -64,3 +64,8 @@ String RID_EMBED_IMAGE_PLACEHOLDER ...@@ -64,3 +64,8 @@ String RID_EMBED_IMAGE_PLACEHOLDER
{ {
Text [ en-US ] = "<Embedded-Image>"; Text [ en-US ] = "<Embedded-Image>";
}; };
String RID_STR_TEXT_FORMAT
{
Text [ en-US ] = "Text";
};
...@@ -45,6 +45,7 @@ ...@@ -45,6 +45,7 @@
#define RID_STR_PROPPAGE_DEFAULT ( RID_PROPCONTROLLER_START + 1 ) #define RID_STR_PROPPAGE_DEFAULT ( RID_PROPCONTROLLER_START + 1 )
#define RID_STR_PROPPAGE_DATA ( RID_PROPCONTROLLER_START + 2 ) #define RID_STR_PROPPAGE_DATA ( RID_PROPCONTROLLER_START + 2 )
#define RID_STR_HELP_SECTION_LABEL ( RID_PROPCONTROLLER_START + 3 ) #define RID_STR_HELP_SECTION_LABEL ( RID_PROPCONTROLLER_START + 3 )
#define RID_EMBED_IMAGE_PLACEHOLDER ( RID_PROPCONTROLLER_START + 5 ) #define RID_EMBED_IMAGE_PLACEHOLDER ( RID_PROPCONTROLLER_START + 4 )
#define RID_STR_TEXT_FORMAT ( RID_PROPCONTROLLER_START + 5 )
#endif // EXTENSIONS_PROPRESID_HRC #endif // EXTENSIONS_PROPRESID_HRC
...@@ -44,6 +44,7 @@ ...@@ -44,6 +44,7 @@
#include <com/sun/star/util/Time.hpp> #include <com/sun/star/util/Time.hpp>
#include "modulepcr.hxx" #include "modulepcr.hxx"
#include "propresid.hrc" #include "propresid.hrc"
//............................................................................ //............................................................................
namespace pcr namespace pcr
{ {
...@@ -118,11 +119,44 @@ namespace pcr ...@@ -118,11 +119,44 @@ namespace pcr
getTypedControlWindow()->SetFormatKey( nFormatKey ); getTypedControlWindow()->SetFormatKey( nFormatKey );
SvNumberFormatter* pNF = getTypedControlWindow()->GetFormatter(); SvNumberFormatter* pNF = getTypedControlWindow()->GetFormatter();
getTypedControlWindow()->SetValue( getPreviewValue(pNF,getTypedControlWindow()->GetFormatKey()) ); const SvNumberformat* pEntry = pNF->GetEntry( nFormatKey );
OSL_ENSURE( pEntry, "OFormatSampleControl::setValue: invalid format entry!" );
const bool bIsTextFormat = ( pEntry && pEntry->IsTextFormat() );
if ( bIsTextFormat )
getTypedControlWindow()->SetText( String( PcrRes( RID_STR_TEXT_FORMAT ) ) );
else
getTypedControlWindow()->SetValue( pEntry ? getPreviewValue( *pEntry ) : 1234.56789 );
} }
else else
getTypedControlWindow()->SetText( String() ); getTypedControlWindow()->SetText( String() );
} }
//------------------------------------------------------------------
double OFormatSampleControl::getPreviewValue( const SvNumberformat& i_rEntry )
{
double nValue = 1234.56789;
switch ( i_rEntry.GetType() & ~NUMBERFORMAT_DEFINED )
{
case NUMBERFORMAT_DATE:
{
Date aCurrentDate;
static ::com::sun::star::util::Date STANDARD_DB_DATE(30,12,1899);
nValue = ::dbtools::DBTypeConversion::toDouble(::dbtools::DBTypeConversion::toDate(static_cast<sal_Int32>(aCurrentDate.GetDate())),STANDARD_DB_DATE);
}
break;
case NUMBERFORMAT_TIME:
case NUMBERFORMAT_DATETIME:
{
Time aCurrentTime;
nValue = ::dbtools::DBTypeConversion::toDouble(::dbtools::DBTypeConversion::toTime(aCurrentTime.GetTime()));
}
break;
default:
break;
}
return nValue;
}
//------------------------------------------------------------------ //------------------------------------------------------------------
double OFormatSampleControl::getPreviewValue(SvNumberFormatter* _pNF,sal_Int32 _nFormatKey) double OFormatSampleControl::getPreviewValue(SvNumberFormatter* _pNF,sal_Int32 _nFormatKey)
{ {
...@@ -130,27 +164,7 @@ namespace pcr ...@@ -130,27 +164,7 @@ namespace pcr
DBG_ASSERT( pEntry, "OFormattedNumericControl::SetFormatDescription: invalid format key!" ); DBG_ASSERT( pEntry, "OFormattedNumericControl::SetFormatDescription: invalid format key!" );
double nValue = 1234.56789; double nValue = 1234.56789;
if ( pEntry ) if ( pEntry )
{ nValue = getPreviewValue( *pEntry );
switch (pEntry->GetType() & ~NUMBERFORMAT_DEFINED)
{
case NUMBERFORMAT_DATE:
{
Date aCurrentDate;
static ::com::sun::star::util::Date STANDARD_DB_DATE(30,12,1899);
nValue = ::dbtools::DBTypeConversion::toDouble(::dbtools::DBTypeConversion::toDate(static_cast<sal_Int32>(aCurrentDate.GetDate())),STANDARD_DB_DATE);
}
break;
case NUMBERFORMAT_TIME:
case NUMBERFORMAT_DATETIME:
{
Time aCurrentTime;
nValue = ::dbtools::DBTypeConversion::toDouble(::dbtools::DBTypeConversion::toTime(aCurrentTime.GetTime()));
}
break;
default:
break;
}
}
return nValue; return nValue;
} }
//------------------------------------------------------------------ //------------------------------------------------------------------
......
...@@ -90,6 +90,9 @@ namespace pcr ...@@ -90,6 +90,9 @@ namespace pcr
* \return current date or time or the value 1234.56789 * \return current date or time or the value 1234.56789
*/ */
static double getPreviewValue(SvNumberFormatter* _pNF,sal_Int32 _nFormatKey); static double getPreviewValue(SvNumberFormatter* _pNF,sal_Int32 _nFormatKey);
private:
static double getPreviewValue( const SvNumberformat& i_rEntry );
}; };
//======================================================================== //========================================================================
......
...@@ -40,11 +40,10 @@ ...@@ -40,11 +40,10 @@
#include <com/sun/star/sdb/SQLContext.hpp> #include <com/sun/star/sdb/SQLContext.hpp>
#include <toolkit/controls/unocontrol.hxx> #include <toolkit/controls/unocontrol.hxx>
#ifndef _TOOLKIT_AWT_LISTENERMULTIPLEXER_HXX_
#include <toolkit/helper/listenermultiplexer.hxx> #include <toolkit/helper/listenermultiplexer.hxx>
#endif
#include <cppuhelper/implbase5.hxx> #include <cppuhelper/implbase5.hxx>
#include <comphelper/uno3.hxx> #include <comphelper/uno3.hxx>
#include <comphelper/componentcontext.hxx>
#include <cppuhelper/implbase4.hxx> #include <cppuhelper/implbase4.hxx>
#include <connectivity/sqlparse.hxx> #include <connectivity/sqlparse.hxx>
#include <svx/ParseContext.hxx> #include <svx/ParseContext.hxx>
...@@ -72,7 +71,7 @@ namespace frm ...@@ -72,7 +71,7 @@ namespace frm
{ {
TextListenerMultiplexer m_aTextListeners; TextListenerMultiplexer m_aTextListeners;
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xORB; ::comphelper::ComponentContext m_aContext;
::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xField; ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xField;
::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter > m_xFormatter; ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter > m_xFormatter;
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > m_xConnection; ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > m_xConnection;
......
...@@ -459,7 +459,7 @@ public class AgendaWizardDialogImpl extends AgendaWizardDialog ...@@ -459,7 +459,7 @@ public class AgendaWizardDialogImpl extends AgendaWizardDialog
running = false; running = false;
} }
public void finishWizard() { public boolean finishWizard() {
boolean bSaveSuccess = false; // pesimistic :( boolean bSaveSuccess = false; // pesimistic :(
XTextDocument xTextDocument; XTextDocument xTextDocument;
...@@ -480,7 +480,7 @@ public class AgendaWizardDialogImpl extends AgendaWizardDialog ...@@ -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); 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.... if (answer == 3) // user said: no, do not overwrite....
return; return false;
} }
agendaTemplate.xTextDocument.lockControllers(); agendaTemplate.xTextDocument.lockControllers();
...@@ -550,10 +550,11 @@ public class AgendaWizardDialogImpl extends AgendaWizardDialog ...@@ -550,10 +550,11 @@ public class AgendaWizardDialogImpl extends AgendaWizardDialog
} }
} else { } else {
agendaTemplate.xTextDocument.unlockControllers(); agendaTemplate.xTextDocument.unlockControllers();
return; return false;
} }
xDialog.endExecute(); xDialog.endExecute();
running = false; running = false;
return true;
} }
private void closeDocument() { private void closeDocument() {
......
...@@ -292,7 +292,7 @@ public class SQLQueryComposer ...@@ -292,7 +292,7 @@ public class SQLQueryComposer
return sFromClause; return sFromClause;
} }
public boolean setQueryCommand(String QueryName, XWindow _xParentWindow, boolean _bincludeGrouping, boolean _baddAliasFieldNames) public boolean setQueryCommand(XWindow _xParentWindow, boolean _bincludeGrouping, boolean _baddAliasFieldNames)
{ {
try try
{ {
......
...@@ -212,7 +212,7 @@ public class FaxWizardDialogImpl extends FaxWizardDialog ...@@ -212,7 +212,7 @@ public class FaxWizardDialogImpl extends FaxWizardDialog
running = false; running = false;
} }
public void finishWizard() public boolean finishWizard()
{ {
switchToStep(getCurrentStep(), getMaxStep()); switchToStep(getCurrentStep(), getMaxStep());
myFaxDoc.setWizardTemplateDocInfo(resources.resFaxWizardDialog_title, resources.resTemplateDescription); myFaxDoc.setWizardTemplateDocInfo(resources.resFaxWizardDialog_title, resources.resTemplateDescription);
...@@ -239,7 +239,7 @@ public class FaxWizardDialogImpl extends FaxWizardDialog ...@@ -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); 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.... if (answer == 3) // user said: no, do not overwrite....
{ {
return; return false;
} }
} }
} }
...@@ -297,7 +297,7 @@ public class FaxWizardDialogImpl extends FaxWizardDialog ...@@ -297,7 +297,7 @@ public class FaxWizardDialogImpl extends FaxWizardDialog
xDialog.endExecute(); xDialog.endExecute();
running = false; running = false;
} }
return true;
} }
public void closeDocument() public void closeDocument()
......
...@@ -308,7 +308,7 @@ public class FormWizard extends WizardDialog ...@@ -308,7 +308,7 @@ public class FormWizard extends WizardDialog
} }
// @Override // @Override
public void finishWizard() public boolean finishWizard()
{ {
int ncurStep = getCurrentStep(); int ncurStep = getCurrentStep();
if ((switchToStep(ncurStep, SOSTORE_PAGE)) || (ncurStep == SOSTORE_PAGE)) if ((switchToStep(ncurStep, SOSTORE_PAGE)) || (ncurStep == SOSTORE_PAGE))
...@@ -326,6 +326,7 @@ public class FormWizard extends WizardDialog ...@@ -326,6 +326,7 @@ public class FormWizard extends WizardDialog
{ {
bcreateForm = true; bcreateForm = true;
xDialog.endExecute(); xDialog.endExecute();
return true;
} }
} }
} }
...@@ -335,6 +336,7 @@ public class FormWizard extends WizardDialog ...@@ -335,6 +336,7 @@ public class FormWizard extends WizardDialog
showMessageBox("WarningBox", com.sun.star.awt.VclWindowPeerAttribute.OK, smessage); showMessageBox("WarningBox", com.sun.star.awt.VclWindowPeerAttribute.OK, smessage);
} }
} }
return false;
} }
// @Override // @Override
......
...@@ -253,7 +253,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog ...@@ -253,7 +253,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog
running = false; running = false;
} }
public void finishWizard() public boolean finishWizard()
{ {
switchToStep(getCurrentStep(), getMaxStep()); switchToStep(getCurrentStep(), getMaxStep());
try try
...@@ -279,7 +279,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog ...@@ -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); 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.... if (answer == 3) // user said: no, do not overwrite....
{ {
return; return false;
} }
} }
} }
...@@ -356,7 +356,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog ...@@ -356,7 +356,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog
xDialog.endExecute(); xDialog.endExecute();
running = false; running = false;
} }
return true;
} }
public void closeDocument() public void closeDocument()
......
...@@ -177,7 +177,7 @@ public class Finalizer ...@@ -177,7 +177,7 @@ public class Finalizer
{ {
CurDBMetaData.oSQLQueryComposer = new SQLQueryComposer(CurDBMetaData); CurDBMetaData.oSQLQueryComposer = new SQLQueryComposer(CurDBMetaData);
String queryname = getTitle(); String queryname = getTitle();
boolean bsuccess = CurDBMetaData.oSQLQueryComposer.setQueryCommand(queryname, CurUnoDialog.xWindow, true, true); boolean bsuccess = CurDBMetaData.oSQLQueryComposer.setQueryCommand(CurUnoDialog.xWindow, true, true);
if (bsuccess) if (bsuccess)
{ {
bsuccess = CurDBMetaData.createQuery(CurDBMetaData.oSQLQueryComposer, queryname); bsuccess = CurDBMetaData.createQuery(CurDBMetaData.oSQLQueryComposer, queryname);
......
...@@ -292,17 +292,16 @@ public class QueryWizard extends WizardDialog ...@@ -292,17 +292,16 @@ public class QueryWizard extends WizardDialog
} }
} }
public void finishWizard() public boolean finishWizard()
{ {
int ncurStep = getCurrentStep(); int ncurStep = getCurrentStep();
if ((switchToStep(ncurStep, SOSUMMARY_PAGE)) || (ncurStep == SOSUMMARY_PAGE)) if ( ( ncurStep == SOSUMMARY_PAGE )
|| ( switchToStep( ncurStep, SOSUMMARY_PAGE ) )
)
{ {
components = CurFinalizer.finish(); components = CurFinalizer.finish();
if ( components == null )
{
setControlProperty("btnWizardFinish", "Enabled", false);
}
} }
return ( components != null );
} }
protected void enterStep(int nOldStep, int nNewStep) protected void enterStep(int nOldStep, int nNewStep)
......
...@@ -329,7 +329,7 @@ public class ReportWizard extends WizardDialog implements XTextListener, XComple ...@@ -329,7 +329,7 @@ public class ReportWizard extends WizardDialog implements XTextListener, XComple
boolean bQueryCreated = false; boolean bQueryCreated = false;
if (this.CurDBCommandFieldSelection.getSelectedCommandType() == CommandType.TABLE) 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); CurReportDocument.setCommandType(CommandType.COMMAND);
String sQuery = CurReportDocument.getRecordParser().oSQLQueryComposer.getQuery(); String sQuery = CurReportDocument.getRecordParser().oSQLQueryComposer.getQuery();
...@@ -520,7 +520,7 @@ public class ReportWizard extends WizardDialog implements XTextListener, XComple ...@@ -520,7 +520,7 @@ public class ReportWizard extends WizardDialog implements XTextListener, XComple
enableNavigationButtons(false, false, false); enableNavigationButtons(false, false, false);
} }
public void finishWizard() public boolean finishWizard()
{ {
final int ncurStep = getCurrentStep(); final int ncurStep = getCurrentStep();
if ((switchToStep(ncurStep, SOSTOREPAGE)) || (ncurStep == SOSTOREPAGE)) if ((switchToStep(ncurStep, SOSTOREPAGE)) || (ncurStep == SOSTOREPAGE))
...@@ -532,9 +532,11 @@ public class ReportWizard extends WizardDialog implements XTextListener, XComple ...@@ -532,9 +532,11 @@ public class ReportWizard extends WizardDialog implements XTextListener, XComple
nReportMode = CurReportFinalizer.getReportOpenMode(); nReportMode = CurReportFinalizer.getReportOpenMode();
m_sReportName = CurReportFinalizer.getStoreName(); m_sReportName = CurReportFinalizer.getStoreName();
xDialog.endExecute(); xDialog.endExecute();
return true;
} }
} }
} }
return false;
} }
public void cancelWizard() public void cancelWizard()
......
...@@ -289,7 +289,7 @@ public class TableWizard extends WizardDialog implements XTextListener, XComplet ...@@ -289,7 +289,7 @@ public class TableWizard extends WizardDialog implements XTextListener, XComplet
return bIsSuccessfull; return bIsSuccessfull;
} }
public void finishWizard() public boolean finishWizard()
{ {
super.switchToStep(super.getCurrentStep(), SOFINALPAGE); super.switchToStep(super.getCurrentStep(), SOFINALPAGE);
tablename = curFinalizer.getTableName(curScenarioSelector.getFirstTableName()); tablename = curFinalizer.getTableName(curScenarioSelector.getFirstTableName());
...@@ -314,6 +314,7 @@ public class TableWizard extends WizardDialog implements XTextListener, XComplet ...@@ -314,6 +314,7 @@ public class TableWizard extends WizardDialog implements XTextListener, XComplet
components = curTableDescriptor.switchtoDataViewmode(curTableDescriptor.getComposedTableName(), com.sun.star.sdb.CommandType.TABLE, CurFrame); components = curTableDescriptor.switchtoDataViewmode(curTableDescriptor.getComposedTableName(), com.sun.star.sdb.CommandType.TABLE, CurFrame);
} }
super.xDialog.endExecute(); super.xDialog.endExecute();
return true;
} }
} }
else else
...@@ -323,6 +324,7 @@ public class TableWizard extends WizardDialog implements XTextListener, XComplet ...@@ -323,6 +324,7 @@ public class TableWizard extends WizardDialog implements XTextListener, XComplet
curFinalizer.setFocusToTableNameControl(); curFinalizer.setFocusToTableNameControl();
} }
} }
return false;
} }
private void callFormWizard() private void callFormWizard()
......
...@@ -685,7 +685,7 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL ...@@ -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. * 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 ...@@ -693,8 +693,18 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL
public void finishWizard_1() public void finishWizard_1()
{ {
enableFinishButton(false); enableFinishButton(false);
finishWizard(); boolean success = false;
removeTerminateListener(); try
{
success = finishWizard();
}
finally
{
if ( !success )
enableFinishButton( true );
}
if ( success )
removeTerminateListener();
} }
public int getMaximalStep() public int getMaximalStep()
......
...@@ -942,9 +942,10 @@ public abstract class WWD_Events extends WWD_Startup ...@@ -942,9 +942,10 @@ public abstract class WWD_Events extends WWD_Startup
/** /**
* the user clicks the finish/create button. * the user clicks the finish/create button.
*/ */
public void finishWizard() public boolean finishWizard()
{ {
finishWizard(true); finishWizard(true);
return true;
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment