2001-02-15 13:08:36 +00:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
2008-04-10 19:39:48 +00:00
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
2001-02-15 13:08:36 +00:00
|
|
|
*
|
2010-02-12 15:01:35 +01:00
|
|
|
* Copyright 2000, 2010 Oracle and/or its affiliates.
|
2001-02-15 13:08:36 +00:00
|
|
|
*
|
2008-04-10 19:39:48 +00:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2001-02-15 13:08:36 +00:00
|
|
|
*
|
2008-04-10 19:39:48 +00:00
|
|
|
* This file is part of OpenOffice.org.
|
2001-02-15 13:08:36 +00:00
|
|
|
*
|
2008-04-10 19:39:48 +00:00
|
|
|
* OpenOffice.org is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Lesser General Public License version 3
|
|
|
|
* only, as published by the Free Software Foundation.
|
2001-02-15 13:08:36 +00:00
|
|
|
*
|
2008-04-10 19:39:48 +00:00
|
|
|
* OpenOffice.org is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU Lesser General Public License version 3 for more details
|
|
|
|
* (a copy is included in the LICENSE file that accompanied this code).
|
2001-02-15 13:08:36 +00:00
|
|
|
*
|
2008-04-10 19:39:48 +00:00
|
|
|
* You should have received a copy of the GNU Lesser General Public License
|
|
|
|
* version 3 along with OpenOffice.org. If not, see
|
|
|
|
* <http://www.openoffice.org/license.html>
|
|
|
|
* for a copy of the LGPLv3 License.
|
2001-02-15 13:08:36 +00:00
|
|
|
*
|
|
|
|
************************************************************************/
|
|
|
|
|
2006-09-17 13:46:30 +00:00
|
|
|
// MARKER(update_precomp.py): autogen include statement, do not remove
|
|
|
|
#include "precompiled_svtools.hxx"
|
2007-06-27 20:29:43 +00:00
|
|
|
#include <svtools/wizardmachine.hxx>
|
|
|
|
#include <svtools/helpid.hrc>
|
2001-02-15 13:08:36 +00:00
|
|
|
#include <tools/debug.hxx>
|
2010-05-25 10:17:24 +02:00
|
|
|
#include <tools/diagnose_ex.h>
|
2001-02-15 13:08:36 +00:00
|
|
|
#include <vcl/msgbox.hxx>
|
2007-06-27 20:29:43 +00:00
|
|
|
#include <svtools/svtdata.hxx>
|
2001-02-15 13:08:36 +00:00
|
|
|
#ifndef _SVTOOLS_HRC
|
2010-04-09 11:05:09 +02:00
|
|
|
#include <svtools/svtools.hrc>
|
2001-02-15 13:08:36 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
//.........................................................................
|
|
|
|
namespace svt
|
|
|
|
{
|
|
|
|
//.........................................................................
|
|
|
|
|
2001-08-02 09:37:38 +00:00
|
|
|
//=====================================================================
|
|
|
|
//= WizardPageImplData
|
|
|
|
//=====================================================================
|
|
|
|
struct WizardPageImplData
|
|
|
|
{
|
|
|
|
WizardPageImplData()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2001-02-15 13:08:36 +00:00
|
|
|
//=====================================================================
|
|
|
|
//= OWizardPage
|
|
|
|
//=====================================================================
|
2001-02-23 07:21:21 +00:00
|
|
|
//---------------------------------------------------------------------
|
2007-05-22 18:33:44 +00:00
|
|
|
OWizardPage::OWizardPage( Window* _pParent, WinBits _nStyle )
|
2001-02-23 07:21:21 +00:00
|
|
|
:TabPage( _pParent, _nStyle )
|
2001-08-02 09:37:38 +00:00
|
|
|
,m_pImpl( new WizardPageImplData )
|
2001-02-23 07:21:21 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------
|
2007-05-22 18:33:44 +00:00
|
|
|
OWizardPage::OWizardPage( Window* _pParent, const ResId& _rResId )
|
2001-02-23 07:21:21 +00:00
|
|
|
:TabPage( _pParent, _rResId )
|
2001-08-02 09:37:38 +00:00
|
|
|
,m_pImpl( new WizardPageImplData )
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------
|
|
|
|
OWizardPage::~OWizardPage()
|
2001-02-23 07:21:21 +00:00
|
|
|
{
|
2001-08-02 09:37:38 +00:00
|
|
|
delete m_pImpl;
|
|
|
|
}
|
|
|
|
|
2001-02-15 13:08:36 +00:00
|
|
|
//---------------------------------------------------------------------
|
|
|
|
void OWizardPage::initializePage()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2001-02-23 07:21:21 +00:00
|
|
|
//---------------------------------------------------------------------
|
|
|
|
void OWizardPage::ActivatePage()
|
|
|
|
{
|
|
|
|
TabPage::ActivatePage();
|
2008-03-06 18:25:24 +00:00
|
|
|
updateDialogTravelUI();
|
2001-02-23 07:21:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------
|
2008-03-06 18:25:24 +00:00
|
|
|
void OWizardPage::updateDialogTravelUI()
|
2001-02-23 07:21:21 +00:00
|
|
|
{
|
2008-03-06 18:25:24 +00:00
|
|
|
OWizardMachine* pWizardMachine = dynamic_cast< OWizardMachine* >( GetParent() );
|
|
|
|
if ( pWizardMachine )
|
|
|
|
pWizardMachine->updateTravelUI();
|
2001-02-23 07:21:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------
|
2008-03-06 18:25:24 +00:00
|
|
|
bool OWizardPage::canAdvance() const
|
2001-02-23 07:21:21 +00:00
|
|
|
{
|
2008-03-06 18:25:24 +00:00
|
|
|
return true;
|
2001-02-23 07:21:21 +00:00
|
|
|
}
|
|
|
|
|
2001-02-15 13:08:36 +00:00
|
|
|
//---------------------------------------------------------------------
|
2010-05-25 10:17:24 +02:00
|
|
|
sal_Bool OWizardPage::commitPage( WizardTypes::CommitPageReason )
|
2001-02-15 13:08:36 +00:00
|
|
|
{
|
|
|
|
return sal_True;
|
|
|
|
}
|
|
|
|
|
2001-08-02 09:37:38 +00:00
|
|
|
//=====================================================================
|
|
|
|
//= WizardMachineImplData
|
|
|
|
//=====================================================================
|
2004-05-19 13:01:49 +00:00
|
|
|
struct WizardMachineImplData : public WizardTypes
|
2001-08-02 09:37:38 +00:00
|
|
|
{
|
|
|
|
String sTitleBase; // the base for the title
|
2004-05-19 13:01:49 +00:00
|
|
|
::std::stack< WizardState > aStateHistory; // the history of all states (used for implementing "Back")
|
2001-08-02 09:37:38 +00:00
|
|
|
|
2004-05-19 13:01:49 +00:00
|
|
|
WizardState nFirstUnknownPage;
|
2001-08-02 09:37:38 +00:00
|
|
|
// the WizardDialog does not allow non-linear transitions (e.g. it's
|
|
|
|
// not possible to add pages in a non-linear order), so we need some own maintainance data
|
|
|
|
|
2008-03-06 18:25:24 +00:00
|
|
|
sal_Bool m_bAutoNextButtonState;
|
2001-08-02 09:37:38 +00:00
|
|
|
|
2008-03-06 18:25:24 +00:00
|
|
|
bool m_bTravelingSuspended;
|
2005-03-11 09:42:17 +00:00
|
|
|
|
2001-08-02 09:37:38 +00:00
|
|
|
WizardMachineImplData()
|
|
|
|
:nFirstUnknownPage( 0 )
|
2008-03-06 18:25:24 +00:00
|
|
|
,m_bAutoNextButtonState( sal_False )
|
|
|
|
,m_bTravelingSuspended( false )
|
2001-08-02 09:37:38 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2004-10-27 12:23:37 +00:00
|
|
|
long OWizardMachine::calcRightHelpOffset(sal_uInt32 _nButtonFlags)
|
|
|
|
{
|
|
|
|
sal_Int32 nMask = 1;
|
|
|
|
sal_Int32 nRightAlignedButtonCount = -1;
|
2006-06-19 20:00:47 +00:00
|
|
|
for (unsigned int i = 0; i < 8*sizeof(_nButtonFlags); i++ )
|
2004-10-27 12:23:37 +00:00
|
|
|
{
|
|
|
|
if( ( _nButtonFlags & nMask ) != 0 )
|
|
|
|
nRightAlignedButtonCount++;
|
|
|
|
nMask <<= 1;
|
|
|
|
}
|
|
|
|
Size aSize = GetPageSizePixel();
|
|
|
|
sal_Int32 nTotButtonWidth = nRightAlignedButtonCount * LogicalCoordinateToPixel(50);
|
|
|
|
sal_Int32 nTotRightButtonSpaceOffset = (nRightAlignedButtonCount) * WIZARDDIALOG_BUTTON_STDOFFSET_X;
|
|
|
|
if ((_nButtonFlags & WZB_NEXT) && (_nButtonFlags & WZB_NEXT))
|
|
|
|
nTotRightButtonSpaceOffset = (nTotRightButtonSpaceOffset - WIZARDDIALOG_BUTTON_STDOFFSET_X) + WIZARDDIALOG_BUTTON_SMALLSTDOFFSET_X;
|
|
|
|
return aSize.Width() - nTotButtonWidth - nTotRightButtonSpaceOffset;
|
|
|
|
}
|
|
|
|
|
2001-02-15 13:08:36 +00:00
|
|
|
//=====================================================================
|
|
|
|
//= OWizardMachine
|
|
|
|
//=====================================================================
|
|
|
|
//---------------------------------------------------------------------
|
2008-03-06 18:25:24 +00:00
|
|
|
OWizardMachine::OWizardMachine(Window* _pParent, const ResId& _rRes, sal_uInt32 _nButtonFlags )
|
|
|
|
:WizardDialog( _pParent, _rRes )
|
2001-02-15 13:08:36 +00:00
|
|
|
,m_pFinish(NULL)
|
|
|
|
,m_pCancel(NULL)
|
|
|
|
,m_pNextPage(NULL)
|
|
|
|
,m_pPrevPage(NULL)
|
|
|
|
,m_pHelp(NULL)
|
2001-08-02 09:37:38 +00:00
|
|
|
,m_pImpl( new WizardMachineImplData )
|
2010-05-20 12:45:50 +02:00
|
|
|
{
|
|
|
|
implConstruct( _nButtonFlags );
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------
|
|
|
|
OWizardMachine::OWizardMachine(Window* _pParent, const WinBits i_nStyle, sal_uInt32 _nButtonFlags )
|
|
|
|
:WizardDialog( _pParent, i_nStyle )
|
|
|
|
,m_pFinish(NULL)
|
|
|
|
,m_pCancel(NULL)
|
|
|
|
,m_pNextPage(NULL)
|
|
|
|
,m_pPrevPage(NULL)
|
|
|
|
,m_pHelp(NULL)
|
|
|
|
,m_pImpl( new WizardMachineImplData )
|
|
|
|
{
|
|
|
|
implConstruct( _nButtonFlags );
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------
|
|
|
|
void OWizardMachine::implConstruct( const sal_uInt32 _nButtonFlags )
|
2001-02-15 13:08:36 +00:00
|
|
|
{
|
2001-08-02 09:37:38 +00:00
|
|
|
m_pImpl->sTitleBase = GetText();
|
2001-02-15 13:08:36 +00:00
|
|
|
|
|
|
|
// create the buttons according to the wizard button flags
|
2001-08-08 13:57:10 +00:00
|
|
|
// the help button
|
|
|
|
if (_nButtonFlags & WZB_HELP)
|
|
|
|
{
|
|
|
|
m_pHelp= new HelpButton(this, WB_TABSTOP);
|
|
|
|
m_pHelp->SetSizePixel( LogicToPixel( Size( 50, 14 ), MAP_APPFONT ) );
|
|
|
|
m_pHelp->Show();
|
2004-10-27 12:23:37 +00:00
|
|
|
AddButton( m_pHelp, WIZARDDIALOG_BUTTON_STDOFFSET_X);
|
2001-02-15 13:08:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// the previous button
|
|
|
|
if (_nButtonFlags & WZB_PREVIOUS)
|
|
|
|
{
|
|
|
|
m_pPrevPage = new PushButton(this, WB_TABSTOP);
|
2007-05-22 18:33:44 +00:00
|
|
|
m_pPrevPage->SetSmartHelpId( SmartId(HID_WIZARD_PREVIOUS) );
|
2001-02-15 13:08:36 +00:00
|
|
|
m_pPrevPage->SetSizePixel( LogicToPixel( Size( 50, 14 ), MAP_APPFONT ) );
|
|
|
|
m_pPrevPage->SetText(String(SvtResId(STR_WIZDLG_PREVIOUS)));
|
|
|
|
m_pPrevPage->Show();
|
|
|
|
|
|
|
|
if (_nButtonFlags & WZB_NEXT)
|
2004-10-27 12:23:37 +00:00
|
|
|
AddButton( m_pPrevPage, ( WIZARDDIALOG_BUTTON_SMALLSTDOFFSET_X) ); // half x-offset to the next button
|
2001-02-15 13:08:36 +00:00
|
|
|
else
|
|
|
|
AddButton( m_pPrevPage, WIZARDDIALOG_BUTTON_STDOFFSET_X );
|
|
|
|
SetPrevButton( m_pPrevPage );
|
|
|
|
m_pPrevPage->SetClickHdl( LINK( this, OWizardMachine, OnPrevPage ) );
|
|
|
|
}
|
|
|
|
|
|
|
|
// the next button
|
|
|
|
if (_nButtonFlags & WZB_NEXT)
|
|
|
|
{
|
|
|
|
m_pNextPage = new PushButton(this, WB_TABSTOP);
|
2007-05-22 18:33:44 +00:00
|
|
|
m_pNextPage->SetSmartHelpId( SmartId(HID_WIZARD_NEXT) );
|
2001-02-15 13:08:36 +00:00
|
|
|
m_pNextPage->SetSizePixel( LogicToPixel( Size( 50, 14 ), MAP_APPFONT ) );
|
|
|
|
m_pNextPage->SetText(String(SvtResId(STR_WIZDLG_NEXT)));
|
|
|
|
m_pNextPage->Show();
|
|
|
|
|
|
|
|
AddButton( m_pNextPage, WIZARDDIALOG_BUTTON_STDOFFSET_X );
|
|
|
|
SetNextButton( m_pNextPage );
|
|
|
|
m_pNextPage->SetClickHdl( LINK( this, OWizardMachine, OnNextPage ) );
|
|
|
|
}
|
|
|
|
|
|
|
|
// the finish button
|
|
|
|
if (_nButtonFlags & WZB_FINISH)
|
|
|
|
{
|
|
|
|
m_pFinish = new OKButton(this, WB_TABSTOP);
|
|
|
|
m_pFinish->SetSizePixel( LogicToPixel( Size( 50, 14 ), MAP_APPFONT ) );
|
|
|
|
m_pFinish->SetText(String(SvtResId(STR_WIZDLG_FINISH)));
|
|
|
|
m_pFinish->Show();
|
|
|
|
|
|
|
|
AddButton( m_pFinish, WIZARDDIALOG_BUTTON_STDOFFSET_X );
|
|
|
|
m_pFinish->SetClickHdl( LINK( this, OWizardMachine, OnFinish ) );
|
|
|
|
}
|
|
|
|
|
2004-10-27 12:23:37 +00:00
|
|
|
// the cancel button
|
|
|
|
if (_nButtonFlags & WZB_CANCEL)
|
|
|
|
{
|
|
|
|
m_pCancel = new CancelButton(this, WB_TABSTOP);
|
|
|
|
m_pCancel->SetSizePixel( LogicToPixel( Size( 50, 14 ), MAP_APPFONT ) );
|
|
|
|
m_pCancel->Show();
|
|
|
|
|
|
|
|
AddButton( m_pCancel, WIZARDDIALOG_BUTTON_STDOFFSET_X );
|
|
|
|
}
|
2001-02-15 13:08:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------
|
|
|
|
OWizardMachine::~OWizardMachine()
|
|
|
|
{
|
|
|
|
delete m_pFinish;
|
|
|
|
delete m_pCancel;
|
|
|
|
delete m_pNextPage;
|
|
|
|
delete m_pPrevPage;
|
|
|
|
delete m_pHelp;
|
|
|
|
|
2004-05-19 13:01:49 +00:00
|
|
|
for (WizardState i=0; i<m_pImpl->nFirstUnknownPage; ++i)
|
2001-02-15 13:08:36 +00:00
|
|
|
delete GetPage(i);
|
2001-08-02 09:37:38 +00:00
|
|
|
|
|
|
|
delete m_pImpl;
|
2001-02-15 13:08:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------
|
|
|
|
void OWizardMachine::implUpdateTitle()
|
|
|
|
{
|
2001-08-02 09:37:38 +00:00
|
|
|
String sCompleteTitle(m_pImpl->sTitleBase);
|
|
|
|
|
2008-03-06 18:25:24 +00:00
|
|
|
// append the page title
|
|
|
|
TabPage* pCurrentPage = GetPage(getCurrentState());
|
|
|
|
if ( pCurrentPage && pCurrentPage->GetText().Len() )
|
2001-08-02 09:37:38 +00:00
|
|
|
{
|
2008-03-06 18:25:24 +00:00
|
|
|
sCompleteTitle += String::CreateFromAscii(" - ");
|
|
|
|
sCompleteTitle += pCurrentPage->GetText();
|
2001-08-02 09:37:38 +00:00
|
|
|
}
|
|
|
|
|
2008-03-06 18:25:24 +00:00
|
|
|
SetText(sCompleteTitle);
|
2001-08-02 09:37:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------
|
|
|
|
const String& OWizardMachine::getTitleBase() const
|
|
|
|
{
|
|
|
|
return m_pImpl->sTitleBase;
|
|
|
|
}
|
|
|
|
|
2001-02-15 13:08:36 +00:00
|
|
|
//---------------------------------------------------------------------
|
|
|
|
void OWizardMachine::setTitleBase(const String& _rTitleBase)
|
|
|
|
{
|
2001-08-02 09:37:38 +00:00
|
|
|
m_pImpl->sTitleBase = _rTitleBase;
|
2001-02-15 13:08:36 +00:00
|
|
|
implUpdateTitle();
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------
|
2010-05-20 12:45:50 +02:00
|
|
|
TabPage* OWizardMachine::GetOrCreatePage( const WizardState i_nState )
|
2001-02-15 13:08:36 +00:00
|
|
|
{
|
2010-05-20 12:45:50 +02:00
|
|
|
if ( NULL == GetPage( i_nState ) )
|
2001-02-15 13:08:36 +00:00
|
|
|
{
|
2010-05-20 12:45:50 +02:00
|
|
|
TabPage* pNewPage = createPage( i_nState );
|
|
|
|
DBG_ASSERT( pNewPage, "OWizardMachine::GetOrCreatePage: invalid new page (NULL)!" );
|
2001-02-15 13:08:36 +00:00
|
|
|
|
|
|
|
// fill up the page sequence of our base class (with dummies)
|
2010-05-20 12:45:50 +02:00
|
|
|
while ( m_pImpl->nFirstUnknownPage < i_nState )
|
2001-02-15 13:08:36 +00:00
|
|
|
{
|
2010-05-20 12:45:50 +02:00
|
|
|
AddPage( NULL );
|
2001-08-02 09:37:38 +00:00
|
|
|
++m_pImpl->nFirstUnknownPage;
|
2001-02-15 13:08:36 +00:00
|
|
|
}
|
|
|
|
|
2010-05-20 12:45:50 +02:00
|
|
|
if ( m_pImpl->nFirstUnknownPage == i_nState )
|
2001-02-15 13:08:36 +00:00
|
|
|
{
|
|
|
|
// encountered this page number the first time
|
2010-05-20 12:45:50 +02:00
|
|
|
AddPage( pNewPage );
|
2001-08-02 09:37:38 +00:00
|
|
|
++m_pImpl->nFirstUnknownPage;
|
2001-02-15 13:08:36 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
// already had this page - just change it
|
2010-05-20 12:45:50 +02:00
|
|
|
SetPage( i_nState, pNewPage );
|
2001-02-15 13:08:36 +00:00
|
|
|
}
|
2010-05-20 12:45:50 +02:00
|
|
|
return GetPage( i_nState );
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------
|
|
|
|
void OWizardMachine::ActivatePage()
|
|
|
|
{
|
|
|
|
WizardDialog::ActivatePage();
|
|
|
|
|
|
|
|
WizardState nCurrentLevel = GetCurLevel();
|
|
|
|
GetOrCreatePage( nCurrentLevel );
|
2001-02-15 13:08:36 +00:00
|
|
|
|
2010-05-20 12:45:50 +02:00
|
|
|
enterState( nCurrentLevel );
|
2001-02-15 13:08:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------
|
|
|
|
long OWizardMachine::DeactivatePage()
|
|
|
|
{
|
2004-05-19 13:01:49 +00:00
|
|
|
WizardState nCurrentState = getCurrentState();
|
2001-02-15 13:08:36 +00:00
|
|
|
if (!leaveState(nCurrentState) || !WizardDialog::DeactivatePage())
|
|
|
|
return sal_False;
|
|
|
|
return sal_True;
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------
|
|
|
|
void OWizardMachine::defaultButton(sal_uInt32 _nWizardButtonFlags)
|
|
|
|
{
|
|
|
|
// the new default button
|
|
|
|
PushButton* pNewDefButton = NULL;
|
|
|
|
if (m_pFinish && (_nWizardButtonFlags & WZB_FINISH))
|
|
|
|
pNewDefButton = m_pFinish;
|
|
|
|
if (m_pNextPage && (_nWizardButtonFlags & WZB_NEXT))
|
|
|
|
pNewDefButton = m_pNextPage;
|
|
|
|
if (m_pPrevPage && (_nWizardButtonFlags & WZB_PREVIOUS))
|
|
|
|
pNewDefButton = m_pPrevPage;
|
|
|
|
if (m_pHelp && (_nWizardButtonFlags & WZB_HELP))
|
|
|
|
pNewDefButton = m_pHelp;
|
|
|
|
if (m_pCancel && (_nWizardButtonFlags & WZB_CANCEL))
|
|
|
|
pNewDefButton = m_pCancel;
|
|
|
|
|
|
|
|
if (pNewDefButton)
|
|
|
|
defaultButton(pNewDefButton);
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------
|
|
|
|
void OWizardMachine::implResetDefault(Window* _pWindow)
|
|
|
|
{
|
|
|
|
Window* pChildLoop = _pWindow->GetWindow(WINDOW_FIRSTCHILD);
|
|
|
|
while (pChildLoop)
|
|
|
|
{
|
|
|
|
// does the window participate in the tabbing order?
|
|
|
|
if (pChildLoop->GetStyle() & WB_DIALOGCONTROL)
|
|
|
|
implResetDefault(pChildLoop);
|
|
|
|
|
|
|
|
// is it a button?
|
|
|
|
WindowType eType = pChildLoop->GetType();
|
|
|
|
if ( (WINDOW_BUTTON == eType)
|
|
|
|
|| (WINDOW_PUSHBUTTON == eType)
|
|
|
|
|| (WINDOW_OKBUTTON == eType)
|
|
|
|
|| (WINDOW_CANCELBUTTON == eType)
|
|
|
|
|| (WINDOW_HELPBUTTON == eType)
|
|
|
|
|| (WINDOW_IMAGEBUTTON == eType)
|
|
|
|
|| (WINDOW_MENUBUTTON == eType)
|
|
|
|
|| (WINDOW_MOREBUTTON == eType)
|
|
|
|
)
|
|
|
|
{
|
|
|
|
pChildLoop->SetStyle(pChildLoop->GetStyle() & ~WB_DEFBUTTON);
|
|
|
|
}
|
|
|
|
|
|
|
|
// the next one ...
|
|
|
|
pChildLoop = pChildLoop->GetWindow(WINDOW_NEXT);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------
|
|
|
|
void OWizardMachine::defaultButton(PushButton* _pNewDefButton)
|
|
|
|
{
|
|
|
|
// loop through all (direct and indirect) descendants which participate in our tabbing order, and
|
|
|
|
// reset the WB_DEFBUTTON for every window which is a button
|
|
|
|
implResetDefault(this);
|
|
|
|
|
|
|
|
// set it's new style
|
|
|
|
if (_pNewDefButton)
|
|
|
|
_pNewDefButton->SetStyle(_pNewDefButton->GetStyle() | WB_DEFBUTTON);
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------
|
|
|
|
void OWizardMachine::enableButtons(sal_uInt32 _nWizardButtonFlags, sal_Bool _bEnable)
|
|
|
|
{
|
|
|
|
if (m_pFinish && (_nWizardButtonFlags & WZB_FINISH))
|
|
|
|
m_pFinish->Enable(_bEnable);
|
|
|
|
if (m_pNextPage && (_nWizardButtonFlags & WZB_NEXT))
|
|
|
|
m_pNextPage->Enable(_bEnable);
|
|
|
|
if (m_pPrevPage && (_nWizardButtonFlags & WZB_PREVIOUS))
|
|
|
|
m_pPrevPage->Enable(_bEnable);
|
|
|
|
if (m_pHelp && (_nWizardButtonFlags & WZB_HELP))
|
|
|
|
m_pHelp->Enable(_bEnable);
|
|
|
|
if (m_pCancel && (_nWizardButtonFlags & WZB_CANCEL))
|
|
|
|
m_pCancel->Enable(_bEnable);
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------
|
2004-05-19 13:01:49 +00:00
|
|
|
void OWizardMachine::enterState(WizardState _nState)
|
2001-02-15 13:08:36 +00:00
|
|
|
{
|
|
|
|
// tell the page
|
2010-05-25 10:17:24 +02:00
|
|
|
IWizardPageController* pController = getPageController( GetPage( _nState ) );
|
|
|
|
OSL_ENSURE( pController, "OWizardMachine::enterState: no controller for the given page!" );
|
|
|
|
if ( pController )
|
|
|
|
pController->initializePage();
|
2001-02-15 13:08:36 +00:00
|
|
|
|
2008-03-06 18:25:24 +00:00
|
|
|
if ( isAutomaticNextButtonStateEnabled() )
|
|
|
|
enableButtons( WZB_NEXT, canAdvance() );
|
|
|
|
|
|
|
|
enableButtons( WZB_PREVIOUS, !m_pImpl->aStateHistory.empty() );
|
2004-08-02 13:37:20 +00:00
|
|
|
|
2001-02-15 13:08:36 +00:00
|
|
|
// set the new title - it depends on the current page (i.e. state)
|
|
|
|
implUpdateTitle();
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------
|
2006-06-19 20:00:47 +00:00
|
|
|
sal_Bool OWizardMachine::leaveState(WizardState)
|
2001-02-15 13:08:36 +00:00
|
|
|
{
|
|
|
|
// no need to ask the page here.
|
|
|
|
// If we reach this point, we already gave the current page the chance to commit it's data,
|
|
|
|
// and it was allowed to commit it's data
|
|
|
|
|
|
|
|
return sal_True;
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------
|
2010-05-25 11:43:39 +02:00
|
|
|
sal_Bool OWizardMachine::onFinish()
|
2001-02-15 13:08:36 +00:00
|
|
|
{
|
2010-05-25 11:43:39 +02:00
|
|
|
return Finnish( RET_OK );
|
2001-02-15 13:08:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------
|
2006-06-19 20:00:47 +00:00
|
|
|
IMPL_LINK(OWizardMachine, OnFinish, PushButton*, EMPTYARG)
|
2001-02-15 13:08:36 +00:00
|
|
|
{
|
2008-03-06 18:25:24 +00:00
|
|
|
if ( isTravelingSuspended() )
|
2005-03-11 09:42:17 +00:00
|
|
|
return 0;
|
2008-03-06 18:25:24 +00:00
|
|
|
WizardTravelSuspension aTravelGuard( *this );
|
2004-05-19 13:01:49 +00:00
|
|
|
if ( !prepareLeaveCurrentState( eFinish ) )
|
2005-03-11 09:42:17 +00:00
|
|
|
{
|
2001-02-15 13:08:36 +00:00
|
|
|
return 0L;
|
2005-03-11 09:42:17 +00:00
|
|
|
}
|
2010-05-25 11:43:39 +02:00
|
|
|
return onFinish() ? 1L : 0L;
|
2001-02-15 13:08:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------
|
2008-03-06 18:25:24 +00:00
|
|
|
OWizardMachine::WizardState OWizardMachine::determineNextState( WizardState _nCurrentState ) const
|
2001-02-15 13:08:36 +00:00
|
|
|
{
|
|
|
|
return _nCurrentState + 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------
|
2004-05-19 13:01:49 +00:00
|
|
|
sal_Bool OWizardMachine::prepareLeaveCurrentState( CommitPageReason _eReason )
|
2001-02-15 13:08:36 +00:00
|
|
|
{
|
2010-05-25 10:17:24 +02:00
|
|
|
IWizardPageController* pController = getPageController( GetPage( getCurrentState() ) );
|
|
|
|
ENSURE_OR_RETURN( pController != NULL, "OWizardMachine::prepareLeaveCurrentState: no controller for the current page!", sal_True );
|
|
|
|
return pController->commitPage( _eReason );
|
2004-05-19 13:01:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------
|
|
|
|
sal_Bool OWizardMachine::skipBackwardUntil( WizardState _nTargetState )
|
|
|
|
{
|
|
|
|
// alowed to leave the current page?
|
|
|
|
if ( !prepareLeaveCurrentState( eTravelBackward ) )
|
|
|
|
return sal_False;
|
|
|
|
|
|
|
|
// don't travel directly on m_pImpl->aStateHistory, in case something goes wrong
|
|
|
|
::std::stack< WizardState > aTravelVirtually = m_pImpl->aStateHistory;
|
2004-10-27 12:23:37 +00:00
|
|
|
::std::stack< WizardState > aOldStateHistory = m_pImpl->aStateHistory;
|
2004-05-19 13:01:49 +00:00
|
|
|
|
|
|
|
WizardState nCurrentRollbackState = getCurrentState();
|
|
|
|
while ( nCurrentRollbackState != _nTargetState )
|
|
|
|
{
|
|
|
|
DBG_ASSERT( !aTravelVirtually.empty(), "OWizardMachine::skipBackwardUntil: this target state does not exist in the history!" );
|
|
|
|
nCurrentRollbackState = aTravelVirtually.top();
|
|
|
|
aTravelVirtually.pop();
|
|
|
|
}
|
2004-10-27 12:23:37 +00:00
|
|
|
m_pImpl->aStateHistory = aTravelVirtually;
|
2004-05-19 13:01:49 +00:00
|
|
|
if ( !ShowPage( _nTargetState ) )
|
2004-10-27 12:23:37 +00:00
|
|
|
{
|
|
|
|
m_pImpl->aStateHistory = aOldStateHistory;
|
2004-05-19 13:01:49 +00:00
|
|
|
return sal_False;
|
2004-10-27 12:23:37 +00:00
|
|
|
}
|
2004-05-19 13:01:49 +00:00
|
|
|
return sal_True;
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------
|
|
|
|
sal_Bool OWizardMachine::skipUntil( WizardState _nTargetState )
|
|
|
|
{
|
2004-09-20 12:38:16 +00:00
|
|
|
WizardState nCurrentState = getCurrentState();
|
|
|
|
|
2004-05-19 13:01:49 +00:00
|
|
|
// alowed to leave the current page?
|
2004-09-20 12:38:16 +00:00
|
|
|
if ( !prepareLeaveCurrentState( nCurrentState < _nTargetState ? eTravelForward : eTravelBackward ) )
|
2004-05-19 13:01:49 +00:00
|
|
|
return sal_False;
|
|
|
|
|
|
|
|
// don't travel directly on m_pImpl->aStateHistory, in case something goes wrong
|
|
|
|
::std::stack< WizardState > aTravelVirtually = m_pImpl->aStateHistory;
|
2004-10-27 12:23:37 +00:00
|
|
|
::std::stack< WizardState > aOldStateHistory = m_pImpl->aStateHistory;
|
2004-05-19 13:01:49 +00:00
|
|
|
while ( nCurrentState != _nTargetState )
|
|
|
|
{
|
|
|
|
WizardState nNextState = determineNextState( nCurrentState );
|
|
|
|
if ( WZS_INVALID_STATE == nNextState )
|
|
|
|
{
|
|
|
|
DBG_ERROR( "OWizardMachine::skipUntil: the given target state does not exist!" );
|
|
|
|
return sal_False;
|
|
|
|
}
|
|
|
|
|
|
|
|
// remember the skipped state in the history
|
|
|
|
aTravelVirtually.push( nCurrentState );
|
|
|
|
|
|
|
|
// get the next state
|
|
|
|
nCurrentState = nNextState;
|
|
|
|
}
|
2004-10-27 12:23:37 +00:00
|
|
|
m_pImpl->aStateHistory = aTravelVirtually;
|
2004-05-19 13:01:49 +00:00
|
|
|
// show the target page
|
|
|
|
if ( !ShowPage( nCurrentState ) )
|
|
|
|
{
|
|
|
|
// argh! prepareLeaveCurrentPage succeeded, determineNextState succeeded,
|
|
|
|
// but ShowPage doesn't? Somebody behaves very strange here ....
|
|
|
|
DBG_ERROR( "OWizardMachine::skipUntil: very unpolite ...." );
|
2004-10-27 12:23:37 +00:00
|
|
|
m_pImpl->aStateHistory = aOldStateHistory;
|
2004-05-19 13:01:49 +00:00
|
|
|
return sal_False;
|
|
|
|
}
|
2001-02-15 13:08:36 +00:00
|
|
|
return sal_True;
|
|
|
|
}
|
|
|
|
|
2001-02-23 07:21:21 +00:00
|
|
|
//---------------------------------------------------------------------
|
|
|
|
sal_Bool OWizardMachine::skip(sal_Int32 _nSteps)
|
|
|
|
{
|
|
|
|
DBG_ASSERT(_nSteps > 0, "OWizardMachine::skip: invalid number of steps!");
|
|
|
|
// alowed to leave the current page?
|
2004-05-19 13:01:49 +00:00
|
|
|
if ( !prepareLeaveCurrentState( eTravelForward ) )
|
2001-02-23 07:21:21 +00:00
|
|
|
return sal_False;
|
|
|
|
|
2004-05-19 13:01:49 +00:00
|
|
|
WizardState nCurrentState = getCurrentState();
|
|
|
|
WizardState nNextState = determineNextState(nCurrentState);
|
2001-02-23 07:21:21 +00:00
|
|
|
// loop _nSteps steps
|
|
|
|
while (_nSteps-- > 0)
|
|
|
|
{
|
|
|
|
if (WZS_INVALID_STATE == nNextState)
|
|
|
|
return sal_False;
|
|
|
|
|
|
|
|
// remember the skipped state in the history
|
2001-08-02 09:37:38 +00:00
|
|
|
m_pImpl->aStateHistory.push(nCurrentState);
|
2001-02-23 07:21:21 +00:00
|
|
|
|
|
|
|
// get the next state
|
|
|
|
nCurrentState = nNextState;
|
|
|
|
nNextState = determineNextState(nCurrentState);
|
|
|
|
}
|
|
|
|
|
|
|
|
// show the (n+1)th page
|
2001-02-23 09:55:00 +00:00
|
|
|
if (!ShowPage(nCurrentState))
|
2001-02-23 07:21:21 +00:00
|
|
|
{
|
|
|
|
// TODO: this leaves us in a state where we have no current page and an inconsistent state history.
|
|
|
|
// Perhaps we should rollback the skipping here ....
|
|
|
|
DBG_ERROR("OWizardMachine::skip: very unpolite ....");
|
|
|
|
// if somebody does a skip and then does not allow to leave ...
|
|
|
|
// (can't be a commit error, as we've already committed the current page. So if ShowPage fails here,
|
|
|
|
// somebody behaves really strange ...)
|
|
|
|
return sal_False;
|
|
|
|
}
|
|
|
|
|
|
|
|
// all fine
|
|
|
|
return sal_True;
|
|
|
|
}
|
|
|
|
|
2001-02-15 13:08:36 +00:00
|
|
|
//---------------------------------------------------------------------
|
|
|
|
sal_Bool OWizardMachine::travelNext()
|
|
|
|
{
|
2004-05-19 13:01:49 +00:00
|
|
|
// allowed to leave the current page?
|
|
|
|
if ( !prepareLeaveCurrentState( eTravelForward ) )
|
2001-02-15 13:08:36 +00:00
|
|
|
return sal_False;
|
|
|
|
|
|
|
|
// determine the next state to travel to
|
2004-05-19 13:01:49 +00:00
|
|
|
WizardState nCurrentState = getCurrentState();
|
|
|
|
WizardState nNextState = determineNextState(nCurrentState);
|
2001-02-15 13:08:36 +00:00
|
|
|
if (WZS_INVALID_STATE == nNextState)
|
|
|
|
return sal_False;
|
|
|
|
|
2004-08-02 13:37:20 +00:00
|
|
|
// the state history is used by the enterState method
|
|
|
|
// all fine
|
|
|
|
m_pImpl->aStateHistory.push(nCurrentState);
|
2001-02-15 13:08:36 +00:00
|
|
|
if (!ShowPage(nNextState))
|
2004-08-02 13:37:20 +00:00
|
|
|
{
|
|
|
|
m_pImpl->aStateHistory.pop();
|
2001-02-15 13:08:36 +00:00
|
|
|
return sal_False;
|
2004-08-02 13:37:20 +00:00
|
|
|
}
|
2001-02-15 13:08:36 +00:00
|
|
|
|
|
|
|
return sal_True;
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------
|
|
|
|
sal_Bool OWizardMachine::travelPrevious()
|
|
|
|
{
|
2001-08-02 09:37:38 +00:00
|
|
|
DBG_ASSERT(m_pImpl->aStateHistory.size() > 0, "OWizardMachine::travelPrevious: have no previous page!");
|
2001-02-15 13:08:36 +00:00
|
|
|
|
|
|
|
// alowed to leave the current page?
|
2004-05-19 13:01:49 +00:00
|
|
|
if ( !prepareLeaveCurrentState( eTravelBackward ) )
|
2001-02-15 13:08:36 +00:00
|
|
|
return sal_False;
|
|
|
|
|
|
|
|
// the next state to switch to
|
2004-05-19 13:01:49 +00:00
|
|
|
WizardState nPreviousState = m_pImpl->aStateHistory.top();
|
2001-02-15 13:08:36 +00:00
|
|
|
|
2004-08-02 13:37:20 +00:00
|
|
|
// the state history is used by the enterState method
|
|
|
|
m_pImpl->aStateHistory.pop();
|
2001-02-15 13:08:36 +00:00
|
|
|
// show this page
|
|
|
|
if (!ShowPage(nPreviousState))
|
2004-08-02 13:37:20 +00:00
|
|
|
{
|
|
|
|
m_pImpl->aStateHistory.push(nPreviousState);
|
2001-02-15 13:08:36 +00:00
|
|
|
return sal_False;
|
2004-08-02 13:37:20 +00:00
|
|
|
}
|
2001-02-15 13:08:36 +00:00
|
|
|
|
|
|
|
// all fine
|
|
|
|
return sal_True;
|
|
|
|
}
|
|
|
|
|
2004-09-20 12:38:16 +00:00
|
|
|
//---------------------------------------------------------------------
|
|
|
|
void OWizardMachine::removePageFromHistory( WizardState nToRemove )
|
|
|
|
{
|
|
|
|
|
|
|
|
::std::stack< WizardState > aTemp;
|
|
|
|
while(!m_pImpl->aStateHistory.empty())
|
|
|
|
{
|
|
|
|
WizardState nPreviousState = m_pImpl->aStateHistory.top();
|
|
|
|
m_pImpl->aStateHistory.pop();
|
|
|
|
if(nPreviousState != nToRemove)
|
|
|
|
aTemp.push( nPreviousState );
|
|
|
|
else
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
while(!aTemp.empty())
|
|
|
|
{
|
|
|
|
m_pImpl->aStateHistory.push( aTemp.top() );
|
|
|
|
aTemp.pop();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-03-06 18:25:24 +00:00
|
|
|
//---------------------------------------------------------------------
|
|
|
|
void OWizardMachine::enableAutomaticNextButtonState( bool _bEnable )
|
|
|
|
{
|
|
|
|
m_pImpl->m_bAutoNextButtonState = _bEnable;
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------
|
|
|
|
bool OWizardMachine::isAutomaticNextButtonStateEnabled() const
|
|
|
|
{
|
|
|
|
return m_pImpl->m_bAutoNextButtonState;
|
|
|
|
}
|
|
|
|
|
2001-02-15 13:08:36 +00:00
|
|
|
//---------------------------------------------------------------------
|
2006-06-19 20:00:47 +00:00
|
|
|
IMPL_LINK(OWizardMachine, OnPrevPage, PushButton*, EMPTYARG)
|
2001-02-15 13:08:36 +00:00
|
|
|
{
|
2008-03-06 18:25:24 +00:00
|
|
|
if ( isTravelingSuspended() )
|
2005-03-11 09:42:17 +00:00
|
|
|
return 0;
|
2008-03-06 18:25:24 +00:00
|
|
|
WizardTravelSuspension aTravelGuard( *this );
|
2005-03-11 09:42:17 +00:00
|
|
|
sal_Int32 nRet = travelPrevious();
|
|
|
|
return nRet;
|
2001-02-15 13:08:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------
|
2006-06-19 20:00:47 +00:00
|
|
|
IMPL_LINK(OWizardMachine, OnNextPage, PushButton*, EMPTYARG)
|
2001-02-15 13:08:36 +00:00
|
|
|
{
|
2008-03-06 18:25:24 +00:00
|
|
|
if ( isTravelingSuspended() )
|
2005-03-11 09:42:17 +00:00
|
|
|
return 0;
|
2008-03-06 18:25:24 +00:00
|
|
|
WizardTravelSuspension aTravelGuard( *this );
|
2005-03-11 09:42:17 +00:00
|
|
|
sal_Int32 nRet = travelNext();
|
|
|
|
return nRet;
|
2001-02-15 13:08:36 +00:00
|
|
|
}
|
2008-03-06 18:25:24 +00:00
|
|
|
|
2004-08-02 13:37:20 +00:00
|
|
|
//---------------------------------------------------------------------
|
2010-05-25 10:17:24 +02:00
|
|
|
IWizardPageController* OWizardMachine::getPageController( TabPage* _pCurrentPage ) const
|
2004-08-02 13:37:20 +00:00
|
|
|
{
|
2010-05-25 10:17:24 +02:00
|
|
|
IWizardPageController* pController = dynamic_cast< IWizardPageController* >( _pCurrentPage );
|
|
|
|
return pController;
|
2004-08-02 13:37:20 +00:00
|
|
|
}
|
2005-03-11 09:42:17 +00:00
|
|
|
|
2008-06-06 13:29:15 +00:00
|
|
|
//---------------------------------------------------------------------
|
|
|
|
void OWizardMachine::getStateHistory( ::std::vector< WizardState >& _out_rHistory )
|
|
|
|
{
|
|
|
|
::std::stack< WizardState > aHistoryCopy( m_pImpl->aStateHistory );
|
|
|
|
while ( !aHistoryCopy.empty() )
|
|
|
|
{
|
|
|
|
_out_rHistory.push_back( aHistoryCopy.top() );
|
|
|
|
aHistoryCopy.pop();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-03-06 18:25:24 +00:00
|
|
|
//---------------------------------------------------------------------
|
|
|
|
bool OWizardMachine::canAdvance() const
|
2005-03-11 09:42:17 +00:00
|
|
|
{
|
2008-03-06 18:25:24 +00:00
|
|
|
return WZS_INVALID_STATE != determineNextState( getCurrentState() );
|
2005-03-11 09:42:17 +00:00
|
|
|
}
|
|
|
|
|
2008-03-06 18:25:24 +00:00
|
|
|
//---------------------------------------------------------------------
|
|
|
|
void OWizardMachine::updateTravelUI()
|
|
|
|
{
|
2010-05-25 10:17:24 +02:00
|
|
|
const IWizardPageController* pController = getPageController( GetPage( getCurrentState() ) );
|
|
|
|
OSL_ENSURE( pController != NULL, "RoadmapWizard::updateTravelUI: no controller for the current page!" );
|
2008-03-06 18:25:24 +00:00
|
|
|
|
|
|
|
bool bCanAdvance =
|
2010-05-25 10:17:24 +02:00
|
|
|
( !pController || pController->canAdvance() ) // the current page allows to advance
|
|
|
|
&& canAdvance(); // the dialog as a whole allows to advance
|
2008-03-06 18:25:24 +00:00
|
|
|
enableButtons( WZB_NEXT, bCanAdvance );
|
|
|
|
}
|
2005-03-11 09:42:17 +00:00
|
|
|
|
2008-03-06 18:25:24 +00:00
|
|
|
//---------------------------------------------------------------------
|
|
|
|
bool OWizardMachine::isTravelingSuspended() const
|
|
|
|
{
|
|
|
|
return m_pImpl->m_bTravelingSuspended;
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------
|
|
|
|
void OWizardMachine::suspendTraveling( AccessGuard )
|
|
|
|
{
|
|
|
|
DBG_ASSERT( !m_pImpl->m_bTravelingSuspended, "OWizardMachine::suspendTraveling: already suspended!" );
|
|
|
|
m_pImpl->m_bTravelingSuspended = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------
|
|
|
|
void OWizardMachine::resumeTraveling( AccessGuard )
|
2005-03-11 09:42:17 +00:00
|
|
|
{
|
2008-03-06 18:25:24 +00:00
|
|
|
DBG_ASSERT( m_pImpl->m_bTravelingSuspended, "OWizardMachine::resumeTraveling: nothing to resume!" );
|
|
|
|
m_pImpl->m_bTravelingSuspended = false;
|
2005-03-11 09:42:17 +00:00
|
|
|
}
|
2001-02-15 13:08:36 +00:00
|
|
|
|
|
|
|
//.........................................................................
|
|
|
|
} // namespace svt
|
|
|
|
//.........................................................................
|