diff options
author | Noel Grandin <noel@peralex.com> | 2016-08-22 14:54:18 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-08-23 09:54:16 +0200 |
commit | 6fc92adb8f89e653fd733e77ab24b4fcffe6a909 (patch) | |
tree | 398e14591cdfb44fb146def9eab0ccfa3fe720d3 /sd | |
parent | c3b305149efd8a2407078ce5908ab1e1df567aba (diff) |
convert SdrHdlKind to scoped enum
Change-Id: Ib0a06d94f8b51cce1f29f20d1c00d54be939c076
Diffstat (limited to 'sd')
-rw-r--r-- | sd/qa/unit/tiledrendering/tiledrendering.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/animations/motionpathtag.cxx | 38 | ||||
-rw-r--r-- | sd/source/ui/func/fupoor.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/func/fusel.cxx | 8 | ||||
-rw-r--r-- | sd/source/ui/func/smarttag.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/inc/smarttag.hxx | 4 | ||||
-rw-r--r-- | sd/source/ui/view/sdview2.cxx | 4 |
7 files changed, 32 insertions, 32 deletions
diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx b/sd/qa/unit/tiledrendering/tiledrendering.cxx index b5de22266b72..268692e72e07 100644 --- a/sd/qa/unit/tiledrendering/tiledrendering.cxx +++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx @@ -412,7 +412,7 @@ void SdTiledRenderingTest::testSetGraphicSelection() CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt32>(8), pObject->GetHdlCount()); // Take the bottom center one. SdrHdl* pHdl = pObject->GetHdl(6); - CPPUNIT_ASSERT_EQUAL(HDL_LOWER, pHdl->GetKind()); + CPPUNIT_ASSERT_EQUAL((int)SdrHdlKind::Lower, (int)pHdl->GetKind()); Rectangle aShapeBefore = pObject->GetSnapRect(); // Resize. pXImpressDocument->setGraphicSelection(LOK_SETGRAPHICSELECTION_START, convertMm100ToTwip(pHdl->GetPos().getX()), convertMm100ToTwip(pHdl->GetPos().getY())); diff --git a/sd/source/ui/animations/motionpathtag.cxx b/sd/source/ui/animations/motionpathtag.cxx index 37e6f74b9a52..aed3a65f69b7 100644 --- a/sd/source/ui/animations/motionpathtag.cxx +++ b/sd/source/ui/animations/motionpathtag.cxx @@ -527,12 +527,12 @@ bool MotionPathTag::MouseButtonDown( const MouseEvent& rMEvt, SmartHdl& rHdl ) // to create the needed local SdrDragEntry for it in createSdrDragEntries() const basegfx::B2DPolyPolygon aDragPoly(mpPathObj->GetPathPoly()); - if( (pHdl->GetKind() == HDL_MOVE) || (pHdl->GetKind() == HDL_SMARTTAG) ) + if( (pHdl->GetKind() == SdrHdlKind::Move) || (pHdl->GetKind() == SdrHdlKind::SmartTag) ) { pDragMethod = new PathDragMove( mrView, xTag, aDragPoly ); pHdl->SetPos( aMDPos ); } - else if( pHdl->GetKind() == HDL_POLY ) + else if( pHdl->GetKind() == SdrHdlKind::Poly ) { pDragMethod = new PathDragObjOwn( mrView, aDragPoly ); } @@ -628,7 +628,7 @@ bool MotionPathTag::OnMarkHandle( const KeyEvent& rKEvt ) const SdrHdlList& rHdlList = mrView.GetHdlList(); SdrHdl* pHdl = rHdlList.GetFocusHdl(); - if(pHdl && pHdl->GetKind() == HDL_POLY ) + if(pHdl && pHdl->GetKind() == SdrHdlKind::Poly ) { // rescue ID of point with focus sal_uInt32 nPol(pHdl->GetPolyNum()); @@ -659,7 +659,7 @@ bool MotionPathTag::OnMarkHandle( const KeyEvent& rKEvt ) { SdrHdl* pAct = rHdlList.GetHdl(a); - if(pAct && pAct->GetKind() == HDL_POLY && pAct->GetPolyNum() == nPol && pAct->GetPointNum() == nPnt) + if(pAct && pAct->GetKind() == SdrHdlKind::Poly && pAct->GetPolyNum() == nPol && pAct->GetPointNum() == nPnt) pNewOne = pAct; } @@ -714,15 +714,15 @@ bool MotionPathTag::OnMove( const KeyEvent& rKEvt ) // start dragging rtl::Reference< MotionPathTag > xTag( this ); SdrDragMethod* pDragMethod = nullptr; - if( (pHdl->GetKind() == HDL_MOVE) || (pHdl->GetKind() == HDL_SMARTTAG) ) + if( (pHdl->GetKind() == SdrHdlKind::Move) || (pHdl->GetKind() == SdrHdlKind::SmartTag) ) { pDragMethod = new PathDragMove( mrView, xTag ); } - else if( pHdl->GetKind() == HDL_POLY ) + else if( pHdl->GetKind() == SdrHdlKind::Poly ) { pDragMethod = new PathDragObjOwn( mrView ); } - else if( pHdl->GetKind() != HDL_BWGT ) + else if( pHdl->GetKind() != SdrHdlKind::BezierWeight ) { pDragMethod = new PathDragResize( mrView, xTag ); } @@ -787,7 +787,7 @@ sal_uLong MotionPathTag::GetMarkedPointCount() const bool MotionPathTag::MarkPoint(SdrHdl& rHdl, bool bUnmark ) { bool bRet=false; - if( mpPathObj && mrView.IsPointMarkable( rHdl ) && (rHdl.GetKind() != HDL_SMARTTAG) ) + if( mpPathObj && mrView.IsPointMarkable( rHdl ) && (rHdl.GetKind() != SdrHdlKind::SmartTag) ) { SmartHdl* pSmartHdl = dynamic_cast< SmartHdl* >( &rHdl ); if( pSmartHdl && pSmartHdl->getTag().get() == this ) @@ -955,23 +955,23 @@ void MotionPathTag::addCustomHandles( SdrHdlList& rHandlerList ) bool bHgt0=aRect.Top()==aRect.Bottom(); if (bWdt0 && bHgt0) { - rHandlerList.AddHdl(new SmartHdl( xThis, mpPathObj, aRect.TopLeft(),HDL_UPLFT)); + rHandlerList.AddHdl(new SmartHdl( xThis, mpPathObj, aRect.TopLeft(),SdrHdlKind::UpperLeft)); } else if (bWdt0 || bHgt0) { - rHandlerList.AddHdl(new SmartHdl( xThis, mpPathObj, aRect.TopLeft() ,HDL_UPLFT)); - rHandlerList.AddHdl(new SmartHdl( xThis, mpPathObj, aRect.BottomRight(),HDL_LWRGT)); + rHandlerList.AddHdl(new SmartHdl( xThis, mpPathObj, aRect.TopLeft() ,SdrHdlKind::UpperLeft)); + rHandlerList.AddHdl(new SmartHdl( xThis, mpPathObj, aRect.BottomRight(),SdrHdlKind::LowerRight)); } else { - if (!bWdt0 && !bHgt0) rHandlerList.AddHdl(new SmartHdl( xThis, mpPathObj, aRect.TopLeft() ,HDL_UPLFT)); - if ( !bHgt0) rHandlerList.AddHdl(new SmartHdl( xThis, mpPathObj, aRect.TopCenter() ,HDL_UPPER)); - if (!bWdt0 && !bHgt0) rHandlerList.AddHdl(new SmartHdl( xThis, mpPathObj, aRect.TopRight() ,HDL_UPRGT)); - if (!bWdt0 ) rHandlerList.AddHdl(new SmartHdl( xThis, mpPathObj, aRect.LeftCenter() ,HDL_LEFT )); - if (!bWdt0 ) rHandlerList.AddHdl(new SmartHdl( xThis, mpPathObj, aRect.RightCenter() ,HDL_RIGHT)); - if (!bWdt0 && !bHgt0) rHandlerList.AddHdl(new SmartHdl( xThis, mpPathObj, aRect.BottomLeft() ,HDL_LWLFT)); - if ( !bHgt0) rHandlerList.AddHdl(new SmartHdl( xThis, mpPathObj, aRect.BottomCenter(),HDL_LOWER)); - if (!bWdt0 && !bHgt0) rHandlerList.AddHdl(new SmartHdl( xThis, mpPathObj, aRect.BottomRight() ,HDL_LWRGT)); + if (!bWdt0 && !bHgt0) rHandlerList.AddHdl(new SmartHdl( xThis, mpPathObj, aRect.TopLeft() ,SdrHdlKind::UpperLeft)); + if ( !bHgt0) rHandlerList.AddHdl(new SmartHdl( xThis, mpPathObj, aRect.TopCenter() ,SdrHdlKind::Upper)); + if (!bWdt0 && !bHgt0) rHandlerList.AddHdl(new SmartHdl( xThis, mpPathObj, aRect.TopRight() ,SdrHdlKind::UpperRight)); + if (!bWdt0 ) rHandlerList.AddHdl(new SmartHdl( xThis, mpPathObj, aRect.LeftCenter() ,SdrHdlKind::Left )); + if (!bWdt0 ) rHandlerList.AddHdl(new SmartHdl( xThis, mpPathObj, aRect.RightCenter() ,SdrHdlKind::Right)); + if (!bWdt0 && !bHgt0) rHandlerList.AddHdl(new SmartHdl( xThis, mpPathObj, aRect.BottomLeft() ,SdrHdlKind::LowerLeft)); + if ( !bHgt0) rHandlerList.AddHdl(new SmartHdl( xThis, mpPathObj, aRect.BottomCenter(),SdrHdlKind::Lower)); + if (!bWdt0 && !bHgt0) rHandlerList.AddHdl(new SmartHdl( xThis, mpPathObj, aRect.BottomRight() ,SdrHdlKind::LowerRight)); } while( nCount < rHandlerList.GetHdlCount() ) diff --git a/sd/source/ui/func/fupoor.cxx b/sd/source/ui/func/fupoor.cxx index 7af92eac1334..d7de0b6cfab4 100644 --- a/sd/source/ui/func/fupoor.cxx +++ b/sd/source/ui/func/fupoor.cxx @@ -526,7 +526,7 @@ bool FuPoor::KeyInput(const KeyEvent& rKEvt) if(pHdl) { - if(pHdl->GetKind() == HDL_POLY) + if(pHdl->GetKind() == SdrHdlKind::Poly) { // rescue ID of point with focus sal_uInt32 nPol(pHdl->GetPolyNum()); @@ -559,7 +559,7 @@ bool FuPoor::KeyInput(const KeyEvent& rKEvt) SdrHdl* pAct = rHdlList.GetHdl(a); if(pAct - && pAct->GetKind() == HDL_POLY + && pAct->GetKind() == SdrHdlKind::Poly && pAct->GetPolyNum() == nPol && pAct->GetPointNum() == nPnt) { diff --git a/sd/source/ui/func/fusel.cxx b/sd/source/ui/func/fusel.cxx index d5d61ee9e764..6ba46951c997 100644 --- a/sd/source/ui/func/fusel.cxx +++ b/sd/source/ui/func/fusel.cxx @@ -438,7 +438,7 @@ bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt) SdrViewEvent aVEvt; SdrHitKind eHit = mpView->PickAnything(rMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt); - if (eHit == SdrHitKind::Handle && aVEvt.pHdl->GetKind() == HDL_BWGT) + if (eHit == SdrHitKind::Handle && aVEvt.pHdl->GetKind() == SdrHdlKind::BezierWeight) { /****************************************************************** * Drag Handle @@ -718,9 +718,9 @@ bool FuSelection::MouseButtonUp(const MouseEvent& rMEvt) mpView->Start3DCreation(); bSuppressChangesOfSelection = false; } - else if (pHdl->GetKind() != HDL_MIRX && - pHdl->GetKind() != HDL_REF1 && - pHdl->GetKind() != HDL_REF2 && mpView->Is3DRotationCreationActive()) + else if (pHdl->GetKind() != SdrHdlKind::MirrorAxis && + pHdl->GetKind() != SdrHdlKind::Ref1 && + pHdl->GetKind() != SdrHdlKind::Ref2 && mpView->Is3DRotationCreationActive()) { /********************************************************* * If 3D-rotation bodies are about to be created, diff --git a/sd/source/ui/func/smarttag.cxx b/sd/source/ui/func/smarttag.cxx index f49b3a8f56a6..0ee180765a9b 100644 --- a/sd/source/ui/func/smarttag.cxx +++ b/sd/source/ui/func/smarttag.cxx @@ -348,14 +348,14 @@ void SmartTagSet::CheckPossibilities() mxSelectedTag->CheckPossibilities(); } -SmartHdl::SmartHdl( const SmartTagReference& xTag, SdrObject* pObject, const Point& rPnt, SdrHdlKind eNewKind /*=HDL_MOVE*/ ) +SmartHdl::SmartHdl( const SmartTagReference& xTag, SdrObject* pObject, const Point& rPnt, SdrHdlKind eNewKind /*=SdrHdlKind::Move*/ ) : SdrHdl( rPnt, eNewKind ) , mxTag( xTag ) { SetObj( pObject ); } -SmartHdl::SmartHdl( const SmartTagReference& xTag, const Point& rPnt, SdrHdlKind eNewKind /*=HDL_MOVE*/ ) +SmartHdl::SmartHdl( const SmartTagReference& xTag, const Point& rPnt, SdrHdlKind eNewKind /*=SdrHdlKind::Move*/ ) : SdrHdl( rPnt, eNewKind ) , mxTag( xTag ) { diff --git a/sd/source/ui/inc/smarttag.hxx b/sd/source/ui/inc/smarttag.hxx index 0e6b135c3436..7b08aea9e437 100644 --- a/sd/source/ui/inc/smarttag.hxx +++ b/sd/source/ui/inc/smarttag.hxx @@ -164,8 +164,8 @@ private: class SmartHdl : public SdrHdl { public: - SmartHdl( const SmartTagReference& xTag, SdrObject* pObject, const Point& rPnt, SdrHdlKind eNewKind=HDL_SMARTTAG ); - SmartHdl( const SmartTagReference& xTag, const Point& rPnt, SdrHdlKind eNewKind=HDL_SMARTTAG ); + SmartHdl( const SmartTagReference& xTag, SdrObject* pObject, const Point& rPnt, SdrHdlKind eNewKind=SdrHdlKind::SmartTag ); + SmartHdl( const SmartTagReference& xTag, const Point& rPnt, SdrHdlKind eNewKind=SdrHdlKind::SmartTag ); const SmartTagReference& getTag() const { return mxTag; } diff --git a/sd/source/ui/view/sdview2.cxx b/sd/source/ui/view/sdview2.cxx index 361fcaba4f44..4ee833c3b5dc 100644 --- a/sd/source/ui/view/sdview2.cxx +++ b/sd/source/ui/view/sdview2.cxx @@ -518,7 +518,7 @@ sal_Int8 View::AcceptDrop( const AcceptDropEvent& rEvt, DropTargetHelper& rTarge { SdrHdl* pIAOHandle = rHdlList.GetHdl( n ); - if( pIAOHandle && ( HDL_COLR == pIAOHandle->GetKind() ) ) + if( pIAOHandle && ( SdrHdlKind::Color == pIAOHandle->GetKind() ) ) { if(pIAOHandle->getOverlayObjectList().isHitPixel(rEvt.maPosPixel)) { @@ -672,7 +672,7 @@ sal_Int8 View::ExecuteDrop( const ExecuteDropEvent& rEvt, { SdrHdl* pIAOHandle = rHdlList.GetHdl( n ); - if( pIAOHandle && ( HDL_COLR == pIAOHandle->GetKind() ) ) + if( pIAOHandle && ( SdrHdlKind::Color == pIAOHandle->GetKind() ) ) { if(pIAOHandle->getOverlayObjectList().isHitPixel(rEvt.maPosPixel)) { |