diff options
Diffstat (limited to 'svx/source/svdraw/svdsnpv.cxx')
-rwxr-xr-x[-rw-r--r--] | svx/source/svdraw/svdsnpv.cxx | 82 |
1 files changed, 41 insertions, 41 deletions
diff --git a/svx/source/svdraw/svdsnpv.cxx b/svx/source/svdraw/svdsnpv.cxx index 5649856efbaa..ef39697b5ff4 100644..100755 --- a/svx/source/svdraw/svdsnpv.cxx +++ b/svx/source/svdraw/svdsnpv.cxx @@ -36,13 +36,13 @@ #include <svx/svdobj.hxx> #include <svx/svdpagv.hxx> #include <svx/svdpage.hxx> -#include "svditer.hxx" +#include "svx/svditer.hxx" #include <svx/sdr/overlay/overlayobjectlist.hxx> #include <svx/sdr/overlay/overlaycrosshair.hxx> #include <svx/sdr/overlay/overlayhelpline.hxx> #include <svx/sdr/overlay/overlaymanager.hxx> #include <basegfx/matrix/b2dhommatrix.hxx> -#include <sdrpaintwindow.hxx> +#include <svx/sdrpaintwindow.hxx> //////////////////////////////////////////////////////////////////////////////////////////////////// // #114409#-1 Migrate PageOrigin @@ -204,29 +204,29 @@ void ImplHelpLineOverlay::SetPosition(const basegfx::B2DPoint& rNewPosition) void SdrSnapView::ClearVars() { nMagnSizPix=4; - bSnapEnab=TRUE; - bGridSnap=TRUE; - bSnapTo1Pix=TRUE; - bBordSnap=TRUE; - bHlplSnap=TRUE; - bOFrmSnap=TRUE; - bOPntSnap=FALSE; - bOConSnap=TRUE; - bMoveMFrmSnap=TRUE; - bMoveOFrmSnap=TRUE; - bMoveOPntSnap=TRUE; - bMoveOConSnap=TRUE; - bMoveSnapOnlyTopLeft=FALSE; - bOrtho=FALSE; - bBigOrtho=TRUE; + bSnapEnab=sal_True; + bGridSnap=sal_True; + bSnapTo1Pix=sal_True; + bBordSnap=sal_True; + bHlplSnap=sal_True; + bOFrmSnap=sal_True; + bOPntSnap=sal_False; + bOConSnap=sal_True; + bMoveMFrmSnap=sal_True; + bMoveOFrmSnap=sal_True; + bMoveOPntSnap=sal_True; + bMoveOConSnap=sal_True; + bMoveSnapOnlyTopLeft=sal_False; + bOrtho=sal_False; + bBigOrtho=sal_True; nSnapAngle=1500; - bAngleSnapEnab=FALSE; - bMoveOnlyDragging=FALSE; - bSlantButShear=FALSE; - bCrookNoContortion=FALSE; + bAngleSnapEnab=sal_False; + bMoveOnlyDragging=sal_False; + bSlantButShear=sal_False; + bCrookNoContortion=sal_False; eCrookMode=SDRCROOK_ROTATE; - bHlplFixed=FALSE; - bEliminatePolyPoints=FALSE; + bHlplFixed=sal_False; + bEliminatePolyPoints=sal_False; nEliminatePolyPointLimitAngle=0; // #114409#-1 Migrate PageOrigin @@ -258,7 +258,7 @@ SdrSnapView::~SdrSnapView() //////////////////////////////////////////////////////////////////////////////////////////////////// -BOOL SdrSnapView::IsAction() const +sal_Bool SdrSnapView::IsAction() const { return IsSetPageOrg() || IsDragHelpLine() || SdrPaintView::IsAction(); } @@ -318,7 +318,7 @@ Point SdrSnapView::GetSnapPos(const Point& rPnt, const SdrPageView* pPV) const } #define NOT_SNAPPED 0x7FFFFFFF -USHORT SdrSnapView::SnapPos(Point& rPnt, const SdrPageView* pPV) const +sal_uInt16 SdrSnapView::SnapPos(Point& rPnt, const SdrPageView* pPV) const { if (!bSnapEnab) return SDRSNAP_NOTSNAPPED; long x=rPnt.X(); @@ -336,8 +336,8 @@ USHORT SdrSnapView::SnapPos(Point& rPnt, const SdrPageView* pPV) const if (bHlplVisible && bHlplSnap && !IsDragHelpLine()) { const SdrHelpLineList& rHLL=pPV->GetHelpLines(); - USHORT nAnz=rHLL.GetCount(); - for (USHORT i=nAnz; i>0;) { + sal_uInt16 nAnz=rHLL.GetCount(); + for (sal_uInt16 i=nAnz; i>0;) { i--; const SdrHelpLine& rHL=rHLL[i]; const Point& rPos=rHL.GetPos(); @@ -380,11 +380,11 @@ USHORT SdrSnapView::SnapPos(Point& rPnt, const SdrPageView* pPV) const a=y- ys ; if (Abs(a)<=my) { dy1=-a; if (Abs(dy1)<Abs(dy)) dy=dy1; } // rechte Papierkante } if (bOFrmSnap || bOPntSnap /*|| (bConnVisible && bOConSnap)*/) { - ULONG nMaxPointSnapCount=200; - ULONG nMaxFrameSnapCount=200; + sal_uIntPtr nMaxPointSnapCount=200; + sal_uIntPtr nMaxFrameSnapCount=200; // #97981# go back to IM_DEEPNOGROUPS runthrough for snap to object comparisons - SdrObjListIter aIter(*pPV->GetPage(),/*IM_FLAT*/IM_DEEPNOGROUPS,TRUE); + SdrObjListIter aIter(*pPV->GetPage(),/*IM_FLAT*/IM_DEEPNOGROUPS,sal_True); while (aIter.IsMore() && (nMaxPointSnapCount>0 || nMaxFrameSnapCount>0)) { SdrObject* pO=aIter.Next(); @@ -460,7 +460,7 @@ USHORT SdrSnapView::SnapPos(Point& rPnt, const SdrPageView* pPV) const dy = 0; } } - BOOL bRet=SDRSNAP_NOTSNAPPED; + sal_Bool 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; @@ -471,7 +471,7 @@ USHORT 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); - USHORT nRet=SnapPos(aPt,pPV); + sal_uInt16 nRet=SnapPos(aPt,pPV); aPt-=rPt; if ((nRet & SDRSNAP_XSNAPPED) !=0) { if (bXSnapped) { @@ -480,7 +480,7 @@ void SdrSnapView::CheckSnap(const Point& rPt, const SdrPageView* pPV, long& nBes } } else { nBestXSnap=aPt.X(); - bXSnapped=TRUE; + bXSnapped=sal_True; } } if ((nRet & SDRSNAP_YSNAPPED) !=0) { @@ -490,17 +490,17 @@ void SdrSnapView::CheckSnap(const Point& rPt, const SdrPageView* pPV, long& nBes } } else { nBestYSnap=aPt.Y(); - bYSnapped=TRUE; + bYSnapped=sal_True; } } } -USHORT SdrSnapView::SnapRect(const Rectangle& rRect, const SdrPageView* pPV, long& rDX, long& rDY) const +sal_uInt16 SdrSnapView::SnapRect(const Rectangle& rRect, const SdrPageView* pPV, long& rDX, long& rDY) const { long nBestXSnap=0; long nBestYSnap=0; - bool bXSnapped=FALSE; - bool bYSnapped=FALSE; + bool bXSnapped=sal_False; + bool bYSnapped=sal_False; CheckSnap(rRect.TopLeft() ,pPV,nBestXSnap,nBestYSnap,bXSnapped,bYSnapped); if (!bMoveSnapOnlyTopLeft) { CheckSnap(rRect.TopRight() ,pPV,nBestXSnap,nBestYSnap,bXSnapped,bYSnapped); @@ -509,7 +509,7 @@ USHORT SdrSnapView::SnapRect(const Rectangle& rRect, const SdrPageView* pPV, lon } rDX=nBestXSnap; rDY=nBestYSnap; - USHORT nRet=0; + sal_uInt16 nRet=0; if (bXSnapped) nRet+=SDRSNAP_XSNAPPED; if (bYSnapped) nRet+=SDRSNAP_YSNAPPED; return nRet; @@ -574,7 +574,7 @@ void SdrSnapView::BrkSetPageOrg() //////////////////////////////////////////////////////////////////////////////////////////////////// -sal_Bool SdrSnapView::PickHelpLine(const Point& rPnt, short nTol, const OutputDevice& rOut, USHORT& rnHelpLineNum, SdrPageView*& rpPV) const +sal_Bool SdrSnapView::PickHelpLine(const Point& rPnt, short nTol, const OutputDevice& rOut, sal_uInt16& rnHelpLineNum, SdrPageView*& rpPV) const { rpPV=NULL; nTol=ImpGetHitTolLogic(nTol,&rOut); @@ -583,7 +583,7 @@ sal_Bool SdrSnapView::PickHelpLine(const Point& rPnt, short nTol, const OutputDe if(pPV) { Point aPnt(rPnt); - USHORT nIndex=pPV->GetHelpLines().HitTest(aPnt,USHORT(nTol),rOut); + sal_uInt16 nIndex=pPV->GetHelpLines().HitTest(aPnt,sal_uInt16(nTol),rOut); if (nIndex!=SDRHELPLINE_NOTFOUND) { rpPV=pPV; rnHelpLineNum=nIndex; @@ -594,7 +594,7 @@ sal_Bool SdrSnapView::PickHelpLine(const Point& rPnt, short nTol, const OutputDe } // start HelpLine drag for new HelpLine -sal_Bool SdrSnapView::BegDragHelpLine(USHORT nHelpLineNum, SdrPageView* pPV) +sal_Bool SdrSnapView::BegDragHelpLine(sal_uInt16 nHelpLineNum, SdrPageView* pPV) { sal_Bool bRet(sal_False); |