summaryrefslogtreecommitdiff
path: root/extensions
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-04-22 11:36:48 +0200
committerNoel Grandin <noel@peralex.com>2015-04-29 10:41:37 +0200
commitaaa1861c49bf2549e1bddc461961871ac102a83d (patch)
tree5ed83702976b886b25484bdbb2465e03ec2ba19d /extensions
parentf6d4cd396803f568ca667ed5e4d7725ade99b5df (diff)
convert WZB_ constants to scoped enum
Change-Id: If2f12ea54b57f32df23fc22fb8be0aa3c6f2e76e
Diffstat (limited to 'extensions')
-rw-r--r--extensions/source/abpilot/abpfinalpage.cxx8
-rw-r--r--extensions/source/abpilot/abspage.cxx2
-rw-r--r--extensions/source/abpilot/abspilot.cxx6
-rw-r--r--extensions/source/abpilot/typeselectionpage.cxx4
-rw-r--r--extensions/source/dbpilots/controlwizard.cxx6
-rw-r--r--extensions/source/dbpilots/gridwizard.cxx12
-rw-r--r--extensions/source/dbpilots/groupboxwiz.cxx12
-rw-r--r--extensions/source/dbpilots/listcombowizard.cxx14
8 files changed, 32 insertions, 32 deletions
diff --git a/extensions/source/abpilot/abpfinalpage.cxx b/extensions/source/abpilot/abpfinalpage.cxx
index bb9e12a31d8d..d1e74a74c9bd 100644
--- a/extensions/source/abpilot/abpfinalpage.cxx
+++ b/extensions/source/abpilot/abpfinalpage.cxx
@@ -169,7 +169,7 @@ namespace abp
m_pLocation->GrabFocus();
// default the finish button
- getDialog()->defaultButton( WZB_FINISH );
+ getDialog()->defaultButton( WizardButtonFlags::FINISH );
}
@@ -178,9 +178,9 @@ namespace abp
AddressBookSourcePage::DeactivatePage();
// default the "next" button, again
- getDialog()->defaultButton( WZB_NEXT );
+ getDialog()->defaultButton( WizardButtonFlags::NEXT );
// disable the finish button
- getDialog()->enableButtons( WZB_FINISH, false );
+ getDialog()->enableButtons( WizardButtonFlags::FINISH, false );
}
@@ -197,7 +197,7 @@ namespace abp
bool bEmptyLocation = m_pLocation->GetText().isEmpty();
// enable or disable the finish button
- getDialog()->enableButtons( WZB_FINISH, !bEmptyLocation && (!m_pRegisterName->IsChecked() || bValidName) );
+ getDialog()->enableButtons( WizardButtonFlags::FINISH, !bEmptyLocation && (!m_pRegisterName->IsChecked() || bValidName) );
// show the error message for an invalid name
m_pDuplicateNameError->Show( !bValidName && !bEmptyName );
diff --git a/extensions/source/abpilot/abspage.cxx b/extensions/source/abpilot/abspage.cxx
index b8f16632eb1d..078a8b150610 100644
--- a/extensions/source/abpilot/abspage.cxx
+++ b/extensions/source/abpilot/abspage.cxx
@@ -38,7 +38,7 @@ namespace abp
void AddressBookSourcePage::DeactivatePage()
{
AddressBookSourcePage_Base::DeactivatePage();
- getDialog()->enableButtons(WZB_NEXT, true);
+ getDialog()->enableButtons(WizardButtonFlags::NEXT, true);
}
diff --git a/extensions/source/abpilot/abspilot.cxx b/extensions/source/abpilot/abspilot.cxx
index f06fa97156f9..2617e35d7f6a 100644
--- a/extensions/source/abpilot/abspilot.cxx
+++ b/extensions/source/abpilot/abspilot.cxx
@@ -60,7 +60,7 @@ namespace abp
OAddessBookSourcePilot::OAddessBookSourcePilot(vcl::Window* _pParent, const Reference< XComponentContext >& _rxORB)
:OAddessBookSourcePilot_Base( _pParent,
- static_cast<sal_uInt32>(WZB_HELP | WZB_FINISH | WZB_CANCEL | WZB_NEXT | WZB_PREVIOUS) )
+ WizardButtonFlags::HELP | WizardButtonFlags::FINISH | WizardButtonFlags::CANCEL | WizardButtonFlags::NEXT | WizardButtonFlags::PREVIOUS )
,m_xORB(_rxORB)
,m_aNewDataSource(_rxORB)
,m_eNewDataSourceType( AST_INVALID )
@@ -119,8 +119,8 @@ namespace abp
m_aSettings.bRegisterDataSource = false;
m_aSettings.bIgnoreNoTable = false;
- defaultButton(WZB_NEXT);
- enableButtons(WZB_FINISH, false);
+ defaultButton(WizardButtonFlags::NEXT);
+ enableButtons(WizardButtonFlags::FINISH, false);
ActivatePage();
typeSelectionChanged( m_aSettings.eType );
diff --git a/extensions/source/abpilot/typeselectionpage.cxx b/extensions/source/abpilot/typeselectionpage.cxx
index f732eff901b4..f93957962ff9 100644
--- a/extensions/source/abpilot/typeselectionpage.cxx
+++ b/extensions/source/abpilot/typeselectionpage.cxx
@@ -191,14 +191,14 @@ namespace abp
}
}
- getDialog()->enableButtons(WZB_PREVIOUS, false);
+ getDialog()->enableButtons(WizardButtonFlags::PREVIOUS, false);
}
void TypeSelectionPage::DeactivatePage()
{
AddressBookSourcePage::DeactivatePage();
- getDialog()->enableButtons(WZB_PREVIOUS, true);
+ getDialog()->enableButtons(WizardButtonFlags::PREVIOUS, true);
}
diff --git a/extensions/source/dbpilots/controlwizard.cxx b/extensions/source/dbpilots/controlwizard.cxx
index 9128bbbf4589..ab334d0a1d75 100644
--- a/extensions/source/dbpilots/controlwizard.cxx
+++ b/extensions/source/dbpilots/controlwizard.cxx
@@ -242,15 +242,15 @@ namespace dbp
OControlWizard::OControlWizard( vcl::Window* _pParent,
const Reference< XPropertySet >& _rxObjectModel, const Reference< XComponentContext >& _rxContext )
- :OWizardMachine(_pParent, WZB_CANCEL | WZB_PREVIOUS | WZB_NEXT | WZB_FINISH)
+ :OWizardMachine(_pParent, WizardButtonFlags::CANCEL | WizardButtonFlags::PREVIOUS | WizardButtonFlags::NEXT | WizardButtonFlags::FINISH)
,m_xContext(_rxContext)
{
m_aContext.xObjectModel = _rxObjectModel;
initContext();
SetPageSizePixel(LogicToPixel(::Size(WINDOW_SIZE_X, WINDOW_SIZE_Y), MAP_APPFONT));
- defaultButton(WZB_NEXT);
- enableButtons(WZB_FINISH, false);
+ defaultButton(WizardButtonFlags::NEXT);
+ enableButtons(WizardButtonFlags::FINISH, false);
}
OControlWizard::~OControlWizard()
diff --git a/extensions/source/dbpilots/gridwizard.cxx b/extensions/source/dbpilots/gridwizard.cxx
index aec86cd649ca..b2bfbae8e8c0 100644
--- a/extensions/source/dbpilots/gridwizard.cxx
+++ b/extensions/source/dbpilots/gridwizard.cxx
@@ -259,13 +259,13 @@ namespace dbp
{
OControlWizard::enterState(_nState);
- enableButtons(WZB_PREVIOUS, m_bHadDataSelection ? (GW_STATE_DATASOURCE_SELECTION < _nState) : GW_STATE_FIELDSELECTION < _nState);
- enableButtons(WZB_NEXT, GW_STATE_FIELDSELECTION != _nState);
+ enableButtons(WizardButtonFlags::PREVIOUS, m_bHadDataSelection ? (GW_STATE_DATASOURCE_SELECTION < _nState) : GW_STATE_FIELDSELECTION < _nState);
+ enableButtons(WizardButtonFlags::NEXT, GW_STATE_FIELDSELECTION != _nState);
if (_nState < GW_STATE_FIELDSELECTION)
- enableButtons(WZB_FINISH, false);
+ enableButtons(WizardButtonFlags::FINISH, false);
if (GW_STATE_FIELDSELECTION == _nState)
- defaultButton(WZB_FINISH);
+ defaultButton(WizardButtonFlags::FINISH);
}
@@ -275,7 +275,7 @@ namespace dbp
return false;
if (GW_STATE_FIELDSELECTION == _nState)
- defaultButton(WZB_NEXT);
+ defaultButton(WizardButtonFlags::NEXT);
return true;
}
@@ -395,7 +395,7 @@ namespace dbp
m_pDeselectOne->Enable(m_pSelFields->GetSelectEntryCount() != 0);
m_pDeselectAll->Enable(m_pSelFields->GetEntryCount() != 0);
- getDialog()->enableButtons(WZB_FINISH, 0 != m_pSelFields->GetEntryCount());
+ getDialog()->enableButtons(WizardButtonFlags::FINISH, 0 != m_pSelFields->GetEntryCount());
}
diff --git a/extensions/source/dbpilots/groupboxwiz.cxx b/extensions/source/dbpilots/groupboxwiz.cxx
index fbcaa668990b..89f56cde8ec1 100644
--- a/extensions/source/dbpilots/groupboxwiz.cxx
+++ b/extensions/source/dbpilots/groupboxwiz.cxx
@@ -144,14 +144,14 @@ namespace dbp
// setting the def button .... to be done before the base class is called, too, 'cause the base class
// calls the pages, which are allowed to override our def button behaviour
- defaultButton(GBW_STATE_FINALIZE == _nState ? WZB_FINISH : WZB_NEXT);
+ defaultButton(GBW_STATE_FINALIZE == _nState ? WizardButtonFlags::FINISH : WizardButtonFlags::NEXT);
// allow "finish" on the last page only
- enableButtons(WZB_FINISH, GBW_STATE_FINALIZE == _nState);
+ enableButtons(WizardButtonFlags::FINISH, GBW_STATE_FINALIZE == _nState);
// allow previous on all pages but the first one
- enableButtons(WZB_PREVIOUS, GBW_STATE_OPTIONLIST != _nState);
+ enableButtons(WizardButtonFlags::PREVIOUS, GBW_STATE_OPTIONLIST != _nState);
// allow next on all pages but the last one
- enableButtons(WZB_NEXT, GBW_STATE_FINALIZE != _nState);
+ enableButtons(WizardButtonFlags::NEXT, GBW_STATE_FINALIZE != _nState);
OControlWizard::enterState(_nState);
}
@@ -323,7 +323,7 @@ namespace dbp
m_pMoveLeft->Enable(bSelectedSome);
m_pMoveRight->Enable(bUnfinishedInput);
- getDialog()->enableButtons(WZB_NEXT, bHaveSome);
+ getDialog()->enableButtons(WizardButtonFlags::NEXT, bHaveSome);
if (bUnfinishedInput)
{
@@ -333,7 +333,7 @@ namespace dbp
else
{
if (WB_DEFBUTTON == (m_pMoveRight->GetStyle() & WB_DEFBUTTON))
- getDialog()->defaultButton(WZB_NEXT);
+ getDialog()->defaultButton(WizardButtonFlags::NEXT);
}
}
diff --git a/extensions/source/dbpilots/listcombowizard.cxx b/extensions/source/dbpilots/listcombowizard.cxx
index 0173584e3455..458f9743df07 100644
--- a/extensions/source/dbpilots/listcombowizard.cxx
+++ b/extensions/source/dbpilots/listcombowizard.cxx
@@ -128,13 +128,13 @@ namespace dbp
{
OControlWizard::enterState(_nState);
- enableButtons(WZB_PREVIOUS, m_bHadDataSelection ? (LCW_STATE_DATASOURCE_SELECTION < _nState) : LCW_STATE_TABLESELECTION < _nState);
- enableButtons(WZB_NEXT, getFinalState() != _nState);
+ enableButtons(WizardButtonFlags::PREVIOUS, m_bHadDataSelection ? (LCW_STATE_DATASOURCE_SELECTION < _nState) : LCW_STATE_TABLESELECTION < _nState);
+ enableButtons(WizardButtonFlags::NEXT, getFinalState() != _nState);
if (_nState < getFinalState())
- enableButtons(WZB_FINISH, false);
+ enableButtons(WizardButtonFlags::FINISH, false);
if (getFinalState() == _nState)
- defaultButton(WZB_FINISH);
+ defaultButton(WizardButtonFlags::FINISH);
}
@@ -144,7 +144,7 @@ namespace dbp
return false;
if (getFinalState() == _nState)
- defaultButton(WZB_NEXT);
+ defaultButton(WizardButtonFlags::NEXT);
return true;
}
@@ -508,7 +508,7 @@ namespace dbp
{
bool bInvalidSelection = (COMBOBOX_ENTRY_NOTFOUND == m_pValueListField->GetEntryPos(m_pValueListField->GetText()));
bInvalidSelection |= (COMBOBOX_ENTRY_NOTFOUND == m_pTableField->GetEntryPos(m_pTableField->GetText()));
- getDialog()->enableButtons(WZB_FINISH, !bInvalidSelection);
+ getDialog()->enableButtons(WizardButtonFlags::FINISH, !bInvalidSelection);
}
@@ -550,7 +550,7 @@ namespace dbp
void OComboDBFieldPage::ActivatePage()
{
ODBFieldPage::ActivatePage();
- getDialog()->enableButtons(WZB_FINISH, true);
+ getDialog()->enableButtons(WizardButtonFlags::FINISH, true);
}