summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--basctl/source/basicide/baside2b.cxx10
-rw-r--r--basctl/source/basicide/baside3.cxx8
-rw-r--r--basctl/source/basicide/bastypes.cxx2
-rw-r--r--chart2/source/controller/main/ChartController_Window.cxx10
-rw-r--r--cui/source/options/optcolor.cxx9
-rw-r--r--dbaccess/source/ui/misc/WTypeSelect.cxx2
-rw-r--r--dbaccess/source/ui/querydesign/JoinTableView.cxx6
-rw-r--r--dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx2
-rw-r--r--dbaccess/source/ui/querydesign/TableWindow.cxx2
-rw-r--r--dbaccess/source/ui/querydesign/TableWindowListBox.cxx2
-rw-r--r--dbaccess/source/ui/querydesign/TableWindowTitle.cxx15
-rw-r--r--dbaccess/source/ui/tabledesign/TEditControl.cxx2
-rw-r--r--dbaccess/source/ui/tabledesign/TableDesignControl.cxx2
-rw-r--r--desktop/source/deployment/gui/dp_gui_extlistbox.cxx2
-rw-r--r--editeng/source/editeng/impedit2.cxx20
-rw-r--r--extensions/source/propctrlr/browserlistbox.cxx6
-rw-r--r--forms/source/richtext/richtextimplcontrol.cxx6
-rw-r--r--framework/source/dispatch/windowcommanddispatch.cxx2
-rw-r--r--framework/source/uielement/statusbarmanager.cxx2
-rw-r--r--framework/source/uielement/toolbarmanager.cxx2
-rw-r--r--include/vcl/cmdevt.hxx76
-rw-r--r--reportdesign/source/ui/dlg/GroupsSorting.cxx2
-rw-r--r--reportdesign/source/ui/dlg/Navigator.cxx8
-rw-r--r--reportdesign/source/ui/report/ReportSection.cxx38
-rw-r--r--reportdesign/source/ui/report/ScrollHelper.cxx6
-rw-r--r--sc/source/ui/app/inputhdl.cxx8
-rw-r--r--sc/source/ui/app/inputwin.cxx20
-rw-r--r--sc/source/ui/dbgui/csvgrid.cxx4
-rw-r--r--sc/source/ui/drawfunc/fupoor.cxx2
-rw-r--r--sc/source/ui/miscdlgs/acredlin.cxx2
-rw-r--r--sc/source/ui/navipi/content.cxx5
-rw-r--r--sc/source/ui/navipi/scenwnd.cxx2
-rw-r--r--sc/source/ui/view/gridwin.cxx28
-rw-r--r--sc/source/ui/view/hdrcont.cxx6
-rw-r--r--sc/source/ui/view/preview.cxx6
-rw-r--r--sc/source/ui/view/tabcont.cxx32
-rw-r--r--sd/source/ui/animations/CustomAnimationList.cxx2
-rw-r--r--sd/source/ui/annotations/annotationtag.cxx2
-rw-r--r--sd/source/ui/annotations/annotationwindow.cxx4
-rw-r--r--sd/source/ui/app/sdmod1.cxx2
-rw-r--r--sd/source/ui/app/tmplctrl.cxx2
-rw-r--r--sd/source/ui/dlg/LayerTabBar.cxx2
-rw-r--r--sd/source/ui/dlg/RemoteDialogClientBox.cxx2
-rw-r--r--sd/source/ui/sidebar/LayoutMenu.cxx2
-rw-r--r--sd/source/ui/sidebar/MasterPagesSelector.cxx5
-rw-r--r--sd/source/ui/slideshow/slideshowimpl.cxx2
-rw-r--r--sd/source/ui/slidesorter/controller/SlideSorterController.cxx6
-rw-r--r--sd/source/ui/view/drviews4.cxx6
-rw-r--r--sd/source/ui/view/outlnvsh.cxx2
-rw-r--r--sd/source/ui/view/sdruler.cxx2
-rw-r--r--sd/source/ui/view/tabcontr.cxx4
-rw-r--r--sd/source/ui/view/viewshel.cxx12
-rw-r--r--sfx2/source/appl/newhelp.cxx4
-rw-r--r--sfx2/source/control/thumbnailview.cxx6
-rw-r--r--sfx2/source/sidebar/Deck.cxx2
-rw-r--r--sfx2/source/statbar/stbitem.cxx2
-rw-r--r--starmath/source/edit.cxx4
-rw-r--r--starmath/source/view.cxx6
-rw-r--r--svtools/source/brwbox/brwbox2.cxx2
-rw-r--r--svtools/source/brwbox/brwhead.cxx4
-rw-r--r--svtools/source/brwbox/datwin.cxx10
-rw-r--r--svtools/source/contnr/imivctl1.cxx14
-rw-r--r--svtools/source/contnr/svimpbox.cxx8
-rw-r--r--svtools/source/control/calendar.cxx4
-rw-r--r--svtools/source/control/fmtfield.cxx2
-rw-r--r--svtools/source/control/headbar.cxx2
-rw-r--r--svtools/source/control/scrwin.cxx6
-rw-r--r--svtools/source/control/tabbar.cxx7
-rw-r--r--svtools/source/control/toolbarmenu.cxx2
-rw-r--r--svtools/source/control/valueset.cxx8
-rw-r--r--svtools/source/table/tabledatawindow.cxx2
-rw-r--r--svx/source/dialog/imapwnd.cxx2
-rw-r--r--svx/source/dialog/svxruler.cxx2
-rw-r--r--svx/source/fmcomp/fmgridcl.cxx4
-rw-r--r--svx/source/fmcomp/gridctrl.cxx2
-rw-r--r--svx/source/form/filtnav.cxx6
-rw-r--r--svx/source/form/navigatortree.cxx6
-rw-r--r--svx/source/gallery2/galbrws1.cxx2
-rw-r--r--svx/source/gallery2/galctrl.cxx8
-rw-r--r--svx/source/stbctrls/pszctrl.cxx2
-rw-r--r--svx/source/stbctrls/xmlsecctrl.cxx2
-rw-r--r--svx/source/stbctrls/zoomctrl.cxx2
-rw-r--r--svx/source/svdraw/svdedxv.cxx4
-rw-r--r--sw/source/ui/dbui/createaddresslistdialog.cxx9
-rw-r--r--sw/source/ui/dbui/mmaddressblockpage.cxx9
-rw-r--r--sw/source/uibase/docvw/SidebarTxtControl.cxx4
-rw-r--r--sw/source/uibase/docvw/edtdd.cxx2
-rw-r--r--sw/source/uibase/docvw/edtwin.cxx41
-rw-r--r--sw/source/uibase/docvw/srcedtw.cxx14
-rw-r--r--sw/source/uibase/misc/redlndlg.cxx3
-rw-r--r--sw/source/uibase/uiview/pview.cxx8
-rw-r--r--sw/source/uibase/uiview/viewport.cxx2
-rw-r--r--sw/source/uibase/utlui/bookctrl.cxx2
-rw-r--r--sw/source/uibase/utlui/tmplctrl.cxx2
-rw-r--r--sw/source/uibase/utlui/unotools.cxx8
-rw-r--r--toolkit/source/awt/vclxwindow.cxx4
-rw-r--r--vcl/osx/salinst.cxx2
-rw-r--r--vcl/source/control/combobox.cxx2
-rw-r--r--vcl/source/control/edit.cxx14
-rw-r--r--vcl/source/control/ilstbox.cxx4
-rw-r--r--vcl/source/control/lstbox.cxx2
-rw-r--r--vcl/source/control/spinfld.cxx2
-rw-r--r--vcl/source/control/tabctrl.cxx2
-rw-r--r--vcl/source/edit/textview.cxx12
-rw-r--r--vcl/source/edit/vclmedit.cxx8
-rw-r--r--vcl/source/window/event.cxx2
-rw-r--r--vcl/source/window/layout.cxx2
-rw-r--r--vcl/source/window/menufloatingwindow.cxx2
-rw-r--r--vcl/source/window/openglwin.cxx2
-rw-r--r--vcl/source/window/printdlg.cxx4
-rw-r--r--vcl/source/window/scrwnd.cxx2
-rw-r--r--vcl/source/window/seleng.cxx2
-rw-r--r--vcl/source/window/toolbox.cxx4
-rw-r--r--vcl/source/window/window2.cxx8
-rw-r--r--vcl/source/window/winproc.cxx40
-rw-r--r--vcl/win/source/window/salframe.cxx2
116 files changed, 391 insertions, 386 deletions
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index e4ae127660c7..8d84a28bbb24 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -459,12 +459,12 @@ void EditorWindow::Command( const CommandEvent& rCEvt )
if ( pEditView )
{
pEditView->Command( rCEvt );
- if ( ( rCEvt.GetCommand() == COMMAND_WHEEL ) ||
- ( rCEvt.GetCommand() == COMMAND_STARTAUTOSCROLL ) ||
- ( rCEvt.GetCommand() == COMMAND_AUTOSCROLL ) )
+ if ( ( rCEvt.GetCommand() == CommandEventId::Wheel ) ||
+ ( rCEvt.GetCommand() == CommandEventId::StartAutoScroll ) ||
+ ( rCEvt.GetCommand() == CommandEventId::AutoScroll ) )
{
HandleScrollCommand( rCEvt, rModulWindow.GetHScrollBar(), &rModulWindow.GetEditVScrollBar() );
- } else if ( rCEvt.GetCommand() == COMMAND_CONTEXTMENU ) {
+ } else if ( rCEvt.GetCommand() == CommandEventId::ContextMenu ) {
SfxDispatcher* pDispatcher = GetDispatcher();
if ( pDispatcher )
{
@@ -1497,7 +1497,7 @@ void BreakPointWindow::MouseButtonDown( const MouseEvent& rMEvt )
void BreakPointWindow::Command( const CommandEvent& rCEvt )
{
- if ( rCEvt.GetCommand() == COMMAND_CONTEXTMENU )
+ if ( rCEvt.GetCommand() == CommandEventId::ContextMenu )
{
Point aPos( rCEvt.IsMouseEvent() ? rCEvt.GetMousePosPixel() : Point(1,1) );
Point aEventPos( PixelToLogic( aPos ) );
diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx
index 1575aa67fc74..8dc391e4d608 100644
--- a/basctl/source/basicide/baside3.cxx
+++ b/basctl/source/basicide/baside3.cxx
@@ -195,13 +195,13 @@ void DialogWindow::KeyInput( const KeyEvent& rKEvt )
void DialogWindow::Command( const CommandEvent& rCEvt )
{
- if ( ( rCEvt.GetCommand() == COMMAND_WHEEL ) ||
- ( rCEvt.GetCommand() == COMMAND_STARTAUTOSCROLL ) ||
- ( rCEvt.GetCommand() == COMMAND_AUTOSCROLL ) )
+ if ( ( rCEvt.GetCommand() == CommandEventId::Wheel ) ||
+ ( rCEvt.GetCommand() == CommandEventId::StartAutoScroll ) ||
+ ( rCEvt.GetCommand() == CommandEventId::AutoScroll ) )
{
HandleScrollCommand( rCEvt, GetHScrollBar(), GetVScrollBar() );
}
- else if ( rCEvt.GetCommand() == COMMAND_CONTEXTMENU )
+ else if ( rCEvt.GetCommand() == CommandEventId::ContextMenu )
{
if (SfxDispatcher* pDispatcher = GetDispatcher())
{
diff --git a/basctl/source/basicide/bastypes.cxx b/basctl/source/basicide/bastypes.cxx
index 8f9fd1717d41..5fc8268a77ec 100644
--- a/basctl/source/basicide/bastypes.cxx
+++ b/basctl/source/basicide/bastypes.cxx
@@ -487,7 +487,7 @@ void TabBar::MouseButtonDown( const MouseEvent& rMEvt )
void TabBar::Command( const CommandEvent& rCEvt )
{
- if ( ( rCEvt.GetCommand() == COMMAND_CONTEXTMENU ) && !IsInEditMode() )
+ if ( ( rCEvt.GetCommand() == CommandEventId::ContextMenu ) && !IsInEditMode() )
{
Point aPos( rCEvt.IsMouseEvent() ? rCEvt.GetMousePosPixel() : Point(1,1) );
if ( rCEvt.IsMouseEvent() ) // select right tab
diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx
index 9d0f94a71839..1e28f3f07abb 100644
--- a/chart2/source/controller/main/ChartController_Window.cxx
+++ b/chart2/source/controller/main/ChartController_Window.cxx
@@ -969,7 +969,7 @@ void ChartController::execute_Command( const CommandEvent& rCEvt )
}
// pop-up menu
- if(rCEvt.GetCommand() == COMMAND_CONTEXTMENU && !bIsAction)
+ if(rCEvt.GetCommand() == CommandEventId::ContextMenu && !bIsAction)
{
{
SolarMutexGuard aGuard;
@@ -1259,10 +1259,10 @@ void ChartController::execute_Command( const CommandEvent& rCEvt )
}
}
}
- else if( ( rCEvt.GetCommand() == COMMAND_STARTEXTTEXTINPUT ) ||
- ( rCEvt.GetCommand() == COMMAND_EXTTEXTINPUT ) ||
- ( rCEvt.GetCommand() == COMMAND_ENDEXTTEXTINPUT ) ||
- ( rCEvt.GetCommand() == COMMAND_INPUTCONTEXTCHANGE ) )
+ else if( ( rCEvt.GetCommand() == CommandEventId::StartExtTextInput ) ||
+ ( rCEvt.GetCommand() == CommandEventId::ExtTextInput ) ||
+ ( rCEvt.GetCommand() == CommandEventId::EndExtTextInput ) ||
+ ( rCEvt.GetCommand() == CommandEventId::InputContextChange ) )
{
//#i84417# enable editing with IME
SolarMutexGuard aGuard;
diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx
index 506ca0919aaf..65064c34c4a8 100644
--- a/cui/source/options/optcolor.cxx
+++ b/cui/source/options/optcolor.cxx
@@ -951,8 +951,7 @@ bool ColorConfigCtrl_Impl::PreNotify( NotifyEvent& rNEvt )
if(rNEvt.GetType() == MouseNotifyEvent::COMMAND)
{
const CommandEvent* pCEvt = rNEvt.GetCommandEvent();
- sal_uInt16 nCmd = pCEvt->GetCommand();
- if( COMMAND_WHEEL == nCmd )
+ if( pCEvt->GetCommand() == CommandEventId::Wheel )
{
Command(*pCEvt);
return true;
@@ -966,9 +965,9 @@ void ColorConfigCtrl_Impl::Command( const CommandEvent& rCEvt )
switch ( rCEvt.GetCommand() )
{
- case COMMAND_WHEEL:
- case COMMAND_STARTAUTOSCROLL:
- case COMMAND_AUTOSCROLL:
+ case CommandEventId::Wheel:
+ case CommandEventId::StartAutoScroll:
+ case CommandEventId::AutoScroll:
{
const CommandWheelData* pWheelData = rCEvt.GetWheelData();
if(pWheelData && !pWheelData->IsHorz() && CommandWheelMode::ZOOM != pWheelData->GetMode())
diff --git a/dbaccess/source/ui/misc/WTypeSelect.cxx b/dbaccess/source/ui/misc/WTypeSelect.cxx
index fad658bb2d87..dcde972e33d3 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 bcd5d47458d2..f3ef5af16ff7 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 4f556d2bfe70..3bf8774b764f 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 31697a39ae00..52dcde3d589a 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 f0408d945205..4db24a60cec6 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 0c5ca6a9064e..2cb3efea4629 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 203341077a09..9074ac93d45e 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 81dfc575169d..5aced5b1d127 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())
{
diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
index 77e926f0ef96..26b577ebab7d 100644
--- a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
+++ b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
@@ -888,7 +888,7 @@ bool ExtensionBox_Impl::Notify( NotifyEvent& rNEvt )
if ( rNEvt.GetType() == MouseNotifyEvent::COMMAND )
{
if ( m_bHasScrollBar &&
- ( rNEvt.GetCommandEvent()->GetCommand() == COMMAND_WHEEL ) )
+ ( rNEvt.GetCommandEvent()->GetCommand() == CommandEventId::Wheel ) )
{
const CommandWheelData* pData = rNEvt.GetCommandEvent()->GetWheelData();
if ( pData->GetMode() == CommandWheelMode::SCROLL )
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index d74bb8b44fc7..bfded820d6fa 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -347,7 +347,7 @@ void ImpEditEngine::Command( const CommandEvent& rCEvt, EditView* pView )
{
GetSelEngine().SetCurView( pView );
SetActiveView( pView );
- if ( rCEvt.GetCommand() == COMMAND_STARTEXTTEXTINPUT )
+ if ( rCEvt.GetCommand() == CommandEventId::StartExtTextInput )
{
pView->DeleteSelected();
delete mpIMEInfos;
@@ -360,9 +360,9 @@ void ImpEditEngine::Command( const CommandEvent& rCEvt, EditView* pView )
mpIMEInfos->bWasCursorOverwrite = !pView->IsInsertMode();
UndoActionStart( EDITUNDO_INSERT );
}
- else if ( rCEvt.GetCommand() == COMMAND_ENDEXTTEXTINPUT )
+ else if ( rCEvt.GetCommand() == CommandEventId::EndExtTextInput )
{
- OSL_ENSURE( mpIMEInfos, "COMMAND_ENDEXTTEXTINPUT => Kein Start ?" );
+ OSL_ENSURE( mpIMEInfos, "CommandEventId::EndExtTextInput => Kein Start ?" );
if( mpIMEInfos )
{
// #102812# convert quotes in IME text
@@ -400,9 +400,9 @@ void ImpEditEngine::Command( const CommandEvent& rCEvt, EditView* pView )
}
UndoActionEnd( EDITUNDO_INSERT );
}
- else if ( rCEvt.GetCommand() == COMMAND_EXTTEXTINPUT )
+ else if ( rCEvt.GetCommand() == CommandEventId::ExtTextInput )
{
- OSL_ENSURE( mpIMEInfos, "COMMAND_EXTTEXTINPUT => No Start ?" );
+ OSL_ENSURE( mpIMEInfos, "CommandEventId::ExtTextInput => No Start ?" );
if( mpIMEInfos )
{
const CommandExtTextInputData* pData = rCEvt.GetExtTextInputData();
@@ -469,10 +469,10 @@ void ImpEditEngine::Command( const CommandEvent& rCEvt, EditView* pView )
pView->HideCursor();
}
}
- else if ( rCEvt.GetCommand() == COMMAND_INPUTCONTEXTCHANGE )
+ else if ( rCEvt.GetCommand() == CommandEventId::InputContextChange )
{
}
- else if ( rCEvt.GetCommand() == COMMAND_CURSORPOS )
+ else if ( rCEvt.GetCommand() == CommandEventId::CursorPos )
{
if ( mpIMEInfos && mpIMEInfos->nLen )
{
@@ -498,7 +498,7 @@ void ImpEditEngine::Command( const CommandEvent& rCEvt, EditView* pView )
pView->GetWindow()->SetCursorRect();
}
}
- else if ( rCEvt.GetCommand() == COMMAND_SELECTIONCHANGE )
+ else if ( rCEvt.GetCommand() == CommandEventId::SelectionChange )
{
const CommandSelectionChangeData *pData = rCEvt.GetSelectionChangeData();
@@ -518,7 +518,7 @@ void ImpEditEngine::Command( const CommandEvent& rCEvt, EditView* pView )
}
pView->SetSelection( aSelection );
}
- else if ( rCEvt.GetCommand() == COMMAND_PREPARERECONVERSION )
+ else if ( rCEvt.GetCommand() == CommandEventId::PrepareReconversion )
{
if ( pView->HasSelection() )
{
@@ -534,7 +534,7 @@ void ImpEditEngine::Command( const CommandEvent& rCEvt, EditView* pView )
}
}
}
- else if ( rCEvt.GetCommand() == COMMAND_QUERYCHARPOSITION )
+ else if ( rCEvt.GetCommand() == CommandEventId::QueryCharPosition )
{
if ( mpIMEInfos && mpIMEInfos->nLen )
{
diff --git a/extensions/source/propctrlr/browserlistbox.cxx b/extensions/source/propctrlr/browserlistbox.cxx
index 13b2df89e334..dca5033e18cb 100644
--- a/extensions/source/propctrlr/browserlistbox.cxx
+++ b/extensions/source/propctrlr/browserlistbox.cxx
@@ -1272,9 +1272,9 @@ namespace pcr
if ( _rNEvt.GetType() == MouseNotifyEvent::COMMAND)
{
const CommandEvent* pCommand = _rNEvt.GetCommandEvent();
- if ( ( COMMAND_WHEEL == pCommand->GetCommand() )
- || ( COMMAND_STARTAUTOSCROLL == pCommand->GetCommand() )
- || ( COMMAND_AUTOSCROLL == pCommand->GetCommand() )
+ if ( ( CommandEventId::Wheel == pCommand->GetCommand() )
+ || ( CommandEventId::StartAutoScroll == pCommand->GetCommand() )
+ || ( CommandEventId::AutoScroll == pCommand->GetCommand() )
)
{
// interested in scroll events if we have a scrollbar
diff --git a/forms/source/richtext/richtextimplcontrol.cxx b/forms/source/richtext/richtextimplcontrol.cxx
index 0d67724aa65f..bc4a6292d48c 100644
--- a/forms/source/richtext/richtextimplcontrol.cxx
+++ b/forms/source/richtext/richtextimplcontrol.cxx
@@ -557,9 +557,9 @@ namespace frm
long RichTextControlImpl::HandleCommand( const CommandEvent& _rEvent )
{
- if ( ( _rEvent.GetCommand() == COMMAND_WHEEL )
- || ( _rEvent.GetCommand() == COMMAND_STARTAUTOSCROLL )
- || ( _rEvent.GetCommand() == COMMAND_AUTOSCROLL )
+ if ( ( _rEvent.GetCommand() == CommandEventId::Wheel )
+ || ( _rEvent.GetCommand() == CommandEventId::StartAutoScroll )
+ || ( _rEvent.GetCommand() == CommandEventId::AutoScroll )
)
{
m_pAntiImpl->HandleScrollCommand( _rEvent, m_pHScroll, m_pVScroll );
diff --git a/framework/source/dispatch/windowcommanddispatch.cxx b/framework/source/dispatch/windowcommanddispatch.cxx
index 69205499dcee..dcdc4651c2d8 100644
--- a/framework/source/dispatch/windowcommanddispatch.cxx
+++ b/framework/source/dispatch/windowcommanddispatch.cxx
@@ -107,7 +107,7 @@ IMPL_LINK(WindowCommandDispatch, impl_notifyCommand, void*, pParam)
return 0L;
const CommandEvent* pCommand = static_cast<CommandEvent*>(pEvent->GetData());
- if (pCommand->GetCommand() != COMMAND_SHOWDIALOG)
+ if (pCommand->GetCommand() != CommandEventId::ShowDialog)
return 0L;
const CommandDialogData* pData = pCommand->GetDialogData();
diff --git a/framework/source/uielement/statusbarmanager.cxx b/framework/source/uielement/statusbarmanager.cxx
index f6bfb7eaf03e..80e81c03032b 100644
--- a/framework/source/uielement/statusbarmanager.cxx
+++ b/framework/source/uielement/statusbarmanager.cxx
@@ -599,7 +599,7 @@ void StatusBarManager::Command( const CommandEvent& rEvt )
if ( m_bDisposed )
return;
- if ( rEvt.GetCommand() == COMMAND_CONTEXTMENU )
+ if ( rEvt.GetCommand() == CommandEventId::ContextMenu )
{
sal_uInt16 nId = m_pStatusBar->GetItemId( rEvt.GetMousePosPixel() );
StatusBarControllerMap::const_iterator it = m_aControllerMap.find( nId );
diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx
index 46d04d9e5894..3e12b5efef78 100644
--- a/framework/source/uielement/toolbarmanager.cxx
+++ b/framework/source/uielement/toolbarmanager.cxx
@@ -1777,7 +1777,7 @@ IMPL_LINK_TYPED( ToolBarManager, Command, CommandEvent const *, pCmdEvt, void )
if ( m_bDisposed )
return;
- if ( pCmdEvt->GetCommand() != COMMAND_CONTEXTMENU )
+ if ( pCmdEvt->GetCommand() != CommandEventId::ContextMenu )
return;
::PopupMenu * pMenu = GetToolBarCustomMenu(m_pToolBar);
diff --git a/include/vcl/cmdevt.hxx b/include/vcl/cmdevt.hxx
index 32164687a95d..9a7d65042f72 100644
--- a/include/vcl/cmdevt.hxx
+++ b/include/vcl/cmdevt.hxx
@@ -382,42 +382,46 @@ public:
// - CommandEvent -
-#define COMMAND_CONTEXTMENU ((sal_uInt16)1)
-#define COMMAND_STARTDRAG ((sal_uInt16)2)
-#define COMMAND_WHEEL ((sal_uInt16)3)
-#define COMMAND_STARTAUTOSCROLL ((sal_uInt16)4)
-#define COMMAND_AUTOSCROLL ((sal_uInt16)5)
-#define COMMAND_STARTEXTTEXTINPUT ((sal_uInt16)7)
-#define COMMAND_EXTTEXTINPUT ((sal_uInt16)8)
-#define COMMAND_ENDEXTTEXTINPUT ((sal_uInt16)9)
-#define COMMAND_INPUTCONTEXTCHANGE ((sal_uInt16)10)
-#define COMMAND_CURSORPOS ((sal_uInt16)11)
-#define COMMAND_PASTESELECTION ((sal_uInt16)12)
-#define COMMAND_MODKEYCHANGE ((sal_uInt16)13)
-#define COMMAND_HANGUL_HANJA_CONVERSION ((sal_uInt16)14)
-#define COMMAND_INPUTLANGUAGECHANGE ((sal_uInt16)15)
-#define COMMAND_SHOWDIALOG ((sal_uInt16)16)
-#define COMMAND_MEDIA ((sal_uInt16)17)
-#define COMMAND_SELECTIONCHANGE ((sal_uInt16)18)
-#define COMMAND_PREPARERECONVERSION ((sal_uInt16)19)
-#define COMMAND_QUERYCHARPOSITION ((sal_uInt16)20)
-#define COMMAND_SWIPE ((sal_uInt16)21)
-#define COMMAND_LONGPRESS ((sal_uInt16)22)
+enum class CommandEventId
+{
+ NONE = 0,
+ ContextMenu = 1,
+ StartDrag = 2,
+ Wheel = 3,
+ StartAutoScroll = 4,
+ AutoScroll = 5,
+ StartExtTextInput = 7,
+ ExtTextInput = 8,
+ EndExtTextInput = 9,
+ InputContextChange = 10,
+ CursorPos = 11,
+ PasteSelection = 12,
+ ModKeyChange = 13,
+ HangulHanjaConversion = 14,
+ InputLanguageChange = 15,
+ ShowDialog = 16,
+ Media = 17,
+ SelectionChange = 18,
+ PrepareReconversion = 19,
+ QueryCharPosition = 20,
+ Swipe = 21,
+ LongPress = 22,
+};
class VCL_DLLPUBLIC CommandEvent
{
private:
Point maPos;
void* mpData;
- sal_uInt16 mnCommand;
+ CommandEventId mnCommand;
bool mbMouseEvent;
public:
CommandEvent();
- CommandEvent( const Point& rMousePos, sal_uInt16 nCmd,
+ CommandEvent( const Point& rMousePos, CommandEventId nCmd,
bool bMEvt = false, const void* pCmdData = NULL );
- sal_uInt16 GetCommand() const { return mnCommand; }
+ CommandEventId GetCommand() const { return mnCommand; }
const Point& GetMousePosPixel() const { return maPos; }
bool IsMouseEvent() const { return mbMouseEvent; }
void* GetEventData() const { return mpData; }
@@ -437,12 +441,12 @@ public:
inline CommandEvent::CommandEvent()
{
mpData = NULL;
- mnCommand = 0;
+ mnCommand = CommandEventId::NONE;
mbMouseEvent = false;
}
inline CommandEvent::CommandEvent( const Point& rMousePos,
- sal_uInt16 nCmd, bool bMEvt, const void* pCmdData ) :
+ CommandEventId nCmd, bool bMEvt, const void* pCmdData ) :
maPos( rMousePos )
{
mpData = const_cast<void*>(pCmdData);
@@ -452,7 +456,7 @@ inline CommandEvent::CommandEvent( const Point& rMousePos,
inline const CommandExtTextInputData* CommandEvent::GetExtTextInputData() const
{
- if ( mnCommand == COMMAND_EXTTEXTINPUT )
+ if ( mnCommand == CommandEventId::ExtTextInput )
return static_cast<const CommandExtTextInputData*>(mpData);
else
return NULL;
@@ -460,7 +464,7 @@ inline const CommandExtTextInputData* CommandEvent::GetExtTextInputData() const
inline const CommandInputContextData* CommandEvent::GetInputContextChangeData() const
{
- if ( mnCommand == COMMAND_INPUTCONTEXTCHANGE )
+ if ( mnCommand == CommandEventId::InputContextChange )
return static_cast<const CommandInputContextData*>(mpData);
else
return NULL;
@@ -468,7 +472,7 @@ inline const CommandInputContextData* CommandEvent::GetInputContextChangeData()
inline const CommandWheelData* CommandEvent::GetWheelData() const
{
- if ( mnCommand == COMMAND_WHEEL )
+ if ( mnCommand == CommandEventId::Wheel )
return static_cast<const CommandWheelData*>(mpData);
else
return NULL;
@@ -476,7 +480,7 @@ inline const CommandWheelData* CommandEvent::GetWheelData() const
inline const CommandScrollData* CommandEvent::GetAutoScrollData() const
{
- if ( mnCommand == COMMAND_AUTOSCROLL )
+ if ( mnCommand == CommandEventId::AutoScroll )
return static_cast<const CommandScrollData*>(mpData);
else
return NULL;
@@ -484,7 +488,7 @@ inline const CommandScrollData* CommandEvent::GetAutoScrollData() const
inline const CommandModKeyData* CommandEvent::GetModKeyData() const
{
- if( mnCommand == COMMAND_MODKEYCHANGE )
+ if( mnCommand == CommandEventId::ModKeyChange )
return static_cast<const CommandModKeyData*>(mpData);
else
return NULL;
@@ -492,7 +496,7 @@ inline const CommandModKeyData* CommandEvent::GetModKeyData() const
inline const CommandDialogData* CommandEvent::GetDialogData() const
{
- if( mnCommand == COMMAND_SHOWDIALOG )
+ if( mnCommand == CommandEventId::ShowDialog )
return static_cast<const CommandDialogData*>(mpData);
else
return NULL;
@@ -500,7 +504,7 @@ inline const CommandDialogData* CommandEvent::GetDialogData() const
inline CommandMediaData* CommandEvent::GetMediaData() const
{
- if( mnCommand == COMMAND_MEDIA )
+ if( mnCommand == CommandEventId::Media )
return static_cast<CommandMediaData*>(mpData);
else
return NULL;
@@ -508,7 +512,7 @@ inline CommandMediaData* CommandEvent::GetMediaData() const
inline const CommandSelectionChangeData* CommandEvent::GetSelectionChangeData() const
{
- if( mnCommand == COMMAND_SELECTIONCHANGE )
+ if( mnCommand == CommandEventId::SelectionChange )
return static_cast<const CommandSelectionChangeData*>(mpData);
else
return NULL;
@@ -516,7 +520,7 @@ inline const CommandSelectionChangeData* CommandEvent::GetSelectionChangeData()
inline const CommandSwipeData* CommandEvent::GetSwipeData() const
{
- if( mnCommand == COMMAND_SWIPE )
+ if( mnCommand == CommandEventId::Swipe )
return static_cast<const CommandSwipeData*>(mpData);
else
return NULL;
@@ -524,7 +528,7 @@ inline const CommandSwipeData* CommandEvent::GetSwipeData() const
inline const CommandLongPressData* CommandEvent::GetLongPressData() const
{
- if( mnCommand == COMMAND_LONGPRESS )
+ if( mnCommand == CommandEventId::LongPress )
return static_cast<const CommandLongPressData*>(mpData);
else
return NULL;
diff --git a/reportdesign/source/ui/dlg/GroupsSorting.cxx b/reportdesign/source/ui/dlg/GroupsSorting.cxx
index 839fa91abfde..ff786a5fce33 100644
--- a/reportdesign/source/ui/dlg/GroupsSorting.cxx
+++ b/reportdesign/source/ui/dlg/GroupsSorting.cxx
@@ -723,7 +723,7 @@ void OFieldExpressionControl::Command(const CommandEvent& rEvt)
{
switch (rEvt.GetCommand())
{
- case COMMAND_CONTEXTMENU:
+ case CommandEventId::ContextMenu:
{
if (!rEvt.IsMouseEvent())
{
diff --git a/reportdesign/source/ui/dlg/Navigator.cxx b/reportdesign/source/ui/dlg/Navigator.cxx
index 13c4e5a9066c..f65a642278e0 100644
--- a/reportdesign/source/ui/dlg/Navigator.cxx
+++ b/reportdesign/source/ui/dlg/Navigator.cxx
@@ -275,9 +275,9 @@ void NavigatorTree::dispose()
void NavigatorTree::Command( const CommandEvent& rEvt )
{
bool bHandled = false;
- switch( rEvt.GetCommand() )
+ switch( rEvt.GetCommand())
{
- case COMMAND_CONTEXTMENU:
+ case CommandEventId::ContextMenu:
{
// die Stelle, an der geklickt wurde
SvTreeListEntry* ptClickedOn = NULL;
@@ -349,7 +349,9 @@ void NavigatorTree::Command( const CommandEvent& rEvt )
}
bHandled = true;
- } break;
+ }
+ break;
+ default: break;
}
if (!bHandled)
diff --git a/reportdesign/source/ui/report/ReportSection.cxx b/reportdesign/source/ui/report/ReportSection.cxx
index d8e97db06131..ae97c8ef5fa2 100644
--- a/reportdesign/source/ui/report/ReportSection.cxx
+++ b/reportdesign/source/ui/report/ReportSection.cxx
@@ -475,33 +475,29 @@ void lcl_insertMenuItemImages(
void OReportSection::Command( const CommandEvent& _rCEvt )
{
Window::Command(_rCEvt);
- switch (_rCEvt.GetCommand())
+ if (_rCEvt.GetCommand() == CommandEventId::ContextMenu)
{
- case COMMAND_CONTEXTMENU:
- {
- OReportController& rController = m_pParent->getViewsWindow()->getView()->getReportView()->getController();
- uno::Reference<frame::XFrame> xFrame = rController.getFrame();
- PopupMenu aContextMenu( ModuleRes( RID_MENU_REPORT ) );
- uno::Reference< report::XReportDefinition> xReportDefinition = getSection()->getReportDefinition();
+ OReportController& rController = m_pParent->getViewsWindow()->getView()->getReportView()->getController();
+ uno::Reference<frame::XFrame> xFrame = rController.getFrame();
+ PopupMenu aContextMenu( ModuleRes( RID_MENU_REPORT ) );
+ uno::Reference< report::XReportDefinition> xReportDefinition = getSection()->getReportDefinition();
- lcl_insertMenuItemImages(aContextMenu,rController,xReportDefinition,xFrame);
+ lcl_insertMenuItemImages(aContextMenu,rController,xReportDefinition,xFrame);
- Point aPos = _rCEvt.GetMousePosPixel();
- m_pView->EndAction();
- const sal_uInt16 nId = aContextMenu.Execute(this, aPos);
- if ( nId )
+ Point aPos = _rCEvt.GetMousePosPixel();
+ m_pView->EndAction();
+ const sal_uInt16 nId = aContextMenu.Execute(this, aPos);
+ if ( nId )
+ {
+ uno::Sequence< beans::PropertyValue> aArgs;
+ if ( nId == SID_ATTR_CHAR_COLOR_BACKGROUND )
{
- uno::Sequence< beans::PropertyValue> aArgs;
- if ( nId == SID_ATTR_CHAR_COLOR_BACKGROUND )
- {
- aArgs.realloc(1);
- aArgs[0].Name = "Selection";
- aArgs[0].Value <<= m_xSection;
- }
- rController.executeChecked(nId,aArgs);
+ aArgs.realloc(1);
+ aArgs[0].Name = "Selection";
+ aArgs[0].Value <<= m_xSection;
}
+ rController.executeChecked(nId,aArgs);
}
- break;
}
}
diff --git a/reportdesign/source/ui/report/ScrollHelper.cxx b/reportdesign/source/ui/report/ScrollHelper.cxx
index ba789bc9f774..938fd45942db 100644
--- a/reportdesign/source/ui/report/ScrollHelper.cxx
+++ b/reportdesign/source/ui/report/ScrollHelper.cxx
@@ -330,9 +330,9 @@ bool OScrollWindowHelper::Notify( NotifyEvent& rNEvt )
{
const CommandEvent* pCommandEvent = rNEvt.GetCommandEvent();
if ( pCommandEvent &&
- ( ((pCommandEvent->GetCommand() == COMMAND_WHEEL) ||
- (pCommandEvent->GetCommand() == COMMAND_STARTAUTOSCROLL) ||
- (pCommandEvent->GetCommand() == COMMAND_AUTOSCROLL))) )
+ ( ((pCommandEvent->GetCommand() == CommandEventId::Wheel) ||
+ (pCommandEvent->GetCommand() == CommandEventId::StartAutoScroll) ||
+ (pCommandEvent->GetCommand() == CommandEventId::AutoScroll))) )
{
ScrollBar* pHScrBar = NULL;
ScrollBar* pVScrBar = NULL;
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index fdfe240a0044..d15a66153f6a 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -3268,9 +3268,9 @@ bool ScInputHandler::InputCommand( const CommandEvent& rCEvt, bool bForce )
{
bool bUsed = false;
- if ( rCEvt.GetCommand() == COMMAND_CURSORPOS )
+ if ( rCEvt.GetCommand() == CommandEventId::CursorPos )
{
- // For COMMAND_CURSORPOS, do as little as possible, because
+ // For CommandEventId::CursorPos, do as little as possible, because
// with remote VCL, even a ShowCursor will generate another event.
if ( eMode != SC_INPUT_NONE )
{
@@ -3285,7 +3285,7 @@ bool ScInputHandler::InputCommand( const CommandEvent& rCEvt, bool bForce )
}
}
}
- else if ( rCEvt.GetCommand() == COMMAND_QUERYCHARPOSITION )
+ else if ( rCEvt.GetCommand() == CommandEventId::QueryCharPosition )
{
if ( eMode != SC_INPUT_NONE )
{
@@ -3358,7 +3358,7 @@ bool ScInputHandler::InputCommand( const CommandEvent& rCEvt, bool bForce )
bUsed = true;
- if ( rCEvt.GetCommand() == COMMAND_ENDEXTTEXTINPUT )
+ if ( rCEvt.GetCommand() == CommandEventId::EndExtTextInput )
{
// AutoInput after ext text input
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 7f57d9879d25..8b84cc632116 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -1595,8 +1595,8 @@ void ScTextWnd::MouseButtonUp( const MouseEvent& rMEvt )
void ScTextWnd::Command( const CommandEvent& rCEvt )
{
bInputMode = true;
- sal_uInt16 nCommand = rCEvt.GetCommand();
- if ( pEditView /* && nCommand == COMMAND_STARTDRAG */ )
+ CommandEventId nCommand = rCEvt.GetCommand();
+ if ( pEditView /* && nCommand == CommandEventId::StartDrag */ )
{
ScModule* pScMod = SC_MOD();
ScTabViewShell* pStartViewSh = ScTabViewShell::GetActiveViewShell();
@@ -1609,11 +1609,11 @@ void ScTextWnd::Command( const CommandEvent& rCEvt )
pEditView->Command( rCEvt );
pScMod->SetInEditCommand( false );
- // COMMAND_STARTDRAG does not mean by far that the content was actually changed,
+ // CommandEventId::StartDrag does not mean by far that the content was actually changed,
// so don't trigger an InputChanged.
//! Detect if dragged with Move or forbid Drag&Move somehow
- if ( nCommand == COMMAND_STARTDRAG )
+ if ( nCommand == CommandEventId::StartDrag )
{
// Is dragged onto another View?
ScTabViewShell* pEndViewSh = ScTabViewShell::GetActiveViewShell();
@@ -1628,11 +1628,11 @@ void ScTextWnd::Command( const CommandEvent& rCEvt )
}
}
}
- else if ( nCommand == COMMAND_CURSORPOS )
+ else if ( nCommand == CommandEventId::CursorPos )
{
- // don't call InputChanged for COMMAND_CURSORPOS
+ // don't call InputChanged for CommandEventId::CursorPos
}
- else if ( nCommand == COMMAND_INPUTLANGUAGECHANGE )
+ else if ( nCommand == CommandEventId::InputLanguageChange )
{
// #i55929# Font and font size state depends on input language if nothing is selected,
// so the slots have to be invalidated when the input language is changed.
@@ -1645,9 +1645,9 @@ void ScTextWnd::Command( const CommandEvent& rCEvt )
rBindings.Invalidate( SID_ATTR_CHAR_FONTHEIGHT );
}
}
- else if ( nCommand == COMMAND_WHEEL )
+ else if ( nCommand == CommandEventId::Wheel )
{
- //don't call InputChanged for COMMAND_WHEEL
+ //don't call InputChanged for CommandEventId::Wheel
}
else
SC_MOD()->InputChanged( pEditView );
@@ -1662,7 +1662,7 @@ void ScTextWnd::StartDrag( sal_Int8 /* nAction */, const Point& rPosPixel )
{
if ( pEditView )
{
- CommandEvent aDragEvent( rPosPixel, COMMAND_STARTDRAG, true );
+ CommandEvent aDragEvent( rPosPixel, CommandEventId::StartDrag, true );
pEditView->Command( aDragEvent );
// handling of d&d to different view (CancelHandler) can't be done here,
diff --git a/sc/source/ui/dbgui/csvgrid.cxx b/sc/source/ui/dbgui/csvgrid.cxx
index 766ab71cd62d..8d29dc1b9349 100644
--- a/sc/source/ui/dbgui/csvgrid.cxx
+++ b/sc/source/ui/dbgui/csvgrid.cxx
@@ -949,7 +949,7 @@ void ScCsvGrid::Command( const CommandEvent& rCEvt )
{
switch( rCEvt.GetCommand() )
{
- case COMMAND_CONTEXTMENU:
+ case CommandEventId::ContextMenu:
{
if( rCEvt.IsMouseEvent() )
{
@@ -973,7 +973,7 @@ void ScCsvGrid::Command( const CommandEvent& rCEvt )
}
}
break;
- case COMMAND_WHEEL:
+ case CommandEventId::Wheel:
{
Point aPoint;
Rectangle aRect( aPoint, maWinSize );
diff --git a/sc/source/ui/drawfunc/fupoor.cxx b/sc/source/ui/drawfunc/fupoor.cxx
index 7f1a01bd40a5..b9e4eae8a67b 100644
--- a/sc/source/ui/drawfunc/fupoor.cxx
+++ b/sc/source/ui/drawfunc/fupoor.cxx
@@ -177,7 +177,7 @@ bool FuPoor::KeyInput(const KeyEvent& /* rKEvt */)
sal_uInt8 FuPoor::Command(const CommandEvent& rCEvt)
{
- if ( COMMAND_STARTDRAG == rCEvt.GetCommand() )
+ if ( CommandEventId::StartDrag == rCEvt.GetCommand() )
{
//!!! sollte Joe eigentlich machen:
// nur, wenn im Outliner was selektiert ist, darf
diff --git a/sc/source/ui/miscdlgs/acredlin.cxx b/sc/source/ui/miscdlgs/acredlin.cxx
index d7854dd9e1c0..32bcda49cf46 100644
--- a/sc/source/ui/miscdlgs/acredlin.cxx
+++ b/sc/source/ui/miscdlgs/acredlin.cxx
@@ -1697,7 +1697,7 @@ IMPL_LINK_NOARG(ScAcceptChgDlg, CommandHdl)
const CommandEvent aCEvt(pTheView->GetCommandEvent());
- if(aCEvt.GetCommand()==COMMAND_CONTEXTMENU)
+ if(aCEvt.GetCommand()==CommandEventId::ContextMenu)
{
ScPopupMenu aPopup(ScResId(RID_POPUP_CHANGES));
diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx
index 2e131c804bb4..30ebd411df31 100644
--- a/sc/source/ui/navipi/content.cxx
+++ b/sc/source/ui/navipi/content.cxx
@@ -567,7 +567,7 @@ void ScContentTree::Command( const CommandEvent& rCEvt )
switch ( rCEvt.GetCommand() )
{
- case COMMAND_STARTDRAG:
+ case CommandEventId::StartDrag:
// Aus dem ExecuteDrag heraus kann der Navigator geloescht werden
// (beim Umschalten auf einen anderen Dokument-Typ), das wuerde aber
// den StarView MouseMove-Handler, der Command() aufruft, umbringen.
@@ -578,7 +578,7 @@ void ScContentTree::Command( const CommandEvent& rCEvt )
bDone = true;
break;
- case COMMAND_CONTEXTMENU:
+ case CommandEventId::ContextMenu:
{
// Drag-Drop Modus
@@ -648,6 +648,7 @@ void ScContentTree::Command( const CommandEvent& rCEvt )
}
}
break;
+ default: break;
}
if (!bDone)
diff --git a/sc/source/ui/navipi/scenwnd.cxx b/sc/source/ui/navipi/scenwnd.cxx
index 70ca0bd45fbb..22ebb99c5eca 100644
--- a/sc/source/ui/navipi/scenwnd.cxx
+++ b/sc/source/ui/navipi/scenwnd.cxx
@@ -129,7 +129,7 @@ bool ScScenarioListBox::Notify( NotifyEvent& rNEvt )
else if ( rNEvt.GetType() == MouseNotifyEvent::COMMAND && GetSelectEntryCount() )
{
const CommandEvent* pCEvt = rNEvt.GetCommandEvent();
- if ( pCEvt && pCEvt->GetCommand() == COMMAND_CONTEXTMENU )
+ if ( pCEvt && pCEvt->GetCommand() == CommandEventId::ContextMenu )
{
if( const ScenarioEntry* pEntry = GetSelectedEntry() )
{
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index be2ff5e4775a..e59acb922793 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -2918,7 +2918,7 @@ void ScGridWindow::StartDrag( sal_Int8 /* nAction */, const Point& rPosPixel )
HideNoteMarker();
- CommandEvent aDragEvent( rPosPixel, COMMAND_STARTDRAG, true );
+ CommandEvent aDragEvent( rPosPixel, CommandEventId::StartDrag, true );
if (bEEMouse && pViewData->HasEditView( eWhich ))
{
@@ -2969,25 +2969,25 @@ void ScGridWindow::Command( const CommandEvent& rCEvt )
// menu from an inplace client is closed. Now we have the chance to
// deactivate the inplace client without any problem regarding parent
// windows and code on the stack.
- sal_uInt16 nCmd = rCEvt.GetCommand();
+ CommandEventId nCmd = rCEvt.GetCommand();
ScTabViewShell* pTabViewSh = pViewData->GetViewShell();
SfxInPlaceClient* pClient = pTabViewSh->GetIPClient();
if ( pClient &&
pClient->IsObjectInPlaceActive() &&
- nCmd == COMMAND_CONTEXTMENU )
+ nCmd == CommandEventId::ContextMenu )
{
pTabViewSh->DeactivateOle();
return;
}
ScModule* pScMod = SC_MOD();
- OSL_ENSURE( nCmd != COMMAND_STARTDRAG, "ScGridWindow::Command called with COMMAND_STARTDRAG" );
+ OSL_ENSURE( nCmd != CommandEventId::StartDrag, "ScGridWindow::Command called with CommandEventId::StartDrag" );
- if ( nCmd == COMMAND_STARTEXTTEXTINPUT ||
- nCmd == COMMAND_ENDEXTTEXTINPUT ||
- nCmd == COMMAND_EXTTEXTINPUT ||
- nCmd == COMMAND_CURSORPOS ||
- nCmd == COMMAND_QUERYCHARPOSITION )
+ if ( nCmd == CommandEventId::StartExtTextInput ||
+ nCmd == CommandEventId::EndExtTextInput ||
+ nCmd == CommandEventId::ExtTextInput ||
+ nCmd == CommandEventId::CursorPos ||
+ nCmd == CommandEventId::QueryCharPosition )
{
bool bEditView = pViewData->HasEditView( eWhich );
if (!bEditView)
@@ -3005,7 +3005,7 @@ void ScGridWindow::Command( const CommandEvent& rCEvt )
}
}
- if ( nCmd == COMMAND_CURSORPOS && !bEditView )
+ if ( nCmd == CommandEventId::CursorPos && !bEditView )
{
// CURSORPOS may be called without following text input,
// to set the input method window position
@@ -3027,7 +3027,7 @@ void ScGridWindow::Command( const CommandEvent& rCEvt )
return;
}
- if ( nCmd == COMMAND_PASTESELECTION )
+ if ( nCmd == CommandEventId::PasteSelection )
{
if ( bEEMouse )
{
@@ -3041,7 +3041,7 @@ void ScGridWindow::Command( const CommandEvent& rCEvt )
return;
}
- if ( nCmd == COMMAND_INPUTLANGUAGECHANGE )
+ if ( nCmd == CommandEventId::InputLanguageChange )
{
// #i55929# Font and font size state depends on input language if nothing is selected,
// so the slots have to be invalidated when the input language is changed.
@@ -3052,7 +3052,7 @@ void ScGridWindow::Command( const CommandEvent& rCEvt )
return;
}
- if ( nCmd == COMMAND_WHEEL || nCmd == COMMAND_STARTAUTOSCROLL || nCmd == COMMAND_AUTOSCROLL )
+ if ( nCmd == CommandEventId::Wheel || nCmd == CommandEventId::StartAutoScroll || nCmd == CommandEventId::AutoScroll )
{
bool bDone = pViewData->GetView()->ScrollCommand( rCEvt, eWhich );
if (!bDone)
@@ -3065,7 +3065,7 @@ void ScGridWindow::Command( const CommandEvent& rCEvt )
if (bDisable)
return;
- if ( nCmd == COMMAND_CONTEXTMENU && !SC_MOD()->GetIsWaterCan() )
+ if ( nCmd == CommandEventId::ContextMenu && !SC_MOD()->GetIsWaterCan() )
{
bool bMouse = rCEvt.IsMouseEvent();
if ( bMouse && nMouseStatus == SC_GM_IGNORE )
diff --git a/sc/source/ui/view/hdrcont.cxx b/sc/source/ui/view/hdrcont.cxx
index 77e1ce12cab6..15407ea88133 100644
--- a/sc/source/ui/view/hdrcont.cxx
+++ b/sc/source/ui/view/hdrcont.cxx
@@ -811,8 +811,8 @@ void ScHeaderControl::Tracking( const TrackingEvent& rTEvt )
void ScHeaderControl::Command( const CommandEvent& rCEvt )
{
- sal_uInt16 nCmd = rCEvt.GetCommand();
- if ( nCmd == COMMAND_CONTEXTMENU )
+ CommandEventId nCmd = rCEvt.GetCommand();
+ if ( nCmd == CommandEventId::ContextMenu )
{
StopMarking(); // finish selection / dragging
@@ -861,7 +861,7 @@ void ScHeaderControl::Command( const CommandEvent& rCEvt )
pViewSh->GetDispatcher()->ExecutePopup( aResId );
}
}
- else if ( nCmd == COMMAND_STARTDRAG )
+ else if ( nCmd == CommandEventId::StartDrag )
{
pSelEngine->Command( rCEvt );
}
diff --git a/sc/source/ui/view/preview.cxx b/sc/source/ui/view/preview.cxx
index b5448cbc64bd..0feb97d64502 100644
--- a/sc/source/ui/view/preview.cxx
+++ b/sc/source/ui/view/preview.cxx
@@ -639,14 +639,14 @@ void ScPreview::Paint( vcl::RenderContext& /*rRenderContext*/, const Rectangle&
void ScPreview::Command( const CommandEvent& rCEvt )
{
- sal_uInt16 nCmd = rCEvt.GetCommand();
- if ( nCmd == COMMAND_WHEEL || nCmd == COMMAND_STARTAUTOSCROLL || nCmd == COMMAND_AUTOSCROLL )
+ CommandEventId nCmd = rCEvt.GetCommand();
+ if ( nCmd == CommandEventId::Wheel || nCmd == CommandEventId::StartAutoScroll || nCmd == CommandEventId::AutoScroll )
{
bool bDone = pViewShell->ScrollCommand( rCEvt );
if (!bDone)
Window::Command(rCEvt);
}
- else if ( nCmd == COMMAND_CONTEXTMENU )
+ else if ( nCmd == CommandEventId::ContextMenu )
SfxDispatcher::ExecutePopup();
else
Window::Command( rCEvt );
diff --git a/sc/source/ui/view/tabcont.cxx b/sc/source/ui/view/tabcont.cxx
index 98156a8f2382..7801b719c08b 100644
--- a/sc/source/ui/view/tabcont.cxx
+++ b/sc/source/ui/view/tabcont.cxx
@@ -425,24 +425,20 @@ void ScTabControl::Command( const CommandEvent& rCEvt )
// ViewFrame erstmal aktivieren (Bug 19493):
pViewSh->SetActive();
- sal_uInt16 nCmd = rCEvt.GetCommand();
- if ( nCmd == COMMAND_CONTEXTMENU )
+ if ( rCEvt.GetCommand() == CommandEventId::ContextMenu && !bDisable)
{
- if (!bDisable)
- {
- // #i18735# select the page that is under the mouse cursor
- // if multiple tables are selected and the one under the cursor
- // is not part of them then unselect them
- sal_uInt16 nId = GetPageId( rCEvt.GetMousePosPixel() );
- SwitchToPageId(nId);
-
- // #i52073# OLE inplace editing has to be stopped before showing the sheet tab context menu
- pViewSh->DeactivateOle();
-
- // Popup-Menu:
- // get Dispatcher from ViewData (ViewFrame) instead of Shell (Frame), so it can't be null
- pViewData->GetDispatcher().ExecutePopup( ScResId(RID_POPUP_TAB) );
- }
+ // #i18735# select the page that is under the mouse cursor
+ // if multiple tables are selected and the one under the cursor
+ // is not part of them then unselect them
+ sal_uInt16 nId = GetPageId( rCEvt.GetMousePosPixel() );
+ SwitchToPageId(nId);
+
+ // #i52073# OLE inplace editing has to be stopped before showing the sheet tab context menu
+ pViewSh->DeactivateOle();
+
+ // Popup-Menu:
+ // get Dispatcher from ViewData (ViewFrame) instead of Shell (Frame), so it can't be null
+ pViewData->GetDispatcher().ExecutePopup( ScResId(RID_POPUP_TAB) );
}
}
@@ -454,7 +450,7 @@ void ScTabControl::StartDrag( sal_Int8 /* nAction */, const Point& rPosPixel )
if (!bDisable)
{
vcl::Region aRegion( Rectangle(0,0,0,0) );
- CommandEvent aCEvt( rPosPixel, COMMAND_STARTDRAG, true ); // needed for StartDrag
+ CommandEvent aCEvt( rPosPixel, CommandEventId::StartDrag, true ); // needed for StartDrag
if (TabBar::StartDrag( aCEvt, aRegion ))
DoDrag( aRegion );
}
diff --git a/sd/source/ui/animations/CustomAnimationList.cxx b/sd/source/ui/animations/CustomAnimationList.cxx
index d840f0ab4db1..0f883707ac0e 100644
--- a/sd/source/ui/animations/CustomAnimationList.cxx
+++ b/sd/source/ui/animations/CustomAnimationList.cxx
@@ -473,7 +473,7 @@ void CustomAnimationList::KeyInput( const KeyEvent& rKEvt )
case KEY_SPACE:
{
const Point aPos;
- const CommandEvent aCEvt( aPos, COMMAND_CONTEXTMENU );
+ const CommandEvent aCEvt( aPos, CommandEventId::ContextMenu );
Command( aCEvt );
return;
}
diff --git a/sd/source/ui/annotations/annotationtag.cxx b/sd/source/ui/annotations/annotationtag.cxx
index 440c7bf940fb..9a0c861f84ca 100644
--- a/sd/source/ui/annotations/annotationtag.cxx
+++ b/sd/source/ui/annotations/annotationtag.cxx
@@ -350,7 +350,7 @@ bool AnnotationTag::RequestHelp( const HelpEvent& /*rHEvt*/ )
/** returns true if the SmartTag consumes this event. */
bool AnnotationTag::Command( const CommandEvent& rCEvt )
{
- if ( rCEvt.GetCommand() == COMMAND_CONTEXTMENU )
+ if ( rCEvt.GetCommand() == CommandEventId::ContextMenu )
{
vcl::Window* pWindow = mrView.GetViewShell()->GetActiveWindow();
if( pWindow )
diff --git a/sd/source/ui/annotations/annotationwindow.cxx b/sd/source/ui/annotations/annotationwindow.cxx
index 6ed8eb39dbf4..1b08e48aecd4 100644
--- a/sd/source/ui/annotations/annotationwindow.cxx
+++ b/sd/source/ui/annotations/annotationwindow.cxx
@@ -215,7 +215,7 @@ void AnnotationTextWindow::MouseButtonUp( const MouseEvent& rMEvt )
void AnnotationTextWindow::Command( const CommandEvent& rCEvt )
{
- if ( rCEvt.GetCommand() == COMMAND_CONTEXTMENU )
+ if ( rCEvt.GetCommand() == CommandEventId::ContextMenu )
{
mpAnnotationWindow->Command(rCEvt);
}
@@ -738,7 +738,7 @@ void AnnotationWindow::MouseButtonDown( const MouseEvent& rMEvt )
void AnnotationWindow::Command( const CommandEvent& rCEvt )
{
- if ( rCEvt.GetCommand() == COMMAND_CONTEXTMENU )
+ if ( rCEvt.GetCommand() == CommandEventId::ContextMenu )
{
if( mpMeta->IsVisible() &&(mpMeta->GetPosPixel().Y() < rCEvt.GetMousePosPixel().Y()) )
return;
diff --git a/sd/source/ui/app/sdmod1.cxx b/sd/source/ui/app/sdmod1.cxx
index 79d10ba494c4..47a6bc004336 100644
--- a/sd/source/ui/app/sdmod1.cxx
+++ b/sd/source/ui/app/sdmod1.cxx
@@ -422,7 +422,7 @@ IMPL_STATIC_LINK( SdModule, EventListenerHdl, VclSimpleEvent*, pEvent )
{
const CommandEvent& rEvent = *static_cast<const CommandEvent*>(static_cast<VclWindowEvent*>(pEvent)->GetData());
- if( rEvent.GetCommand() == COMMAND_MEDIA )
+ if( rEvent.GetCommand() == CommandEventId::Media )
{
CommandMediaData* pMediaData = rEvent.GetMediaData();
pMediaData->SetPassThroughToOS(false);
diff --git a/sd/source/ui/app/tmplctrl.cxx b/sd/source/ui/app/tmplctrl.cxx
index 494cd21d9d64..4e3ca3394fc2 100644
--- a/sd/source/ui/app/tmplctrl.cxx
+++ b/sd/source/ui/app/tmplctrl.cxx
@@ -92,7 +92,7 @@ void SdTemplateControl::Paint( const UserDrawEvent& )
void SdTemplateControl::Command( const CommandEvent& rCEvt )
{
- if ( rCEvt.GetCommand() == COMMAND_CONTEXTMENU && !GetStatusBar().GetItemText( GetId() ).isEmpty() )
+ if ( rCEvt.GetCommand() == CommandEventId::ContextMenu && !GetStatusBar().GetItemText( GetId() ).isEmpty() )
{
SfxViewFrame* pViewFrame = SfxViewFrame::Current();
diff --git a/sd/source/ui/dlg/LayerTabBar.cxx b/sd/source/ui/dlg/LayerTabBar.cxx
index 934c5bbf89f9..500d78cbcfd0 100644
--- a/sd/source/ui/dlg/LayerTabBar.cxx
+++ b/sd/source/ui/dlg/LayerTabBar.cxx
@@ -151,7 +151,7 @@ sal_Int8 LayerTabBar::ExecuteDrop( const ExecuteDropEvent& rEvt )
void LayerTabBar::Command(const CommandEvent& rCEvt)
{
- if ( rCEvt.GetCommand() == COMMAND_CONTEXTMENU )
+ if ( rCEvt.GetCommand() == CommandEventId::ContextMenu )
{
SfxDispatcher* pDispatcher = pDrViewSh->GetViewFrame()->GetDispatcher();
pDispatcher->ExecutePopup(SdResId(RID_LAYERTAB_POPUP));
diff --git a/sd/source/ui/dlg/RemoteDialogClientBox.cxx b/sd/source/ui/dlg/RemoteDialogClientBox.cxx
index 8c74a7673499..4c8bcf9df530 100644
--- a/sd/source/ui/dlg/RemoteDialogClientBox.cxx
+++ b/sd/source/ui/dlg/RemoteDialogClientBox.cxx
@@ -614,7 +614,7 @@ bool ClientBox::Notify( NotifyEvent& rNEvt )
if ( rNEvt.GetType() == MouseNotifyEvent::COMMAND )
{
if ( m_bHasScrollBar &&
- ( rNEvt.GetCommandEvent()->GetCommand() == COMMAND_WHEEL ) )
+ ( rNEvt.GetCommandEvent()->GetCommand() == CommandEventId::Wheel ) )
{
const CommandWheelData* pData = rNEvt.GetCommandEvent()->GetWheelData();
if ( pData->GetMode() == CommandWheelMode::SCROLL )
diff --git a/sd/source/ui/sidebar/LayoutMenu.cxx b/sd/source/ui/sidebar/LayoutMenu.cxx
index 31abab125e46..4c2ba8bb638e 100644
--- a/sd/source/ui/sidebar/LayoutMenu.cxx
+++ b/sd/source/ui/sidebar/LayoutMenu.cxx
@@ -590,7 +590,7 @@ void LayoutMenu::Command (const CommandEvent& rEvent)
{
switch (rEvent.GetCommand())
{
- case COMMAND_CONTEXTMENU:
+ case CommandEventId::ContextMenu:
if ( ! SD_MOD()->GetWaterCan())
{
// Determine the position where to show the menu.
diff --git a/sd/source/ui/sidebar/MasterPagesSelector.cxx b/sd/source/ui/sidebar/MasterPagesSelector.cxx
index 055c28e5f292..2c522c16a4ab 100644
--- a/sd/source/ui/sidebar/MasterPagesSelector.cxx
+++ b/sd/source/ui/sidebar/MasterPagesSelector.cxx
@@ -206,7 +206,7 @@ void MasterPagesSelector::Command (const CommandEvent& rEvent)
{
switch (rEvent.GetCommand())
{
- case COMMAND_CONTEXTMENU:
+ case CommandEventId::ContextMenu:
{
// Use the currently selected item and show the popup menu in its
// center.
@@ -237,8 +237,9 @@ void MasterPagesSelector::Command (const CommandEvent& rEvent)
// Show the menu.
pMenu->Execute(this, Rectangle(aPosition,Size(1,1)), POPUPMENU_EXECUTE_DOWN);
}
- break;
}
+ break;
+ default: break;
}
}
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx
index 4018cb143b3b..de631df21e24 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -2013,7 +2013,7 @@ IMPL_LINK( SlideshowImpl, EventListenerHdl, VclSimpleEvent*, pEvent )
{
const CommandEvent& rEvent = *static_cast<const CommandEvent*>(static_cast<VclWindowEvent*>(pEvent)->GetData());
- if( rEvent.GetCommand() == COMMAND_MEDIA )
+ if( rEvent.GetCommand() == CommandEventId::Media )
{
CommandMediaData* pMediaData = rEvent.GetMediaData();
pMediaData->SetPassThroughToOS(false);
diff --git a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
index 81fe35a6ab9a..a8412772b79b 100644
--- a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
+++ b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
@@ -314,7 +314,7 @@ bool SlideSorterController::Command (
switch (rEvent.GetCommand())
{
- case COMMAND_CONTEXTMENU:
+ case CommandEventId::ContextMenu:
{
SdPage* pPage = NULL;
sal_uInt16 nPopupId;
@@ -426,7 +426,7 @@ bool SlideSorterController::Command (
}
break;
- case COMMAND_WHEEL:
+ case CommandEventId::Wheel:
{
const CommandWheelData* pData = rEvent.GetWheelData();
if (pData == NULL)
@@ -459,6 +459,8 @@ bool SlideSorterController::Command (
bEventHasBeenHandled = true;
}
break;
+
+ default: break;
}
return bEventHasBeenHandled;
diff --git a/sd/source/ui/view/drviews4.cxx b/sd/source/ui/view/drviews4.cxx
index dc7a8fe99354..8e157e0ed122 100644
--- a/sd/source/ui/view/drviews4.cxx
+++ b/sd/source/ui/view/drviews4.cxx
@@ -460,7 +460,7 @@ void DrawViewShell::Command(const CommandEvent& rCEvt, ::sd::Window* pWin)
// windows and code on the stack.
SfxInPlaceClient* pIPClient = GetViewShell()->GetIPClient();
bool bIsOleActive = ( pIPClient && pIPClient->IsObjectInPlaceActive() );
- if ( bIsOleActive && ( rCEvt.GetCommand() == COMMAND_CONTEXTMENU ))
+ if ( bIsOleActive && ( rCEvt.GetCommand() == CommandEventId::ContextMenu ))
{
// Deactivate OLE object
mpDrawView->UnmarkAll();
@@ -475,7 +475,7 @@ void DrawViewShell::Command(const CommandEvent& rCEvt, ::sd::Window* pWin)
const bool bNativeShow (SlideShow::IsRunning(GetViewShellBase()));
- if( rCEvt.GetCommand() == COMMAND_PASTESELECTION && !bNativeShow )
+ if( rCEvt.GetCommand() == CommandEventId::PasteSelection && !bNativeShow )
{
TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSelection( GetActiveWindow() ) );
@@ -503,7 +503,7 @@ void DrawViewShell::Command(const CommandEvent& rCEvt, ::sd::Window* pWin)
}
}
}
- else if( rCEvt.GetCommand() == COMMAND_CONTEXTMENU && !bNativeShow &&
+ else if( rCEvt.GetCommand() == CommandEventId::ContextMenu && !bNativeShow &&
pWin != NULL && !mpDrawView->IsAction() && !SD_MOD()->GetWaterCan() )
{
sal_uInt16 nSdResId = 0; // ResourceID for popup menu
diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx
index 59ada2769de4..c3382c85967a 100644
--- a/sd/source/ui/view/outlnvsh.cxx
+++ b/sd/source/ui/view/outlnvsh.cxx
@@ -1368,7 +1368,7 @@ void OutlineViewShell::GetStatusBarState(SfxItemSet& rSet)
void OutlineViewShell::Command( const CommandEvent& rCEvt, ::sd::Window* pWin )
{
- if ( rCEvt.GetCommand() == COMMAND_CONTEXTMENU )
+ if ( rCEvt.GetCommand() == CommandEventId::ContextMenu )
{
GetActiveWindow()->ReleaseMouse();
diff --git a/sd/source/ui/view/sdruler.cxx b/sd/source/ui/view/sdruler.cxx
index 95d4c6ca52a6..8c3c9b78fba7 100644
--- a/sd/source/ui/view/sdruler.cxx
+++ b/sd/source/ui/view/sdruler.cxx
@@ -142,7 +142,7 @@ void Ruler::SetNullOffset(const Point& rOffset)
void Ruler::Command(const CommandEvent& rCEvt)
{
- if( rCEvt.GetCommand() == COMMAND_CONTEXTMENU &&
+ if( rCEvt.GetCommand() == CommandEventId::ContextMenu &&
!pDrViewShell->GetView()->IsTextEdit() )
{
SvxRuler::Command( rCEvt );
diff --git a/sd/source/ui/view/tabcontr.cxx b/sd/source/ui/view/tabcontr.cxx
index 908e3e570905..d66f3198575e 100644
--- a/sd/source/ui/view/tabcontr.cxx
+++ b/sd/source/ui/view/tabcontr.cxx
@@ -278,9 +278,7 @@ sal_Int8 TabControl::ExecuteDrop( const ExecuteDropEvent& rEvt )
void TabControl::Command(const CommandEvent& rCEvt)
{
- sal_uInt16 nCmd = rCEvt.GetCommand();
-
- if ( nCmd == COMMAND_CONTEXTMENU )
+ if ( rCEvt.GetCommand() == CommandEventId::ContextMenu )
{
bool bGraphicShell = pDrViewSh->ISA(GraphicViewShell);
sal_uInt16 nResId = bGraphicShell ? RID_GRAPHIC_PAGETAB_POPUP :
diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx
index f5168b5f7b0b..b7b0694dc69a 100644
--- a/sd/source/ui/view/viewshel.cxx
+++ b/sd/source/ui/view/viewshel.cxx
@@ -641,7 +641,7 @@ void ViewShell::Command(const CommandEvent& rCEvt, ::sd::Window* pWin)
if( !bDone )
{
- if( rCEvt.GetCommand() == COMMAND_INPUTLANGUAGECHANGE )
+ if( rCEvt.GetCommand() == CommandEventId::InputLanguageChange )
{
//#i42732# update state of fontname if input language changes
GetViewFrame()->GetBindings().Invalidate( SID_ATTR_CHAR_FONT );
@@ -682,7 +682,7 @@ bool ViewShell::HandleScrollCommand(const CommandEvent& rCEvt, ::sd::Window* pWi
switch( rCEvt.GetCommand() )
{
- case COMMAND_SWIPE:
+ case CommandEventId::Swipe:
{
rtl::Reference< SlideShow > xSlideShow( SlideShow::GetSlideShow( GetViewShellBase() ) );
if (xSlideShow.is())
@@ -692,7 +692,7 @@ bool ViewShell::HandleScrollCommand(const CommandEvent& rCEvt, ::sd::Window* pWi
}
}
break;
- case COMMAND_LONGPRESS:
+ case CommandEventId::LongPress:
{
rtl::Reference< SlideShow > xSlideShow( SlideShow::GetSlideShow( GetViewShellBase() ) );
if (xSlideShow.is())
@@ -703,7 +703,7 @@ bool ViewShell::HandleScrollCommand(const CommandEvent& rCEvt, ::sd::Window* pWi
}
break;
- case COMMAND_WHEEL:
+ case CommandEventId::Wheel:
{
Reference< XSlideShowController > xSlideShowController( SlideShow::GetSlideShowController(GetViewShellBase() ) );
if( xSlideShowController.is() )
@@ -726,8 +726,8 @@ bool ViewShell::HandleScrollCommand(const CommandEvent& rCEvt, ::sd::Window* pWi
}
}
// fall through when not running slideshow
- case COMMAND_STARTAUTOSCROLL:
- case COMMAND_AUTOSCROLL:
+ case CommandEventId::StartAutoScroll:
+ case CommandEventId::AutoScroll:
{
const CommandWheelData* pData = rCEvt.GetWheelData();
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index 7adaaf1a3173..3b261724f1d4 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -1278,7 +1278,7 @@ bool BookmarksBox_Impl::Notify( NotifyEvent& rNEvt )
else if ( MouseNotifyEvent::COMMAND == nType )
{
const CommandEvent* pCEvt = rNEvt.GetCommandEvent();
- if ( pCEvt->GetCommand() == COMMAND_CONTEXTMENU )
+ if ( pCEvt->GetCommand() == CommandEventId::ContextMenu )
{
PopupMenu aMenu( SfxResId( MENU_HELP_BOOKMARKS ) );
sal_uInt16 nId = aMenu.Execute( this, pCEvt->GetMousePosPixel() );
@@ -2394,7 +2394,7 @@ bool SfxHelpTextWindow_Impl::PreNotify( NotifyEvent& rNEvt )
const CommandEvent* pCmdEvt = rNEvt.GetCommandEvent();
vcl::Window* pCmdWin = rNEvt.GetWindow();
- if ( pCmdEvt->GetCommand() == COMMAND_CONTEXTMENU && pCmdWin != this && pCmdWin != aToolBox.get() )
+ if ( pCmdEvt->GetCommand() == CommandEventId::ContextMenu && pCmdWin != this && pCmdWin != aToolBox.get() )
{
Point aPos;
if ( pCmdEvt->IsMouseEvent() )
diff --git a/sfx2/source/control/thumbnailview.cxx b/sfx2/source/control/thumbnailview.cxx
index 25f63c48c79a..6fbd97d75eaa 100644
--- a/sfx2/source/control/thumbnailview.cxx
+++ b/sfx2/source/control/thumbnailview.cxx
@@ -847,9 +847,9 @@ void ThumbnailView::MouseButtonUp( const MouseEvent& rMEvt )
void ThumbnailView::Command( const CommandEvent& rCEvt )
{
- if ( (rCEvt.GetCommand() == COMMAND_WHEEL) ||
- (rCEvt.GetCommand() == COMMAND_STARTAUTOSCROLL) ||
- (rCEvt.GetCommand() == COMMAND_AUTOSCROLL) )
+ if ( (rCEvt.GetCommand() == CommandEventId::Wheel) ||
+ (rCEvt.GetCommand() == CommandEventId::StartAutoScroll) ||
+ (rCEvt.GetCommand() == CommandEventId::AutoScroll) )
{
if ( HandleScrollCommand( rCEvt, NULL, mpScrBar ) )
return;
diff --git a/sfx2/source/sidebar/Deck.cxx b/sfx2/source/sidebar/Deck.cxx
index ae6ba6da825f..4b2893e823d2 100644
--- a/sfx2/source/sidebar/Deck.cxx
+++ b/sfx2/source/sidebar/Deck.cxx
@@ -168,7 +168,7 @@ bool Deck::Notify (NotifyEvent& rEvent)
if (pCommandEvent != NULL)
switch (pCommandEvent->GetCommand())
{
- case COMMAND_WHEEL:
+ case CommandEventId::Wheel:
return ProcessWheelEvent(pCommandEvent);
default:
diff --git a/sfx2/source/statbar/stbitem.cxx b/sfx2/source/statbar/stbitem.cxx
index 3ebd81948203..c0ded64c7da3 100644
--- a/sfx2/source/statbar/stbitem.cxx
+++ b/sfx2/source/statbar/stbitem.cxx
@@ -377,7 +377,7 @@ throw (::com::sun::star::uno::RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
::Point aPos( rPos.X, rPos.Y );
- CommandEvent aCmdEvent( aPos, (sal_uInt16)nCommand, true, NULL );
+ CommandEvent aCmdEvent( aPos, static_cast<CommandEventId>(nCommand), true, NULL );
Command( aCmdEvent );
}
diff --git a/starmath/source/edit.cxx b/starmath/source/edit.cxx
index ce8471f69591..3213a3477fd4 100644
--- a/starmath/source/edit.cxx
+++ b/starmath/source/edit.cxx
@@ -341,7 +341,7 @@ void SmEditWindow::MouseButtonDown(const MouseEvent &rEvt)
void SmEditWindow::Command(const CommandEvent& rCEvt)
{
bool bForwardEvt = true;
- if (rCEvt.GetCommand() == COMMAND_CONTEXTMENU)
+ if (rCEvt.GetCommand() == CommandEventId::ContextMenu)
{
GetParent()->ToTop();
@@ -368,7 +368,7 @@ void SmEditWindow::Command(const CommandEvent& rCEvt)
xPopupMenu->Execute( this, aPoint );
bForwardEvt = false;
}
- else if (rCEvt.GetCommand() == COMMAND_WHEEL)
+ else if (rCEvt.GetCommand() == CommandEventId::Wheel)
bForwardEvt = !HandleWheelCommands( rCEvt );
if (bForwardEvt)
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index 57e3ad92a0ac..f8937e340c32 100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -564,7 +564,7 @@ void SmGraphicWindow::Command(const CommandEvent& rCEvt)
{
switch ( rCEvt.GetCommand() )
{
- case COMMAND_CONTEXTMENU:
+ case CommandEventId::ContextMenu:
{
GetParent()->ToTop();
SmResId aResId( RID_VIEWMENU );
@@ -583,7 +583,7 @@ void SmGraphicWindow::Command(const CommandEvent& rCEvt)
}
break;
- case COMMAND_WHEEL:
+ case CommandEventId::Wheel:
{
const CommandWheelData* pWData = rCEvt.GetWheelData();
if ( pWData && CommandWheelMode::ZOOM == pWData->GetMode() )
@@ -598,6 +598,8 @@ void SmGraphicWindow::Command(const CommandEvent& rCEvt)
}
}
break;
+
+ default: break;
}
}
if ( bCallBase )
diff --git a/svtools/source/brwbox/brwbox2.cxx b/svtools/source/brwbox/brwbox2.cxx
index e115d7bc475c..dc1e92145369 100644
--- a/svtools/source/brwbox/brwbox2.cxx
+++ b/svtools/source/brwbox/brwbox2.cxx
@@ -1443,7 +1443,7 @@ void BrowseBox::MouseButtonDown( const MouseEvent& rEvt )
// event occurred out of data area
if ( rEvt.IsRight() )
pDataWin->Command(
- CommandEvent( Point( 1, LONG_MAX ), COMMAND_CONTEXTMENU, true ) );
+ CommandEvent( Point( 1, LONG_MAX ), CommandEventId::ContextMenu, true ) );
else
SetNoSelection();
}
diff --git a/svtools/source/brwbox/brwhead.cxx b/svtools/source/brwbox/brwhead.cxx
index 0c723a31e32a..c0b99ef473ad 100644
--- a/svtools/source/brwbox/brwhead.cxx
+++ b/svtools/source/brwbox/brwhead.cxx
@@ -51,14 +51,14 @@ void BrowserHeader::dispose()
void BrowserHeader::Command( const CommandEvent& rCEvt )
{
- if ( !GetCurItemId() && COMMAND_CONTEXTMENU == rCEvt.GetCommand() )
+ if ( !GetCurItemId() && CommandEventId::ContextMenu == rCEvt.GetCommand() )
{
Point aPos( rCEvt.GetMousePosPixel() );
if ( _pBrowseBox->IsFrozen(0) )
aPos.X() += _pBrowseBox->GetColumnWidth(0);
_pBrowseBox->GetDataWindow().Command( CommandEvent(
Point( aPos.X(), aPos.Y() - GetSizePixel().Height() ),
- COMMAND_CONTEXTMENU, rCEvt.IsMouseEvent() ) );
+ CommandEventId::ContextMenu, rCEvt.IsMouseEvent() ) );
}
}
diff --git a/svtools/source/brwbox/datwin.cxx b/svtools/source/brwbox/datwin.cxx
index 6dd64ed0389a..e3dfa380cd21 100644
--- a/svtools/source/brwbox/datwin.cxx
+++ b/svtools/source/brwbox/datwin.cxx
@@ -416,16 +416,16 @@ void BrowserDataWin::Command( const CommandEvent& rEvt )
{
// scroll mouse event?
BrowseBox *pBox = GetParent();
- if ( ( (rEvt.GetCommand() == COMMAND_WHEEL) ||
- (rEvt.GetCommand() == COMMAND_STARTAUTOSCROLL) ||
- (rEvt.GetCommand() == COMMAND_AUTOSCROLL) ) &&
+ if ( ( (rEvt.GetCommand() == CommandEventId::Wheel) ||
+ (rEvt.GetCommand() == CommandEventId::StartAutoScroll) ||
+ (rEvt.GetCommand() == CommandEventId::AutoScroll) ) &&
( HandleScrollCommand( rEvt, pBox->aHScroll.get(), pBox->pVScroll ) ) )
return;
Point aEventPos( rEvt.GetMousePosPixel() );
long nRow = pBox->GetRowAtYPosPixel( aEventPos.Y(), false);
MouseEvent aMouseEvt( aEventPos, 1, MouseEventModifiers::SELECT, MOUSE_LEFT );
- if ( COMMAND_CONTEXTMENU == rEvt.GetCommand() && rEvt.IsMouseEvent() &&
+ if ( CommandEventId::ContextMenu == rEvt.GetCommand() && rEvt.IsMouseEvent() &&
nRow < pBox->GetRowCount() && !pBox->IsRowSelected(nRow) )
{
bInCommand = true;
@@ -447,7 +447,7 @@ void BrowserDataWin::Command( const CommandEvent& rEvt )
return;
bInCommand = false;
- if ( COMMAND_STARTDRAG == rEvt.GetCommand() )
+ if ( CommandEventId::StartDrag == rEvt.GetCommand() )
MouseButtonUp( aMouseEvt );
Control::Command( rEvt );
diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx
index b5d9ca55bb96..d28af606e7f1 100644
--- a/svtools/source/contnr/imivctl1.cxx
+++ b/svtools/source/contnr/imivctl1.cxx
@@ -2149,7 +2149,7 @@ bool SvxIconChoiceCtrl_Impl::HandleScrollCommand( const CommandEvent& rCmd )
switch( rCmd.GetCommand() )
{
- case COMMAND_STARTAUTOSCROLL:
+ case CommandEventId::StartAutoScroll:
{
pView->EndTracking();
sal_uInt16 nScrollFlags = 0;
@@ -2165,7 +2165,7 @@ bool SvxIconChoiceCtrl_Impl::HandleScrollCommand( const CommandEvent& rCmd )
}
break;
- case COMMAND_WHEEL:
+ case CommandEventId::Wheel:
{
const CommandWheelData* pData = rCmd.GetWheelData();
if( pData && (CommandWheelMode::SCROLL == pData->GetMode()) && !pData->IsHorz() )
@@ -2186,7 +2186,7 @@ bool SvxIconChoiceCtrl_Impl::HandleScrollCommand( const CommandEvent& rCmd )
}
break;
- case COMMAND_AUTOSCROLL:
+ case CommandEventId::AutoScroll:
{
const CommandScrollData* pData = rCmd.GetAutoScrollData();
if( pData )
@@ -2196,6 +2196,8 @@ bool SvxIconChoiceCtrl_Impl::HandleScrollCommand( const CommandEvent& rCmd )
}
}
break;
+
+ default: break;
}
if( nScrollDX || nScrollDY )
@@ -2214,9 +2216,9 @@ bool SvxIconChoiceCtrl_Impl::HandleScrollCommand( const CommandEvent& rCmd )
void SvxIconChoiceCtrl_Impl::Command( const CommandEvent& rCEvt )
{
// scroll mouse event?
- if( (rCEvt.GetCommand() == COMMAND_WHEEL) ||
- (rCEvt.GetCommand() == COMMAND_STARTAUTOSCROLL) ||
- (rCEvt.GetCommand() == COMMAND_AUTOSCROLL) )
+ if( (rCEvt.GetCommand() == CommandEventId::Wheel) ||
+ (rCEvt.GetCommand() == CommandEventId::StartAutoScroll) ||
+ (rCEvt.GetCommand() == CommandEventId::AutoScroll) )
{
if( HandleScrollCommand( rCEvt ) )
return;
diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx
index 78ec65c1734b..b50efab898e7 100644
--- a/svtools/source/contnr/svimpbox.cxx
+++ b/svtools/source/contnr/svimpbox.cxx
@@ -2965,17 +2965,17 @@ static void lcl_DeleteSubPopups(PopupMenu* pPopup)
void SvImpLBox::Command( const CommandEvent& rCEvt )
{
- sal_uInt16 nCommand = rCEvt.GetCommand();
+ CommandEventId nCommand = rCEvt.GetCommand();
- if( nCommand == COMMAND_CONTEXTMENU )
+ if( nCommand == CommandEventId::ContextMenu )
aEditIdle.Stop();
// scroll mouse event?
- if( ( ( nCommand == COMMAND_WHEEL ) || ( nCommand == COMMAND_STARTAUTOSCROLL ) || ( nCommand == COMMAND_AUTOSCROLL ) )
+ if( ( ( nCommand == CommandEventId::Wheel ) || ( nCommand == CommandEventId::StartAutoScroll ) || ( nCommand == CommandEventId::AutoScroll ) )
&& pView->HandleScrollCommand( rCEvt, aHorSBar.get(), aVerSBar.get() ) )
return;
- if( bContextMenuHandling && nCommand == COMMAND_CONTEXTMENU )
+ if( bContextMenuHandling && nCommand == CommandEventId::ContextMenu )
{
Point aPopupPos;
bool bClickedIsFreePlace = false;
diff --git a/svtools/source/control/calendar.cxx b/svtools/source/control/calendar.cxx
index 647bd118d2ea..e88fc0ebd5e9 100644
--- a/svtools/source/control/calendar.cxx
+++ b/svtools/source/control/calendar.cxx
@@ -1638,7 +1638,7 @@ void Calendar::RequestHelp( const HelpEvent& rHEvt )
void Calendar::Command( const CommandEvent& rCEvt )
{
- if ( rCEvt.GetCommand() == COMMAND_CONTEXTMENU )
+ if ( rCEvt.GetCommand() == CommandEventId::ContextMenu )
{
if ( !mbSelection && rCEvt.IsMouseEvent() )
{
@@ -1651,7 +1651,7 @@ void Calendar::Command( const CommandEvent& rCEvt )
}
}
}
- else if ( rCEvt.GetCommand() == COMMAND_WHEEL )
+ else if ( rCEvt.GetCommand() == CommandEventId::Wheel )
{
const CommandWheelData* pData = rCEvt.GetWheelData();
if ( pData->GetMode() == CommandWheelMode::SCROLL )
diff --git a/svtools/source/control/fmtfield.cxx b/svtools/source/control/fmtfield.cxx
index 3ba6477517be..0b09fb3ebce6 100644
--- a/svtools/source/control/fmtfield.cxx
+++ b/svtools/source/control/fmtfield.cxx
@@ -777,7 +777,7 @@ bool FormattedField::Notify(NotifyEvent& rNEvt)
if ((rNEvt.GetType() == MouseNotifyEvent::COMMAND) && !IsReadOnly())
{
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) && ImplGetFormatter()->IsTextFormat(m_nFormatKey))
diff --git a/svtools/source/control/headbar.cxx b/svtools/source/control/headbar.cxx
index 90f07816ed8e..6d4be8b36188 100644
--- a/svtools/source/control/headbar.cxx
+++ b/svtools/source/control/headbar.cxx
@@ -1018,7 +1018,7 @@ void HeaderBar::Resize()
void HeaderBar::Command( const CommandEvent& rCEvt )
{
- if ( rCEvt.IsMouseEvent() && (rCEvt.GetCommand() == COMMAND_STARTDRAG) && !mbDrag )
+ if ( rCEvt.IsMouseEvent() && (rCEvt.GetCommand() == CommandEventId::StartDrag) && !mbDrag )
{
ImplStartDrag( rCEvt.GetMousePosPixel(), true );
return;
diff --git a/svtools/source/control/scrwin.cxx b/svtools/source/control/scrwin.cxx
index 9bac31091e9a..3f716b00ca46 100644
--- a/svtools/source/control/scrwin.cxx
+++ b/svtools/source/control/scrwin.cxx
@@ -67,9 +67,9 @@ void ScrollableWindow::dispose()
void ScrollableWindow::Command( const CommandEvent& rCEvt )
{
- if ( (rCEvt.GetCommand() == COMMAND_WHEEL) ||
- (rCEvt.GetCommand() == COMMAND_STARTAUTOSCROLL) ||
- (rCEvt.GetCommand() == COMMAND_AUTOSCROLL) )
+ if ( (rCEvt.GetCommand() == CommandEventId::Wheel) ||
+ (rCEvt.GetCommand() == CommandEventId::StartAutoScroll) ||
+ (rCEvt.GetCommand() == CommandEventId::AutoScroll) )
{
ScrollBar* pHScrBar;
ScrollBar* pVScrBar;
diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx
index ae62dc1a6b27..f65b7257e0f9 100644
--- a/svtools/source/control/tabbar.cxx
+++ b/svtools/source/control/tabbar.cxx
@@ -303,8 +303,7 @@ void ImplTabButton::MouseButtonUp(const MouseEvent& rMouseEvent)
void ImplTabButton::Command(const CommandEvent& rCommandEvent)
{
- sal_uInt16 nCommand = rCommandEvent.GetCommand();
- if (nCommand == COMMAND_CONTEXTMENU)
+ if (rCommandEvent.GetCommand() == CommandEventId::ContextMenu)
{
TabBar* pParent = GetParent();
pParent->maScrollAreaContextHdl.Call((void*)&rCommandEvent);
@@ -1417,7 +1416,7 @@ bool TabBar::PreNotify( NotifyEvent& rNEvt )
{
if (rNEvt.GetType() == MouseNotifyEvent::COMMAND)
{
- if (rNEvt.GetCommandEvent()->GetCommand() == COMMAND_WHEEL)
+ if (rNEvt.GetCommandEvent()->GetCommand() == CommandEventId::Wheel)
{
const CommandWheelData* pData = rNEvt.GetCommandEvent()->GetWheelData();
sal_uInt16 nNewPos = mnFirstPos;
@@ -2344,7 +2343,7 @@ OString TabBar::GetHelpId( sal_uInt16 nPageId ) const
bool TabBar::StartDrag( const CommandEvent& rCEvt, vcl::Region& rRegion )
{
- if ( !(mnWinStyle & WB_DRAG) || (rCEvt.GetCommand() != COMMAND_STARTDRAG) )
+ if ( !(mnWinStyle & WB_DRAG) || (rCEvt.GetCommand() != CommandEventId::StartDrag) )
return false;
// Check if the clicked page was selected. If this is not the case
diff --git a/svtools/source/control/toolbarmenu.cxx b/svtools/source/control/toolbarmenu.cxx
index 4e20373fc9df..adc60bbf2ac6 100644
--- a/svtools/source/control/toolbarmenu.cxx
+++ b/svtools/source/control/toolbarmenu.cxx
@@ -1535,7 +1535,7 @@ void ToolbarMenu::DataChanged( const DataChangedEvent& rDCEvt )
void ToolbarMenu::Command( const CommandEvent& rCEvt )
{
- if ( rCEvt.GetCommand() == COMMAND_WHEEL )
+ if ( rCEvt.GetCommand() == CommandEventId::Wheel )
{
const CommandWheelData* pData = rCEvt.GetWheelData();
if( !pData->GetModifier() && ( pData->GetMode() == CommandWheelMode::SCROLL ) )
diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx
index 8d36028c636d..28bee3593a83 100644
--- a/svtools/source/control/valueset.cxx
+++ b/svtools/source/control/valueset.cxx
@@ -1410,9 +1410,9 @@ void ValueSet::KeyInput( const KeyEvent& rKeyEvent )
void ValueSet::Command( const CommandEvent& rCommandEvent )
{
- if ( rCommandEvent.GetCommand() == COMMAND_WHEEL ||
- rCommandEvent.GetCommand() == COMMAND_STARTAUTOSCROLL ||
- rCommandEvent.GetCommand() == COMMAND_AUTOSCROLL )
+ if ( rCommandEvent.GetCommand() == CommandEventId::Wheel ||
+ rCommandEvent.GetCommand() == CommandEventId::StartAutoScroll ||
+ rCommandEvent.GetCommand() == CommandEventId::AutoScroll )
{
if ( HandleScrollCommand( rCommandEvent, NULL, mxScrollBar.get() ) )
return;
@@ -2119,7 +2119,7 @@ void ValueSet::SetFormat(bool bFormat)
bool ValueSet::StartDrag( const CommandEvent& rEvent, vcl::Region& rRegion )
{
- if ( rEvent.GetCommand() != COMMAND_STARTDRAG )
+ if ( rEvent.GetCommand() != CommandEventId::StartDrag )
return false;
// if necessary abort an existing action
diff --git a/svtools/source/table/tabledatawindow.cxx b/svtools/source/table/tabledatawindow.cxx
index 8691b326a0ca..51709935ea7d 100644
--- a/svtools/source/table/tabledatawindow.cxx
+++ b/svtools/source/table/tabledatawindow.cxx
@@ -201,7 +201,7 @@ namespace svt { namespace table
if ( rNEvt.GetType() == MouseNotifyEvent::COMMAND )
{
const CommandEvent& rCEvt = *rNEvt.GetCommandEvent();
- if ( rCEvt.GetCommand() == COMMAND_WHEEL )
+ if ( rCEvt.GetCommand() == CommandEventId::Wheel )
{
const CommandWheelData* pData = rCEvt.GetWheelData();
if( !pData->GetModifier() && ( pData->GetMode() == CommandWheelMode::SCROLL ) )
diff --git a/svx/source/dialog/imapwnd.cxx b/svx/source/dialog/imapwnd.cxx
index 3ae813705a88..43304c434fb1 100644
--- a/svx/source/dialog/imapwnd.cxx
+++ b/svx/source/dialog/imapwnd.cxx
@@ -474,7 +474,7 @@ void IMapWindow::Command(const CommandEvent& rCEvt)
{
vcl::Region aRegion;
- if ( rCEvt.GetCommand() == COMMAND_CONTEXTMENU )
+ if ( rCEvt.GetCommand() == CommandEventId::ContextMenu )
{
PopupMenu aMenu( SVX_RES( RID_SVXMN_IMAP ) );
const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
diff --git a/svx/source/dialog/svxruler.cxx b/svx/source/dialog/svxruler.cxx
index 87aa43c483f2..5f3f1b4b216b 100644
--- a/svx/source/dialog/svxruler.cxx
+++ b/svx/source/dialog/svxruler.cxx
@@ -3453,7 +3453,7 @@ IMPL_LINK( SvxRuler, TabMenuSelect, Menu *, pMenu )
void SvxRuler::Command( const CommandEvent& rCommandEvent )
{
/* Mouse context menu for switching the unit of measurement */
- if ( COMMAND_CONTEXTMENU == rCommandEvent.GetCommand() )
+ if ( CommandEventId::ContextMenu == rCommandEvent.GetCommand() )
{
CancelDrag();
bool bRTL = mxRulerImpl->pTextRTLItem && mxRulerImpl->pTextRTLItem->GetValue();
diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx
index 056582910ef0..71290f056130 100644
--- a/svx/source/fmcomp/fmgridcl.cxx
+++ b/svx/source/fmcomp/fmgridcl.cxx
@@ -993,7 +993,7 @@ void FmGridHeader::Command(const CommandEvent& rEvt)
{
switch (rEvt.GetCommand())
{
- case COMMAND_CONTEXTMENU:
+ case CommandEventId::ContextMenu:
{
if (!rEvt.IsMouseEvent())
return;
@@ -1023,7 +1023,7 @@ FmGridControl::FmGridControl(
void FmGridControl::Command(const CommandEvent& _rEvt)
{
- if ( COMMAND_CONTEXTMENU == _rEvt.GetCommand() )
+ if ( CommandEventId::ContextMenu == _rEvt.GetCommand() )
{
FmGridHeader* pMyHeader = static_cast< FmGridHeader* >( GetHeaderBar() );
if ( pMyHeader && !_rEvt.IsMouseEvent() )
diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx
index da23bfd34dad..7c9b026afb3d 100644
--- a/svx/source/fmcomp/gridctrl.cxx
+++ b/svx/source/fmcomp/gridctrl.cxx
@@ -2794,7 +2794,7 @@ void DbGridControl::Command(const CommandEvent& rEvt)
{
switch (rEvt.GetCommand())
{
- case COMMAND_CONTEXTMENU:
+ case CommandEventId::ContextMenu:
{
if ( !m_pSeekCursor )
{
diff --git a/svx/source/form/filtnav.cxx b/svx/source/form/filtnav.cxx
index 906a6ffec33c..405cae05229a 100644
--- a/svx/source/form/filtnav.cxx
+++ b/svx/source/form/filtnav.cxx
@@ -1614,7 +1614,7 @@ void FmFilterNavigator::Command( const CommandEvent& rEvt )
bool bHandled = false;
switch (rEvt.GetCommand())
{
- case COMMAND_CONTEXTMENU:
+ case CommandEventId::ContextMenu:
{
// die Stelle, an der geklickt wurde
Point aWhere;
@@ -1704,7 +1704,9 @@ void FmFilterNavigator::Command( const CommandEvent& rEvt )
} break;
}
bHandled = true;
- } break;
+ }
+ break;
+ default: break;
}
if (!bHandled)
diff --git a/svx/source/form/navigatortree.cxx b/svx/source/form/navigatortree.cxx
index 7da894363cbf..9003b2577f39 100644
--- a/svx/source/form/navigatortree.cxx
+++ b/svx/source/form/navigatortree.cxx
@@ -312,7 +312,7 @@ namespace svxform
bool bHandled = false;
switch( rEvt.GetCommand() )
{
- case COMMAND_CONTEXTMENU:
+ case CommandEventId::ContextMenu:
{
// Position of click
::Point ptWhere;
@@ -526,7 +526,9 @@ namespace svxform
}
}
bHandled = true;
- } break;
+ }
+ break;
+ default: break;
}
if (!bHandled)
diff --git a/svx/source/gallery2/galbrws1.cxx b/svx/source/gallery2/galbrws1.cxx
index d3c9e3026c75..854ce84c2f3b 100644
--- a/svx/source/gallery2/galbrws1.cxx
+++ b/svx/source/gallery2/galbrws1.cxx
@@ -88,7 +88,7 @@ bool GalleryThemeListBox::PreNotify( NotifyEvent& rNEvt )
{
const CommandEvent* pCEvt = rNEvt.GetCommandEvent();
- if( pCEvt && pCEvt->GetCommand() == COMMAND_CONTEXTMENU )
+ if( pCEvt && pCEvt->GetCommand() == CommandEventId::ContextMenu )
static_cast< GalleryBrowser1* >( GetParent() )->ShowContextMenu();
}
else if( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT )
diff --git a/svx/source/gallery2/galctrl.cxx b/svx/source/gallery2/galctrl.cxx
index a9bc30215615..90e0f1a069c7 100644
--- a/svx/source/gallery2/galctrl.cxx
+++ b/svx/source/gallery2/galctrl.cxx
@@ -157,7 +157,7 @@ void GalleryPreview::Command(const CommandEvent& rCEvt )
{
Window::Command( rCEvt );
- if( mpTheme && ( rCEvt.GetCommand() == COMMAND_CONTEXTMENU ) )
+ if( mpTheme && ( rCEvt.GetCommand() == CommandEventId::ContextMenu ) )
static_cast<GalleryBrowser2*>( GetParent() )->ShowContextMenu( this,
( rCEvt.IsMouseEvent() ? &rCEvt.GetMousePosPixel() : NULL ) );
}
@@ -378,7 +378,7 @@ void GalleryIconView::Command( const CommandEvent& rCEvt )
{
ValueSet::Command( rCEvt );
- if( rCEvt.GetCommand() == COMMAND_CONTEXTMENU )
+ if( rCEvt.GetCommand() == CommandEventId::ContextMenu )
{
static_cast<GalleryBrowser2*>( GetParent() )->ShowContextMenu( this,
( rCEvt.IsMouseEvent() ? &rCEvt.GetMousePosPixel() : NULL ) );
@@ -403,7 +403,7 @@ sal_Int8 GalleryIconView::ExecuteDrop( const ExecuteDropEvent& rEvt )
void GalleryIconView::StartDrag( sal_Int8, const Point& )
{
- const CommandEvent aEvt( GetPointerPosPixel(), COMMAND_STARTDRAG, true );
+ const CommandEvent aEvt( GetPointerPosPixel(), CommandEventId::StartDrag, true );
vcl::Region aRegion;
// call this to initiate dragging for ValueSet
@@ -558,7 +558,7 @@ void GalleryListView::Command( const CommandEvent& rCEvt )
{
BrowseBox::Command( rCEvt );
- if( rCEvt.GetCommand() == COMMAND_CONTEXTMENU )
+ if( rCEvt.GetCommand() == CommandEventId::ContextMenu )
{
const Point* pPos = NULL;
diff --git a/svx/source/stbctrls/pszctrl.cxx b/svx/source/stbctrls/pszctrl.cxx
index e102a7f96455..d4acca719c07 100644
--- a/svx/source/stbctrls/pszctrl.cxx
+++ b/svx/source/stbctrls/pszctrl.cxx
@@ -310,7 +310,7 @@ void SvxPosSizeStatusBarControl::StateChanged( sal_uInt16 nSID, SfxItemState eSt
void SvxPosSizeStatusBarControl::Command( const CommandEvent& rCEvt )
{
- if ( rCEvt.GetCommand() == COMMAND_CONTEXTMENU && pImp->bHasMenu )
+ if ( rCEvt.GetCommand() == CommandEventId::ContextMenu && pImp->bHasMenu )
{
sal_uInt16 nSelect = pImp->nFunction;
if (!nSelect)
diff --git a/svx/source/stbctrls/xmlsecctrl.cxx b/svx/source/stbctrls/xmlsecctrl.cxx
index 8ae7cb8a8a19..325bb00c7f54 100644
--- a/svx/source/stbctrls/xmlsecctrl.cxx
+++ b/svx/source/stbctrls/xmlsecctrl.cxx
@@ -119,7 +119,7 @@ void XmlSecStatusBarControl::StateChanged( sal_uInt16, SfxItemState eState, cons
void XmlSecStatusBarControl::Command( const CommandEvent& rCEvt )
{
- if( rCEvt.GetCommand() == COMMAND_CONTEXTMENU )
+ if( rCEvt.GetCommand() == CommandEventId::ContextMenu )
{
PopupMenu aPopupMenu( ResId( RID_SVXMNU_XMLSECSTATBAR, DIALOG_MGR() ) );
if( aPopupMenu.Execute( &GetStatusBar(), rCEvt.GetMousePosPixel() ) )
diff --git a/svx/source/stbctrls/zoomctrl.cxx b/svx/source/stbctrls/zoomctrl.cxx
index d5b9ad351acc..bbec9029fd85 100644
--- a/svx/source/stbctrls/zoomctrl.cxx
+++ b/svx/source/stbctrls/zoomctrl.cxx
@@ -142,7 +142,7 @@ void SvxZoomStatusBarControl::Paint( const UserDrawEvent& )
void SvxZoomStatusBarControl::Command( const CommandEvent& rCEvt )
{
- if ( COMMAND_CONTEXTMENU & rCEvt.GetCommand() && bool(nValueSet) )
+ if ( CommandEventId::ContextMenu == rCEvt.GetCommand() && bool(nValueSet) )
{
ZoomPopup_Impl aPop( nZoom, nValueSet );
StatusBar& rStatusbar = GetStatusBar();
diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index 6c116cf58709..b2712615e1f9 100644
--- a/svx/source/svdraw/svdedxv.cxx
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -1317,10 +1317,10 @@ bool SdrObjEditView::MouseMove(const MouseEvent& rMEvt, vcl::Window* pWin)
bool SdrObjEditView::Command(const CommandEvent& rCEvt, vcl::Window* pWin)
{
- // as long as OutlinerView returns a sal_Bool, it only gets COMMAND_STARTDRAG
+ // as long as OutlinerView returns a sal_Bool, it only gets CommandEventId::StartDrag
if (pTextEditOutlinerView!=NULL)
{
- if (rCEvt.GetCommand()==COMMAND_STARTDRAG) {
+ if (rCEvt.GetCommand()==CommandEventId::StartDrag) {
bool bPostIt=pTextEditOutliner->IsInSelectionMode() || !rCEvt.IsMouseEvent();
if (!bPostIt && rCEvt.IsMouseEvent()) {
Point aPt(rCEvt.GetMousePosPixel());
diff --git a/sw/source/ui/dbui/createaddresslistdialog.cxx b/sw/source/ui/dbui/createaddresslistdialog.cxx
index ff9455e8af4f..193e55b1bd7b 100644
--- a/sw/source/ui/dbui/createaddresslistdialog.cxx
+++ b/sw/source/ui/dbui/createaddresslistdialog.cxx
@@ -329,9 +329,9 @@ void SwAddressControl_Impl::Command( const CommandEvent& rCEvt )
{
switch ( rCEvt.GetCommand() )
{
- case COMMAND_WHEEL:
- case COMMAND_STARTAUTOSCROLL:
- case COMMAND_AUTOSCROLL:
+ case CommandEventId::Wheel:
+ case CommandEventId::StartAutoScroll:
+ case CommandEventId::AutoScroll:
{
const CommandWheelData* pWheelData = rCEvt.GetWheelData();
if(pWheelData && !pWheelData->IsHorz() && CommandWheelMode::ZOOM != pWheelData->GetMode())
@@ -350,8 +350,7 @@ bool SwAddressControl_Impl::PreNotify( NotifyEvent& rNEvt )
if(rNEvt.GetType() == MouseNotifyEvent::COMMAND)
{
const CommandEvent* pCEvt = rNEvt.GetCommandEvent();
- const sal_uInt16 nCmd = pCEvt->GetCommand();
- if( COMMAND_WHEEL == nCmd )
+ if( pCEvt->GetCommand() == CommandEventId::Wheel )
{
Command(*pCEvt);
return true;
diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx
index 152df21a6af9..35214f509d23 100644
--- a/sw/source/ui/dbui/mmaddressblockpage.cxx
+++ b/sw/source/ui/dbui/mmaddressblockpage.cxx
@@ -1052,9 +1052,9 @@ void SwAssignFieldsControl::Command( const CommandEvent& rCEvt )
{
switch ( rCEvt.GetCommand() )
{
- case COMMAND_WHEEL:
- case COMMAND_STARTAUTOSCROLL:
- case COMMAND_AUTOSCROLL:
+ case CommandEventId::Wheel:
+ case CommandEventId::StartAutoScroll:
+ case CommandEventId::AutoScroll:
{
const CommandWheelData* pWheelData = rCEvt.GetWheelData();
if(pWheelData && !pWheelData->IsHorz() && CommandWheelMode::ZOOM != pWheelData->GetMode())
@@ -1073,8 +1073,7 @@ bool SwAssignFieldsControl::PreNotify( NotifyEvent& rNEvt )
if(rNEvt.GetType() == MouseNotifyEvent::COMMAND)
{
const CommandEvent* pCEvt = rNEvt.GetCommandEvent();
- const sal_uInt16 nCmd = pCEvt->GetCommand();
- if( COMMAND_WHEEL == nCmd )
+ if( pCEvt->GetCommand() == CommandEventId::Wheel )
{
Command(*pCEvt);
return true;
diff --git a/sw/source/uibase/docvw/SidebarTxtControl.cxx b/sw/source/uibase/docvw/SidebarTxtControl.cxx
index 96ccdfef97b6..5807f27cfdca 100644
--- a/sw/source/uibase/docvw/SidebarTxtControl.cxx
+++ b/sw/source/uibase/docvw/SidebarTxtControl.cxx
@@ -342,7 +342,7 @@ IMPL_LINK( SidebarTxtControl, Select, Menu*, pSelMenu )
void SidebarTxtControl::Command( const CommandEvent& rCEvt )
{
- if ( rCEvt.GetCommand() == COMMAND_CONTEXTMENU )
+ if ( rCEvt.GetCommand() == CommandEventId::ContextMenu )
{
if ( !mrSidebarWin.IsProtected() &&
GetTextView() &&
@@ -380,7 +380,7 @@ void SidebarTxtControl::Command( const CommandEvent& rCEvt )
}
}
else
- if (rCEvt.GetCommand() == COMMAND_WHEEL)
+ if (rCEvt.GetCommand() == CommandEventId::Wheel)
{
if (mrSidebarWin.IsScrollbarVisible())
{
diff --git a/sw/source/uibase/docvw/edtdd.cxx b/sw/source/uibase/docvw/edtdd.cxx
index 72dea948881c..e0dd4aa90448 100644
--- a/sw/source/uibase/docvw/edtdd.cxx
+++ b/sw/source/uibase/docvw/edtdd.cxx
@@ -71,7 +71,7 @@ void SwEditWin::StartDrag( sal_Int8 /*nAction*/, const Point& rPosPixel )
SwWrtShell &rSh = m_rView.GetWrtShell();
if( rSh.GetDrawView() )
{
- CommandEvent aDragEvent( rPosPixel, COMMAND_STARTDRAG, true );
+ CommandEvent aDragEvent( rPosPixel, CommandEventId::StartDrag, true );
if( rSh.GetDrawView()->Command( aDragEvent, this ) )
{
m_rView.GetViewFrame()->GetBindings().InvalidateAll(false);
diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx
index ed45693a154c..a0475d67056c 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -5109,7 +5109,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
// windows and code on the stack.
SfxInPlaceClient* pIPClient = rSh.GetSfxViewShell()->GetIPClient();
bool bIsOleActive = ( pIPClient && pIPClient->IsObjectInPlaceActive() );
- if ( bIsOleActive && ( rCEvt.GetCommand() == COMMAND_CONTEXTMENU ))
+ if ( bIsOleActive && ( rCEvt.GetCommand() == CommandEventId::ContextMenu ))
{
rSh.FinishOLEObj();
return;
@@ -5119,8 +5119,8 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
switch ( rCEvt.GetCommand() )
{
- case COMMAND_CONTEXTMENU:
- {
+ case CommandEventId::ContextMenu:
+ {
const sal_uInt16 nId = SwInputChild::GetChildWindowId();
SwInputChild* pChildWin = static_cast<SwInputChild*>(GetView().GetViewFrame()->
GetChildWindow( nId ));
@@ -5193,18 +5193,18 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
rSh.Do(SwWrtShell::UNDO);
bCallBase = false;
}
- }
- break;
+ }
+ break;
- case COMMAND_WHEEL:
- case COMMAND_STARTAUTOSCROLL:
- case COMMAND_AUTOSCROLL:
+ case CommandEventId::Wheel:
+ case CommandEventId::StartAutoScroll:
+ case CommandEventId::AutoScroll:
if( m_pShadCrsr )
delete m_pShadCrsr, m_pShadCrsr = 0;
bCallBase = !m_rView.HandleWheelCommands( rCEvt );
break;
- case COMMAND_STARTEXTTEXTINPUT:
+ case CommandEventId::StartExtTextInput:
{
bool bIsDocReadOnly = m_rView.GetDocShell()->IsReadOnly() &&
rSh.IsCrsrReadonly();
@@ -5227,7 +5227,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
}
break;
}
- case COMMAND_ENDEXTTEXTINPUT:
+ case CommandEventId::EndExtTextInput:
{
bool bIsDocReadOnly = m_rView.GetDocShell()->IsReadOnly() &&
rSh.IsCrsrReadonly();
@@ -5278,7 +5278,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
}
}
break;
- case COMMAND_EXTTEXTINPUT:
+ case CommandEventId::ExtTextInput:
{
bool bIsDocReadOnly = m_rView.GetDocShell()->IsReadOnly() &&
rSh.IsCrsrReadonly();
@@ -5323,11 +5323,11 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
}
}
break;
- case COMMAND_CURSORPOS:
+ case CommandEventId::CursorPos:
// will be handled by the base class
break;
- case COMMAND_PASTESELECTION:
+ case CommandEventId::PasteSelection:
if( !m_rView.GetDocShell()->IsReadOnly() )
{
TransferableDataHelper aDataHelper(
@@ -5357,7 +5357,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
}
}
break;
- case COMMAND_MODKEYCHANGE :
+ case CommandEventId::ModKeyChange :
{
const CommandModKeyData* pCommandData = rCEvt.GetModKeyData();
if (pCommandData->IsMod1() && !pCommandData->IsMod2())
@@ -5372,15 +5372,15 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
}
}
break;
- case COMMAND_HANGUL_HANJA_CONVERSION :
+ case CommandEventId::HangulHanjaConversion :
GetView().GetViewFrame()->GetDispatcher()->Execute(SID_HANGUL_HANJA_CONVERSION);
break;
- case COMMAND_INPUTLANGUAGECHANGE :
+ case CommandEventId::InputLanguageChange :
// i#42732 - update state of fontname if input language changes
g_bInputLanguageSwitched = true;
SetUseInputLanguage( true );
break;
- case COMMAND_SELECTIONCHANGE:
+ case CommandEventId::SelectionChange:
{
const CommandSelectionChangeData *pData = rCEvt.GetSelectionChangeData();
rSh.SttCrsrMove();
@@ -5391,7 +5391,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
rSh.EndCrsrMove( true );
}
break;
- case COMMAND_PREPARERECONVERSION:
+ case CommandEventId::PrepareReconversion:
if( rSh.HasSelection() )
{
SwPaM *pCrsr = rSh.GetCrsr();
@@ -5450,7 +5450,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
}
}
break;
- case COMMAND_QUERYCHARPOSITION:
+ case CommandEventId::QueryCharPosition:
{
bool bVertical = rSh.IsInVerticalText();
const SwPosition& rPos = *rSh.GetCrsr()->GetPoint();
@@ -5492,10 +5492,11 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
bCallBase = false;
}
break;
-#if OSL_DEBUG_LEVEL > 0
default:
+#if OSL_DEBUG_LEVEL > 0
OSL_ENSURE( false, "unknown command." );
#endif
+ break;
}
if (bCallBase)
Window::Command(rCEvt);
diff --git a/sw/source/uibase/docvw/srcedtw.cxx b/sw/source/uibase/docvw/srcedtw.cxx
index 695019e5db0c..12fe31cac62c 100644
--- a/sw/source/uibase/docvw/srcedtw.cxx
+++ b/sw/source/uibase/docvw/srcedtw.cxx
@@ -417,12 +417,12 @@ void TextViewOutWin::Command( const CommandEvent& rCEvt )
{
switch(rCEvt.GetCommand())
{
- case COMMAND_CONTEXTMENU:
+ case CommandEventId::ContextMenu:
SfxDispatcher::ExecutePopup();
break;
- case COMMAND_WHEEL:
- case COMMAND_STARTAUTOSCROLL:
- case COMMAND_AUTOSCROLL:
+ case CommandEventId::Wheel:
+ case CommandEventId::StartAutoScroll:
+ case CommandEventId::AutoScroll:
{
const CommandWheelData* pWData = rCEvt.GetWheelData();
if( !pWData || CommandWheelMode::ZOOM != pWData->GetMode() )
@@ -763,9 +763,9 @@ void SwSrcEditWindow::Command( const CommandEvent& rCEvt )
{
switch(rCEvt.GetCommand())
{
- case COMMAND_WHEEL:
- case COMMAND_STARTAUTOSCROLL:
- case COMMAND_AUTOSCROLL:
+ case CommandEventId::Wheel:
+ case CommandEventId::StartAutoScroll:
+ case CommandEventId::AutoScroll:
{
const CommandWheelData* pWData = rCEvt.GetWheelData();
if( !pWData || CommandWheelMode::ZOOM != pWData->GetMode() )
diff --git a/sw/source/uibase/misc/redlndlg.cxx b/sw/source/uibase/misc/redlndlg.cxx
index b8cac8b31b33..fcefbb95523a 100644
--- a/sw/source/uibase/misc/redlndlg.cxx
+++ b/sw/source/uibase/misc/redlndlg.cxx
@@ -1026,7 +1026,7 @@ IMPL_LINK_NOARG(SwRedlineAcceptDlg, CommandHdl)
switch ( aCEvt.GetCommand() )
{
- case COMMAND_CONTEXTMENU:
+ case CommandEventId::ContextMenu:
{
SwWrtShell* pSh = ::GetActiveView()->GetWrtShellPtr();
SvTreeListEntry* pEntry = pTable->FirstSelected();
@@ -1183,6 +1183,7 @@ IMPL_LINK_NOARG(SwRedlineAcceptDlg, CommandHdl)
}
}
break;
+ default: break;
}
return 0;
diff --git a/sw/source/uibase/uiview/pview.cxx b/sw/source/uibase/uiview/pview.cxx
index 373026005082..04d43c4acb68 100644
--- a/sw/source/uibase/uiview/pview.cxx
+++ b/sw/source/uibase/uiview/pview.cxx
@@ -458,14 +458,14 @@ void SwPagePreviewWin::Command( const CommandEvent& rCEvt )
bool bCallBase = true;
switch( rCEvt.GetCommand() )
{
- case COMMAND_CONTEXTMENU:
+ case CommandEventId::ContextMenu:
SfxDispatcher::ExecutePopup();
bCallBase = false;
break;
- case COMMAND_WHEEL:
- case COMMAND_STARTAUTOSCROLL:
- case COMMAND_AUTOSCROLL:
+ case CommandEventId::Wheel:
+ case CommandEventId::StartAutoScroll:
+ case CommandEventId::AutoScroll:
{
const CommandWheelData* pData = rCEvt.GetWheelData();
if( pData )
diff --git a/sw/source/uibase/uiview/viewport.cxx b/sw/source/uibase/uiview/viewport.cxx
index d803103f0692..1fa6a1721d7f 100644
--- a/sw/source/uibase/uiview/viewport.cxx
+++ b/sw/source/uibase/uiview/viewport.cxx
@@ -1241,7 +1241,7 @@ bool SwView::HandleWheelCommands( const CommandEvent& rCEvt )
// scrolling the deltaX deltaY
Point deltaPoint( deltaX, deltaY );
CommandWheelData cmd( 0, 0, 0, CommandWheelMode::SCROLL, 0, false, true);
- CommandEvent event(deltaPoint , COMMAND_WHEEL, true, &cmd );
+ CommandEvent event(deltaPoint , CommandEventId::Wheel, true, &cmd );
m_pEditWin->HandleScrollCommand(event, m_pHScrollbar, m_pVScrollbar);
}
diff --git a/sw/source/uibase/utlui/bookctrl.cxx b/sw/source/uibase/utlui/bookctrl.cxx
index bffd651de112..db8bcb838963 100644
--- a/sw/source/uibase/utlui/bookctrl.cxx
+++ b/sw/source/uibase/utlui/bookctrl.cxx
@@ -98,7 +98,7 @@ void SwBookmarkControl::Paint( const UserDrawEvent& )
void SwBookmarkControl::Command( const CommandEvent& rCEvt )
{
- if ( rCEvt.GetCommand() == COMMAND_CONTEXTMENU &&
+ if ( rCEvt.GetCommand() == CommandEventId::ContextMenu &&
!GetStatusBar().GetItemText( GetId() ).isEmpty() )
{
BookmarkPopup_Impl aPop;
diff --git a/sw/source/uibase/utlui/tmplctrl.cxx b/sw/source/uibase/utlui/tmplctrl.cxx
index 7c7f960e11d5..d226e20310f2 100644
--- a/sw/source/uibase/utlui/tmplctrl.cxx
+++ b/sw/source/uibase/utlui/tmplctrl.cxx
@@ -90,7 +90,7 @@ void SwTemplateControl::Paint( const UserDrawEvent& )
void SwTemplateControl::Command( const CommandEvent& rCEvt )
{
- if ( rCEvt.GetCommand() == COMMAND_CONTEXTMENU &&
+ if ( rCEvt.GetCommand() == CommandEventId::ContextMenu &&
!GetStatusBar().GetItemText( GetId() ).isEmpty() )
{
SwTemplatePopup_Impl aPop;
diff --git a/sw/source/uibase/utlui/unotools.cxx b/sw/source/uibase/utlui/unotools.cxx
index d71b4c50fb35..6d870cfabed9 100644
--- a/sw/source/uibase/utlui/unotools.cxx
+++ b/sw/source/uibase/utlui/unotools.cxx
@@ -525,16 +525,16 @@ void SwFrmCtrlWindow::Command( const CommandEvent& rCEvt )
{
switch ( rCEvt.GetCommand() )
{
- case COMMAND_CONTEXTMENU:
+ case CommandEventId::ContextMenu:
{
//#125881# quickly clicking crashes because the control is not fully initialized
if(pExampleFrame->GetController().is())
pExampleFrame->CreatePopup(rCEvt.GetMousePosPixel());
}
break;
- case COMMAND_WHEEL:
- case COMMAND_STARTAUTOSCROLL:
- case COMMAND_AUTOSCROLL:
+ case CommandEventId::Wheel:
+ case CommandEventId::StartAutoScroll:
+ case CommandEventId::AutoScroll:
break;
default:;
}
diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx
index ba8e5b3feb11..232ee05041d8 100644
--- a/toolkit/source/awt/vclxwindow.cxx
+++ b/toolkit/source/awt/vclxwindow.cxx
@@ -671,9 +671,9 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent )
case VCLEVENT_WINDOW_COMMAND:
{
CommandEvent* pCmdEvt = static_cast<CommandEvent*>(rVclWindowEvent.GetData());
- if ( mpImpl->getMouseListeners().getLength() && ( pCmdEvt->GetCommand() == COMMAND_CONTEXTMENU ) )
+ if ( mpImpl->getMouseListeners().getLength() && ( pCmdEvt->GetCommand() == CommandEventId::ContextMenu ) )
{
- // COMMAND_CONTEXTMENU als mousePressed mit PopupTrigger = sal_True versenden...
+ // CommandEventId::ContextMenu als mousePressed mit PopupTrigger = sal_True versenden...
Point aWhere = static_cast< CommandEvent* >( rVclWindowEvent.GetData() )->GetMousePosPixel();
if ( !pCmdEvt->IsMouseEvent() )
{ // for keyboard events, we set the coordinates to -1,-1. This is a slight HACK, but the current API
diff --git a/vcl/osx/salinst.cxx b/vcl/osx/salinst.cxx
index b33aaf6b858a..fa4bb30f83f2 100644
--- a/vcl/osx/salinst.cxx
+++ b/vcl/osx/salinst.cxx
@@ -525,7 +525,7 @@ void AquaSalInstance::handleAppDefinedEvent( NSEvent* pEvent )
{
const Point aPoint;
CommandMediaData aMediaData(nCommand);
- CommandEvent aCEvt( aPoint, COMMAND_MEDIA, FALSE, &aMediaData );
+ CommandEvent aCEvt( aPoint, CommandEventId::Media, FALSE, &aMediaData );
NotifyEvent aNCmdEvt( MouseNotifyEvent::COMMAND, pWindow, &aCEvt );
if ( !ImplCallPreNotify( aNCmdEvt ) )
diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx
index e222bdff8dc5..72acb94d80a9 100644
--- a/vcl/source/control/combobox.cxx
+++ b/vcl/source/control/combobox.cxx
@@ -756,7 +756,7 @@ bool ComboBox::Notify( NotifyEvent& rNEvt )
mpFloatWin->EndPopupMode();
}
else if( (rNEvt.GetType() == MouseNotifyEvent::COMMAND) &&
- (rNEvt.GetCommandEvent()->GetCommand() == COMMAND_WHEEL) &&
+ (rNEvt.GetCommandEvent()->GetCommand() == CommandEventId::Wheel) &&
(rNEvt.GetWindow() == mpSubEdit) )
{
sal_uInt16 nWheelBehavior( GetSettings().GetMouseSettings().GetWheelBehavior() );
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index fb3218ee0b21..5a31215fcacd 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -1974,7 +1974,7 @@ void Edit::LoseFocus()
void Edit::Command( const CommandEvent& rCEvt )
{
- if ( rCEvt.GetCommand() == COMMAND_CONTEXTMENU )
+ if ( rCEvt.GetCommand() == CommandEventId::ContextMenu )
{
PopupMenu* pPopup = Edit::CreatePopupMenu();
@@ -2076,7 +2076,7 @@ void Edit::Command( const CommandEvent& rCEvt )
}
mbActivePopup = false;
}
- else if ( rCEvt.GetCommand() == COMMAND_STARTEXTTEXTINPUT )
+ else if ( rCEvt.GetCommand() == CommandEventId::StartExtTextInput )
{
DeleteSelected();
delete mpIMEInfos;
@@ -2084,7 +2084,7 @@ void Edit::Command( const CommandEvent& rCEvt )
mpIMEInfos = new Impl_IMEInfos( nPos, OUString(maText.getStr() + nPos ) );
mpIMEInfos->bWasCursorOverwrite = !IsInsertMode();
}
- else if ( rCEvt.GetCommand() == COMMAND_ENDEXTTEXTINPUT )
+ else if ( rCEvt.GetCommand() == CommandEventId::EndExtTextInput )
{
bool bInsertMode = !mpIMEInfos->bWasCursorOverwrite;
delete mpIMEInfos;
@@ -2107,7 +2107,7 @@ void Edit::Command( const CommandEvent& rCEvt )
}
}
}
- else if ( rCEvt.GetCommand() == COMMAND_EXTTEXTINPUT )
+ else if ( rCEvt.GetCommand() == CommandEventId::ExtTextInput )
{
const CommandExtTextInputData* pData = rCEvt.GetExtTextInputData();
@@ -2155,7 +2155,7 @@ void Edit::Command( const CommandEvent& rCEvt )
else
GetCursor()->Hide();
}
- else if ( rCEvt.GetCommand() == COMMAND_CURSORPOS )
+ else if ( rCEvt.GetCommand() == CommandEventId::CursorPos )
{
if ( mpIMEInfos )
{
@@ -2167,13 +2167,13 @@ void Edit::Command( const CommandEvent& rCEvt )
SetCursorRect();
}
}
- else if ( rCEvt.GetCommand() == COMMAND_SELECTIONCHANGE )
+ else if ( rCEvt.GetCommand() == CommandEventId::SelectionChange )
{
const CommandSelectionChangeData *pData = rCEvt.GetSelectionChangeData();
Selection aSelection( pData->GetStart(), pData->GetEnd() );
SetSelection(aSelection);
}
- else if ( rCEvt.GetCommand() == COMMAND_QUERYCHARPOSITION )
+ else if ( rCEvt.GetCommand() == CommandEventId::QueryCharPosition )
{
if (mpIMEInfos && mpIMEInfos->nLen > 0)
{
diff --git a/vcl/source/control/ilstbox.cxx b/vcl/source/control/ilstbox.cxx
index 637263d1a58e..131f598a2314 100644
--- a/vcl/source/control/ilstbox.cxx
+++ b/vcl/source/control/ilstbox.cxx
@@ -2513,7 +2513,7 @@ bool ImplListBox::Notify( NotifyEvent& rNEvt )
if ( rNEvt.GetType() == MouseNotifyEvent::COMMAND )
{
const CommandEvent& rCEvt = *rNEvt.GetCommandEvent();
- if ( rCEvt.GetCommand() == COMMAND_WHEEL )
+ if ( rCEvt.GetCommand() == CommandEventId::Wheel )
{
const CommandWheelData* pData = rCEvt.GetWheelData();
if( !pData->GetModifier() && ( pData->GetMode() == CommandWheelMode::SCROLL ) )
@@ -2534,7 +2534,7 @@ const Wallpaper& ImplListBox::GetDisplayBackground() const
bool ImplListBox::HandleWheelAsCursorTravel( const CommandEvent& rCEvt )
{
bool bDone = false;
- if ( rCEvt.GetCommand() == COMMAND_WHEEL )
+ if ( rCEvt.GetCommand() == CommandEventId::Wheel )
{
const CommandWheelData* pData = rCEvt.GetWheelData();
if( !pData->GetModifier() && ( pData->GetMode() == CommandWheelMode::SCROLL ) )
diff --git a/vcl/source/control/lstbox.cxx b/vcl/source/control/lstbox.cxx
index a84a238e2a51..f45962bb3420 100644
--- a/vcl/source/control/lstbox.cxx
+++ b/vcl/source/control/lstbox.cxx
@@ -944,7 +944,7 @@ bool ListBox::PreNotify( NotifyEvent& rNEvt )
mpFloatWin->EndPopupMode();
}
else if ( (rNEvt.GetType() == MouseNotifyEvent::COMMAND) &&
- (rNEvt.GetCommandEvent()->GetCommand() == COMMAND_WHEEL) &&
+ (rNEvt.GetCommandEvent()->GetCommand() == CommandEventId::Wheel) &&
(rNEvt.GetWindow() == mpImplWin) )
{
sal_uInt16 nWheelBehavior( GetSettings().GetMouseSettings().GetWheelBehavior() );
diff --git a/vcl/source/control/spinfld.cxx b/vcl/source/control/spinfld.cxx
index ea20b2522152..450f51d2972d 100644
--- a/vcl/source/control/spinfld.cxx
+++ b/vcl/source/control/spinfld.cxx
@@ -556,7 +556,7 @@ bool SpinField::Notify( NotifyEvent& rNEvt )
if ( rNEvt.GetType() == MouseNotifyEvent::COMMAND )
{
- if ( ( rNEvt.GetCommandEvent()->GetCommand() == COMMAND_WHEEL ) && !IsReadOnly() )
+ if ( ( rNEvt.GetCommandEvent()->GetCommand() == CommandEventId::Wheel ) && !IsReadOnly() )
{
sal_uInt16 nWheelBehavior( GetSettings().GetMouseSettings().GetWheelBehavior() );
if ( ( nWheelBehavior == MOUSE_WHEEL_ALWAYS )
diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx
index d5dd01fa7ac9..66ac7213b260 100644
--- a/vcl/source/control/tabctrl.cxx
+++ b/vcl/source/control/tabctrl.cxx
@@ -1466,7 +1466,7 @@ void TabControl::RequestHelp( const HelpEvent& rHEvt )
void TabControl::Command( const CommandEvent& rCEvt )
{
- if( (mpTabCtrlData->mpListBox == nullptr) && (rCEvt.GetCommand() == COMMAND_CONTEXTMENU) && (GetPageCount() > 1) )
+ if( (mpTabCtrlData->mpListBox == nullptr) && (rCEvt.GetCommand() == CommandEventId::ContextMenu) && (GetPageCount() > 1) )
{
Point aMenuPos;
bool bMenu;
diff --git a/vcl/source/edit/textview.cxx b/vcl/source/edit/textview.cxx
index bd0ccc91589e..a3758ec304b8 100644
--- a/vcl/source/edit/textview.cxx
+++ b/vcl/source/edit/textview.cxx
@@ -911,7 +911,7 @@ void TextView::Command( const CommandEvent& rCEvt )
mpImpl->mpTextEngine->CheckIdleFormatter(); // for fast typing and MouseButtonDown
mpImpl->mpTextEngine->SetActiveView( this );
- if ( rCEvt.GetCommand() == COMMAND_STARTEXTTEXTINPUT )
+ if ( rCEvt.GetCommand() == CommandEventId::StartExtTextInput )
{
DeleteSelected();
delete mpImpl->mpTextEngine->mpIMEInfos;
@@ -919,9 +919,9 @@ void TextView::Command( const CommandEvent& rCEvt )
mpImpl->mpTextEngine->mpIMEInfos = new TEIMEInfos( GetSelection().GetEnd(), pNode->GetText().copy( GetSelection().GetEnd().GetIndex() ) );
mpImpl->mpTextEngine->mpIMEInfos->bWasCursorOverwrite = !IsInsertMode();
}
- else if ( rCEvt.GetCommand() == COMMAND_ENDEXTTEXTINPUT )
+ else if ( rCEvt.GetCommand() == CommandEventId::EndExtTextInput )
{
- DBG_ASSERT( mpImpl->mpTextEngine->mpIMEInfos, "COMMAND_ENDEXTTEXTINPUT => No Start ?" );
+ DBG_ASSERT( mpImpl->mpTextEngine->mpIMEInfos, "CommandEventId::EndExtTextInput => No Start ?" );
if( mpImpl->mpTextEngine->mpIMEInfos )
{
TEParaPortion* pPortion = mpImpl->mpTextEngine->mpTEParaPortions->GetObject( mpImpl->mpTextEngine->mpIMEInfos->aPos.GetPara() );
@@ -940,9 +940,9 @@ void TextView::Command( const CommandEvent& rCEvt )
mpImpl->mpTextEngine->Broadcast( TextHint( TEXT_HINT_MODIFIED ) );
}
}
- else if ( rCEvt.GetCommand() == COMMAND_EXTTEXTINPUT )
+ else if ( rCEvt.GetCommand() == CommandEventId::ExtTextInput )
{
- DBG_ASSERT( mpImpl->mpTextEngine->mpIMEInfos, "COMMAND_EXTTEXTINPUT => No Start ?" );
+ DBG_ASSERT( mpImpl->mpTextEngine->mpIMEInfos, "CommandEventId::ExtTextInput => No Start ?" );
if( mpImpl->mpTextEngine->mpIMEInfos )
{
const CommandExtTextInputData* pData = rCEvt.GetExtTextInputData();
@@ -1010,7 +1010,7 @@ void TextView::Command( const CommandEvent& rCEvt )
HideCursor();
}
}
- else if ( rCEvt.GetCommand() == COMMAND_CURSORPOS )
+ else if ( rCEvt.GetCommand() == CommandEventId::CursorPos )
{
if ( mpImpl->mpTextEngine->mpIMEInfos && mpImpl->mpTextEngine->mpIMEInfos->nLen )
{
diff --git a/vcl/source/edit/vclmedit.cxx b/vcl/source/edit/vclmedit.cxx
index 46c7c90c8e46..1ef7ccd246b4 100644
--- a/vcl/source/edit/vclmedit.cxx
+++ b/vcl/source/edit/vclmedit.cxx
@@ -694,9 +694,9 @@ void ImpVclMEdit::Enable( bool bEnable )
bool ImpVclMEdit::HandleCommand( const CommandEvent& rCEvt )
{
bool bDone = false;
- if ( ( rCEvt.GetCommand() == COMMAND_WHEEL ) ||
- ( rCEvt.GetCommand() == COMMAND_STARTAUTOSCROLL ) ||
- ( rCEvt.GetCommand() == COMMAND_AUTOSCROLL ) )
+ if ( ( rCEvt.GetCommand() == CommandEventId::Wheel ) ||
+ ( rCEvt.GetCommand() == CommandEventId::StartAutoScroll ) ||
+ ( rCEvt.GetCommand() == CommandEventId::AutoScroll ) )
{
mpTextWindow->HandleScrollCommand( rCEvt, mpHScrollBar, mpVScrollBar );
bDone = true;
@@ -818,7 +818,7 @@ void TextWindow::Resize()
void TextWindow::Command( const CommandEvent& rCEvt )
{
- if ( rCEvt.GetCommand() == COMMAND_CONTEXTMENU )
+ if ( rCEvt.GetCommand() == CommandEventId::ContextMenu )
{
PopupMenu* pPopup = Edit::CreatePopupMenu();
if ( !mpExtTextView->HasSelection() )
diff --git a/vcl/source/window/event.cxx b/vcl/source/window/event.cxx
index 1a14dd19b26e..3e729fd738f4 100644
--- a/vcl/source/window/event.cxx
+++ b/vcl/source/window/event.cxx
@@ -329,7 +329,7 @@ void Window::ImplNotifyKeyMouseCommandEventListeners( NotifyEvent& rNEvt )
if( rNEvt.GetType() == MouseNotifyEvent::COMMAND )
{
const CommandEvent* pCEvt = rNEvt.GetCommandEvent();
- if ( pCEvt->GetCommand() != COMMAND_CONTEXTMENU )
+ if ( pCEvt->GetCommand() != CommandEventId::ContextMenu )
// non context menu events are not to be notified up the chain
// so we return immediately
return;
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index ee0a0248de1b..c8bffb54751c 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -1831,7 +1831,7 @@ bool VclScrolledWindow::Notify(NotifyEvent& rNEvt)
if ( rNEvt.GetType() == MouseNotifyEvent::COMMAND )
{
const CommandEvent& rCEvt = *rNEvt.GetCommandEvent();
- if ( rCEvt.GetCommand() == COMMAND_WHEEL )
+ if ( rCEvt.GetCommand() == CommandEventId::Wheel )
{
const CommandWheelData* pData = rCEvt.GetWheelData();
if( !pData->GetModifier() && ( pData->GetMode() == CommandWheelMode::SCROLL ) )
diff --git a/vcl/source/window/menufloatingwindow.cxx b/vcl/source/window/menufloatingwindow.cxx
index d188bca2b5a9..bf7c255769b1 100644
--- a/vcl/source/window/menufloatingwindow.cxx
+++ b/vcl/source/window/menufloatingwindow.cxx
@@ -1183,7 +1183,7 @@ void MenuFloatingWindow::DataChanged( const DataChangedEvent& rDCEvt )
void MenuFloatingWindow::Command( const CommandEvent& rCEvt )
{
- if ( rCEvt.GetCommand() == COMMAND_WHEEL )
+ if ( rCEvt.GetCommand() == CommandEventId::Wheel )
{
const CommandWheelData* pData = rCEvt.GetWheelData();
if( !pData->GetModifier() && ( pData->GetMode() == CommandWheelMode::SCROLL ) )
diff --git a/vcl/source/window/openglwin.cxx b/vcl/source/window/openglwin.cxx
index 6111cbca0a1a..30094e439b5d 100644
--- a/vcl/source/window/openglwin.cxx
+++ b/vcl/source/window/openglwin.cxx
@@ -91,7 +91,7 @@ void OpenGLWindow::Command( const CommandEvent& rCEvt )
if(!mpRenderer)
return;
- if(rCEvt.GetCommand() == COMMAND_WHEEL)
+ if(rCEvt.GetCommand() == CommandEventId::Wheel)
{
const CommandWheelData* pData = rCEvt.GetWheelData();
if(pData->GetMode() == CommandWheelMode::SCROLL)
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index 97e72cefdd6e..ecc8d7afd487 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -197,7 +197,7 @@ void PrintDialog::PrintPreviewWindow::Paint(vcl::RenderContext& rRenderContext,
void PrintDialog::PrintPreviewWindow::Command( const CommandEvent& rEvt )
{
- if( rEvt.GetCommand() == COMMAND_WHEEL )
+ if( rEvt.GetCommand() == CommandEventId::Wheel )
{
const CommandWheelData* pWheelData = rEvt.GetWheelData();
PrintDialog* pDlg = dynamic_cast<PrintDialog*>(GetParentDialog());
@@ -1858,7 +1858,7 @@ IMPL_LINK( PrintDialog, UIOption_ModifyHdl, Edit*, i_pBox )
void PrintDialog::Command( const CommandEvent& rEvt )
{
- if( rEvt.GetCommand() == COMMAND_WHEEL )
+ if( rEvt.GetCommand() == CommandEventId::Wheel )
{
const CommandWheelData* pWheelData = rEvt.GetWheelData();
if( pWheelData->GetDelta() > 0 )
diff --git a/vcl/source/window/scrwnd.cxx b/vcl/source/window/scrwnd.cxx
index 1e7a44af1000..6fe7049159e0 100644
--- a/vcl/source/window/scrwnd.cxx
+++ b/vcl/source/window/scrwnd.cxx
@@ -367,7 +367,7 @@ IMPL_LINK_NOARG_TYPED(ImplWheelWindow, ImplScrollHdl, Timer *, void)
const Point aMousePos( pWindow->OutputToScreenPixel( pWindow->GetPointerPosPixel() ) );
Point aCmdMousePos( pWindow->ImplFrameToOutput( aMousePos ) );
CommandScrollData aScrollData( mnActDeltaX, mnActDeltaY );
- CommandEvent aCEvt( aCmdMousePos, COMMAND_AUTOSCROLL, true, &aScrollData );
+ CommandEvent aCEvt( aCmdMousePos, CommandEventId::AutoScroll, true, &aScrollData );
NotifyEvent aNCmdEvt( MouseNotifyEvent::COMMAND, pWindow, &aCEvt );
if ( !ImplCallPreNotify( aNCmdEvt ) )
diff --git a/vcl/source/window/seleng.cxx b/vcl/source/window/seleng.cxx
index 5ed8c960715e..7999818b509c 100644
--- a/vcl/source/window/seleng.cxx
+++ b/vcl/source/window/seleng.cxx
@@ -345,7 +345,7 @@ void SelectionEngine::Command( const CommandEvent& rCEvt )
return;
aWTimer.Stop();
nFlags |= SelectionEngineFlags::CMDEVT;
- if ( rCEvt.GetCommand() == COMMAND_STARTDRAG )
+ if ( rCEvt.GetCommand() == CommandEventId::StartDrag )
{
if ( nFlags & SelectionEngineFlags::DRG_ENAB )
{
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 1b825b8bfe75..ce89b2747573 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -4366,7 +4366,7 @@ void ToolBox::Command( const CommandEvent& rCEvt )
maCommandHandler.Call( &rCEvt );
// depict StartDrag on MouseButton/Left/Alt
- if ( (rCEvt.GetCommand() == COMMAND_STARTDRAG) && rCEvt.IsMouseEvent() &&
+ if ( (rCEvt.GetCommand() == CommandEventId::StartDrag) && rCEvt.IsMouseEvent() &&
mbCustomize && !mbDragging && !mbDrag && !mbSelection &&
(mnCurPos == TOOLBOX_ITEM_NOTFOUND) )
{
@@ -4404,7 +4404,7 @@ void ToolBox::Command( const CommandEvent& rCEvt )
}
}
}
- else if ( rCEvt.GetCommand() == COMMAND_WHEEL )
+ else if ( rCEvt.GetCommand() == CommandEventId::Wheel )
{
if ( (mnCurLine > 1) || (mnCurLine+mnVisLines-1 < mnCurLines) )
{
diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx
index 9df9085b8ca1..fd6cdf926d07 100644
--- a/vcl/source/window/window2.cxx
+++ b/vcl/source/window/window2.cxx
@@ -759,7 +759,7 @@ bool Window::HandleScrollCommand( const CommandEvent& rCmd,
{
switch( rCmd.GetCommand() )
{
- case COMMAND_STARTAUTOSCROLL:
+ case CommandEventId::StartAutoScroll:
{
sal_uInt16 nFlags = 0;
if ( pHScrl )
@@ -783,7 +783,7 @@ bool Window::HandleScrollCommand( const CommandEvent& rCmd,
}
break;
- case COMMAND_WHEEL:
+ case CommandEventId::Wheel:
{
const CommandWheelData* pData = rCmd.GetWheelData();
@@ -888,7 +888,7 @@ bool Window::HandleScrollCommand( const CommandEvent& rCmd,
}
break;
- case COMMAND_AUTOSCROLL:
+ case CommandEventId::AutoScroll:
{
const CommandScrollData* pData = rCmd.GetAutoScrollData();
if ( pData && (pData->GetDeltaX() || pData->GetDeltaY()) )
@@ -908,7 +908,7 @@ bool Window::HandleScrollCommand( const CommandEvent& rCmd,
return bRet;
}
-// Note that when called for COMMAND_WHEEL above, despite its name,
+// Note that when called for CommandEventId::Wheel above, despite its name,
// pVScrl isn't necessarily the vertical scroll bar. Depending on
// whether the scroll is horizontal or vertical, it is either the
// horizontal or vertical scroll bar. nY is correspondingly either
diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx
index 3ab6541c4edb..c2a7dc0c2d1c 100644
--- a/vcl/source/window/winproc.cxx
+++ b/vcl/source/window/winproc.cxx
@@ -196,7 +196,7 @@ static void ImplSetMousePointer( vcl::Window* pChild )
pChild->ImplGetFrame()->SetPointer( pChild->ImplGetMousePointer() );
}
-static bool ImplCallCommand( vcl::Window* pChild, sal_uInt16 nEvt, void* pData = NULL,
+static bool ImplCallCommand( vcl::Window* pChild, CommandEventId nEvt, void* pData = NULL,
bool bMouse = false, Point* pPos = NULL )
{
Point aPos;
@@ -255,7 +255,7 @@ static sal_IntPtr ContextMenuEventLink( void* pCEvent, void* )
if( ! pEv->aDelData.IsDead() )
{
pEv->pWindow->ImplRemoveDel( &pEv->aDelData );
- ImplCallCommand( pEv->pWindow, COMMAND_CONTEXTMENU, NULL, true, &pEv->aChildPos );
+ ImplCallCommand( pEv->pWindow, CommandEventId::ContextMenu, NULL, true, &pEv->aChildPos );
}
delete pEv;
@@ -787,9 +787,9 @@ bool ImplHandleMouseEvent( vcl::Window* pWindow, MouseNotifyEvent nSVEvent, bool
{
sal_uInt16 nMiddleAction = pChild->GetSettings().GetMouseSettings().GetMiddleButtonAction();
if ( nMiddleAction == MOUSE_MIDDLE_AUTOSCROLL )
- bRet = !ImplCallCommand( pChild, COMMAND_STARTAUTOSCROLL, NULL, true, &aChildPos );
+ bRet = !ImplCallCommand( pChild, CommandEventId::StartAutoScroll, NULL, true, &aChildPos );
else if ( nMiddleAction == MOUSE_MIDDLE_PASTESELECTION )
- bRet = !ImplCallCommand( pChild, COMMAND_PASTESELECTION, NULL, true, &aChildPos );
+ bRet = !ImplCallCommand( pChild, CommandEventId::PasteSelection, NULL, true, &aChildPos );
}
else
{
@@ -818,7 +818,7 @@ bool ImplHandleMouseEvent( vcl::Window* pWindow, MouseNotifyEvent nSVEvent, bool
Application::PostUserEvent( Link<>( pEv, ContextMenuEventLink ) );
}
else
- bRet = ! ImplCallCommand( pChild, COMMAND_CONTEXTMENU, NULL, true, &aChildPos );
+ bRet = ! ImplCallCommand( pChild, CommandEventId::ContextMenu, NULL, true, &aChildPos );
}
}
}
@@ -1063,7 +1063,7 @@ static bool ImplHandleKey( vcl::Window* pWindow, MouseNotifyEvent nSVEvent,
// ContextMenu
if ( (nCode == KEY_CONTEXTMENU) || ((nCode == KEY_F10) && aKeyCode.IsShift() && !aKeyCode.IsMod1() && !aKeyCode.IsMod2() ) )
- nRet = !ImplCallCommand( pChild, COMMAND_CONTEXTMENU, NULL, false );
+ nRet = !ImplCallCommand( pChild, CommandEventId::ContextMenu, NULL, false );
else if ( ( (nCode == KEY_F2) && aKeyCode.IsShift() ) || ( (nCode == KEY_F1) && aKeyCode.IsMod1() ) ||
// #101999# no active help when focus in toolbox, simulate BallonHelp instead
( (nCode == KEY_F1) && aKeyCode.IsShift() && bToolboxFocus ) )
@@ -1192,7 +1192,7 @@ static bool ImplHandleExtTextInput( vcl::Window* pWindow,
pWinData->mpExtOldAttrAry = NULL;
}
pSVData->maWinData.mpExtTextInputWin = pChild;
- ImplCallCommand( pChild, COMMAND_STARTEXTTEXTINPUT );
+ ImplCallCommand( pChild, CommandEventId::StartExtTextInput );
}
// be aware of being recursively called in StartExtTextInput
@@ -1246,7 +1246,7 @@ static bool ImplHandleExtTextInput( vcl::Window* pWindow,
pWinData->mpExtOldAttrAry = new sal_uInt16[rText.getLength()];
memcpy( pWinData->mpExtOldAttrAry, pTextAttr, rText.getLength()*sizeof( sal_uInt16 ) );
}
- return !ImplCallCommand( pChild, COMMAND_EXTTEXTINPUT, &aData );
+ return !ImplCallCommand( pChild, CommandEventId::ExtTextInput, &aData );
}
static bool ImplHandleEndExtTextInput( vcl::Window* /* pWindow */ )
@@ -1270,7 +1270,7 @@ static bool ImplHandleEndExtTextInput( vcl::Window* /* pWindow */ )
delete [] pWinData->mpExtOldAttrAry;
pWinData->mpExtOldAttrAry = NULL;
}
- nRet = !ImplCallCommand( pChild, COMMAND_ENDEXTTEXTINPUT );
+ nRet = !ImplCallCommand( pChild, CommandEventId::EndExtTextInput );
}
return nRet;
@@ -1295,7 +1295,7 @@ static void ImplHandleExtTextInputPos( vcl::Window* pWindow,
if ( pChild )
{
const OutputDevice *pChildOutDev = pChild->GetOutDev();
- ImplCallCommand( pChild, COMMAND_CURSORPOS );
+ ImplCallCommand( pChild, CommandEventId::CursorPos );
const Rectangle* pRect = pChild->GetCursorRect();
if ( pRect )
rRect = pChildOutDev->ImplLogicToDevicePixel( *pRect );
@@ -1326,14 +1326,14 @@ static bool ImplHandleInputContextChange( vcl::Window* pWindow, LanguageType eNe
{
vcl::Window* pChild = ImplGetKeyInputWindow( pWindow );
CommandInputContextData aData( eNewLang );
- return !ImplCallCommand( pChild, COMMAND_INPUTCONTEXTCHANGE, &aData );
+ return !ImplCallCommand( pChild, CommandEventId::InputContextChange, &aData );
}
static bool ImplCallWheelCommand( vcl::Window* pWindow, const Point& rPos,
const CommandWheelData* pWheelData )
{
Point aCmdMousePos = pWindow->ImplFrameToOutput( rPos );
- CommandEvent aCEvt( aCmdMousePos, COMMAND_WHEEL, true, pWheelData );
+ CommandEvent aCEvt( aCmdMousePos, CommandEventId::Wheel, true, pWheelData );
NotifyEvent aNCmdEvt( MouseNotifyEvent::COMMAND, pWindow, &aCEvt );
ImplDelData aDelData( pWindow );
bool bPreNotify = ImplCallPreNotify( aNCmdEvt );
@@ -1580,7 +1580,7 @@ public:
}
virtual bool CallCommand(vcl::Window *pWindow, const Point &/*rMousePos*/) SAL_OVERRIDE
{
- return ImplCallCommand(pWindow, COMMAND_SWIPE, &m_aSwipeData);
+ return ImplCallCommand(pWindow, CommandEventId::Swipe, &m_aSwipeData);
}
};
@@ -1602,7 +1602,7 @@ public:
}
virtual bool CallCommand(vcl::Window *pWindow, const Point &/*rMousePos*/) SAL_OVERRIDE
{
- return ImplCallCommand(pWindow, COMMAND_LONGPRESS, &m_aLongPressData);
+ return ImplCallCommand(pWindow, CommandEventId::LongPress, &m_aLongPressData);
}
};
@@ -2180,7 +2180,7 @@ static void ImplHandleSalKeyMod( vcl::Window* pWindow, SalKeyModEvent* pEvent )
if( pEvent->mnModKeyCode != 0 )
{
CommandModKeyData data( pEvent->mnModKeyCode );
- ImplCallCommand( pChild, COMMAND_MODKEYCHANGE, &data );
+ ImplCallCommand( pChild, CommandEventId::ModKeyChange, &data );
}
}
@@ -2191,7 +2191,7 @@ static void ImplHandleInputLanguageChange( vcl::Window* pWindow )
if ( !pChild )
return;
- ImplCallCommand( pChild, COMMAND_INPUTLANGUAGECHANGE );
+ ImplCallCommand( pChild, CommandEventId::InputLanguageChange );
}
static void ImplHandleSalSettings( sal_uInt16 nEvent )
@@ -2268,7 +2268,7 @@ static bool ImplHandleShowDialog( vcl::Window* pWindow, ShowDialogId nDialogId )
pWindow = pWrkWin;
}
CommandDialogData aCmdData( nDialogId );
- return ImplCallCommand( pWindow, COMMAND_SHOWDIALOG, &aCmdData );
+ return ImplCallCommand( pWindow, CommandEventId::ShowDialog, &aCmdData );
}
static void ImplHandleSurroundingTextRequest( vcl::Window *pWindow,
@@ -2323,7 +2323,7 @@ static void ImplHandleSurroundingTextSelectionChange( vcl::Window *pWindow,
if( pChild )
{
CommandSelectionChangeData data( nStart, nEnd );
- ImplCallCommand( pChild, COMMAND_SELECTIONCHANGE, &data );
+ ImplCallCommand( pChild, CommandEventId::SelectionChange, &data );
}
}
@@ -2331,7 +2331,7 @@ static void ImplHandleStartReconversion( vcl::Window *pWindow )
{
vcl::Window* pChild = ImplGetKeyInputWindow( pWindow );
if( pChild )
- ImplCallCommand( pChild, COMMAND_PREPARERECONVERSION );
+ ImplCallCommand( pChild, CommandEventId::PrepareReconversion );
}
static void ImplHandleSalQueryCharPosition( vcl::Window *pWindow,
@@ -2358,7 +2358,7 @@ static void ImplHandleSalQueryCharPosition( vcl::Window *pWindow,
if( pChild )
{
- ImplCallCommand( pChild, COMMAND_QUERYCHARPOSITION );
+ ImplCallCommand( pChild, CommandEventId::QueryCharPosition );
ImplWinData* pWinData = pChild->ImplGetWinData();
if ( pWinData->mpCompositionCharRects && pEvt->mnCharPos < static_cast<sal_uLong>( pWinData->mnCompositionCharRects ) )
diff --git a/vcl/win/source/window/salframe.cxx b/vcl/win/source/window/salframe.cxx
index ff598c8cd430..999cb660544c 100644
--- a/vcl/win/source/window/salframe.cxx
+++ b/vcl/win/source/window/salframe.cxx
@@ -5219,7 +5219,7 @@ static boolean ImplHandleAppCommand( HWND hWnd, LPARAM lParam, LRESULT & nRet )
{
const Point aPoint;
CommandMediaData aMediaData(nCommand);
- CommandEvent aCEvt( aPoint, COMMAND_MEDIA, FALSE, &aMediaData );
+ CommandEvent aCEvt( aPoint, CommandEventId::Media, FALSE, &aMediaData );
NotifyEvent aNCmdEvt( MouseNotifyEvent::COMMAND, pWindow, &aCEvt );
if ( !ImplCallPreNotify( aNCmdEvt ) )