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 /sw/source | |
parent | e00aa45d3456e2f76ed70d593d6ae1646aa1ae51 (diff) |
convert SdrDragMode to scoped enum
Change-Id: I244132d2240a46f42f14d453e5987968d274e907
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/core/draw/dview.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/frmedt/feshview.cxx | 10 | ||||
-rw-r--r-- | sw/source/uibase/docvw/edtwin.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/shells/drawsh.cxx | 6 | ||||
-rw-r--r-- | sw/source/uibase/shells/drwbassh.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/shells/grfsh.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/uiview/viewdraw.cxx | 2 |
7 files changed, 14 insertions, 14 deletions
diff --git a/sw/source/core/draw/dview.cxx b/sw/source/core/draw/dview.cxx index 5105092e4e8a..963aaa25d2a9 100644 --- a/sw/source/core/draw/dview.cxx +++ b/sw/source/core/draw/dview.cxx @@ -656,7 +656,7 @@ bool SwDrawView::TakeDragLimit( SdrDragMode eMode, { const SdrObject *pObj = rMrkList.GetMark( 0 )->GetMarkedSdrObj(); SwRect aRect; - if( ::CalcClipRect( pObj, aRect, eMode == SDRDRAG_MOVE ) ) + if( ::CalcClipRect( pObj, aRect, eMode == SdrDragMode::Move ) ) { rRect = aRect.SVRect(); bRet = true; diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx index 5e4b92c66aa6..0060de81abcf 100644 --- a/sw/source/core/frmedt/feshview.cxx +++ b/sw/source/core/frmedt/feshview.cxx @@ -185,8 +185,8 @@ bool SwFEShell::SelectObj( const Point& rPt, sal_uInt8 nFlag, SdrObject *pObj ) } // Cancel crop mode - if ( SDRDRAG_CROP == GetDragMode() ) - SetDragMode( SDRDRAG_MOVE ); + if ( SdrDragMode::Crop == GetDragMode() ) + SetDragMode( SdrDragMode::Move ); bUnmark = true; } @@ -608,10 +608,10 @@ void SwFEShell::ScrollTo( const Point &rPt ) } } -void SwFEShell::SetDragMode( sal_uInt16 eDragMode ) +void SwFEShell::SetDragMode( SdrDragMode eDragMode ) { if ( Imp()->HasDrawView() ) - Imp()->GetDrawView()->SetDragMode( (SdrDragMode)eDragMode ); + Imp()->GetDrawView()->SetDragMode( eDragMode ); } SdrDragMode SwFEShell::GetDragMode() const @@ -657,7 +657,7 @@ void SwFEShell::StartCropImage() // Activate CROP mode pView->SetEditMode( SDREDITMODE_EDIT ); - SetDragMode( SDRDRAG_CROP ); + SetDragMode( SdrDragMode::Crop ); } long SwFEShell::BeginDrag( const Point* pPt, bool bIsShift) diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index 75759bc3e5b8..0eae529fcecd 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -4126,7 +4126,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) if (pHdl) bResizeKeepRatio = bResizeKeepRatio && pHdl->IsCornerHdl(); - if (pSdrView->GetDragMode() == SDRDRAG_CROP) + if (pSdrView->GetDragMode() == SdrDragMode::Crop) bisResize = false; if (rMEvt.IsShift()) { @@ -4354,7 +4354,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) { // tdf34555: ortho was always reset before being used in EndSdrDrag // Now, it is reset only if not in Crop mode. - if (pSdrView->GetDragMode() != SDRDRAG_CROP && !rMEvt.IsShift()) + if (pSdrView->GetDragMode() != SdrDragMode::Crop && !rMEvt.IsShift()) pSdrView->SetOrtho(false); if ( pSdrView->MouseButtonUp( rMEvt,this ) ) diff --git a/sw/source/uibase/shells/drawsh.cxx b/sw/source/uibase/shells/drawsh.cxx index e5632b507d33..25cffb9c4589 100644 --- a/sw/source/uibase/shells/drawsh.cxx +++ b/sw/source/uibase/shells/drawsh.cxx @@ -210,9 +210,9 @@ void SwDrawShell::Execute(SfxRequest &rReq) if (rSh.IsObjSelected() && pSdrView->IsRotateAllowed()) { if (GetView().IsDrawRotate()) - rSh.SetDragMode(SDRDRAG_MOVE); + rSh.SetDragMode(SdrDragMode::Move); else - rSh.SetDragMode(SDRDRAG_ROTATE); + rSh.SetDragMode(SdrDragMode::Rotate); GetView().FlipDrawRotate(); } @@ -221,7 +221,7 @@ void SwDrawShell::Execute(SfxRequest &rReq) case SID_BEZIER_EDIT: if (GetView().IsDrawRotate()) { - rSh.SetDragMode(SDRDRAG_MOVE); + rSh.SetDragMode(SdrDragMode::Move); GetView().FlipDrawRotate(); } GetView().FlipDrawSelMode(); diff --git a/sw/source/uibase/shells/drwbassh.cxx b/sw/source/uibase/shells/drwbassh.cxx index c06382ed289c..c937cc6582cc 100644 --- a/sw/source/uibase/shells/drwbassh.cxx +++ b/sw/source/uibase/shells/drwbassh.cxx @@ -360,7 +360,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq) if( GetView().IsDrawRotate() ) { - pSh->SetDragMode( SDRDRAG_MOVE ); + pSh->SetDragMode( SdrDragMode::Move ); GetView().FlipDrawRotate(); } diff --git a/sw/source/uibase/shells/grfsh.cxx b/sw/source/uibase/shells/grfsh.cxx index e58869336da0..db916633f505 100644 --- a/sw/source/uibase/shells/grfsh.cxx +++ b/sw/source/uibase/shells/grfsh.cxx @@ -481,7 +481,7 @@ void SwGrfShell::Execute(SfxRequest &rReq) case SID_OBJECT_CROP: { GraphicObject const *pGraphicObject = rSh.GetGraphicObj(); - if (nullptr != pGraphicObject && SDRDRAG_CROP != rSh.GetDragMode()) { + if (nullptr != pGraphicObject && SdrDragMode::Crop != rSh.GetDragMode()) { rSh.StartCropImage(); } } diff --git a/sw/source/uibase/uiview/viewdraw.cxx b/sw/source/uibase/uiview/viewdraw.cxx index 011afcb3299c..2c8a7416c7b1 100644 --- a/sw/source/uibase/uiview/viewdraw.cxx +++ b/sw/source/uibase/uiview/viewdraw.cxx @@ -426,7 +426,7 @@ void SwView::NoRotate() { if (IsDrawRotate()) { - m_pWrtShell->SetDragMode(SDRDRAG_MOVE); + m_pWrtShell->SetDragMode(SdrDragMode::Move); FlipDrawRotate(); const SfxBoolItem aTmp( SID_OBJECT_ROTATE, false ); |