diff options
author | Noel Grandin <noel@peralex.com> | 2016-08-18 12:20:08 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-08-19 08:18:37 +0200 |
commit | fc518ed954aa73eeeb529c21afbcfdfa55ef7fb4 (patch) | |
tree | c04bd1402c84d8e7abe8224ebe7c7fb178174ad2 /chart2 | |
parent | e00aa45d3456e2f76ed70d593d6ae1646aa1ae51 (diff) |
convert SdrDragMode to scoped enum
Change-Id: I244132d2240a46f42f14d453e5987968d274e907
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/controller/main/ChartController.cxx | 2 | ||||
-rw-r--r-- | chart2/source/controller/main/ChartController_Window.cxx | 16 |
2 files changed, 9 insertions, 9 deletions
diff --git a/chart2/source/controller/main/ChartController.cxx b/chart2/source/controller/main/ChartController.cxx index 40166350f769..9c33513579b5 100644 --- a/chart2/source/controller/main/ChartController.cxx +++ b/chart2/source/controller/main/ChartController.cxx @@ -110,7 +110,7 @@ ChartController::ChartController(uno::Reference<uno::XComponentContext> const & m_xChartView(), m_pDrawModelWrapper(), m_pDrawViewWrapper(nullptr), - m_eDragMode(SDRDRAG_MOVE), + m_eDragMode(SdrDragMode::Move), m_bWaitingForDoubleClick(false), m_bWaitingForMouseUp(false), m_bConnectingToView(false), diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx index 41c6ef807770..e575064d1321 100644 --- a/chart2/source/controller/main/ChartController_Window.cxx +++ b/chart2/source/controller/main/ChartController_Window.cxx @@ -651,7 +651,7 @@ void ChartController::execute_MouseButtonDown( const MouseEvent& rMEvt ) if( !m_aSelection.isRotateableObjectSelected( getModel() ) ) { - m_eDragMode = SDRDRAG_MOVE; + m_eDragMode = SdrDragMode::Move; pDrawViewWrapper->SetDragMode(m_eDragMode); } @@ -666,7 +666,7 @@ void ChartController::execute_MouseButtonDown( const MouseEvent& rMEvt ) //change selection to 3D scene if rotate mode SdrDragMode eDragMode = pDrawViewWrapper->GetDragMode(); - if( SDRDRAG_ROTATE==eDragMode ) + if( SdrDragMode::Rotate==eDragMode ) { E3dScene* pScene = SelectionHelper::getSceneToRotate( pDrawViewWrapper->getNamedSdrObject( m_aSelection.getSelectedCID() ) ); if( pScene ) @@ -851,10 +851,10 @@ void ChartController::execute_MouseButtonUp( const MouseEvent& rMEvt ) bool bIsRotateable = m_aSelection.isRotateableObjectSelected( getModel() ); //toggle between move and rotate - if( bIsRotateable && bClickedTwiceOnDragableObject && SDRDRAG_MOVE==m_eDragMode ) - m_eDragMode=SDRDRAG_ROTATE; + if( bIsRotateable && bClickedTwiceOnDragableObject && SdrDragMode::Move==m_eDragMode ) + m_eDragMode=SdrDragMode::Rotate; else - m_eDragMode=SDRDRAG_MOVE; + m_eDragMode=SdrDragMode::Move; pDrawViewWrapper->SetDragMode(m_eDragMode); @@ -1310,9 +1310,9 @@ bool ChartController::execute_KeyInput( const KeyEvent& rKEvt ) { aNewSelection = aNewOID.getAny(); } - if ( m_eDragMode == SDRDRAG_ROTATE && !SelectionHelper::isRotateableObject( aNewOID.getObjectCID(), getModel() ) ) + if ( m_eDragMode == SdrDragMode::Rotate && !SelectionHelper::isRotateableObject( aNewOID.getObjectCID(), getModel() ) ) { - m_eDragMode = SDRDRAG_MOVE; + m_eDragMode = SdrDragMode::Move; } bReturn = select( aNewSelection ); } @@ -1946,7 +1946,7 @@ void ChartController::impl_SetMousePointer( const MouseEvent & rEvent ) } else if( ObjectIdentifier::isDragableObject( aHitObjectCID ) ) { - if( (m_eDragMode == SDRDRAG_ROTATE) + if( (m_eDragMode == SdrDragMode::Rotate) && SelectionHelper::isRotateableObject( aHitObjectCID , getModel() ) ) m_pChartWindow->SetPointer( Pointer( PointerStyle::Rotate ) ); |