diff options
author | Noel Grandin <noel@peralex.com> | 2015-05-07 15:25:20 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-05-11 12:17:42 +0000 |
commit | 82d68f9cbce4073a727c43b4a8e81d39871b71eb (patch) | |
tree | 64b3a9e1092586afee46899adfd00070821613b8 /dbaccess/source | |
parent | 19ea033f380aa196c9c868a3cdb43e967eb42abe (diff) |
convert COMMAND_ constants to scoped enum
Change-Id: I88e67f89dbbab0646e8f106dfeb32c6ee1bb0b95
Reviewed-on: https://gerrit.libreoffice.org/15671
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'dbaccess/source')
8 files changed, 16 insertions, 17 deletions
diff --git a/dbaccess/source/ui/misc/WTypeSelect.cxx b/dbaccess/source/ui/misc/WTypeSelect.cxx index fad658bb2d871..dcde972e33d3a 100644 --- a/dbaccess/source/ui/misc/WTypeSelect.cxx +++ b/dbaccess/source/ui/misc/WTypeSelect.cxx @@ -422,7 +422,7 @@ bool OWizTypeSelectList::PreNotify( NotifyEvent& rEvt ) break; const CommandEvent* pComEvt = rEvt.GetCommandEvent(); - if(pComEvt->GetCommand() != COMMAND_CONTEXTMENU) + if(pComEvt->GetCommand() != CommandEventId::ContextMenu) break; // the place, at which was clicked Point ptWhere(0,0); diff --git a/dbaccess/source/ui/querydesign/JoinTableView.cxx b/dbaccess/source/ui/querydesign/JoinTableView.cxx index bcd5d47458d20..f3ef5af16ff75 100644 --- a/dbaccess/source/ui/querydesign/JoinTableView.cxx +++ b/dbaccess/source/ui/querydesign/JoinTableView.cxx @@ -1149,7 +1149,7 @@ void OJoinTableView::Command(const CommandEvent& rEvt) switch (rEvt.GetCommand()) { - case COMMAND_CONTEXTMENU: + case CommandEventId::ContextMenu: { if( m_vTableConnection.empty() ) return; @@ -1186,6 +1186,8 @@ void OJoinTableView::Command(const CommandEvent& rEvt) } bHandled = true; } + break; + default: break; } if (!bHandled) Window::Command(rEvt); @@ -1251,7 +1253,7 @@ bool OJoinTableView::PreNotify(NotifyEvent& rNEvt) case MouseNotifyEvent::COMMAND: { const CommandEvent* pCommand = rNEvt.GetCommandEvent(); - if (pCommand->GetCommand() == COMMAND_WHEEL) + if (pCommand->GetCommand() == CommandEventId::Wheel) { const CommandWheelData* pData = rNEvt.GetCommandEvent()->GetWheelData(); if (pData->GetMode() == CommandWheelMode::SCROLL) diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx index 4f556d2bfe702..3bf8774b764f3 100644 --- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx +++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx @@ -1917,7 +1917,7 @@ void OSelectionBrowseBox::Command(const CommandEvent& rEvt) { switch (rEvt.GetCommand()) { - case COMMAND_CONTEXTMENU: + case CommandEventId::ContextMenu: { Point aMenuPos( rEvt.GetMousePosPixel() ); diff --git a/dbaccess/source/ui/querydesign/TableWindow.cxx b/dbaccess/source/ui/querydesign/TableWindow.cxx index 31697a39ae009..52dcde3d589ac 100644 --- a/dbaccess/source/ui/querydesign/TableWindow.cxx +++ b/dbaccess/source/ui/querydesign/TableWindow.cxx @@ -583,7 +583,7 @@ void OTableWindow::Command(const CommandEvent& rEvt) { switch (rEvt.GetCommand()) { - case COMMAND_CONTEXTMENU: + case CommandEventId::ContextMenu: { OJoinController& rController = getDesignView()->getController(); if(!rController.isReadOnly() && rController.isConnected()) diff --git a/dbaccess/source/ui/querydesign/TableWindowListBox.cxx b/dbaccess/source/ui/querydesign/TableWindowListBox.cxx index f0408d945205e..4db24a60cec69 100644 --- a/dbaccess/source/ui/querydesign/TableWindowListBox.cxx +++ b/dbaccess/source/ui/querydesign/TableWindowListBox.cxx @@ -359,7 +359,7 @@ void OTableWindowListBox::Command(const CommandEvent& rEvt) { switch (rEvt.GetCommand()) { - case COMMAND_CONTEXTMENU: + case CommandEventId::ContextMenu: { static_cast<OTableWindow*>(Window::GetParent())->Command(rEvt); break; diff --git a/dbaccess/source/ui/querydesign/TableWindowTitle.cxx b/dbaccess/source/ui/querydesign/TableWindowTitle.cxx index 0c5ca6a9064e0..2cb3efea4629b 100644 --- a/dbaccess/source/ui/querydesign/TableWindowTitle.cxx +++ b/dbaccess/source/ui/querydesign/TableWindowTitle.cxx @@ -106,16 +106,13 @@ void OTableWindowTitle::RequestHelp( const HelpEvent& rHEvt ) void OTableWindowTitle::Command( const CommandEvent& rEvt ) { - switch( rEvt.GetCommand() ) + if ( rEvt.GetCommand() == CommandEventId::ContextMenu ) { - case COMMAND_CONTEXTMENU: - { - GrabFocus(); - if ( m_pTabWin ) - m_pTabWin->Command( rEvt ); - else - Control::Command(rEvt); - } + GrabFocus(); + if ( m_pTabWin ) + m_pTabWin->Command( rEvt ); + else + Control::Command(rEvt); } } diff --git a/dbaccess/source/ui/tabledesign/TEditControl.cxx b/dbaccess/source/ui/tabledesign/TEditControl.cxx index 203341077a093..9074ac93d45e8 100644 --- a/dbaccess/source/ui/tabledesign/TEditControl.cxx +++ b/dbaccess/source/ui/tabledesign/TEditControl.cxx @@ -1344,7 +1344,7 @@ void OTableEditorCtrl::Command(const CommandEvent& rEvt) { switch (rEvt.GetCommand()) { - case COMMAND_CONTEXTMENU: + case CommandEventId::ContextMenu: { Point aMenuPos( rEvt.GetMousePosPixel() ); if (!rEvt.IsMouseEvent()) diff --git a/dbaccess/source/ui/tabledesign/TableDesignControl.cxx b/dbaccess/source/ui/tabledesign/TableDesignControl.cxx index 81dfc575169d2..5aced5b1d127a 100644 --- a/dbaccess/source/ui/tabledesign/TableDesignControl.cxx +++ b/dbaccess/source/ui/tabledesign/TableDesignControl.cxx @@ -104,7 +104,7 @@ void OTableRowView::Command(const CommandEvent& rEvt) switch (rEvt.GetCommand()) { - case COMMAND_CONTEXTMENU: + case CommandEventId::ContextMenu: { if (!rEvt.IsMouseEvent()) { |