summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-08-18 12:20:08 +0200
committerNoel Grandin <noel@peralex.com>2016-08-19 08:18:37 +0200
commitfc518ed954aa73eeeb529c21afbcfdfa55ef7fb4 (patch)
treec04bd1402c84d8e7abe8224ebe7c7fb178174ad2 /sd
parente00aa45d3456e2f76ed70d593d6ae1646aa1ae51 (diff)
convert SdrDragMode to scoped enum
Change-Id: I244132d2240a46f42f14d453e5987968d274e907
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/func/fuconstr.cxx6
-rw-r--r--sd/source/ui/func/fudraw.cxx2
-rw-r--r--sd/source/ui/func/fupoor.cxx2
-rw-r--r--sd/source/ui/func/fusel.cxx30
-rw-r--r--sd/source/ui/func/futext.cxx2
-rw-r--r--sd/source/ui/view/sdview2.cxx4
6 files changed, 23 insertions, 23 deletions
diff --git a/sd/source/ui/func/fuconstr.cxx b/sd/source/ui/func/fuconstr.cxx
index 8719f79e5218..de0972eb192d 100644
--- a/sd/source/ui/func/fuconstr.cxx
+++ b/sd/source/ui/func/fuconstr.cxx
@@ -192,15 +192,15 @@ bool FuConstruct::MouseButtonUp(const MouseEvent& rMEvt)
pSingleObj = mpView->GetMarkedObjectList().GetMark(0)->GetMarkedSdrObj();
}
- if (mpView->GetDragMode() == SDRDRAG_MOVE && mpView->IsRotateAllowed() &&
+ if (mpView->GetDragMode() == SdrDragMode::Move && mpView->IsRotateAllowed() &&
(mpViewShell->GetFrameView()->IsClickChangeRotation() ||
(pSingleObj && pSingleObj->GetObjInventor()==E3dInventor)))
{
- mpView->SetDragMode(SDRDRAG_ROTATE);
+ mpView->SetDragMode(SdrDragMode::Rotate);
}
else
{
- mpView->SetDragMode(SDRDRAG_MOVE);
+ mpView->SetDragMode(SdrDragMode::Move);
}
}
}
diff --git a/sd/source/ui/func/fudraw.cxx b/sd/source/ui/func/fudraw.cxx
index 8d773a940e48..d37203ad40b2 100644
--- a/sd/source/ui/func/fudraw.cxx
+++ b/sd/source/ui/func/fudraw.cxx
@@ -524,7 +524,7 @@ void FuDraw::ForcePointer(const MouseEvent* pMEvt)
eHit = mpView->PickAnything(*pMEvt, SdrMouseEventKind::MOVE, aVEvt);
}
- if ((eDragMode == SDRDRAG_ROTATE) && (eHit == SDRHIT_MARKEDOBJECT))
+ if ((eDragMode == SdrDragMode::Rotate) && (eHit == SDRHIT_MARKEDOBJECT))
{
// The goal of this request is show always the rotation-arrow for 3D-objects at rotation-modus
// Independent of the settings at Extras->Optionen->Grafik "Objekte immer verschieben"
diff --git a/sd/source/ui/func/fupoor.cxx b/sd/source/ui/func/fupoor.cxx
index 1d7f432b11fd..52fa9a7f747a 100644
--- a/sd/source/ui/func/fupoor.cxx
+++ b/sd/source/ui/func/fupoor.cxx
@@ -1123,7 +1123,7 @@ bool FuPoor::doConstructOrthogonal() const
// Check whether a media object is selected
bool bResizeKeepRatio = false;
// tdf#89758 Avoid interactive crop preview from being proportionally scaled by default.
- if (mpView->AreObjectsMarked() && mpView->GetDragMode() != SDRDRAG_CROP)
+ if (mpView->AreObjectsMarked() && mpView->GetDragMode() != SdrDragMode::Crop)
{
const SdrMarkList& rMarkList = mpView->GetMarkedObjectList();
if (rMarkList.GetMarkCount() == 1)
diff --git a/sd/source/ui/func/fusel.cxx b/sd/source/ui/func/fusel.cxx
index 4c81c81006de..72a882b44d24 100644
--- a/sd/source/ui/func/fusel.cxx
+++ b/sd/source/ui/func/fusel.cxx
@@ -120,9 +120,9 @@ FuSelection::~FuSelection()
mpView->UnmarkAllPoints();
mpView->ResetCreationActive();
- if ( mpView->GetDragMode() != SDRDRAG_MOVE )
+ if ( mpView->GetDragMode() != SdrDragMode::Move )
{
- mpView->SetDragMode(SDRDRAG_MOVE);
+ mpView->SetDragMode(SdrDragMode::Move);
}
}
@@ -819,9 +819,9 @@ bool FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
}
if ( (nSlotId != SID_OBJECT_SELECT && nMarkCount==0) ||
- ( mpView->GetDragMode() == SDRDRAG_CROOK &&
+ ( mpView->GetDragMode() == SdrDragMode::Crook &&
!mpView->IsCrookAllowed( mpView->IsCrookNoContortion() ) ) ||
- ( mpView->GetDragMode() == SDRDRAG_SHEAR &&
+ ( mpView->GetDragMode() == SdrDragMode::Shear &&
!mpView->IsShearAllowed() && !mpView->IsDistortAllowed() ) ||
( nSlotId==SID_CONVERT_TO_3D_LATHE && pSingleObj &&
(pSingleObj->GetObjInventor() != SdrInventor ||
@@ -1019,7 +1019,7 @@ void FuSelection::Activate()
{
case SID_OBJECT_ROTATE:
{
- eMode = SDRDRAG_ROTATE;
+ eMode = SdrDragMode::Rotate;
if ( mpView->GetDragMode() != eMode )
mpView->SetDragMode(eMode);
@@ -1028,7 +1028,7 @@ void FuSelection::Activate()
case SID_OBJECT_MIRROR:
{
- eMode = SDRDRAG_MIRROR;
+ eMode = SdrDragMode::Mirror;
if ( mpView->GetDragMode() != eMode )
mpView->SetDragMode(eMode);
@@ -1037,7 +1037,7 @@ void FuSelection::Activate()
case SID_OBJECT_CROP:
{
- eMode = SDRDRAG_CROP;
+ eMode = SdrDragMode::Crop;
if ( mpView->GetDragMode() != eMode )
mpView->SetDragMode(eMode);
@@ -1046,7 +1046,7 @@ void FuSelection::Activate()
case SID_OBJECT_TRANSPARENCE:
{
- eMode = SDRDRAG_TRANSPARENCE;
+ eMode = SdrDragMode::Transparence;
if ( mpView->GetDragMode() != eMode )
mpView->SetDragMode(eMode);
@@ -1055,7 +1055,7 @@ void FuSelection::Activate()
case SID_OBJECT_GRADIENT:
{
- eMode = SDRDRAG_GRADIENT;
+ eMode = SdrDragMode::Gradient;
if ( mpView->GetDragMode() != eMode )
mpView->SetDragMode(eMode);
@@ -1064,7 +1064,7 @@ void FuSelection::Activate()
case SID_OBJECT_SHEAR:
{
- eMode = SDRDRAG_SHEAR;
+ eMode = SdrDragMode::Shear;
if ( mpView->GetDragMode() != eMode )
mpView->SetDragMode(eMode);
@@ -1073,7 +1073,7 @@ void FuSelection::Activate()
case SID_OBJECT_CROOK_ROTATE:
{
- eMode = SDRDRAG_CROOK;
+ eMode = SdrDragMode::Crook;
if ( mpView->GetDragMode() != eMode )
{
@@ -1085,7 +1085,7 @@ void FuSelection::Activate()
case SID_OBJECT_CROOK_SLANT:
{
- eMode = SDRDRAG_CROOK;
+ eMode = SdrDragMode::Crook;
if ( mpView->GetDragMode() != eMode )
{
@@ -1097,7 +1097,7 @@ void FuSelection::Activate()
case SID_OBJECT_CROOK_STRETCH:
{
- eMode = SDRDRAG_CROOK;
+ eMode = SdrDragMode::Crook;
if ( mpView->GetDragMode() != eMode )
{
@@ -1109,7 +1109,7 @@ void FuSelection::Activate()
case SID_CONVERT_TO_3D_LATHE:
{
- eMode = SDRDRAG_MIRROR;
+ eMode = SdrDragMode::Mirror;
bSuppressChangesOfSelection = true;
if ( mpView->GetDragMode() != eMode )
@@ -1124,7 +1124,7 @@ void FuSelection::Activate()
default:
{
- eMode = SDRDRAG_MOVE;
+ eMode = SdrDragMode::Move;
if ( mpView->GetDragMode() != eMode )
mpView->SetDragMode(eMode);
diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx
index fdd492c31d6d..8a81a49d0ef0 100644
--- a/sd/source/ui/func/futext.cxx
+++ b/sd/source/ui/func/futext.cxx
@@ -304,7 +304,7 @@ bool FuText::MouseButtonDown(const MouseEvent& rMEvt)
if (!rMEvt.IsShift() && eHit == SDRHIT_TEXTEDITOBJ)
{
mpView->UnmarkAll();
- mpView->SetDragMode(SDRDRAG_MOVE);
+ mpView->SetDragMode(SdrDragMode::Move);
}
}
diff --git a/sd/source/ui/view/sdview2.cxx b/sd/source/ui/view/sdview2.cxx
index 8e9da15cd1d2..361fcaba4f44 100644
--- a/sd/source/ui/view/sdview2.cxx
+++ b/sd/source/ui/view/sdview2.cxx
@@ -510,7 +510,7 @@ sal_Int8 View::AcceptDrop( const AcceptDropEvent& rEvt, DropTargetHelper& rTarge
bool bXFillExchange = rTargetHelper.IsDropFormatSupported( SotClipboardFormatId::XFA );
// check handle insert
- if( !nRet && ( (bXFillExchange && ( SDRDRAG_GRADIENT == GetDragMode() )) || ( SDRDRAG_TRANSPARENCE == GetDragMode() ) ) )
+ if( !nRet && ( (bXFillExchange && ( SdrDragMode::Gradient == GetDragMode() )) || ( SdrDragMode::Transparence == GetDragMode() ) ) )
{
const SdrHdlList& rHdlList = GetHdlList();
@@ -664,7 +664,7 @@ sal_Int8 View::ExecuteDrop( const ExecuteDropEvent& rEvt,
aPos = pTargetWindow->PixelToLogic( rEvt.maPosPixel );
// handle insert?
- if( (!nRet && ( SDRDRAG_GRADIENT == GetDragMode() )) || (( SDRDRAG_TRANSPARENCE == GetDragMode() ) && aDataHelper.HasFormat( SotClipboardFormatId::XFA )) )
+ if( (!nRet && ( SdrDragMode::Gradient == GetDragMode() )) || (( SdrDragMode::Transparence == GetDragMode() ) && aDataHelper.HasFormat( SotClipboardFormatId::XFA )) )
{
const SdrHdlList& rHdlList = GetHdlList();