summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/control/button.cxx10
-rw-r--r--vcl/source/control/morebtn.cxx4
-rw-r--r--vcl/source/window/btndlg.cxx12
-rw-r--r--vcl/source/window/layout.cxx4
-rw-r--r--vcl/source/window/msgbox.cxx28
5 files changed, 29 insertions, 29 deletions
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 83a248a8605d..e6a1d34ffbbd 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -115,7 +115,7 @@ OUString Button::GetStandardText( StandardButtonType eButton )
{
sal_uInt32 nResId;
const char* pDefText;
- } aResIdAry[BUTTON_COUNT] =
+ } aResIdAry[static_cast<int>(StandardButtonType::COUNT)] =
{
{ SV_BUTTONTEXT_OK, "~OK" },
{ SV_BUTTONTEXT_CANCEL, "~Cancel" },
@@ -1653,7 +1653,7 @@ void OKButton::ImplInit( vcl::Window* pParent, WinBits nStyle )
{
PushButton::ImplInit( pParent, nStyle );
- SetText( Button::GetStandardText( BUTTON_OK ) );
+ SetText( Button::GetStandardText( StandardButtonType::OK ) );
}
OKButton::OKButton( vcl::Window* pParent, WinBits nStyle ) :
@@ -1698,7 +1698,7 @@ void CancelButton::ImplInit( vcl::Window* pParent, WinBits nStyle )
{
PushButton::ImplInit( pParent, nStyle );
- SetText( Button::GetStandardText( BUTTON_CANCEL ) );
+ SetText( Button::GetStandardText( StandardButtonType::CANCEL ) );
}
CancelButton::CancelButton( vcl::Window* pParent, WinBits nStyle ) :
@@ -1742,14 +1742,14 @@ void CancelButton::Click()
CloseButton::CloseButton( vcl::Window* pParent, WinBits nStyle )
: CancelButton(pParent, nStyle)
{
- SetText( Button::GetStandardText( BUTTON_CLOSE ) );
+ SetText( Button::GetStandardText( StandardButtonType::CLOSE ) );
}
void HelpButton::ImplInit( vcl::Window* pParent, WinBits nStyle )
{
PushButton::ImplInit( pParent, nStyle | WB_NOPOINTERFOCUS );
- SetText( Button::GetStandardText( BUTTON_HELP ) );
+ SetText( Button::GetStandardText( StandardButtonType::HELP ) );
}
HelpButton::HelpButton( vcl::Window* pParent, WinBits nStyle ) :
diff --git a/vcl/source/control/morebtn.cxx b/vcl/source/control/morebtn.cxx
index 0b585a1587a8..8e5e9a6a99be 100644
--- a/vcl/source/control/morebtn.cxx
+++ b/vcl/source/control/morebtn.cxx
@@ -42,8 +42,8 @@ void MoreButton::ImplInit( vcl::Window* pParent, WinBits nStyle )
PushButton::ImplInit( pParent, nStyle );
- mpMBData->maMoreText = Button::GetStandardText( BUTTON_MORE );
- mpMBData->maLessText = Button::GetStandardText( BUTTON_LESS );
+ mpMBData->maMoreText = Button::GetStandardText( StandardButtonType::MORE );
+ mpMBData->maLessText = Button::GetStandardText( StandardButtonType::LESS );
ShowState();
diff --git a/vcl/source/window/btndlg.cxx b/vcl/source/window/btndlg.cxx
index 94862da3826d..b211dcf5e6a0 100644
--- a/vcl/source/window/btndlg.cxx
+++ b/vcl/source/window/btndlg.cxx
@@ -296,18 +296,18 @@ void ButtonDialog::AddButton( StandardButtonType eType, sal_uInt16 nId,
pItem->mbOwnButton = true;
pItem->mnSepSize = nSepPixel;
- if ( eType == BUTTON_OK )
+ if ( eType == StandardButtonType::OK )
nBtnFlags |= BUTTONDIALOG_OKBUTTON;
- else if ( eType == BUTTON_HELP )
+ else if ( eType == StandardButtonType::HELP )
nBtnFlags |= BUTTONDIALOG_HELPBUTTON;
- else if ( (eType == BUTTON_CANCEL) || (eType == BUTTON_CLOSE) )
+ else if ( (eType == StandardButtonType::CANCEL) || (eType == StandardButtonType::CLOSE) )
nBtnFlags |= BUTTONDIALOG_CANCELBUTTON;
pItem->mpPushButton = ImplCreatePushButton( nBtnFlags );
// Standard-Buttons have the right text already
- if ( !((eType == BUTTON_OK) && (pItem->mpPushButton->GetType() == WINDOW_OKBUTTON)) ||
- !((eType == BUTTON_CANCEL) && (pItem->mpPushButton->GetType() == WINDOW_CANCELBUTTON)) ||
- !((eType == BUTTON_HELP) && (pItem->mpPushButton->GetType() == WINDOW_HELPBUTTON)) )
+ if ( !((eType == StandardButtonType::OK) && (pItem->mpPushButton->GetType() == WINDOW_OKBUTTON)) ||
+ !((eType == StandardButtonType::CANCEL) && (pItem->mpPushButton->GetType() == WINDOW_CANCELBUTTON)) ||
+ !((eType == StandardButtonType::HELP) && (pItem->mpPushButton->GetType() == WINDOW_HELPBUTTON)) )
{
pItem->mpPushButton->SetText( Button::GetStandardText( eType ) );
}
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index 5495e7c048e8..8548eafd5059 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -2171,14 +2171,14 @@ short MessageDialog::Execute()
break;
case VCL_BUTTONS_YES_NO:
pBtn = new PushButton(pButtonBox);
- pBtn->SetText(Button::GetStandardText(BUTTON_YES));
+ pBtn->SetText(Button::GetStandardText(StandardButtonType::YES));
pBtn->Show();
m_aOwnedButtons.push_back(pBtn);
m_aResponses[pBtn] = RET_YES;
pBtn = new PushButton(pButtonBox);
pBtn->SetStyle(pBtn->GetStyle() & WB_DEFBUTTON);
- pBtn->SetText(Button::GetStandardText(BUTTON_NO));
+ pBtn->SetText(Button::GetStandardText(StandardButtonType::NO));
pBtn->Show();
m_aOwnedButtons.push_back(pBtn);
m_aResponses[pBtn] = RET_NO;
diff --git a/vcl/source/window/msgbox.cxx b/vcl/source/window/msgbox.cxx
index 035d97f7e968..3fdb64787bc4 100644
--- a/vcl/source/window/msgbox.cxx
+++ b/vcl/source/window/msgbox.cxx
@@ -75,8 +75,8 @@ void MessBox::ImplInitButtons()
else // WB_DEF_OK
nOKFlags |= BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_FOCUSBUTTON;
- AddButton( BUTTON_OK, RET_OK, nOKFlags );
- AddButton( BUTTON_CANCEL, RET_CANCEL, nCancelFlags );
+ AddButton( StandardButtonType::OK, RET_OK, nOKFlags );
+ AddButton( StandardButtonType::CANCEL, RET_CANCEL, nCancelFlags );
}
else if ( nStyle & WB_YES_NO )
{
@@ -86,8 +86,8 @@ void MessBox::ImplInitButtons()
nNoFlags |= BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_FOCUSBUTTON;
nNoFlags |= BUTTONDIALOG_CANCELBUTTON;
- AddButton( BUTTON_YES, RET_YES, nYesFlags );
- AddButton( BUTTON_NO, RET_NO, nNoFlags );
+ AddButton( StandardButtonType::YES, RET_YES, nYesFlags );
+ AddButton( StandardButtonType::NO, RET_NO, nNoFlags );
}
else if ( nStyle & WB_YES_NO_CANCEL )
{
@@ -98,9 +98,9 @@ void MessBox::ImplInitButtons()
else
nCancelFlags |= BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_FOCUSBUTTON;
- AddButton( BUTTON_YES, RET_YES, nYesFlags );
- AddButton( BUTTON_NO, RET_NO, nNoFlags );
- AddButton( BUTTON_CANCEL, RET_CANCEL, nCancelFlags );
+ AddButton( StandardButtonType::YES, RET_YES, nYesFlags );
+ AddButton( StandardButtonType::NO, RET_NO, nNoFlags );
+ AddButton( StandardButtonType::CANCEL, RET_CANCEL, nCancelFlags );
}
else if ( nStyle & WB_RETRY_CANCEL )
{
@@ -109,8 +109,8 @@ void MessBox::ImplInitButtons()
else // WB_DEF_RETRY
nRetryFlags |= BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_FOCUSBUTTON;
- AddButton( BUTTON_RETRY, RET_RETRY, nRetryFlags );
- AddButton( BUTTON_CANCEL, RET_CANCEL, nCancelFlags );
+ AddButton( StandardButtonType::RETRY, RET_RETRY, nRetryFlags );
+ AddButton( StandardButtonType::CANCEL, RET_CANCEL, nCancelFlags );
}
else if ( nStyle & WB_ABORT_RETRY_IGNORE )
{
@@ -124,15 +124,15 @@ void MessBox::ImplInitButtons()
else if ( nStyle & WB_DEF_IGNORE )
nIgnoreFlags |= BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_FOCUSBUTTON;
- AddButton( BUTTON_ABORT, RET_CANCEL, nAbortFlags );
- AddButton( BUTTON_RETRY, RET_RETRY, nRetryFlags );
- AddButton( BUTTON_IGNORE, RET_IGNORE, nIgnoreFlags );
+ AddButton( StandardButtonType::ABORT, RET_CANCEL, nAbortFlags );
+ AddButton( StandardButtonType::RETRY, RET_RETRY, nRetryFlags );
+ AddButton( StandardButtonType::IGNORE, RET_IGNORE, nIgnoreFlags );
}
else if ( nStyle & WB_OK )
{
nOKFlags |= BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_FOCUSBUTTON;
- AddButton( BUTTON_OK, RET_OK, nOKFlags );
+ AddButton( StandardButtonType::OK, RET_OK, nOKFlags );
}
}
@@ -162,7 +162,7 @@ void MessBox::ImplPosControls()
{
if ( !mbHelpBtn )
{
- AddButton( BUTTON_HELP, RET_HELP, BUTTONDIALOG_HELPBUTTON, 3 );
+ AddButton( StandardButtonType::HELP, RET_HELP, BUTTONDIALOG_HELPBUTTON, 3 );
mbHelpBtn = true;
}
}