diff options
author | Noel Grandin <noel@peralex.com> | 2015-05-20 14:05:50 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-05-22 06:32:35 +0000 |
commit | e929194317a7debb1c5467282230cbbabe61a710 (patch) | |
tree | 89f7bfe3a00003c0fa96113b77abbf76c92f80bf /chart2 | |
parent | edcd1d5a9c88455fd1d52ab25815fc8d439f31ec (diff) |
convert POINTER constants to scoped enum
Change-Id: Iea29ce5fd6c620535197d3ca8538335078430e19
Reviewed-on: https://gerrit.libreoffice.org/15825
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/controller/main/ChartController_Window.cxx | 54 | ||||
-rw-r--r-- | chart2/source/controller/main/DragMethod_Base.cxx | 4 |
2 files changed, 29 insertions, 29 deletions
diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx index 8d8a22c73163..114f7e605835 100644 --- a/chart2/source/controller/main/ChartController_Window.cxx +++ b/chart2/source/controller/main/ChartController_Window.cxx @@ -1864,25 +1864,25 @@ void ChartController::impl_SetMousePointer( const MouseEvent & rEvent ) switch( aPointer.GetStyle()) { - case POINTER_NSIZE: - case POINTER_SSIZE: - case POINTER_WSIZE: - case POINTER_ESIZE: - case POINTER_NWSIZE: - case POINTER_NESIZE: - case POINTER_SWSIZE: - case POINTER_SESIZE: + case PointerStyle::NSize: + case PointerStyle::SSize: + case PointerStyle::WSize: + case PointerStyle::ESize: + case PointerStyle::NWSize: + case PointerStyle::NESize: + case PointerStyle::SWSize: + case PointerStyle::SESize: if( ! m_aSelection.isResizeableObjectSelected() ) bForceArrowPointer = true; break; - case POINTER_MOVE: + case PointerStyle::Move: if ( !aOID.isDragableObject() ) bForceArrowPointer = true; break; - case POINTER_MOVEPOINT: - case POINTER_MOVEBEZIERWEIGHT: + case PointerStyle::MovePoint: + case PointerStyle::MoveBezierWeight: // there is no point-editing in a chart - // the POINTER_MOVEBEZIERWEIGHT appears in 3d data points + // the PointerStyle::MoveBezierWeight appears in 3d data points bForceArrowPointer = true; break; default: @@ -1890,7 +1890,7 @@ void ChartController::impl_SetMousePointer( const MouseEvent & rEvent ) } if( bForceArrowPointer ) - m_pChartWindow->SetPointer( Pointer( POINTER_ARROW )); + m_pChartWindow->SetPointer( Pointer( PointerStyle::Arrow )); else m_pChartWindow->SetPointer( aPointer ); @@ -1901,44 +1901,44 @@ void ChartController::impl_SetMousePointer( const MouseEvent & rEvent ) if ( m_eDrawMode == CHARTDRAW_INSERT && ( !m_pDrawViewWrapper->IsMarkedHit( aMousePos ) || !m_aSelection.isDragableObjectSelected() ) ) { - PointerStyle ePointerStyle = POINTER_DRAW_RECT; + PointerStyle ePointerStyle = PointerStyle::DrawRect; SdrObjKind eKind = static_cast< SdrObjKind >( m_pDrawViewWrapper->GetCurrentObjIdentifier() ); switch ( eKind ) { case OBJ_LINE: { - ePointerStyle = POINTER_DRAW_LINE; + ePointerStyle = PointerStyle::DrawLine; } break; case OBJ_RECT: case OBJ_CUSTOMSHAPE: { - ePointerStyle = POINTER_DRAW_RECT; + ePointerStyle = PointerStyle::DrawRect; } break; case OBJ_CIRC: { - ePointerStyle = POINTER_DRAW_ELLIPSE; + ePointerStyle = PointerStyle::DrawEllipse; } break; case OBJ_FREELINE: { - ePointerStyle = POINTER_DRAW_POLYGON; + ePointerStyle = PointerStyle::DrawPolygon; } break; case OBJ_TEXT: { - ePointerStyle = POINTER_DRAW_TEXT; + ePointerStyle = PointerStyle::DrawText; } break; case OBJ_CAPTION: { - ePointerStyle = POINTER_DRAW_CAPTION; + ePointerStyle = PointerStyle::DrawCaption; } break; default: { - ePointerStyle = POINTER_DRAW_RECT; + ePointerStyle = PointerStyle::DrawRect; } break; } @@ -1954,7 +1954,7 @@ void ChartController::impl_SetMousePointer( const MouseEvent & rEvent ) { if( aHitObjectCID.equals(m_aSelection.getSelectedCID()) ) { - m_pChartWindow->SetPointer( Pointer( POINTER_ARROW )); + m_pChartWindow->SetPointer( Pointer( PointerStyle::Arrow )); return; } } @@ -1962,14 +1962,14 @@ void ChartController::impl_SetMousePointer( const MouseEvent & rEvent ) if( aHitObjectCID.isEmpty() ) { //additional shape was hit - m_pChartWindow->SetPointer( POINTER_MOVE ); + m_pChartWindow->SetPointer( PointerStyle::Move ); } else if( ObjectIdentifier::isDragableObject( aHitObjectCID ) ) { if( (m_eDragMode == SDRDRAG_ROTATE) && SelectionHelper::isRotateableObject( aHitObjectCID , getModel() ) ) - m_pChartWindow->SetPointer( Pointer( POINTER_ROTATE ) ); + m_pChartWindow->SetPointer( Pointer( PointerStyle::Rotate ) ); else { ObjectType eHitObjectType = ObjectIdentifier::getObjectType( aHitObjectCID ); @@ -1978,15 +1978,15 @@ void ChartController::impl_SetMousePointer( const MouseEvent & rEvent ) if( !ObjectIdentifier::areSiblings(aHitObjectCID,m_aSelection.getSelectedCID()) && !ObjectIdentifier::areIdenticalObjects(aHitObjectCID,m_aSelection.getSelectedCID()) ) { - m_pChartWindow->SetPointer( Pointer( POINTER_ARROW )); + m_pChartWindow->SetPointer( Pointer( PointerStyle::Arrow )); return; } } - m_pChartWindow->SetPointer( POINTER_MOVE ); + m_pChartWindow->SetPointer( PointerStyle::Move ); } } else - m_pChartWindow->SetPointer( Pointer( POINTER_ARROW )); + m_pChartWindow->SetPointer( Pointer( PointerStyle::Arrow )); } } //namespace chart diff --git a/chart2/source/controller/main/DragMethod_Base.cxx b/chart2/source/controller/main/DragMethod_Base.cxx index f0213a97956a..d333197f695a 100644 --- a/chart2/source/controller/main/DragMethod_Base.cxx +++ b/chart2/source/controller/main/DragMethod_Base.cxx @@ -71,9 +71,9 @@ void DragMethod_Base::TakeSdrDragComment(OUString& rStr) const Pointer DragMethod_Base::GetSdrDragPointer() const { if( IsDraggingPoints() || IsDraggingGluePoints() ) - return Pointer(POINTER_MOVEPOINT); + return Pointer(PointerStyle::MovePoint); else - return Pointer(POINTER_MOVE); + return Pointer(PointerStyle::Move); } } //namespace chart |