diff options
author | Noel Grandin <noel@peralex.com> | 2015-04-22 11:36:48 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-04-29 10:41:37 +0200 |
commit | aaa1861c49bf2549e1bddc461961871ac102a83d (patch) | |
tree | 5ed83702976b886b25484bdbb2465e03ec2ba19d /dbaccess/source/ui/dlg | |
parent | f6d4cd396803f568ca667ed5e4d7725ade99b5df (diff) |
convert WZB_ constants to scoped enum
Change-Id: If2f12ea54b57f32df23fc22fb8be0aa3c6f2e76e
Diffstat (limited to 'dbaccess/source/ui/dlg')
-rw-r--r-- | dbaccess/source/ui/dlg/dbwiz.cxx | 16 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/dbwizsetup.cxx | 32 |
2 files changed, 24 insertions, 24 deletions
diff --git a/dbaccess/source/ui/dlg/dbwiz.cxx b/dbaccess/source/ui/dlg/dbwiz.cxx index 566c30af0fa0..fe2b76f5fec7 100644 --- a/dbaccess/source/ui/dlg/dbwiz.cxx +++ b/dbaccess/source/ui/dlg/dbwiz.cxx @@ -67,7 +67,7 @@ ODbTypeWizDialog::ODbTypeWizDialog(vcl::Window* _pParent ,const Reference< XComponentContext >& _rxORB ,const ::com::sun::star::uno::Any& _aDataSourceName ) - :OWizardMachine(_pParent, WZB_NEXT | WZB_PREVIOUS | WZB_FINISH | WZB_CANCEL | WZB_HELP ) + :OWizardMachine(_pParent, WizardButtonFlags::NEXT | WizardButtonFlags::PREVIOUS | WizardButtonFlags::FINISH | WizardButtonFlags::CANCEL | WizardButtonFlags::HELP ) ,m_pOutSet(NULL) ,m_bResetting(false) ,m_bApplied(false) @@ -82,8 +82,8 @@ ODbTypeWizDialog::ODbTypeWizDialog(vcl::Window* _pParent m_eType = dbaui::ODbDataSourceAdministrationHelper::getDatasourceType(*m_pOutSet); SetPageSizePixel(LogicToPixel(::Size(PAGE_X, PAGE_Y), MAP_APPFONT)); - defaultButton(WZB_NEXT); - enableButtons(WZB_FINISH, false); + defaultButton(WizardButtonFlags::NEXT); + enableButtons(WizardButtonFlags::FINISH, false); enableAutomaticNextButtonState( true ); m_pPrevPage->SetHelpId(HID_DBWIZ_PREVIOUS); @@ -115,8 +115,8 @@ IMPL_LINK(ODbTypeWizDialog, OnTypeSelected, OGeneralPage*, _pTabPage) { m_eType = _pTabPage->GetSelectedType(); const bool bURLRequired = m_pCollection->isConnectionUrlRequired(m_eType); - enableButtons(WZB_NEXT,bURLRequired); - enableButtons(WZB_FINISH,!bURLRequired); + enableButtons(WizardButtonFlags::NEXT,bURLRequired); + enableButtons(WizardButtonFlags::FINISH,!bURLRequired); return 1L; } @@ -293,8 +293,8 @@ VclPtr<TabPage> ODbTypeWizDialog::createPage(WizardState _nState) static_cast<OGenericAdministrationPage*>(pPage.get())->SetServiceFactory( m_pImpl->getORB() ); static_cast<OGenericAdministrationPage*>(pPage.get())->SetAdminDialog(this,this); pPage->SetText(ModuleRes(nStringId)); - defaultButton( _nState == START_PAGE ? WZB_NEXT : WZB_FINISH ); - enableButtons( WZB_FINISH, _nState != START_PAGE); + defaultButton( _nState == START_PAGE ? WizardButtonFlags::NEXT : WizardButtonFlags::FINISH ); + enableButtons( WizardButtonFlags::FINISH, _nState != START_PAGE); pPage->Show(); } return pPage; @@ -315,7 +315,7 @@ void ODbTypeWizDialog::setTitle(const OUString& _sTitle) void ODbTypeWizDialog::enableConfirmSettings( bool _bEnable ) { - enableButtons( WZB_FINISH, _bEnable ); + enableButtons( WizardButtonFlags::FINISH, _bEnable ); // TODO: // this is hacky. At the moment, this method is used in only one case. // As soon as it is to be used more wide-spread, we should find a proper concept diff --git a/dbaccess/source/ui/dlg/dbwizsetup.cxx b/dbaccess/source/ui/dlg/dbwizsetup.cxx index b063828432e3..f7fe59ff2594 100644 --- a/dbaccess/source/ui/dlg/dbwizsetup.cxx +++ b/dbaccess/source/ui/dlg/dbwizsetup.cxx @@ -105,7 +105,7 @@ ODbTypeWizDialogSetup::ODbTypeWizDialogSetup(vcl::Window* _pParent ,const Reference< XComponentContext >& _rxORB ,const ::com::sun::star::uno::Any& _aDataSourceName ) - :svt::RoadmapWizard( _pParent, static_cast<sal_uInt32>(WZB_NEXT | WZB_PREVIOUS | WZB_FINISH | WZB_CANCEL | WZB_HELP) ) + :svt::RoadmapWizard( _pParent, WizardButtonFlags::NEXT | WizardButtonFlags::PREVIOUS | WizardButtonFlags::FINISH | WizardButtonFlags::CANCEL | WizardButtonFlags::HELP ) , m_pOutSet(NULL) , m_bResetting(false) @@ -148,8 +148,8 @@ ODbTypeWizDialogSetup::ODbTypeWizDialogSetup(vcl::Window* _pParent m_pImpl->translateProperties(xDatasource, *m_pOutSet); SetPageSizePixel(LogicToPixel(::Size(WIZARD_PAGE_X, WIZARD_PAGE_Y), MAP_APPFONT)); - defaultButton(WZB_NEXT); - enableButtons(WZB_FINISH, true); + defaultButton(WizardButtonFlags::NEXT); + enableButtons(WizardButtonFlags::FINISH, true); enableAutomaticNextButtonState(); ::dbaccess::ODsnTypeCollection::TypeIterator aIter = m_pCollection->begin(); @@ -328,7 +328,7 @@ void ODbTypeWizDialogSetup::activateDatabasePath() activatePath( static_cast< PathId >( nCreateNewDBIndex + 1 ), true ); enableState(PAGE_DBSETUPWIZARD_FINAL, true ); - enableButtons( WZB_FINISH, true); + enableButtons( WizardButtonFlags::FINISH, true); } break; case OGeneralPageWizard::eConnectExternal: @@ -347,14 +347,14 @@ void ODbTypeWizDialogSetup::activateDatabasePath() case OGeneralPageWizard::eOpenExisting: { activatePath( static_cast<PathId>(m_pCollection->size() + 1), true ); - enableButtons( WZB_FINISH, !m_pGeneralPage->GetSelectedDocument().sURL.isEmpty() ); + enableButtons( WizardButtonFlags::FINISH, !m_pGeneralPage->GetSelectedDocument().sURL.isEmpty() ); } break; default: OSL_FAIL( "ODbTypeWizDialogSetup::activateDatabasePath: unknown creation mode!" ); } - enableButtons( WZB_NEXT, m_pGeneralPage->GetDatabaseCreationMode() != OGeneralPageWizard::eOpenExisting ); + enableButtons( WizardButtonFlags::NEXT, m_pGeneralPage->GetDatabaseCreationMode() != OGeneralPageWizard::eOpenExisting ); // TODO: this should go into the base class. Point is, we activate a path whose *last* // step is also the current one. The base class should automatically disable // the Next button in such a case. However, not for this patch ... @@ -374,7 +374,7 @@ void ODbTypeWizDialogSetup::updateTypeDependentStates() } enableState(PAGE_DBSETUPWIZARD_AUTHENTIFICATION, bDoEnable); enableState(PAGE_DBSETUPWIZARD_FINAL, bDoEnable ); - enableButtons( WZB_FINISH, bDoEnable); + enableButtons( WizardButtonFlags::FINISH, bDoEnable); } bool ODbTypeWizDialogSetup::IsConnectionUrlRequired() @@ -566,9 +566,9 @@ VclPtr<TabPage> ODbTypeWizDialogSetup::createPage(WizardState _nState) pPage->SetServiceFactory( m_pImpl->getORB() ); pPage->SetAdminDialog(this, this); - defaultButton( _nState == PAGE_DBSETUPWIZARD_FINAL ? WZB_FINISH : WZB_NEXT ); - enableButtons( WZB_FINISH, _nState == PAGE_DBSETUPWIZARD_FINAL ); - enableButtons( WZB_NEXT, _nState != PAGE_DBSETUPWIZARD_FINAL ); + defaultButton( _nState == PAGE_DBSETUPWIZARD_FINAL ? WizardButtonFlags::FINISH : WizardButtonFlags::NEXT ); + enableButtons( WizardButtonFlags::FINISH, _nState == PAGE_DBSETUPWIZARD_FINAL ); + enableButtons( WizardButtonFlags::NEXT, _nState != PAGE_DBSETUPWIZARD_FINAL ); pPage->Show(); } return pPage; @@ -580,10 +580,10 @@ IMPL_LINK(ODbTypeWizDialogSetup, ImplModifiedHdl, OGenericAdministrationPage*, _ enableState(PAGE_DBSETUPWIZARD_FINAL, m_bIsConnectable); enableState(PAGE_DBSETUPWIZARD_AUTHENTIFICATION, m_bIsConnectable); if (getCurrentState() == PAGE_DBSETUPWIZARD_FINAL) - enableButtons( WZB_FINISH, true); + enableButtons( WizardButtonFlags::FINISH, true); else - enableButtons( WZB_FINISH, m_bIsConnectable); - enableButtons( WZB_NEXT, m_bIsConnectable && (getCurrentState() != PAGE_DBSETUPWIZARD_FINAL)); + enableButtons( WizardButtonFlags::FINISH, m_bIsConnectable); + enableButtons( WizardButtonFlags::NEXT, m_bIsConnectable && (getCurrentState() != PAGE_DBSETUPWIZARD_FINAL)); return sal_True; } @@ -614,7 +614,7 @@ IMPL_LINK(ODbTypeWizDialogSetup, OnChangeCreationMode, OGeneralPageWizard*, /*_p IMPL_LINK(ODbTypeWizDialogSetup, OnRecentDocumentSelected, OGeneralPageWizard*, /*_pGeneralPage*/) { - enableButtons( WZB_FINISH, !m_pGeneralPage->GetSelectedDocument().sURL.isEmpty() ); + enableButtons( WizardButtonFlags::FINISH, !m_pGeneralPage->GetSelectedDocument().sURL.isEmpty() ); return 0L; } @@ -635,7 +635,7 @@ void ODbTypeWizDialogSetup::enterState(WizardState _nState) m_sOldURL = m_sURL; break; case PAGE_DBSETUPWIZARD_FINAL: - enableButtons( WZB_FINISH, true); + enableButtons( WizardButtonFlags::FINISH, true); if ( m_pFinalPage ) m_pFinalPage->enableTableWizardCheckBox(m_pCollection->supportsTableCreation(m_sURL)); break; @@ -1020,7 +1020,7 @@ bool ODbTypeWizDialogSetup::SaveDatabaseDocument() return SaveDatabaseDocument() && OWizardMachine::onFinish(); else { - enableButtons( WZB_FINISH, false ); + enableButtons( WizardButtonFlags::FINISH, false ); return false; } } |