From 82d68f9cbce4073a727c43b4a8e81d39871b71eb Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 7 May 2015 15:25:20 +0200 Subject: convert COMMAND_ constants to scoped enum Change-Id: I88e67f89dbbab0646e8f106dfeb32c6ee1bb0b95 Reviewed-on: https://gerrit.libreoffice.org/15671 Tested-by: Jenkins Reviewed-by: Noel Grandin --- basctl/source/basicide/baside2b.cxx | 10 +++++----- basctl/source/basicide/baside3.cxx | 8 ++++---- basctl/source/basicide/bastypes.cxx | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) (limited to 'basctl') 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 -- cgit