summaryrefslogtreecommitdiff
path: root/svx/source/svdraw
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-04-24 15:06:13 +0200
committerNoel Grandin <noel@peralex.com>2015-04-29 10:41:40 +0200
commit2a6806a81b3fd9218af18c685b2ede36a86956f6 (patch)
treea99801054274dbda906b1a46908e3467671554d3 /svx/source/svdraw
parent62f9bc737c928ceed89af09ff927c92bea4896ca (diff)
convert SDRSNAP_ constants to scoped enum
Change-Id: Ida0b0e3f017c53588ea9208d078c24948a63eb92
Diffstat (limited to 'svx/source/svdraw')
-rw-r--r--svx/source/svdraw/svddrgmt.cxx6
-rw-r--r--svx/source/svdraw/svdsnpv.cxx18
2 files changed, 12 insertions, 12 deletions
diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx
index 0d0c1a518349..c68b62adf128 100644
--- a/svx/source/svdraw/svddrgmt.cxx
+++ b/svx/source/svdraw/svddrgmt.cxx
@@ -1557,10 +1557,10 @@ basegfx::B2DHomMatrix SdrDragMove::getCurrentTransformation()
void SdrDragMove::ImpCheckSnap(const Point& rPt)
{
Point aPt(rPt);
- sal_uInt16 nRet=SnapPos(aPt);
+ SdrSnap nRet=SnapPos(aPt);
aPt-=rPt;
- if ((nRet & SDRSNAP_XSNAPPED) !=0)
+ if (nRet & SdrSnap::XSNAPPED)
{
if (bXSnapped)
{
@@ -1576,7 +1576,7 @@ void SdrDragMove::ImpCheckSnap(const Point& rPt)
}
}
- if ((nRet & SDRSNAP_YSNAPPED) !=0)
+ if (nRet & SdrSnap::YSNAPPED)
{
if (bYSnapped)
{
diff --git a/svx/source/svdraw/svdsnpv.cxx b/svx/source/svdraw/svdsnpv.cxx
index d87e109d2673..c692a3ac5066 100644
--- a/svx/source/svdraw/svdsnpv.cxx
+++ b/svx/source/svdraw/svdsnpv.cxx
@@ -282,14 +282,14 @@ Point SdrSnapView::GetSnapPos(const Point& rPnt, const SdrPageView* pPV) const
}
#define NOT_SNAPPED 0x7FFFFFFF
-sal_uInt16 SdrSnapView::SnapPos(Point& rPnt, const SdrPageView* pPV) const
+SdrSnap SdrSnapView::SnapPos(Point& rPnt, const SdrPageView* pPV) const
{
- if (!bSnapEnab) return SDRSNAP_NOTSNAPPED;
+ if (!bSnapEnab) return SdrSnap::NOTSNAPPED;
long x=rPnt.X();
long y=rPnt.Y();
if (pPV==NULL) {
pPV=GetSdrPageView();
- if (pPV==NULL) return SDRSNAP_NOTSNAPPED;
+ if (pPV==NULL) return SdrSnap::NOTSNAPPED;
}
long dx=NOT_SNAPPED;
@@ -424,9 +424,9 @@ sal_uInt16 SdrSnapView::SnapPos(Point& rPnt, const SdrPageView* pPV) const
dy = 0;
}
}
- sal_uInt16 bRet=SDRSNAP_NOTSNAPPED;
- if (dx==NOT_SNAPPED) dx=0; else bRet|=SDRSNAP_XSNAPPED;
- if (dy==NOT_SNAPPED) dy=0; else bRet|=SDRSNAP_YSNAPPED;
+ SdrSnap bRet=SdrSnap::NOTSNAPPED;
+ if (dx==NOT_SNAPPED) dx=0; else bRet|=SdrSnap::XSNAPPED;
+ if (dy==NOT_SNAPPED) dy=0; else bRet|=SdrSnap::YSNAPPED;
rPnt.X()=x+dx;
rPnt.Y()=y+dy;
return bRet;
@@ -435,9 +435,9 @@ sal_uInt16 SdrSnapView::SnapPos(Point& rPnt, const SdrPageView* pPV) const
void SdrSnapView::CheckSnap(const Point& rPt, const SdrPageView* pPV, long& nBestXSnap, long& nBestYSnap, bool& bXSnapped, bool& bYSnapped) const
{
Point aPt(rPt);
- sal_uInt16 nRet=SnapPos(aPt,pPV);
+ SdrSnap nRet=SnapPos(aPt,pPV);
aPt-=rPt;
- if ((nRet & SDRSNAP_XSNAPPED) !=0) {
+ if (nRet & SdrSnap::XSNAPPED) {
if (bXSnapped) {
if (std::abs(aPt.X())<std::abs(nBestXSnap)) {
nBestXSnap=aPt.X();
@@ -447,7 +447,7 @@ void SdrSnapView::CheckSnap(const Point& rPt, const SdrPageView* pPV, long& nBes
bXSnapped=true;
}
}
- if ((nRet & SDRSNAP_YSNAPPED) !=0) {
+ if (nRet & SdrSnap::YSNAPPED) {
if (bYSnapped) {
if (std::abs(aPt.Y())<std::abs(nBestYSnap)) {
nBestYSnap=aPt.Y();