diff options
Diffstat (limited to 'svx/source/svdraw/svdglue.cxx')
-rwxr-xr-x[-rw-r--r--] | svx/source/svdraw/svdglue.cxx | 76 |
1 files changed, 38 insertions, 38 deletions
diff --git a/svx/source/svdraw/svdglue.cxx b/svx/source/svdraw/svdglue.cxx index 849815a83a7d..737542d43fe0 100644..100755 --- a/svx/source/svdraw/svdglue.cxx +++ b/svx/source/svdraw/svdglue.cxx @@ -160,7 +160,7 @@ void SdrGluePoint::SetAlignAngle(long nWink) else if (nWink<33750) nAlign=SDRHORZALIGN_RIGHT |SDRVERTALIGN_BOTTOM; } -long SdrGluePoint::EscDirToAngle(USHORT nEsc) const +long SdrGluePoint::EscDirToAngle(sal_uInt16 nEsc) const { switch (nEsc) { case SDRESC_RIGHT : return 0; @@ -171,7 +171,7 @@ long SdrGluePoint::EscDirToAngle(USHORT nEsc) const return 0; } -USHORT SdrGluePoint::EscAngleToDir(long nWink) const +sal_uInt16 SdrGluePoint::EscAngleToDir(long nWink) const { nWink=NormAngle360(nWink); if (nWink>=31500 || nWink<4500) return SDRESC_RIGHT; @@ -191,8 +191,8 @@ void SdrGluePoint::Rotate(const Point& rRef, long nWink, double sn, double cs, c SetAlignAngle(GetAlignAngle()+nWink); } // Austrittsrichtungen drehen - USHORT nEscDir0=nEscDir; - USHORT nEscDir1=0; + sal_uInt16 nEscDir0=nEscDir; + sal_uInt16 nEscDir1=0; if ((nEscDir0&SDRESC_LEFT )!=0) nEscDir1|=EscAngleToDir(EscDirToAngle(SDRESC_LEFT )+nWink); if ((nEscDir0&SDRESC_TOP )!=0) nEscDir1|=EscAngleToDir(EscDirToAngle(SDRESC_TOP )+nWink); if ((nEscDir0&SDRESC_RIGHT )!=0) nEscDir1|=EscAngleToDir(EscDirToAngle(SDRESC_RIGHT )+nWink); @@ -220,8 +220,8 @@ void SdrGluePoint::Mirror(const Point& rRef1, const Point& rRef2, long nWink, co SetAlignAngle(nAW); } // Austrittsrichtungen spiegeln - USHORT nEscDir0=nEscDir; - USHORT nEscDir1=0; + sal_uInt16 nEscDir0=nEscDir; + sal_uInt16 nEscDir1=0; if ((nEscDir0&SDRESC_LEFT)!=0) { long nEW=EscDirToAngle(SDRESC_LEFT); nEW+=2*(nWink-nEW); @@ -261,7 +261,7 @@ void SdrGluePoint::Draw(OutputDevice& rOut, const SdrObject* pObj) const bool bMapMerk=rOut.IsMapModeEnabled(); Point aPt(pObj!=NULL ? GetAbsolutePos(*pObj) : GetPos()); aPt=rOut.LogicToPixel(aPt); - rOut.EnableMapMode(FALSE); + rOut.EnableMapMode(sal_False); long x=aPt.X(),y=aPt.Y(); // Groesse erstmal fest auf 7 Pixel rOut.SetLineColor( aBackPenColor ); @@ -296,7 +296,7 @@ void SdrGluePoint::Invalidate(Window& rWin, const SdrObject* pObj) const bool bMapMerk=rWin.IsMapModeEnabled(); Point aPt(pObj!=NULL ? GetAbsolutePos(*pObj) : GetPos()); aPt=rWin.LogicToPixel(aPt); - rWin.EnableMapMode(FALSE); + rWin.EnableMapMode(sal_False); long x=aPt.X(),y=aPt.Y(); // Groesse erstmal fest auf 7 Pixel // #111096# @@ -318,8 +318,8 @@ bool SdrGluePoint::IsHit(const Point& rPnt, const OutputDevice& rOut, const SdrO void SdrGluePointList::Clear() { - USHORT nAnz=GetCount(); - for (USHORT i=0; i<nAnz; i++) { + sal_uInt16 nAnz=GetCount(); + for (sal_uInt16 i=0; i<nAnz; i++) { delete GetObject(i); } aList.Clear(); @@ -328,8 +328,8 @@ void SdrGluePointList::Clear() void SdrGluePointList::operator=(const SdrGluePointList& rSrcList) { if (GetCount()!=0) Clear(); - USHORT nAnz=rSrcList.GetCount(); - for (USHORT i=0; i<nAnz; i++) { + sal_uInt16 nAnz=rSrcList.GetCount(); + for (sal_uInt16 i=0; i<nAnz; i++) { Insert(rSrcList[i]); } } @@ -337,13 +337,13 @@ void SdrGluePointList::operator=(const SdrGluePointList& rSrcList) // Die Id's der Klebepunkte in der Liste sind stets streng monoton steigend! // Ggf. wird dem neuen Klebepunkt eine neue Id zugewiesen (wenn diese bereits // vergeben ist). Die Id 0 ist reserviert. -USHORT SdrGluePointList::Insert(const SdrGluePoint& rGP) +sal_uInt16 SdrGluePointList::Insert(const SdrGluePoint& rGP) { SdrGluePoint* pGP=new SdrGluePoint(rGP); - USHORT nId=pGP->GetId(); - USHORT nAnz=GetCount(); - USHORT nInsPos=nAnz; - USHORT nLastId=nAnz!=0 ? GetObject(nAnz-1)->GetId() : 0; + sal_uInt16 nId=pGP->GetId(); + sal_uInt16 nAnz=GetCount(); + sal_uInt16 nInsPos=nAnz; + sal_uInt16 nLastId=nAnz!=0 ? GetObject(nAnz-1)->GetId() : 0; DBG_ASSERT(nLastId>=nAnz,"SdrGluePointList::Insert(): nLastId<nAnz"); bool bHole = nLastId>nAnz; if (nId<=nLastId) { @@ -351,9 +351,9 @@ USHORT SdrGluePointList::Insert(const SdrGluePoint& rGP) nId=nLastId+1; } else { bool bBrk = false; - for (USHORT nNum=0; nNum<nAnz && !bBrk; nNum++) { + for (sal_uInt16 nNum=0; nNum<nAnz && !bBrk; nNum++) { const SdrGluePoint* pGP2=GetObject(nNum); - USHORT nTmpId=pGP2->GetId(); + sal_uInt16 nTmpId=pGP2->GetId(); if (nTmpId==nId) { nId=nLastId+1; // bereits vorhanden bBrk = true; @@ -372,35 +372,35 @@ USHORT SdrGluePointList::Insert(const SdrGluePoint& rGP) void SdrGluePointList::Invalidate(Window& rWin, const SdrObject* pObj) const { - USHORT nAnz=GetCount(); - for (USHORT nNum=0; nNum<nAnz; nNum++) { + sal_uInt16 nAnz=GetCount(); + for (sal_uInt16 nNum=0; nNum<nAnz; nNum++) { GetObject(nNum)->Invalidate(rWin,pObj); } } -USHORT SdrGluePointList::FindGluePoint(USHORT nId) const +sal_uInt16 SdrGluePointList::FindGluePoint(sal_uInt16 nId) const { // Hier noch einen optimaleren Suchalgorithmus implementieren. // Die Liste sollte stets sortiert sein!!!! - USHORT nAnz=GetCount(); - USHORT nRet=SDRGLUEPOINT_NOTFOUND; - for (USHORT nNum=0; nNum<nAnz && nRet==SDRGLUEPOINT_NOTFOUND; nNum++) { + sal_uInt16 nAnz=GetCount(); + sal_uInt16 nRet=SDRGLUEPOINT_NOTFOUND; + for (sal_uInt16 nNum=0; nNum<nAnz && nRet==SDRGLUEPOINT_NOTFOUND; nNum++) { const SdrGluePoint* pGP=GetObject(nNum); if (pGP->GetId()==nId) nRet=nNum; } return nRet; } -USHORT SdrGluePointList::HitTest(const Point& rPnt, const OutputDevice& rOut, const SdrObject* pObj, bool bBack, bool bNext, USHORT nId0) const +sal_uInt16 SdrGluePointList::HitTest(const Point& rPnt, const OutputDevice& rOut, const SdrObject* pObj, bool bBack, bool bNext, sal_uInt16 nId0) const { - USHORT nAnz=GetCount(); - USHORT nRet=SDRGLUEPOINT_NOTFOUND; - USHORT nNum=bBack ? 0 : nAnz; + sal_uInt16 nAnz=GetCount(); + sal_uInt16 nRet=SDRGLUEPOINT_NOTFOUND; + sal_uInt16 nNum=bBack ? 0 : nAnz; while ((bBack ? nNum<nAnz : nNum>0) && nRet==SDRGLUEPOINT_NOTFOUND) { if (!bBack) nNum--; const SdrGluePoint* pGP=GetObject(nNum); if (bNext) { - if (pGP->GetId()==nId0) bNext=FALSE; + if (pGP->GetId()==nId0) bNext=sal_False; } else { if (pGP->IsHit(rPnt,rOut,pObj)) nRet=nNum; } @@ -411,16 +411,16 @@ USHORT SdrGluePointList::HitTest(const Point& rPnt, const OutputDevice& rOut, co void SdrGluePointList::SetReallyAbsolute(bool bOn, const SdrObject& rObj) { - USHORT nAnz=GetCount(); - for (USHORT nNum=0; nNum<nAnz; nNum++) { + sal_uInt16 nAnz=GetCount(); + for (sal_uInt16 nNum=0; nNum<nAnz; nNum++) { GetObject(nNum)->SetReallyAbsolute(bOn,rObj); } } void SdrGluePointList::Rotate(const Point& rRef, long nWink, double sn, double cs, const SdrObject* pObj) { - USHORT nAnz=GetCount(); - for (USHORT nNum=0; nNum<nAnz; nNum++) { + sal_uInt16 nAnz=GetCount(); + for (sal_uInt16 nNum=0; nNum<nAnz; nNum++) { GetObject(nNum)->Rotate(rRef,nWink,sn,cs,pObj); } } @@ -434,16 +434,16 @@ void SdrGluePointList::Mirror(const Point& rRef1, const Point& rRef2, const SdrO void SdrGluePointList::Mirror(const Point& rRef1, const Point& rRef2, long nWink, const SdrObject* pObj) { - USHORT nAnz=GetCount(); - for (USHORT nNum=0; nNum<nAnz; nNum++) { + sal_uInt16 nAnz=GetCount(); + for (sal_uInt16 nNum=0; nNum<nAnz; nNum++) { GetObject(nNum)->Mirror(rRef1,rRef2,nWink,pObj); } } void SdrGluePointList::Shear(const Point& rRef, long nWink, double tn, bool bVShear, const SdrObject* pObj) { - USHORT nAnz=GetCount(); - for (USHORT nNum=0; nNum<nAnz; nNum++) { + sal_uInt16 nAnz=GetCount(); + for (sal_uInt16 nNum=0; nNum<nAnz; nNum++) { GetObject(nNum)->Shear(rRef,nWink,tn,bVShear,pObj); } } |