summaryrefslogtreecommitdiff
path: root/svx/source/svdraw/svdglue.cxx
diff options
context:
space:
mode:
authorMikhail Voytenko <mav@openoffice.org>2011-01-10 16:11:35 +0100
committerMikhail Voytenko <mav@openoffice.org>2011-01-10 16:11:35 +0100
commit94d85ef550ad17efba5dec09290d0e8176a8b455 (patch)
tree41a1a79c31bd144b9374142c6259d33e2a3f5b89 /svx/source/svdraw/svdglue.cxx
parent3f4e9b4c3cd9028744ea6ed5e93c41c51a15d229 (diff)
removetooltypes01: #i112600# remove tooltypes from svx
Diffstat (limited to 'svx/source/svdraw/svdglue.cxx')
-rw-r--r--svx/source/svdraw/svdglue.cxx94
1 files changed, 47 insertions, 47 deletions
diff --git a/svx/source/svdraw/svdglue.cxx b/svx/source/svdraw/svdglue.cxx
index 634d7060e735..4f7605d0a4dd 100644
--- a/svx/source/svdraw/svdglue.cxx
+++ b/svx/source/svdraw/svdglue.cxx
@@ -35,7 +35,7 @@
////////////////////////////////////////////////////////////////////////////////////////////////////
-void SdrGluePoint::SetReallyAbsolute(FASTBOOL bOn, const SdrObject& rObj)
+void SdrGluePoint::SetReallyAbsolute(int bOn, const SdrObject& rObj)
{
if ( bReallyAbsolute != bOn )
{
@@ -159,7 +159,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;
@@ -170,7 +170,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;
@@ -190,8 +190,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);
@@ -219,8 +219,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);
@@ -245,7 +245,7 @@ void SdrGluePoint::Mirror(const Point& rRef1, const Point& rRef2, long nWink, co
if (pObj!=NULL) SetAbsolutePos(aPt,*pObj); else SetPos(aPt);
}
-void SdrGluePoint::Shear(const Point& rRef, long /*nWink*/, double tn, FASTBOOL bVShear, const SdrObject* pObj)
+void SdrGluePoint::Shear(const Point& rRef, long /*nWink*/, double tn, int bVShear, const SdrObject* pObj)
{
Point aPt(pObj!=NULL ? GetAbsolutePos(*pObj) : GetPos());
ShearPoint(aPt,rRef,tn,bVShear);
@@ -260,7 +260,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 );
@@ -295,7 +295,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#
@@ -305,7 +305,7 @@ void SdrGluePoint::Invalidate(Window& rWin, const SdrObject* pObj) const
rWin.EnableMapMode(bMapMerk);
}
-FASTBOOL SdrGluePoint::IsHit(const Point& rPnt, const OutputDevice& rOut, const SdrObject* pObj) const
+int SdrGluePoint::IsHit(const Point& rPnt, const OutputDevice& rOut, const SdrObject* pObj) const
{
Point aPt(pObj!=NULL ? GetAbsolutePos(*pObj) : GetPos());
Size aSiz=rOut.PixelToLogic(Size(3,3));
@@ -317,8 +317,8 @@ FASTBOOL SdrGluePoint::IsHit(const Point& rPnt, const OutputDevice& rOut, const
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();
@@ -327,8 +327,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]);
}
}
@@ -336,30 +336,30 @@ 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");
- FASTBOOL bHole=nLastId>nAnz;
+ int bHole=nLastId>nAnz;
if (nId<=nLastId) {
if (!bHole || nId==0) {
nId=nLastId+1;
} else {
- FASTBOOL bBrk=FALSE;
- for (USHORT nNum=0; nNum<nAnz && !bBrk; nNum++) {
+ int bBrk=sal_False;
+ 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;
+ bBrk=sal_True;
}
if (nTmpId>nId) {
nInsPos=nNum; // Hier einfuegen (einsortieren)
- bBrk=TRUE;
+ bBrk=sal_True;
}
}
}
@@ -371,35 +371,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, FASTBOOL bBack, FASTBOOL bNext, USHORT nId0) const
+sal_uInt16 SdrGluePointList::HitTest(const Point& rPnt, const OutputDevice& rOut, const SdrObject* pObj, int bBack, int 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;
}
@@ -408,18 +408,18 @@ USHORT SdrGluePointList::HitTest(const Point& rPnt, const OutputDevice& rOut, co
return nRet;
}
-void SdrGluePointList::SetReallyAbsolute(FASTBOOL bOn, const SdrObject& rObj)
+void SdrGluePointList::SetReallyAbsolute(int 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);
}
}
@@ -433,16 +433,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, FASTBOOL bVShear, const SdrObject* pObj)
+void SdrGluePointList::Shear(const Point& rRef, long nWink, double tn, int 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);
}
}