diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2010-10-05 07:57:54 -0500 |
---|---|---|
committer | Michael Meeks <michael.meeks@novell.com> | 2010-10-08 14:28:47 +0100 |
commit | c7545a363b7b61647060ae5c359f4aa9e1c36745 (patch) | |
tree | bb584990a9feda3910a9576b93a80b7d9def3d2f /svx/source/svdraw | |
parent | 6af890e2af327ff31db15a780223b8bfeadadae6 (diff) |
FASTBOOL to bool conversion
Diffstat (limited to 'svx/source/svdraw')
36 files changed, 754 insertions, 757 deletions
diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx index 6cb9bdb91cb5..e8446a2b5d22 100644 --- a/svx/source/svdraw/svdattr.cxx +++ b/svx/source/svdraw/svdattr.cxx @@ -991,12 +991,12 @@ SfxPoolItem* __EXPORT SdrMetricItem::Create(SvStream& rIn, USHORT /*nVer*/) cons return new SdrMetricItem(Which(),rIn); } -FASTBOOL __EXPORT SdrMetricItem::HasMetrics() const +bool __EXPORT SdrMetricItem::HasMetrics() const { return TRUE; } -FASTBOOL __EXPORT SdrMetricItem::ScaleMetrics(long nMul, long nDiv) +bool __EXPORT SdrMetricItem::ScaleMetrics(long nMul, long nDiv) { if (GetValue()!=0) { BigInt aVal(GetValue()); @@ -1387,12 +1387,12 @@ SfxPoolItem* __EXPORT SdrTextAniAmountItem::Clone(SfxItemPool* /*pPool*/) const SfxPoolItem* __EXPORT SdrTextAniAmountItem::Create(SvStream& rIn, USHORT /*nVer*/) const { return new SdrTextAniAmountItem(rIn); } -FASTBOOL __EXPORT SdrTextAniAmountItem::HasMetrics() const +bool __EXPORT SdrTextAniAmountItem::HasMetrics() const { return GetValue()>0; } -FASTBOOL __EXPORT SdrTextAniAmountItem::ScaleMetrics(long nMul, long nDiv) +bool __EXPORT SdrTextAniAmountItem::ScaleMetrics(long nMul, long nDiv) { if (GetValue()>0) { BigInt aVal(GetValue()); diff --git a/svx/source/svdraw/svddrag.cxx b/svx/source/svdraw/svddrag.cxx index 74d8fd10a402..17eff22d6ef8 100644 --- a/svx/source/svdraw/svddrag.cxx +++ b/svx/source/svdraw/svddrag.cxx @@ -30,7 +30,7 @@ #include <svx/svdview.hxx> #include <svx/svddrag.hxx> -void SdrDragStat::Clear(FASTBOOL bLeaveOne) +void SdrDragStat::Clear(bool bLeaveOne) { void* pP=aPnts.First(); while (pP!=NULL) { @@ -84,7 +84,7 @@ void SdrDragStat::NextMove(const Point& rPnt) Now()=aBla; } -void SdrDragStat::NextPoint(FASTBOOL bSaveReal) +void SdrDragStat::NextPoint(bool bSaveReal) { Point aPnt(GetNow()); if (bSaveReal) aPnt=aRealNow; @@ -108,7 +108,7 @@ Point SdrDragStat::KorregPos(const Point& rNow, const Point& /*rPrev*/) const return aRet; } -FASTBOOL SdrDragStat::CheckMinMoved(const Point& rPnt) +bool SdrDragStat::CheckMinMoved(const Point& rPnt) { if (!bMinMoved) { long dx=rPnt.X()-GetPrev().X(); if (dx<0) dx=-dx; diff --git a/svx/source/svdraw/svdetc.cxx b/svx/source/svdraw/svdetc.cxx index 8a4245919821..f194e7a975ae 100644 --- a/svx/source/svdraw/svdetc.cxx +++ b/svx/source/svdraw/svdetc.cxx @@ -321,7 +321,7 @@ void UShortCont::Sort() class ImpClipMerk { Region aClip; - FASTBOOL bClip; + bool bClip; public: ImpClipMerk(const OutputDevice& rOut): aClip(rOut.GetClipRegion()),bClip(rOut.IsClipRegion()) {} void Restore(OutputDevice& rOut) @@ -385,7 +385,7 @@ public: const Color& GetLineColor() const { return aLineColor; } }; -ImpSdrHdcMerk::ImpSdrHdcMerk(const OutputDevice& rOut, USHORT nNewMode, FASTBOOL bAutoMerk): +ImpSdrHdcMerk::ImpSdrHdcMerk(const OutputDevice& rOut, USHORT nNewMode, bool bAutoMerk): pFarbMerk(NULL), pClipMerk(NULL), pLineColorMerk(NULL), @@ -498,17 +498,17 @@ void SdrLinkList::RemoveLink(const Link& rLink) //////////////////////////////////////////////////////////////////////////////////////////////////// // #98988# Re-implement GetDraftFillColor(...) -FASTBOOL GetDraftFillColor(const SfxItemSet& rSet, Color& rCol) +bool GetDraftFillColor(const SfxItemSet& rSet, Color& rCol) { XFillStyle eFill=((XFillStyleItem&)rSet.Get(XATTR_FILLSTYLE)).GetValue(); - FASTBOOL bRetval(FALSE); + bool bRetval = false; switch(eFill) { case XFILL_SOLID: { rCol = ((XFillColorItem&)rSet.Get(XATTR_FILLCOLOR)).GetColorValue(); - bRetval = TRUE; + bRetval = true; break; } @@ -526,7 +526,7 @@ FASTBOOL GetDraftFillColor(const SfxItemSet& rSet, Color& rCol) const basegfx::BColor aAverageColor(basegfx::average(aCol1.getBColor(), aCol2.getBColor())); rCol = Color(aAverageColor); - bRetval = TRUE; + bRetval = true; break; } @@ -536,7 +536,7 @@ FASTBOOL GetDraftFillColor(const SfxItemSet& rSet, Color& rCol) Color aCol2(rGrad.GetEndColor()); const basegfx::BColor aAverageColor(basegfx::average(aCol1.getBColor(), aCol2.getBColor())); rCol = Color(aAverageColor); - bRetval = TRUE; + bRetval = true; break; } @@ -580,7 +580,7 @@ FASTBOOL GetDraftFillColor(const SfxItemSet& rSet, Color& rCol) rCol = Color(UINT8(nRt), UINT8(nGn), UINT8(nBl)); - bRetval = TRUE; + bRetval = true; } if(pAccess) diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx index 34a77fcd9e62..ede68a69c0d2 100644 --- a/svx/source/svdraw/svdfmtf.cxx +++ b/svx/source/svdraw/svdfmtf.cxx @@ -268,12 +268,12 @@ ULONG ImpSdrGDIMetaFileImport::DoImport(const GDIMetaFile& rMtf, return aTmpList.GetObjCount(); } -void ImpSdrGDIMetaFileImport::SetAttributes(SdrObject* pObj, FASTBOOL bForceTextAttr) +void ImpSdrGDIMetaFileImport::SetAttributes(SdrObject* pObj, bool bForceTextAttr) { bNoLine = FALSE; bNoFill = FALSE; - FASTBOOL bLine=TRUE && !bForceTextAttr; - FASTBOOL bFill=pObj==NULL || pObj->IsClosedObj() && !bForceTextAttr; - FASTBOOL bText=bForceTextAttr || (pObj!=NULL && pObj->GetOutlinerParaObject()!=NULL); + bool bLine = !bForceTextAttr; + bool bFill = (pObj==NULL) || (pObj->IsClosedObj() && !bForceTextAttr); + bool bText = bForceTextAttr || (pObj!=NULL && pObj->GetOutlinerParaObject()!=NULL); if ( bLine ) { @@ -431,7 +431,7 @@ void ImpSdrGDIMetaFileImport::InsertObj( SdrObject* pObj, sal_Bool bScale ) aTmpList.InsertObject( pObj ); if ( HAS_BASE( SdrPathObj, pObj ) ) { - FASTBOOL bClosed=pObj->IsClosedObj(); + bool bClosed=pObj->IsClosedObj(); bLastObjWasPolyWithoutLine=bNoLine && bClosed; bLastObjWasLine=!bClosed; } diff --git a/svx/source/svdraw/svdfmtf.hxx b/svx/source/svdraw/svdfmtf.hxx index 2562b81efa8d..826b2f544386 100644 --- a/svx/source/svdraw/svdfmtf.hxx +++ b/svx/source/svdraw/svdfmtf.hxx @@ -142,7 +142,7 @@ protected: void DoAction(MetaCommentAction& rAct, GDIMetaFile* pMtf); void ImportText( const Point& rPos, const XubString& rStr, const MetaAction& rAct ); - void SetAttributes(SdrObject* pObj, FASTBOOL bForceTextAttr=FALSE); + void SetAttributes(SdrObject* pObj, bool bForceTextAttr = false); void InsertObj( SdrObject* pObj, sal_Bool bScale = sal_True ); void MapScaling(); diff --git a/svx/source/svdraw/svdglue.cxx b/svx/source/svdraw/svdglue.cxx index 634d7060e735..3c4485f8840b 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(bool bOn, const SdrObject& rObj) { if ( bReallyAbsolute != bOn ) { @@ -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, bool bVShear, const SdrObject* pObj) { Point aPt(pObj!=NULL ? GetAbsolutePos(*pObj) : GetPos()); ShearPoint(aPt,rRef,tn,bVShear); @@ -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 +bool 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)); @@ -344,22 +344,22 @@ USHORT SdrGluePointList::Insert(const SdrGluePoint& rGP) USHORT nInsPos=nAnz; USHORT nLastId=nAnz!=0 ? GetObject(nAnz-1)->GetId() : 0; DBG_ASSERT(nLastId>=nAnz,"SdrGluePointList::Insert(): nLastId<nAnz"); - FASTBOOL bHole=nLastId>nAnz; + bool bHole = nLastId>nAnz; if (nId<=nLastId) { if (!bHole || nId==0) { nId=nLastId+1; } else { - FASTBOOL bBrk=FALSE; + bool bBrk = false; for (USHORT nNum=0; nNum<nAnz && !bBrk; nNum++) { const SdrGluePoint* pGP2=GetObject(nNum); USHORT nTmpId=pGP2->GetId(); if (nTmpId==nId) { nId=nLastId+1; // bereits vorhanden - bBrk=TRUE; + bBrk = true; } if (nTmpId>nId) { nInsPos=nNum; // Hier einfuegen (einsortieren) - bBrk=TRUE; + bBrk = true; } } } @@ -390,7 +390,7 @@ USHORT SdrGluePointList::FindGluePoint(USHORT nId) const return nRet; } -USHORT SdrGluePointList::HitTest(const Point& rPnt, const OutputDevice& rOut, const SdrObject* pObj, FASTBOOL bBack, FASTBOOL bNext, USHORT nId0) const +USHORT SdrGluePointList::HitTest(const Point& rPnt, const OutputDevice& rOut, const SdrObject* pObj, bool bBack, bool bNext, USHORT nId0) const { USHORT nAnz=GetCount(); USHORT nRet=SDRGLUEPOINT_NOTFOUND; @@ -408,7 +408,7 @@ USHORT SdrGluePointList::HitTest(const Point& rPnt, const OutputDevice& rOut, co return nRet; } -void SdrGluePointList::SetReallyAbsolute(FASTBOOL bOn, const SdrObject& rObj) +void SdrGluePointList::SetReallyAbsolute(bool bOn, const SdrObject& rObj) { USHORT nAnz=GetCount(); for (USHORT nNum=0; nNum<nAnz; nNum++) { @@ -439,7 +439,7 @@ void SdrGluePointList::Mirror(const Point& rRef1, const Point& rRef2, long nWink } } -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, bool bVShear, const SdrObject* pObj) { USHORT nAnz=GetCount(); for (USHORT nNum=0; nNum<nAnz; nNum++) { diff --git a/svx/source/svdraw/svdhlpln.cxx b/svx/source/svdraw/svdhlpln.cxx index 2813b6f032f1..3291af977929 100644 --- a/svx/source/svdraw/svdhlpln.cxx +++ b/svx/source/svdraw/svdhlpln.cxx @@ -47,11 +47,11 @@ Pointer SdrHelpLine::GetPointer() const } // switch } -FASTBOOL SdrHelpLine::IsHit(const Point& rPnt, USHORT nTolLog, const OutputDevice& rOut) const +bool SdrHelpLine::IsHit(const Point& rPnt, USHORT nTolLog, const OutputDevice& rOut) const { Size a1Pix(rOut.PixelToLogic(Size(1,1))); - FASTBOOL bXHit=rPnt.X()>=aPos.X()-nTolLog && rPnt.X()<=aPos.X()+nTolLog+a1Pix.Width(); - FASTBOOL bYHit=rPnt.Y()>=aPos.Y()-nTolLog && rPnt.Y()<=aPos.Y()+nTolLog+a1Pix.Height(); + bool bXHit=rPnt.X()>=aPos.X()-nTolLog && rPnt.X()<=aPos.X()+nTolLog+a1Pix.Width(); + bool bYHit=rPnt.Y()>=aPos.Y()-nTolLog && rPnt.Y()<=aPos.Y()+nTolLog+a1Pix.Height(); switch (eKind) { case SDRHELPLINE_VERTICAL : return bXHit; case SDRHELPLINE_HORIZONTAL: return bYHit; @@ -123,13 +123,13 @@ void SdrHelpLineList::operator=(const SdrHelpLineList& rSrcList) bool SdrHelpLineList::operator==(const SdrHelpLineList& rSrcList) const { - FASTBOOL bEqual=FALSE; + bool bEqual = false; USHORT nAnz=GetCount(); if (nAnz==rSrcList.GetCount()) { - bEqual=TRUE; + bEqual = true; for (USHORT i=0; i<nAnz && bEqual; i++) { if (*GetObject(i)!=*rSrcList.GetObject(i)) { - bEqual=FALSE; + bEqual = false; } } } diff --git a/svx/source/svdraw/svdibrow.cxx b/svx/source/svdraw/svdibrow.cxx index fa3dbe852b3a..74a01f66778e 100644 --- a/svx/source/svdraw/svdibrow.cxx +++ b/svx/source/svdraw/svdibrow.cxx @@ -415,11 +415,11 @@ void __EXPORT _SdrItemBrowserControl::DoubleClick(const BrowserMouseEvent&) void __EXPORT _SdrItemBrowserControl::KeyInput(const KeyEvent& rKEvt) { USHORT nKeyCode=rKEvt.GetKeyCode().GetCode()+rKEvt.GetKeyCode().GetModifier(); - FASTBOOL bAusgewertet=FALSE; + bool bAusgewertet = false; ULONG nPos=GetCurrentPos(); if (nPos!=CONTAINER_ENTRY_NOTFOUND) { if (nKeyCode==KEY_RETURN) { - if (BegChangeEntry(nPos)) bAusgewertet=TRUE; + if (BegChangeEntry(nPos)) bAusgewertet = true; } else if (nKeyCode==KEY_ESCAPE) { // ... } else if (rKEvt.GetKeyCode().GetModifier()==KEY_SHIFT+KEY_MOD1+KEY_MOD2) { // Strg @@ -483,7 +483,7 @@ void _SdrItemBrowserControl::ImpSaveWhich() void _SdrItemBrowserControl::ImpRestoreWhich() { if (nLastWhich!=0) { - FASTBOOL bFnd=FALSE; + bool bFnd = false; USHORT nBestMinWh=0,nBestMaxWh=0xFFFF; // not implemented yet ULONG nBestMinPos=0,nBestMaxPos=0xFFFFFFFF; // not implemented yet ULONG nAnz=aList.Count(); @@ -492,7 +492,7 @@ void _SdrItemBrowserControl::ImpRestoreWhich() ImpItemListRow* pEntry=ImpGetEntry(nNum); if (!pEntry->bComment) { USHORT nWh=pEntry->nWhichId; - if (nWh==nLastWhich) bFnd=TRUE; + if (nWh==nLastWhich) bFnd = true; else if (nWh<nLastWhich && nWh>nBestMinWh) nBestMinPos=nNum; else if (nWh>nLastWhich && nWh<nBestMaxWh) nBestMaxPos=nNum; } @@ -508,10 +508,10 @@ void _SdrItemBrowserControl::ImpRestoreWhich() } } -FASTBOOL _SdrItemBrowserControl::BegChangeEntry(ULONG nPos) +bool _SdrItemBrowserControl::BegChangeEntry(ULONG nPos) { BrkChangeEntry(); - FASTBOOL bRet=FALSE; + bool bRet = false; ImpItemListRow* pEntry=ImpGetEntry(nPos); if (pEntry!=NULL && !pEntry->bComment) { SetMode(MYBROWSEMODE & ~BROWSER_KEEPHIGHLIGHT); @@ -542,14 +542,14 @@ FASTBOOL _SdrItemBrowserControl::BegChangeEntry(ULONG nPos) aNeuNam.AppendAscii(" - Type 'del' to reset to default."); pParent->SetText(aNeuNam); pAktChangeEntry=new ImpItemListRow(*pEntry); - bRet=TRUE; + bRet = true; } return bRet; } -FASTBOOL _SdrItemBrowserControl::EndChangeEntry() +bool _SdrItemBrowserControl::EndChangeEntry() { - FASTBOOL bRet=FALSE; + bool bRet = false; if (pEditControl!=NULL) { aEntryChangedHdl.Call(this); delete pEditControl; @@ -559,7 +559,7 @@ FASTBOOL _SdrItemBrowserControl::EndChangeEntry() Window* pParent=GetParent(); pParent->SetText(aWNamMerk); SetMode(MYBROWSEMODE); - bRet=TRUE; + bRet = true; } return bRet; } @@ -584,15 +584,15 @@ void _SdrItemBrowserControl::ImpSetEntry(const ImpItemListRow& rEntry, ULONG nEn aList.Insert(new ImpItemListRow(rEntry),CONTAINER_APPEND); RowInserted(nEntryNum); } else if (*pAktEntry!=rEntry) { - FASTBOOL bStateDiff=rEntry.eState!=pAktEntry->eState; - FASTBOOL bValueDiff=!rEntry.aValue.Equals(pAktEntry->aValue); - FASTBOOL bAllDiff=TRUE; + bool bStateDiff=rEntry.eState!=pAktEntry->eState; + bool bValueDiff=!rEntry.aValue.Equals(pAktEntry->aValue); + bool bAllDiff = true; if (bStateDiff || bValueDiff) { // Checken, ob nur State und/oder Value geaendert ImpItemListRow aTest(rEntry); aTest.eState=pAktEntry->eState; aTest.aValue=pAktEntry->aValue; - if (aTest==*pAktEntry) bAllDiff=FALSE; + if (aTest==*pAktEntry) bAllDiff = false; } *pAktEntry=rEntry; if (bAllDiff) { @@ -604,7 +604,7 @@ void _SdrItemBrowserControl::ImpSetEntry(const ImpItemListRow& rEntry, ULONG nEn } } -FASTBOOL ImpGetItem(const SfxItemSet& rSet, USHORT nWhich, const SfxPoolItem*& rpItem) +bool ImpGetItem(const SfxItemSet& rSet, USHORT nWhich, const SfxPoolItem*& rpItem) { SfxItemState eState=rSet.GetItemState(nWhich,TRUE,&rpItem); if (eState==SFX_ITEM_DEFAULT) { @@ -613,12 +613,12 @@ FASTBOOL ImpGetItem(const SfxItemSet& rSet, USHORT nWhich, const SfxPoolItem*& r return (eState==SFX_ITEM_DEFAULT || eState==SFX_ITEM_SET) && rpItem!=NULL; } -FASTBOOL IsItemIneffective(USHORT nWhich, const SfxItemSet* pSet, USHORT& rIndent) +bool IsItemIneffective(USHORT nWhich, const SfxItemSet* pSet, USHORT& rIndent) { rIndent=0; if (pSet==NULL) return FALSE; const SfxPoolItem* pItem=NULL; - FASTBOOL bRet=FALSE; + bool bRet = false; switch (nWhich) { case XATTR_LINEDASH : case XATTR_LINEWIDTH : @@ -687,10 +687,10 @@ FASTBOOL IsItemIneffective(USHORT nWhich, const SfxItemSet* pSet, USHORT& rInden if (nWhich==XATTR_FILLBITMAP || nWhich==XATTR_FILLBMP_TILE) { return FALSE; // immer anwaehlbar } - FASTBOOL bTileTRUE=FALSE; - FASTBOOL bTileFALSE=FALSE; - FASTBOOL bStretchTRUE=FALSE; - FASTBOOL bStretchFALSE=FALSE; + bool bTileTRUE = false; + bool bTileFALSE = false; + bool bStretchTRUE = false; + bool bStretchFALSE = false; if (ImpGetItem(*pSet,XATTR_FILLBMP_TILE,pItem)) { bTileTRUE=((const XFillBmpTileItem*)pItem)->GetValue(); bTileFALSE=!bTileTRUE; @@ -717,14 +717,14 @@ FASTBOOL IsItemIneffective(USHORT nWhich, const SfxItemSet* pSet, USHORT& rInden if (nWhich==XATTR_FILLBMP_TILEOFFSETX || nWhich==XATTR_FILLBMP_TILEOFFSETY) { if (bTileFALSE) return TRUE; USHORT nX=0,nY=0; - FASTBOOL bX=FALSE,bY=FALSE; + bool bX = false,bY = false; if (ImpGetItem(*pSet,XATTR_FILLBMP_TILEOFFSETX,pItem)) { nX=((const XFillBmpTileOffsetXItem*)pItem)->GetValue(); - bX=TRUE; + bX = true; } if (ImpGetItem(*pSet,XATTR_FILLBMP_TILEOFFSETY,pItem)) { nY=((const XFillBmpTileOffsetYItem*)pItem)->GetValue(); - bY=TRUE; + bY = true; } if (nWhich==XATTR_FILLBMP_TILEOFFSETX) { if (nX!=0 || !bX) return FALSE; @@ -777,7 +777,7 @@ FASTBOOL IsItemIneffective(USHORT nWhich, const SfxItemSet* pSet, USHORT& rInden case SDRATTR_SHADOWPERSP : { rIndent=1; if (ImpGetItem(*pSet,SDRATTR_SHADOW,pItem)) { - FASTBOOL bShadow=((const SdrShadowItem*)pItem)->GetValue(); + bool bShadow=((const SdrShadowItem*)pItem)->GetValue(); if (!bShadow) return TRUE; } } break; @@ -785,7 +785,7 @@ FASTBOOL IsItemIneffective(USHORT nWhich, const SfxItemSet* pSet, USHORT& rInden case SDRATTR_CAPTIONANGLE: { rIndent=1; if (ImpGetItem(*pSet,SDRATTR_CAPTIONFIXEDANGLE,pItem)) { - FASTBOOL bFixed=((const SdrCaptionFixedAngleItem*)pItem)->GetValue(); + bool bFixed=((const SdrCaptionFixedAngleItem*)pItem)->GetValue(); if (!bFixed) return TRUE; } } break; @@ -793,7 +793,7 @@ FASTBOOL IsItemIneffective(USHORT nWhich, const SfxItemSet* pSet, USHORT& rInden case SDRATTR_CAPTIONESCABS: { rIndent=1; if (ImpGetItem(*pSet,SDRATTR_CAPTIONESCISREL,pItem)) { - FASTBOOL bRel=((const SdrCaptionEscIsRelItem*)pItem)->GetValue(); + bool bRel=((const SdrCaptionEscIsRelItem*)pItem)->GetValue(); if (bRel && nWhich==SDRATTR_CAPTIONESCABS) return TRUE; if (!bRel && nWhich==SDRATTR_CAPTIONESCREL) return TRUE; } @@ -801,7 +801,7 @@ FASTBOOL IsItemIneffective(USHORT nWhich, const SfxItemSet* pSet, USHORT& rInden case SDRATTR_CAPTIONLINELEN: { rIndent=1; if (ImpGetItem(*pSet,SDRATTR_CAPTIONFITLINELEN,pItem)) { - FASTBOOL bFit=((const SdrCaptionFitLineLenItem*)pItem)->GetValue(); + bool bFit=((const SdrCaptionFitLineLenItem*)pItem)->GetValue(); if (bFit) return TRUE; } } break; @@ -810,7 +810,7 @@ FASTBOOL IsItemIneffective(USHORT nWhich, const SfxItemSet* pSet, USHORT& rInden case SDRATTR_TEXT_MAXFRAMEHEIGHT: { rIndent=1; if (ImpGetItem(*pSet,SDRATTR_TEXT_AUTOGROWHEIGHT,pItem)) { - FASTBOOL bAutoGrow=((const SdrTextAutoGrowHeightItem*)pItem)->GetValue(); + bool bAutoGrow=((const SdrTextAutoGrowHeightItem*)pItem)->GetValue(); if (!bAutoGrow) return TRUE; } } break; @@ -818,7 +818,7 @@ FASTBOOL IsItemIneffective(USHORT nWhich, const SfxItemSet* pSet, USHORT& rInden case SDRATTR_TEXT_MAXFRAMEWIDTH: { rIndent=1; if (ImpGetItem(*pSet,SDRATTR_TEXT_AUTOGROWWIDTH,pItem)) { - FASTBOOL bAutoGrow=((const SdrTextAutoGrowWidthItem*)pItem)->GetValue(); + bool bAutoGrow=((const SdrTextAutoGrowWidthItem*)pItem)->GetValue(); if (!bAutoGrow) return TRUE; } } break; @@ -975,7 +975,7 @@ void _SdrItemBrowserControl::SetAttributes(const SfxItemSet* pSet, const SfxItem if(aCommentStr.Len()) { ImpItemListRow aEntry; - aEntry.bComment=TRUE; + aEntry.bComment = true; aEntry.aName=aCommentStr; ImpSetEntry(aEntry,nEntryNum); nEntryNum++; @@ -1018,20 +1018,20 @@ void _SdrItemBrowserControl::SetAttributes(const SfxItemSet* pSet, const SfxItem else if (HAS_BASE(SvxCharScaleWidthItem,&rItem)) aEntry.eItemType=ITEM_FONTWIDTH; else if (HAS_BASE(SvxFieldItem ,&rItem)) aEntry.eItemType=ITEM_FIELD; switch (aEntry.eItemType) { - case ITEM_BYTE : aEntry.bIsNum=TRUE; aEntry.nVal=((SfxByteItem &)rItem).GetValue(); aEntry.nMin=0; aEntry.nMax=255; break; - case ITEM_INT16 : aEntry.bIsNum=TRUE; aEntry.nVal=((SfxInt16Item &)rItem).GetValue(); aEntry.nMin=-32767; aEntry.nMax=32767; break; - case ITEM_UINT16 : aEntry.bIsNum=TRUE; aEntry.nVal=((SfxUInt16Item&)rItem).GetValue(); aEntry.nMin=0; aEntry.nMax=65535; break; - case ITEM_INT32 : aEntry.bIsNum=TRUE; aEntry.nVal=((SfxInt32Item &)rItem).GetValue(); break; - case ITEM_UINT32 : aEntry.bIsNum=TRUE; aEntry.nVal=((SfxUInt32Item&)rItem).GetValue(); aEntry.nMin=0; /*aEntry.nMax=0xFF...*/;break; - case ITEM_ENUM : aEntry.bCanNum=TRUE; aEntry.nVal=((SfxEnumItemInterface&)rItem).GetEnumValue(); aEntry.nMin=0; aEntry.nMax=((SfxEnumItemInterface&)rItem).GetValueCount()-1; break; - case ITEM_BOOL : aEntry.bCanNum=TRUE; aEntry.nVal=((SfxBoolItem &)rItem).GetValue(); aEntry.nMin=0; aEntry.nMax=1; break; - case ITEM_FLAG : aEntry.bCanNum=TRUE; aEntry.nVal=((SfxFlagItem &)rItem).GetValue(); aEntry.nMin=0; aEntry.nMax=0xFFFF; break; - case ITEM_FONTHEIGHT: aEntry.bCanNum=TRUE; aEntry.nVal=((SvxFontHeightItem&)rItem).GetHeight(); aEntry.nMin=0; break; - case ITEM_FONTWIDTH : aEntry.bCanNum=TRUE; aEntry.nVal=((SvxCharScaleWidthItem&)rItem).GetValue(); aEntry.nMin=0; aEntry.nMax=0xFFFF;break; + case ITEM_BYTE : aEntry.bIsNum = true; aEntry.nVal=((SfxByteItem &)rItem).GetValue(); aEntry.nMin=0; aEntry.nMax=255; break; + case ITEM_INT16 : aEntry.bIsNum = true; aEntry.nVal=((SfxInt16Item &)rItem).GetValue(); aEntry.nMin=-32767; aEntry.nMax=32767; break; + case ITEM_UINT16 : aEntry.bIsNum = true; aEntry.nVal=((SfxUInt16Item&)rItem).GetValue(); aEntry.nMin=0; aEntry.nMax=65535; break; + case ITEM_INT32 : aEntry.bIsNum = true; aEntry.nVal=((SfxInt32Item &)rItem).GetValue(); break; + case ITEM_UINT32 : aEntry.bIsNum = true; aEntry.nVal=((SfxUInt32Item&)rItem).GetValue(); aEntry.nMin=0; /*aEntry.nMax=0xFF...*/;break; + case ITEM_ENUM : aEntry.bCanNum = true; aEntry.nVal=((SfxEnumItemInterface&)rItem).GetEnumValue(); aEntry.nMin=0; aEntry.nMax=((SfxEnumItemInterface&)rItem).GetValueCount()-1; break; + case ITEM_BOOL : aEntry.bCanNum = true; aEntry.nVal=((SfxBoolItem &)rItem).GetValue(); aEntry.nMin=0; aEntry.nMax=1; break; + case ITEM_FLAG : aEntry.bCanNum = true; aEntry.nVal=((SfxFlagItem &)rItem).GetValue(); aEntry.nMin=0; aEntry.nMax=0xFFFF; break; + case ITEM_FONTHEIGHT: aEntry.bCanNum = true; aEntry.nVal=((SvxFontHeightItem&)rItem).GetHeight(); aEntry.nMin=0; break; + case ITEM_FONTWIDTH : aEntry.bCanNum = true; aEntry.nVal=((SvxCharScaleWidthItem&)rItem).GetValue(); aEntry.nMin=0; aEntry.nMax=0xFFFF;break; default: break; } // switch - if (aEntry.bIsNum) aEntry.bCanNum=TRUE; - FASTBOOL bGetPres=TRUE; + if (aEntry.bIsNum) aEntry.bCanNum = true; + bool bGetPres = true; if (bGetPres) { rItem.GetPresentation(SFX_ITEM_PRESENTATION_NAMELESS, pPool->GetMetric(nWhich), @@ -1136,7 +1136,7 @@ void SdrItemBrowser::ForceParent() void SdrItemBrowser::SetDirty() { if (!bDirty) { - bDirty=TRUE; + bDirty = true; aIdleTimer.SetTimeout(1); aIdleTimer.Start(); } @@ -1197,9 +1197,9 @@ IMPL_LINK(SdrItemBrowser,ChangedHdl,_SdrItemBrowserControl*,pBrowse) if (nLongVal>pEntry->nMax) nLongVal=pEntry->nMax; if (nLongVal<pEntry->nMin) nLongVal=pEntry->nMin; } - FASTBOOL bPair=FALSE; - FASTBOOL bPairX=TRUE; - FASTBOOL bPairY=FALSE; + bool bPair = false; + bool bPairX = true; + bool bPairY = false; USHORT nSepLen=1; long nLongX = aNewText.ToInt32(); long nLongY=0; @@ -1208,7 +1208,7 @@ IMPL_LINK(SdrItemBrowser,ChangedHdl,_SdrItemBrowserControl*,pBrowse) if (nPos==STRING_NOTFOUND) nPos=aNewText.Search(sal_Unicode(' ')); if (nPos==STRING_NOTFOUND) { nPos=aNewText.SearchAscii(".."); if (nPos!=STRING_NOTFOUND) nSepLen=2; } if (nPos!=STRING_NOTFOUND) { - bPair=TRUE; + bPair = true; bPairX=nPos>0; XubString s(aNewText); s.Erase(0,nPos+nSepLen); diff --git a/svx/source/svdraw/svdlayer.cxx b/svx/source/svdraw/svdlayer.cxx index 098c036dcad7..44742ab7fc57 100644 --- a/svx/source/svdraw/svdlayer.cxx +++ b/svx/source/svdraw/svdlayer.cxx @@ -196,7 +196,7 @@ void SetOfByte::QueryValue( com::sun::star::uno::Any & rAny ) const // SdrLayer //////////////////////////////////////////////////////////////////////////////////////////////////// -void SdrLayer::SetStandardLayer(FASTBOOL bStd) +void SdrLayer::SetStandardLayer(bool bStd) { nType=(UINT16)bStd; if (bStd) { @@ -291,7 +291,7 @@ bool SdrLayerAdmin::operator==(const SdrLayerAdmin& rCmpLayerAdmin) const if (pParent!=rCmpLayerAdmin.pParent || aLayer.Count()!=rCmpLayerAdmin.aLayer.Count() || aLSets.Count()!=rCmpLayerAdmin.aLSets.Count()) return FALSE; - FASTBOOL bOk=TRUE; + bool bOk = true; USHORT nAnz=GetLayerCount(); USHORT i=0; while (bOk && i<nAnz) { @@ -383,7 +383,7 @@ USHORT SdrLayerAdmin::GetLayerPos(SdrLayer* pLayer) const return USHORT(nRet); } -const SdrLayer* SdrLayerAdmin::GetLayer(const XubString& rName, FASTBOOL /*bInherited*/) const +const SdrLayer* SdrLayerAdmin::GetLayer(const XubString& rName, bool /*bInherited*/) const { UINT16 i(0); const SdrLayer* pLay = NULL; @@ -404,7 +404,7 @@ const SdrLayer* SdrLayerAdmin::GetLayer(const XubString& rName, FASTBOOL /*bInhe return pLay; } -SdrLayerID SdrLayerAdmin::GetLayerID(const XubString& rName, FASTBOOL bInherited) const +SdrLayerID SdrLayerAdmin::GetLayerID(const XubString& rName, bool bInherited) const { SdrLayerID nRet=SDRLAYER_NOTFOUND; const SdrLayer* pLay=GetLayer(rName,bInherited); diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx index 8ab385fa329c..e7a0d75a1215 100644 --- a/svx/source/svdraw/svdmodel.cxx +++ b/svx/source/svdraw/svdmodel.cxx @@ -116,8 +116,8 @@ void SdrModel::ImpCtor(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* _pEmbe mpImpl = new SdrModelImpl; mpImpl->mpUndoManager=0; mpImpl->mpUndoFactory=0; - mpImpl->mbAllowShapePropertyChangeListener=false; - mbInDestruction=false; + mpImpl->mbAllowShapePropertyChangeListener = false; + mbInDestruction = false; aObjUnit=SdrEngineDefaults::GetMapFraction(); eObjUnit=SdrEngineDefaults::GetMapUnit(); eUIUnit=FUNIT_MM; @@ -232,7 +232,7 @@ SdrModel::SdrModel(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* pPers, sal #endif DBG_CTOR(SdrModel,NULL); - ImpCtor(pPool,pPers,FALSE, (FASTBOOL)bLoadRefCounts); + ImpCtor(pPool,pPers,FALSE, (bool)bLoadRefCounts); } SdrModel::SdrModel(const String& rPath, SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* pPers, sal_Bool bLoadRefCounts): @@ -245,10 +245,10 @@ SdrModel::SdrModel(const String& rPath, SfxItemPool* pPool, ::comphelper::IEmbed #endif DBG_CTOR(SdrModel,NULL); - ImpCtor(pPool,pPers,FALSE, (FASTBOOL)bLoadRefCounts); + ImpCtor(pPool,pPers,FALSE, (bool)bLoadRefCounts); } -SdrModel::SdrModel(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* pPers, FASTBOOL bUseExtColorTable, sal_Bool bLoadRefCounts): +SdrModel::SdrModel(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* pPers, bool bUseExtColorTable, sal_Bool bLoadRefCounts): maMaPag(1024,32,32), maPages(1024,32,32) { @@ -257,10 +257,10 @@ SdrModel::SdrModel(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* pPers, FAS #endif DBG_CTOR(SdrModel,NULL); - ImpCtor(pPool,pPers,bUseExtColorTable, (FASTBOOL)bLoadRefCounts); + ImpCtor(pPool,pPers,bUseExtColorTable, (bool)bLoadRefCounts); } -SdrModel::SdrModel(const String& rPath, SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* pPers, FASTBOOL bUseExtColorTable, sal_Bool bLoadRefCounts): +SdrModel::SdrModel(const String& rPath, SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* pPers, bool bUseExtColorTable, sal_Bool bLoadRefCounts): maMaPag(1024,32,32), maPages(1024,32,32), aTablePath(rPath) @@ -270,7 +270,7 @@ SdrModel::SdrModel(const String& rPath, SfxItemPool* pPool, ::comphelper::IEmbed #endif DBG_CTOR(SdrModel,NULL); - ImpCtor(pPool,pPers,bUseExtColorTable, (FASTBOOL)bLoadRefCounts); + ImpCtor(pPool,pPers,bUseExtColorTable, (bool)bLoadRefCounts); } SdrModel::SdrModel(const SdrModel& /*rSrcModel*/): @@ -396,23 +396,23 @@ void SdrModel::operator=(const SdrModel& /*rSrcModel*/) DBG_ERROR("SdrModel::operator=() ist noch nicht implementiert"); } -FASTBOOL SdrModel::operator==(const SdrModel& /*rCmpModel*/) const +bool SdrModel::operator==(const SdrModel& /*rCmpModel*/) const { DBG_ERROR("SdrModel::operator==() ist noch nicht implementiert"); return FALSE; } -void SdrModel::SetSwapGraphics( FASTBOOL bSwap ) +void SdrModel::SetSwapGraphics( bool bSwap ) { bSwapGraphics = bSwap; } -FASTBOOL SdrModel::IsReadOnly() const +bool SdrModel::IsReadOnly() const { return bReadOnly; } -void SdrModel::SetReadOnly(FASTBOOL bYes) +void SdrModel::SetReadOnly(bool bYes) { bReadOnly=bYes; } @@ -448,9 +448,9 @@ void SdrModel::ClearUndoBuffer() } } -FASTBOOL SdrModel::Undo() +bool SdrModel::Undo() { - FASTBOOL bRet=FALSE; + bool bRet = false; if( mpImpl->mpUndoManager ) { DBG_ERROR("svx::SdrModel::Undo(), method not supported with application undo manager!"); @@ -472,9 +472,9 @@ FASTBOOL SdrModel::Undo() return bRet; } -FASTBOOL SdrModel::Redo() +bool SdrModel::Redo() { - FASTBOOL bRet=FALSE; + bool bRet=FALSE; if( mpImpl->mpUndoManager ) { DBG_ERROR("svx::SdrModel::Redo(), method not supported with application undo manager!"); @@ -496,9 +496,9 @@ FASTBOOL SdrModel::Redo() return bRet; } -FASTBOOL SdrModel::Repeat(SfxRepeatTarget& rView) +bool SdrModel::Repeat(SfxRepeatTarget& rView) { - FASTBOOL bRet=FALSE; + bool bRet = false; if( mpImpl->mpUndoManager ) { DBG_ERROR("svx::SdrModel::Redo(), method not supported with application undo manager!"); @@ -511,7 +511,7 @@ FASTBOOL SdrModel::Repeat(SfxRepeatTarget& rView) if(pDo->CanRepeat(rView)) { pDo->Repeat(rView); - bRet=TRUE; + bRet = true; } } } @@ -806,7 +806,7 @@ SdrModel* SdrModel::AllocModel() const return pModel; } -SdrPage* SdrModel::AllocPage(FASTBOOL bMasterPage) +SdrPage* SdrModel::AllocPage(bool bMasterPage) { return new SdrPage(*this,bMasterPage); } @@ -1292,7 +1292,7 @@ void SdrModel::TakeUnitStr(FieldUnit eUnit, XubString& rStr) } } -void SdrModel::TakeMetricStr(long nVal, XubString& rStr, FASTBOOL bNoUnitChars, sal_Int32 nNumDigits) const +void SdrModel::TakeMetricStr(long nVal, XubString& rStr, bool bNoUnitChars, sal_Int32 nNumDigits) const { // #i22167# // change to double precision usage to not loose decimal places after comma @@ -1406,7 +1406,7 @@ void SdrModel::TakeMetricStr(long nVal, XubString& rStr, FASTBOOL bNoUnitChars, rStr += aUIUnitStr; } -void SdrModel::TakeWinkStr(long nWink, XubString& rStr, FASTBOOL bNoDegChar) const +void SdrModel::TakeWinkStr(long nWink, XubString& rStr, bool bNoDegChar) const { BOOL bNeg(nWink < 0); @@ -1434,7 +1434,7 @@ void SdrModel::TakeWinkStr(long nWink, XubString& rStr, FASTBOOL bNoDegChar) con rStr += DEGREE_CHAR; } -void SdrModel::TakePercentStr(const Fraction& rVal, XubString& rStr, FASTBOOL bNoPercentChar) const +void SdrModel::TakePercentStr(const Fraction& rVal, XubString& rStr, bool bNoPercentChar) const { INT32 nMul(rVal.GetNumerator()); INT32 nDiv(rVal.GetDenominator()); @@ -1467,7 +1467,7 @@ void SdrModel::SetChanged(sal_Bool bFlg) mbChanged = bFlg; } -void SdrModel::RecalcPageNums(FASTBOOL bMaster) +void SdrModel::RecalcPageNums(bool bMaster) { Container& rPL=*(bMaster ? &maMaPag : &maPages); USHORT nAnz=USHORT(rPL.Count()); @@ -1602,9 +1602,9 @@ void SdrModel::MoveMasterPage(USHORT nPgNum, USHORT nNewPos) //////////////////////////////////////////////////////////////////////////////////////////////////// -FASTBOOL SdrModel::CheckConsistence() const +bool SdrModel::CheckConsistence() const { - FASTBOOL bRet=TRUE; + bool bRet = true; #ifdef DBG_UTIL DBG_CHKTHIS(SdrModel,NULL); #endif @@ -1616,7 +1616,7 @@ FASTBOOL SdrModel::CheckConsistence() const // #48289# void SdrModel::CopyPages(USHORT nFirstPageNum, USHORT nLastPageNum, USHORT nDestPos, - FASTBOOL bUndo, FASTBOOL bMoveNoCopy) + bool bUndo, bool bMoveNoCopy) { if( bUndo && !IsUndoEnabled() ) bUndo = false; @@ -1633,7 +1633,7 @@ void SdrModel::CopyPages(USHORT nFirstPageNum, USHORT nLastPageNum, nFirstPageNum=nMaxPage; if (nLastPageNum>nMaxPage) nLastPageNum =nMaxPage; - FASTBOOL bReverse=nLastPageNum<nFirstPageNum; + bool bReverse=nLastPageNum<nFirstPageNum; if (nDestPos>nPageAnz) nDestPos=nPageAnz; @@ -1694,8 +1694,8 @@ void SdrModel::CopyPages(USHORT nFirstPageNum, USHORT nLastPageNum, void SdrModel::Merge(SdrModel& rSourceModel, USHORT nFirstPageNum, USHORT nLastPageNum, USHORT nDestPos, - FASTBOOL bMergeMasterPages, FASTBOOL bAllMasterPages, - FASTBOOL bUndo, FASTBOOL bTreadSourceAsConst) + bool bMergeMasterPages, bool bAllMasterPages, + bool bUndo, bool bTreadSourceAsConst) { if (&rSourceModel==this) { // #48289# @@ -1712,24 +1712,24 @@ void SdrModel::Merge(SdrModel& rSourceModel, USHORT nSrcPageAnz=rSourceModel.GetPageCount(); USHORT nSrcMasterPageAnz=rSourceModel.GetMasterPageCount(); USHORT nDstMasterPageAnz=GetMasterPageCount(); - FASTBOOL bInsPages=(nFirstPageNum<nSrcPageAnz || nLastPageNum<nSrcPageAnz); + bool bInsPages=(nFirstPageNum<nSrcPageAnz || nLastPageNum<nSrcPageAnz); USHORT nMaxSrcPage=nSrcPageAnz; if (nMaxSrcPage!=0) nMaxSrcPage--; if (nFirstPageNum>nMaxSrcPage) nFirstPageNum=nMaxSrcPage; if (nLastPageNum>nMaxSrcPage) nLastPageNum =nMaxSrcPage; - FASTBOOL bReverse=nLastPageNum<nFirstPageNum; + bool bReverse=nLastPageNum<nFirstPageNum; USHORT* pMasterMap=NULL; - FASTBOOL* pMasterNeed=NULL; + bool* pMasterNeed=NULL; USHORT nMasterNeed=0; if (bMergeMasterPages && nSrcMasterPageAnz!=0) { // Feststellen, welche MasterPages aus rSrcModel benoetigt werden pMasterMap=new USHORT[nSrcMasterPageAnz]; - pMasterNeed=new FASTBOOL[nSrcMasterPageAnz]; + pMasterNeed=new bool[nSrcMasterPageAnz]; memset(pMasterMap,0xFF,nSrcMasterPageAnz*sizeof(USHORT)); if (bAllMasterPages) { - memset(pMasterNeed,TRUE,nSrcMasterPageAnz*sizeof(FASTBOOL)); + memset(pMasterNeed, true, nSrcMasterPageAnz * sizeof(bool)); } else { - memset(pMasterNeed,FALSE,nSrcMasterPageAnz*sizeof(FASTBOOL)); + memset(pMasterNeed, false, nSrcMasterPageAnz * sizeof(bool)); USHORT nAnf= bReverse ? nLastPageNum : nFirstPageNum; USHORT nEnd= bReverse ? nFirstPageNum : nLastPageNum; for (USHORT i=nAnf; i<=nEnd; i++) { @@ -1741,7 +1741,7 @@ void SdrModel::Merge(SdrModel& rSourceModel, if(nMPgNum < nSrcMasterPageAnz) { - pMasterNeed[nMPgNum] = TRUE; + pMasterNeed[nMPgNum] = true; } } } @@ -2022,20 +2022,20 @@ void SdrModel::ReformatAllTextObjects() ImpReformatAllTextObjects(); } -FASTBOOL SdrModel::HasTransparentObjects( BOOL bCheckForAlphaChannel ) const +bool SdrModel::HasTransparentObjects( BOOL bCheckForAlphaChannel ) const { - FASTBOOL bRet = FALSE; + bool bRet = false; USHORT n, nCount; for( n = 0, nCount = GetMasterPageCount(); ( n < nCount ) && !bRet; n++ ) if( GetMasterPage( n )->HasTransparentObjects( bCheckForAlphaChannel ) ) - bRet = TRUE; + bRet = true; if( !bRet ) { for( n = 0, nCount = GetPageCount(); ( n < nCount ) && !bRet; n++ ) if( GetPage( n )->HasTransparentObjects( bCheckForAlphaChannel ) ) - bRet = TRUE; + bRet = true; } return bRet; diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx index 6ab27c85aaf0..82a52e0bd667 100644 --- a/svx/source/svdraw/svdoashp.cxx +++ b/svx/source/svdraw/svdoashp.cxx @@ -1972,12 +1972,12 @@ void SdrObjCustomShape::NbcMirror( const Point& rRef1, const Point& rRef2 ) InvalidateRenderGeometry(); } -void SdrObjCustomShape::Shear( const Point& rRef, long nWink, double tn, FASTBOOL bVShear ) +void SdrObjCustomShape::Shear( const Point& rRef, long nWink, double tn, bool bVShear ) { SdrTextObj::Shear( rRef, nWink, tn, bVShear ); InvalidateRenderGeometry(); } -void SdrObjCustomShape::NbcShear( const Point& rRef, long nWink, double tn, FASTBOOL bVShear ) +void SdrObjCustomShape::NbcShear( const Point& rRef, long nWink, double tn, bool bVShear ) { long nDrehWink = aGeo.nDrehWink; if ( nDrehWink ) @@ -2467,12 +2467,12 @@ void SdrObjCustomShape::DragCreateObject( SdrDragStat& rStat ) bSnapRectDirty=TRUE; } -FASTBOOL SdrObjCustomShape::BegCreate( SdrDragStat& rDrag ) +bool SdrObjCustomShape::BegCreate( SdrDragStat& rDrag ) { return SdrTextObj::BegCreate( rDrag ); } -FASTBOOL SdrObjCustomShape::MovCreate(SdrDragStat& rStat) +bool SdrObjCustomShape::MovCreate(SdrDragStat& rStat) { SdrView* pView = rStat.GetView(); // #i37448# if( pView && pView->IsSolidDragging() ) @@ -2484,7 +2484,7 @@ FASTBOOL SdrObjCustomShape::MovCreate(SdrDragStat& rStat) return TRUE; } -FASTBOOL SdrObjCustomShape::EndCreate( SdrDragStat& rStat, SdrCreateCmd eCmd ) +bool SdrObjCustomShape::EndCreate( SdrDragStat& rStat, SdrCreateCmd eCmd ) { DragCreateObject( rStat ); @@ -2522,18 +2522,18 @@ basegfx::B2DPolyPolygon SdrObjCustomShape::TakeCreatePoly(const SdrDragStat& /*r // in context with the SdrObjCustomShape the SdrTextAutoGrowHeightItem == true -> Resize Shape to fit text, // the SdrTextAutoGrowWidthItem == true -> Word wrap text in Shape -FASTBOOL SdrObjCustomShape::IsAutoGrowHeight() const +bool SdrObjCustomShape::IsAutoGrowHeight() const { const SfxItemSet& rSet = GetMergedItemSet(); - FASTBOOL bIsAutoGrowHeight = ((SdrTextAutoGrowHeightItem&)(rSet.Get(SDRATTR_TEXT_AUTOGROWHEIGHT))).GetValue(); + bool bIsAutoGrowHeight = ((SdrTextAutoGrowHeightItem&)(rSet.Get(SDRATTR_TEXT_AUTOGROWHEIGHT))).GetValue(); if ( bIsAutoGrowHeight && IsVerticalWriting() ) bIsAutoGrowHeight = ((SdrTextWordWrapItem&)(rSet.Get(SDRATTR_TEXT_WORDWRAP))).GetValue() == FALSE; return bIsAutoGrowHeight; } -FASTBOOL SdrObjCustomShape::IsAutoGrowWidth() const +bool SdrObjCustomShape::IsAutoGrowWidth() const { const SfxItemSet& rSet = GetMergedItemSet(); - FASTBOOL bIsAutoGrowWidth = ((SdrTextAutoGrowHeightItem&)(rSet.Get(SDRATTR_TEXT_AUTOGROWHEIGHT))).GetValue(); + bool bIsAutoGrowWidth = ((SdrTextAutoGrowHeightItem&)(rSet.Get(SDRATTR_TEXT_AUTOGROWHEIGHT))).GetValue(); if ( bIsAutoGrowWidth && !IsVerticalWriting() ) bIsAutoGrowWidth = ((SdrTextWordWrapItem&)(rSet.Get(SDRATTR_TEXT_WORDWRAP))).GetValue() == FALSE; return bIsAutoGrowWidth; @@ -2601,12 +2601,12 @@ void SdrObjCustomShape::SetVerticalWriting( sal_Bool bVertical ) } } } -FASTBOOL SdrObjCustomShape::AdjustTextFrameWidthAndHeight(Rectangle& rR, FASTBOOL bHgt, FASTBOOL bWdt) const +bool SdrObjCustomShape::AdjustTextFrameWidthAndHeight(Rectangle& rR, bool bHgt, bool bWdt) const { if ( pModel && HasText() && !rR.IsEmpty() ) { - FASTBOOL bWdtGrow=bWdt && IsAutoGrowWidth(); - FASTBOOL bHgtGrow=bHgt && IsAutoGrowHeight(); + bool bWdtGrow=bWdt && IsAutoGrowWidth(); + bool bHgtGrow=bHgt && IsAutoGrowHeight(); if ( bWdtGrow || bHgtGrow ) { Rectangle aR0(rR); @@ -2745,7 +2745,7 @@ FASTBOOL SdrObjCustomShape::AdjustTextFrameWidthAndHeight(Rectangle& rR, FASTBOO return FALSE; } -Rectangle SdrObjCustomShape::ImpCalculateTextFrame( const FASTBOOL bHgt, const FASTBOOL bWdt ) +Rectangle SdrObjCustomShape::ImpCalculateTextFrame( const bool bHgt, const bool bWdt ) { Rectangle aReturnValue; @@ -2775,7 +2775,7 @@ Rectangle SdrObjCustomShape::ImpCalculateTextFrame( const FASTBOOL bHgt, const F return aReturnValue; } -FASTBOOL SdrObjCustomShape::NbcAdjustTextFrameWidthAndHeight(FASTBOOL bHgt, FASTBOOL bWdt) +bool SdrObjCustomShape::NbcAdjustTextFrameWidthAndHeight(bool bHgt, bool bWdt) { Rectangle aNewTextRect = ImpCalculateTextFrame( bHgt, bWdt ); sal_Bool bRet = !aNewTextRect.IsEmpty() && ( aNewTextRect != aRect ); @@ -2805,7 +2805,7 @@ FASTBOOL SdrObjCustomShape::NbcAdjustTextFrameWidthAndHeight(FASTBOOL bHgt, FAST } return bRet; } -FASTBOOL SdrObjCustomShape::AdjustTextFrameWidthAndHeight(FASTBOOL bHgt, FASTBOOL bWdt) +bool SdrObjCustomShape::AdjustTextFrameWidthAndHeight(bool bHgt, bool bWdt) { Rectangle aNewTextRect = ImpCalculateTextFrame( bHgt, bWdt ); sal_Bool bRet = !aNewTextRect.IsEmpty() && ( aNewTextRect != aRect ); @@ -2968,7 +2968,7 @@ void SdrObjCustomShape::TakeTextAnchorRect( Rectangle& rAnchorRect ) const else SdrTextObj::TakeTextAnchorRect( rAnchorRect ); } -void SdrObjCustomShape::TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRect, FASTBOOL bNoEditText, +void SdrObjCustomShape::TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRect, bool bNoEditText, Rectangle* pAnchorRect, BOOL /*bLineWidth*/) const { Rectangle aAnkRect; // Rect innerhalb dem geankert wird diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx index b9d3e24592ee..811929070b07 100644 --- a/svx/source/svdraw/svdobj.cxx +++ b/svx/source/svdraw/svdobj.cxx @@ -162,7 +162,7 @@ SdrObjUserData::~SdrObjUserData() { } -FASTBOOL SdrObjUserData::HasMacro(const SdrObject* /*pObj*/) const +bool SdrObjUserData::HasMacro(const SdrObject* /*pObj*/) const { return FALSE; } @@ -206,7 +206,7 @@ void SdrObjUserData::PaintMacro(OutputDevice& rOut, const Rectangle& /*rDirtyRec rOut.SetRasterOp(eRop); } -FASTBOOL SdrObjUserData::DoMacro(const SdrObjMacroHitRec& /*rRec*/, SdrObject* /*pObj*/) +bool SdrObjUserData::DoMacro(const SdrObjMacroHitRec& /*rRec*/, SdrObject* /*pObj*/) { return FALSE; } @@ -678,7 +678,7 @@ AutoTimer* SdrObject::ForceAutoTimer() return pPlusData->pAutoTimer; } -FASTBOOL SdrObject::HasRefPoint() const +bool SdrObject::HasRefPoint() const { return FALSE; } @@ -1115,7 +1115,7 @@ void SdrObject::ImpTakeDescriptionStr(USHORT nStrCacheID, XubString& rStr, USHOR } } -XubString SdrObject::GetWinkStr(long nWink, FASTBOOL bNoDegChar) const +XubString SdrObject::GetWinkStr(long nWink, bool bNoDegChar) const { XubString aStr; if (pModel!=NULL) { @@ -1124,7 +1124,7 @@ XubString SdrObject::GetWinkStr(long nWink, FASTBOOL bNoDegChar) const return aStr; } -XubString SdrObject::GetMetrStr(long nVal, MapUnit /*eWantMap*/, FASTBOOL bNoUnitChars) const +XubString SdrObject::GetMetrStr(long nVal, MapUnit /*eWantMap*/, bool bNoUnitChars) const { XubString aStr; if (pModel!=NULL) { @@ -1279,14 +1279,14 @@ Rectangle SdrObject::ImpDragCalcRect(const SdrDragStat& rDrag) const Rectangle aRect(aTmpRect); const SdrHdl* pHdl=rDrag.GetHdl(); SdrHdlKind eHdl=pHdl==NULL ? HDL_MOVE : pHdl->GetKind(); - FASTBOOL bEcke=(eHdl==HDL_UPLFT || eHdl==HDL_UPRGT || eHdl==HDL_LWLFT || eHdl==HDL_LWRGT); - FASTBOOL bOrtho=rDrag.GetView()!=NULL && rDrag.GetView()->IsOrtho(); - FASTBOOL bBigOrtho=bEcke && bOrtho && rDrag.GetView()->IsBigOrtho(); + bool bEcke=(eHdl==HDL_UPLFT || eHdl==HDL_UPRGT || eHdl==HDL_LWLFT || eHdl==HDL_LWRGT); + bool bOrtho=rDrag.GetView()!=NULL && rDrag.GetView()->IsOrtho(); + bool bBigOrtho=bEcke && bOrtho && rDrag.GetView()->IsBigOrtho(); Point aPos(rDrag.GetNow()); - FASTBOOL bLft=(eHdl==HDL_UPLFT || eHdl==HDL_LEFT || eHdl==HDL_LWLFT); - FASTBOOL bRgt=(eHdl==HDL_UPRGT || eHdl==HDL_RIGHT || eHdl==HDL_LWRGT); - FASTBOOL bTop=(eHdl==HDL_UPRGT || eHdl==HDL_UPPER || eHdl==HDL_UPLFT); - FASTBOOL bBtm=(eHdl==HDL_LWRGT || eHdl==HDL_LOWER || eHdl==HDL_LWLFT); + bool bLft=(eHdl==HDL_UPLFT || eHdl==HDL_LEFT || eHdl==HDL_LWLFT); + bool bRgt=(eHdl==HDL_UPRGT || eHdl==HDL_RIGHT || eHdl==HDL_LWRGT); + bool bTop=(eHdl==HDL_UPRGT || eHdl==HDL_UPPER || eHdl==HDL_UPLFT); + bool bBtm=(eHdl==HDL_LWRGT || eHdl==HDL_LOWER || eHdl==HDL_LWLFT); if (bLft) aTmpRect.Left() =aPos.X(); if (bRgt) aTmpRect.Right() =aPos.X(); if (bTop) aTmpRect.Top() =aPos.Y(); @@ -1298,8 +1298,8 @@ Rectangle SdrObject::ImpDragCalcRect(const SdrDragStat& rDrag) const long nYMul=aTmpRect.Bottom()-aTmpRect.Top(); long nXDiv=nWdt0; long nYDiv=nHgt0; - FASTBOOL bXNeg=(nXMul<0)!=(nXDiv<0); - FASTBOOL bYNeg=(nYMul<0)!=(nYDiv<0); + bool bXNeg=(nXMul<0)!=(nXDiv<0); + bool bYNeg=(nYMul<0)!=(nYDiv<0); nXMul=Abs(nXMul); nYMul=Abs(nYMul); nXDiv=Abs(nXDiv); @@ -1311,7 +1311,7 @@ Rectangle SdrObject::ImpDragCalcRect(const SdrDragStat& rDrag) const nXDiv=aXFact.GetDenominator(); nYDiv=aYFact.GetDenominator(); if (bEcke) { // Eckpunkthandles - FASTBOOL bUseX=(aXFact<aYFact) != bBigOrtho; + bool bUseX=(aXFact<aYFact) != bBigOrtho; if (bUseX) { long nNeed=long(BigInt(nHgt0)*BigInt(nXMul)/BigInt(nXDiv)); if (bYNeg) nNeed=-nNeed; @@ -1401,7 +1401,7 @@ basegfx::B2DPolyPolygon SdrObject::getSpecialDragPoly(const SdrDragStat& /*rDrag //////////////////////////////////////////////////////////////////////////////////////////////////// // Create -FASTBOOL SdrObject::BegCreate(SdrDragStat& rStat) +bool SdrObject::BegCreate(SdrDragStat& rStat) { rStat.SetOrtho4Possible(); Rectangle aRect1(rStat.GetStart(), rStat.GetNow()); @@ -1411,7 +1411,7 @@ FASTBOOL SdrObject::BegCreate(SdrDragStat& rStat) return TRUE; } -FASTBOOL SdrObject::MovCreate(SdrDragStat& rStat) +bool SdrObject::MovCreate(SdrDragStat& rStat) { rStat.TakeCreateRect(aOutRect); rStat.SetActionRect(aOutRect); @@ -1428,7 +1428,7 @@ FASTBOOL SdrObject::MovCreate(SdrDragStat& rStat) return TRUE; } -FASTBOOL SdrObject::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) +bool SdrObject::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) { rStat.TakeCreateRect(aOutRect); aOutRect.Justify(); @@ -1444,7 +1444,7 @@ void SdrObject::BrkCreate(SdrDragStat& /*rStat*/) { } -FASTBOOL SdrObject::BckCreate(SdrDragStat& /*rStat*/) +bool SdrObject::BckCreate(SdrDragStat& /*rStat*/) { return FALSE; } @@ -1475,8 +1475,8 @@ void SdrObject::NbcMove(const Size& rSiz) void SdrObject::NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) { - FASTBOOL bXMirr=(xFact.GetNumerator()<0) != (xFact.GetDenominator()<0); - FASTBOOL bYMirr=(yFact.GetNumerator()<0) != (yFact.GetDenominator()<0); + bool bXMirr=(xFact.GetNumerator()<0) != (xFact.GetDenominator()<0); + bool bYMirr=(yFact.GetNumerator()<0) != (yFact.GetDenominator()<0); if (bXMirr || bYMirr) { Point aRef1(GetSnapRect().Center()); if (bXMirr) { @@ -1553,7 +1553,7 @@ void SdrObject::NbcMirror(const Point& rRef1, const Point& rRef2) SetGlueReallyAbsolute(FALSE); } -void SdrObject::NbcShear(const Point& rRef, long nWink, double tn, FASTBOOL bVShear) +void SdrObject::NbcShear(const Point& rRef, long nWink, double tn, bool bVShear) { SetGlueReallyAbsolute(TRUE); NbcShearGluePoints(rRef,nWink,tn,bVShear); @@ -1606,7 +1606,7 @@ void SdrObject::Mirror(const Point& rRef1, const Point& rRef2) SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0); } -void SdrObject::Shear(const Point& rRef, long nWink, double tn, FASTBOOL bVShear) +void SdrObject::Shear(const Point& rRef, long nWink, double tn, bool bVShear) { if (nWink!=0) { Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetLastBoundRect(); @@ -1720,7 +1720,7 @@ long SdrObject::GetRotateAngle() const return 0; } -long SdrObject::GetShearAngle(FASTBOOL /*bVertical*/) const +long SdrObject::GetShearAngle(bool /*bVertical*/) const { return 0; } @@ -1764,7 +1764,7 @@ void SdrObject::NbcSetPoint(const Point& /*rPnt*/, sal_uInt32 /*i*/) { } -FASTBOOL SdrObject::HasTextEdit() const +bool SdrObject::HasTextEdit() const { return FALSE; } @@ -1832,7 +1832,7 @@ SdrObjUserData* SdrObject::ImpGetMacroUserData() const return pData; } -FASTBOOL SdrObject::HasMacro() const +bool SdrObject::HasMacro() const { SdrObjUserData* pData=ImpGetMacroUserData(); return pData!=NULL ? pData->HasMacro(this) : FALSE; @@ -1891,7 +1891,7 @@ void SdrObject::PaintMacro(OutputDevice& rOut, const Rectangle& rDirtyRect, cons } } -FASTBOOL SdrObject::DoMacro(const SdrObjMacroHitRec& rRec) +bool SdrObject::DoMacro(const SdrObjMacroHitRec& rRec) { SdrObjUserData* pData=ImpGetMacroUserData(); if (pData!=NULL) { @@ -2211,13 +2211,13 @@ void SdrObject::NbcApplyNotPersistAttr(const SfxItemSet& rAttr) } } -void lcl_SetItem(SfxItemSet& rAttr, FASTBOOL bMerge, const SfxPoolItem& rItem) +void lcl_SetItem(SfxItemSet& rAttr, bool bMerge, const SfxPoolItem& rItem) { if (bMerge) rAttr.MergeValue(rItem,TRUE); else rAttr.Put(rItem); } -void SdrObject::TakeNotPersistAttr(SfxItemSet& rAttr, FASTBOOL bMerge) const +void SdrObject::TakeNotPersistAttr(SfxItemSet& rAttr, bool bMerge) const { const Rectangle& rSnap=GetSnapRect(); const Rectangle& rLogic=GetLogicRect(); @@ -2291,9 +2291,9 @@ void SdrObject::NbcSetStyleSheet(SfxStyleSheet* pNewStyleSheet, sal_Bool bDontRe // Das Broadcasting beim Setzen der Attribute wird vom AttrObj gemanagt //////////////////////////////////////////////////////////////////////////////////////////////////// -FASTBOOL SdrObject::IsNode() const +bool SdrObject::IsNode() const { - return TRUE; + return true; } SdrGluePoint SdrObject::GetVertexGluePoint(USHORT nPosNum) const @@ -2354,7 +2354,7 @@ SdrGluePointList* SdrObject::ForceGluePointList() return pPlusData->pGluePoints; } -void SdrObject::SetGlueReallyAbsolute(FASTBOOL bOn) +void SdrObject::SetGlueReallyAbsolute(bool bOn) { // erst Const-Aufruf um zu sehen, ob // ueberhaupt Klebepunkte da sind @@ -2387,7 +2387,7 @@ void SdrObject::NbcMirrorGluePoints(const Point& rRef1, const Point& rRef2) } } -void SdrObject::NbcShearGluePoints(const Point& rRef, long nWink, double tn, FASTBOOL bVShear) +void SdrObject::NbcShearGluePoints(const Point& rRef, long nWink, double tn, bool bVShear) { // erst Const-Aufruf um zu sehen, ob // ueberhaupt Klebepunkte da sind @@ -2398,20 +2398,20 @@ void SdrObject::NbcShearGluePoints(const Point& rRef, long nWink, double tn, FAS } } -FASTBOOL SdrObject::IsEdge() const +bool SdrObject::IsEdge() const { - return FALSE; + return false; } -void SdrObject::ConnectToNode(FASTBOOL /*bTail1*/, SdrObject* /*pObj*/) +void SdrObject::ConnectToNode(bool /*bTail1*/, SdrObject* /*pObj*/) { } -void SdrObject::DisconnectFromNode(FASTBOOL /*bTail1*/) +void SdrObject::DisconnectFromNode(bool /*bTail1*/) { } -SdrObject* SdrObject::GetConnectedNode(FASTBOOL /*bTail1*/) const +SdrObject* SdrObject::GetConnectedNode(bool /*bTail1*/) const { return NULL; } diff --git a/svx/source/svdraw/svdocapt.cxx b/svx/source/svdraw/svdocapt.cxx index b92157823081..c86431f65eb5 100644 --- a/svx/source/svdraw/svdocapt.cxx +++ b/svx/source/svdraw/svdocapt.cxx @@ -77,9 +77,9 @@ public: long nEscAbs; long nLineLen; SdrCaptionEscDir eEscDir; - FASTBOOL bFitLineLen; - FASTBOOL bEscRel; - FASTBOOL bFixedAngle; + bool bFitLineLen; + bool bEscRel; + bool bFixedAngle; public: ImpCaptParams() @@ -115,7 +115,7 @@ void ImpCaptParams::CalcEscPos(const Point& rTailPt, const Rectangle& rRect, Poi nY+=rRect.Top(); Point aBestPt; EscDir eBestDir=LKS; - FASTBOOL bTryH=eEscDir==SDRCAPT_ESCBESTFIT; + bool bTryH=eEscDir==SDRCAPT_ESCBESTFIT; if (!bTryH) { if (eType!=SDRCAPT_TYPE1) { bTryH=eEscDir==SDRCAPT_ESCHORIZONTAL; @@ -123,7 +123,7 @@ void ImpCaptParams::CalcEscPos(const Point& rTailPt, const Rectangle& rRect, Poi bTryH=eEscDir==SDRCAPT_ESCVERTICAL; } } - FASTBOOL bTryV=eEscDir==SDRCAPT_ESCBESTFIT; + bool bTryV=eEscDir==SDRCAPT_ESCBESTFIT; if (!bTryV) { if (eType!=SDRCAPT_TYPE1) { bTryV=eEscDir==SDRCAPT_ESCVERTICAL; @@ -135,7 +135,7 @@ void ImpCaptParams::CalcEscPos(const Point& rTailPt, const Rectangle& rRect, Poi if (bTryH) { Point aLft(rRect.Left()-nGap,nY); Point aRgt(rRect.Right()+nGap,nY); - FASTBOOL bLft=(aTl.X()-aLft.X()<aRgt.X()-aTl.X()); + bool bLft=(aTl.X()-aLft.X()<aRgt.X()-aTl.X()); if (bLft) { eBestDir=LKS; aBestPt=aLft; @@ -147,7 +147,7 @@ void ImpCaptParams::CalcEscPos(const Point& rTailPt, const Rectangle& rRect, Poi if (bTryV) { Point aTop(nX,rRect.Top()-nGap); Point aBtm(nX,rRect.Bottom()+nGap); - FASTBOOL bTop=(aTl.Y()-aTop.Y()<aBtm.Y()-aTl.Y()); + bool bTop=(aTl.Y()-aTop.Y()<aBtm.Y()-aTl.Y()); Point aBest2; EscDir eBest2; if (bTop) { @@ -157,7 +157,7 @@ void ImpCaptParams::CalcEscPos(const Point& rTailPt, const Rectangle& rRect, Poi eBest2=UNT; aBest2=aBtm; } - FASTBOOL bTakeIt=eEscDir!=SDRCAPT_ESCBESTFIT; + bool bTakeIt=eEscDir!=SDRCAPT_ESCBESTFIT; if (!bTakeIt) { BigInt aHorX(aBestPt.X()-aTl.X()); aHorX*=aHorX; BigInt aHorY(aBestPt.Y()-aTl.Y()); aHorY*=aHorY; @@ -557,7 +557,7 @@ void SdrCaptionObj::ImpCalcTail(const ImpCaptParams& rPara, Polygon& rPoly, Rect } } -FASTBOOL SdrCaptionObj::BegCreate(SdrDragStat& rStat) +bool SdrCaptionObj::BegCreate(SdrDragStat& rStat) { if (aRect.IsEmpty()) return FALSE; // Create z.Zt. nur mit vorgegebenen Rect @@ -570,7 +570,7 @@ FASTBOOL SdrCaptionObj::BegCreate(SdrDragStat& rStat) return TRUE; } -FASTBOOL SdrCaptionObj::MovCreate(SdrDragStat& rStat) +bool SdrCaptionObj::MovCreate(SdrDragStat& rStat) { ImpCaptParams aPara; ImpGetCaptParams(aPara); @@ -582,7 +582,7 @@ FASTBOOL SdrCaptionObj::MovCreate(SdrDragStat& rStat) return TRUE; } -FASTBOOL SdrCaptionObj::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) +bool SdrCaptionObj::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) { ImpCaptParams aPara; ImpGetCaptParams(aPara); @@ -592,7 +592,7 @@ FASTBOOL SdrCaptionObj::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) return (eCmd==SDRCREATE_FORCEEND || rStat.GetPointAnz()>=2); } -FASTBOOL SdrCaptionObj::BckCreate(SdrDragStat& /*rStat*/) +bool SdrCaptionObj::BckCreate(SdrDragStat& /*rStat*/) { return FALSE; } @@ -761,12 +761,12 @@ SdrObject* SdrCaptionObj::DoConvertToPolyObj(BOOL bBezier) const SdrObject* pTail = ImpConvertMakeObj(basegfx::B2DPolyPolygon(aTailPoly.getB2DPolygon()), sal_False, bBezier); SdrObject* pRet=(pTail!=NULL) ? pTail : pRect; if (pTail!=NULL && pRect!=NULL) { - FASTBOOL bInsRect=TRUE; - FASTBOOL bInsTail=TRUE; + bool bInsRect = true; + bool bInsTail = true; SdrObjList* pOL=pTail->GetSubList(); - if (pOL!=NULL) { pRet=pRect; bInsTail=FALSE; } + if (pOL!=NULL) { pRet=pRect; bInsTail = false; } if (pOL==NULL) pOL=pRect->GetSubList(); - if (pOL!=NULL) { pRet=pRect; bInsRect=FALSE; } + if (pOL!=NULL) { pRet=pRect; bInsRect = false; } if (pOL==NULL) { SdrObjGroup* pGrp=new SdrObjGroup; pOL=pGrp->GetSubList(); diff --git a/svx/source/svdraw/svdocirc.cxx b/svx/source/svdraw/svdocirc.cxx index 4c600cba821f..7b8ae0e27e26 100644 --- a/svx/source/svdraw/svdocirc.cxx +++ b/svx/source/svdraw/svdocirc.cxx @@ -152,7 +152,7 @@ SdrCircObj::~SdrCircObj() void SdrCircObj::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const { - FASTBOOL bCanConv=!HasText() || ImpCanConvTextToCurve(); + bool bCanConv=!HasText() || ImpCanConvTextToCurve(); rInfo.bEdgeRadiusAllowed = FALSE; rInfo.bCanConvToPath=bCanConv; rInfo.bCanConvToPoly=bCanConv; @@ -164,16 +164,16 @@ UINT16 SdrCircObj::GetObjIdentifier() const return UINT16(meCircleKind); } -FASTBOOL SdrCircObj::PaintNeedsXPolyCirc() const +bool SdrCircObj::PaintNeedsXPolyCirc() const { // XPoly ist notwendig fuer alle gedrehten Ellipsenobjekte, // fuer alle Kreis- und Ellipsenabschnitte // und wenn nicht WIN dann (erstmal) auch fuer Kreis-/Ellipsenausschnitte // und Kreis-/Ellipsenboegen (wg. Genauigkeit) - FASTBOOL bNeed=aGeo.nDrehWink!=0 || aGeo.nShearWink!=0 || meCircleKind==OBJ_CCUT; + bool bNeed=aGeo.nDrehWink!=0 || aGeo.nShearWink!=0 || meCircleKind==OBJ_CCUT; #ifndef WIN // Wenn nicht Win, dann fuer alle ausser Vollkreis (erstmal!!!) - if (meCircleKind!=OBJ_CIRC) bNeed=TRUE; + if (meCircleKind!=OBJ_CIRC) bNeed = true; #endif const SfxItemSet& rSet = GetObjectItemSet(); @@ -211,7 +211,7 @@ FASTBOOL SdrCircObj::PaintNeedsXPolyCirc() const } if(!bNeed && meCircleKind != OBJ_CIRC && nStartWink == nEndWink) - bNeed=TRUE; // Weil sonst Vollkreis gemalt wird + bNeed = true; // Weil sonst Vollkreis gemalt wird return bNeed; } @@ -377,7 +377,7 @@ struct ImpCircUser : public SdrDragStatUserData long nStart; long nEnd; long nWink; - FASTBOOL bRight; // noch nicht implementiert + bool bRight; // noch nicht implementiert public: ImpCircUser() @@ -692,7 +692,7 @@ void SdrCircObj::ImpSetCreateParams(SdrDragStat& rStat) const pU->SetCreateParams(rStat); } -FASTBOOL SdrCircObj::BegCreate(SdrDragStat& rStat) +bool SdrCircObj::BegCreate(SdrDragStat& rStat) { rStat.SetOrtho4Possible(); Rectangle aRect1(rStat.GetStart(), rStat.GetNow()); @@ -703,7 +703,7 @@ FASTBOOL SdrCircObj::BegCreate(SdrDragStat& rStat) return TRUE; } -FASTBOOL SdrCircObj::MovCreate(SdrDragStat& rStat) +bool SdrCircObj::MovCreate(SdrDragStat& rStat) { ImpSetCreateParams(rStat); ImpCircUser* pU=(ImpCircUser*)rStat.GetUser(); @@ -726,11 +726,11 @@ FASTBOOL SdrCircObj::MovCreate(SdrDragStat& rStat) return TRUE; } -FASTBOOL SdrCircObj::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) +bool SdrCircObj::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) { ImpSetCreateParams(rStat); ImpCircUser* pU=(ImpCircUser*)rStat.GetUser(); - FASTBOOL bRet=FALSE; + bool bRet = false; if (eCmd==SDRCREATE_FORCEEND && rStat.GetPointAnz()<4) meCircleKind=OBJ_CIRC; if (meCircleKind==OBJ_CIRC) { bRet=rStat.GetPointAnz()>=2; @@ -767,7 +767,7 @@ void SdrCircObj::BrkCreate(SdrDragStat& rStat) rStat.SetUser(NULL); } -FASTBOOL SdrCircObj::BckCreate(SdrDragStat& rStat) +bool SdrCircObj::BckCreate(SdrDragStat& rStat) { rStat.SetNoSnap(rStat.GetPointAnz()>=3); rStat.SetOrtho4Possible(rStat.GetPointAnz()<3); @@ -825,12 +825,12 @@ void SdrCircObj::NbcMove(const Size& aSiz) void SdrCircObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) { long nWink0=aGeo.nDrehWink; - FASTBOOL bNoShearRota=(aGeo.nDrehWink==0 && aGeo.nShearWink==0); + bool bNoShearRota=(aGeo.nDrehWink==0 && aGeo.nShearWink==0); SdrTextObj::NbcResize(rRef,xFact,yFact); bNoShearRota|=(aGeo.nDrehWink==0 && aGeo.nShearWink==0); if (meCircleKind!=OBJ_CIRC) { - FASTBOOL bXMirr=(xFact.GetNumerator()<0) != (xFact.GetDenominator()<0); - FASTBOOL bYMirr=(yFact.GetNumerator()<0) != (yFact.GetDenominator()<0); + bool bXMirr=(xFact.GetNumerator()<0) != (xFact.GetDenominator()<0); + bool bYMirr=(yFact.GetNumerator()<0) != (yFact.GetDenominator()<0); if (bXMirr || bYMirr) { // bei bXMirr!=bYMirr muessten eigentlich noch die beiden // Linienende vertauscht werden. Das ist jedoch mal wieder @@ -874,7 +874,7 @@ void SdrCircObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fract ImpSetCircInfoToAttr(); } -void SdrCircObj::NbcShear(const Point& rRef, long nWink, double tn, FASTBOOL bVShear) +void SdrCircObj::NbcShear(const Point& rRef, long nWink, double tn, bool bVShear) { SdrTextObj::NbcShear(rRef,nWink,tn,bVShear); SetXPolyDirty(); @@ -884,7 +884,7 @@ void SdrCircObj::NbcShear(const Point& rRef, long nWink, double tn, FASTBOOL bVS void SdrCircObj::NbcMirror(const Point& rRef1, const Point& rRef2) { //long nWink0=aGeo.nDrehWink; - FASTBOOL bFreeMirr=meCircleKind!=OBJ_CIRC; + bool bFreeMirr=meCircleKind!=OBJ_CIRC; Point aTmpPt1; Point aTmpPt2; if (bFreeMirr) { // bei freier Spiegelachse einige Vorbereitungen Treffen diff --git a/svx/source/svdraw/svdoedge.cxx b/svx/source/svdraw/svdoedge.cxx index 3d254aeb39c4..27a56fe134be 100644 --- a/svx/source/svdraw/svdoedge.cxx +++ b/svx/source/svdraw/svdoedge.cxx @@ -76,23 +76,23 @@ void SdrObjConnection::ResetVars() bAutoCorner=FALSE; } -FASTBOOL SdrObjConnection::TakeGluePoint(SdrGluePoint& rGP, FASTBOOL bSetAbsPos) const +bool SdrObjConnection::TakeGluePoint(SdrGluePoint& rGP, bool bSetAbsPos) const { - FASTBOOL bRet=FALSE; + bool bRet = false; if (pObj!=NULL) { // Ein Obj muss schon angedockt sein! if (bAutoVertex) { rGP=pObj->GetVertexGluePoint(nConId); - bRet=TRUE; + bRet = true; } else if (bAutoCorner) { rGP=pObj->GetCornerGluePoint(nConId); - bRet=TRUE; + bRet = true; } else { const SdrGluePointList* pGPL=pObj->GetGluePointList(); if (pGPL!=NULL) { USHORT nNum=pGPL->FindGluePoint(nConId); if (nNum!=SDRGLUEPOINT_NOTFOUND) { rGP=(*pGPL)[nNum]; - bRet=TRUE; + bRet = true; } } } @@ -129,10 +129,10 @@ USHORT SdrEdgeInfoRec::ImpGetPolyIdx(SdrEdgeLineCode eLineCode, const XPolygon& return 0; } -FASTBOOL SdrEdgeInfoRec::ImpIsHorzLine(SdrEdgeLineCode eLineCode, const XPolygon& rXP) const +bool SdrEdgeInfoRec::ImpIsHorzLine(SdrEdgeLineCode eLineCode, const XPolygon& rXP) const { USHORT nIdx=ImpGetPolyIdx(eLineCode,rXP); - FASTBOOL bHorz=nAngle1==0 || nAngle1==18000; + bool bHorz=nAngle1==0 || nAngle1==18000; if (eLineCode==OBJ2LINE2 || eLineCode==OBJ2LINE3) { nIdx=rXP.GetPointCount()-nIdx; // #36314# bHorz=nAngle2==0 || nAngle2==18000; // #52000# @@ -373,7 +373,7 @@ void SdrEdgeObj::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const rInfo.bGradientAllowed = FALSE; rInfo.bShearAllowed =FALSE; rInfo.bEdgeRadiusAllowed=FALSE; - FASTBOOL bCanConv=!HasText() || ImpCanConvTextToCurve(); + bool bCanConv=!HasText() || ImpCanConvTextToCurve(); rInfo.bCanConvToPath=bCanConv; rInfo.bCanConvToPoly=bCanConv; rInfo.bCanConvToContour = (rInfo.bCanConvToPoly || LineGeometryUsageIsNecessary()); @@ -414,9 +414,9 @@ void SdrEdgeObj::TakeUnrotatedSnapRect(Rectangle& rRect) const rRect=GetSnapRect(); } -FASTBOOL SdrEdgeObj::IsNode() const +bool SdrEdgeObj::IsNode() const { - return TRUE; + return true; } SdrGluePoint SdrEdgeObj::GetVertexGluePoint(USHORT nNum) const @@ -462,12 +462,12 @@ SdrGluePointList* SdrEdgeObj::ForceGluePointList() return NULL; // Keine benutzerdefinierten Klebepunkte fuer Verbinder #31671# } -FASTBOOL SdrEdgeObj::IsEdge() const +bool SdrEdgeObj::IsEdge() const { - return TRUE; + return true; } -void SdrEdgeObj::ConnectToNode(FASTBOOL bTail1, SdrObject* pObj) +void SdrEdgeObj::ConnectToNode(bool bTail1, SdrObject* pObj) { SdrObjConnection& rCon=GetConnection(bTail1); DisconnectFromNode(bTail1); @@ -478,7 +478,7 @@ void SdrEdgeObj::ConnectToNode(FASTBOOL bTail1, SdrObject* pObj) } } -void SdrEdgeObj::DisconnectFromNode(FASTBOOL bTail1) +void SdrEdgeObj::DisconnectFromNode(bool bTail1) { SdrObjConnection& rCon=GetConnection(bTail1); if (rCon.pObj!=NULL) { @@ -487,16 +487,16 @@ void SdrEdgeObj::DisconnectFromNode(FASTBOOL bTail1) } } -SdrObject* SdrEdgeObj::GetConnectedNode(FASTBOOL bTail1) const +SdrObject* SdrEdgeObj::GetConnectedNode(bool bTail1) const { SdrObject* pObj=GetConnection(bTail1).pObj; if (pObj!=NULL && (pObj->GetPage()!=pPage || !pObj->IsInserted())) pObj=NULL; return pObj; } -FASTBOOL SdrEdgeObj::CheckNodeConnection(FASTBOOL bTail1) const +bool SdrEdgeObj::CheckNodeConnection(bool bTail1) const { - FASTBOOL bRet=FALSE; + bool bRet = false; const SdrObjConnection& rCon=GetConnection(bTail1); USHORT nPtAnz=pEdgeTrack->GetPointCount(); if (rCon.pObj!=NULL && rCon.pObj->GetPage()==pPage && nPtAnz!=0) { @@ -519,7 +519,7 @@ FASTBOOL SdrEdgeObj::CheckNodeConnection(FASTBOOL bTail1) const return bRet; } -void SdrEdgeObj::ImpSetTailPoint(FASTBOOL bTail1, const Point& rPt) +void SdrEdgeObj::ImpSetTailPoint(bool bTail1, const Point& rPt) { USHORT nPtAnz=pEdgeTrack->GetPointCount(); if (nPtAnz==0) { @@ -605,11 +605,11 @@ USHORT SdrEdgeObj::ImpCalcEscAngle(SdrObject* pObj, const Point& rPt) const long dyo=rPt.Y()-aR.Top(); long dxr=aR.Right()-rPt.X(); long dyu=aR.Bottom()-rPt.Y(); - FASTBOOL bxMitt=Abs(dxl-dxr)<2; - FASTBOOL byMitt=Abs(dyo-dyu)<2; + bool bxMitt=Abs(dxl-dxr)<2; + bool byMitt=Abs(dyo-dyu)<2; long dx=Min(dxl,dxr); long dy=Min(dyo,dyu); - FASTBOOL bDiag=Abs(dx-dy)<2; + bool bDiag=Abs(dx-dy)<2; if (bxMitt && byMitt) return SDRESC_ALL; // In der Mitte if (bDiag) { // diagonal USHORT nRet=0; @@ -635,7 +635,7 @@ USHORT SdrEdgeObj::ImpCalcEscAngle(SdrObject* pObj, const Point& rPt) const } } -FASTBOOL SdrEdgeObj::ImpStripPolyPoints(XPolygon& /*rXP*/) const +bool SdrEdgeObj::ImpStripPolyPoints(XPolygon& /*rXP*/) const { // fehlende Implementation !!! return FALSE; @@ -645,10 +645,10 @@ XPolygon SdrEdgeObj::ImpCalcObjToCenter(const Point& rStPt, long nEscAngle, cons { XPolygon aXP; aXP.Insert(XPOLY_APPEND,rStPt,XPOLY_NORMAL); - FASTBOOL bRts=nEscAngle==0; - FASTBOOL bObn=nEscAngle==9000; - FASTBOOL bLks=nEscAngle==18000; - FASTBOOL bUnt=nEscAngle==27000; + bool bRts=nEscAngle==0; + bool bObn=nEscAngle==9000; + bool bLks=nEscAngle==18000; + bool bUnt=nEscAngle==27000; Point aP1(rStPt); // erstmal den Pflichtabstand if (bLks) aP1.X()=rRect.Left(); @@ -656,43 +656,40 @@ XPolygon SdrEdgeObj::ImpCalcObjToCenter(const Point& rStPt, long nEscAngle, cons if (bObn) aP1.Y()=rRect.Top(); if (bUnt) aP1.Y()=rRect.Bottom(); - FASTBOOL bFinish=FALSE; - if (!bFinish) { - Point aP2(aP1); // Und nun den Pflichtabstand ggf. bis auf Meetinghoehe erweitern - if (bLks && rMeeting.X()<=aP2.X()) aP2.X()=rMeeting.X(); - if (bRts && rMeeting.X()>=aP2.X()) aP2.X()=rMeeting.X(); - if (bObn && rMeeting.Y()<=aP2.Y()) aP2.Y()=rMeeting.Y(); - if (bUnt && rMeeting.Y()>=aP2.Y()) aP2.Y()=rMeeting.Y(); - aXP.Insert(XPOLY_APPEND,aP2,XPOLY_NORMAL); - - Point aP3(aP2); - if ((bLks && rMeeting.X()>aP2.X()) || (bRts && rMeeting.X()<aP2.X())) { // Aussenrum - if (rMeeting.Y()<aP2.Y()) { - aP3.Y()=rRect.Top(); - if (rMeeting.Y()<aP3.Y()) aP3.Y()=rMeeting.Y(); - } else { - aP3.Y()=rRect.Bottom(); - if (rMeeting.Y()>aP3.Y()) aP3.Y()=rMeeting.Y(); - } + Point aP2(aP1); // Und nun den Pflichtabstand ggf. bis auf Meetinghoehe erweitern + if (bLks && rMeeting.X()<=aP2.X()) aP2.X()=rMeeting.X(); + if (bRts && rMeeting.X()>=aP2.X()) aP2.X()=rMeeting.X(); + if (bObn && rMeeting.Y()<=aP2.Y()) aP2.Y()=rMeeting.Y(); + if (bUnt && rMeeting.Y()>=aP2.Y()) aP2.Y()=rMeeting.Y(); + aXP.Insert(XPOLY_APPEND,aP2,XPOLY_NORMAL); + + Point aP3(aP2); + if ((bLks && rMeeting.X()>aP2.X()) || (bRts && rMeeting.X()<aP2.X())) { // Aussenrum + if (rMeeting.Y()<aP2.Y()) { + aP3.Y()=rRect.Top(); + if (rMeeting.Y()<aP3.Y()) aP3.Y()=rMeeting.Y(); + } else { + aP3.Y()=rRect.Bottom(); + if (rMeeting.Y()>aP3.Y()) aP3.Y()=rMeeting.Y(); + } + aXP.Insert(XPOLY_APPEND,aP3,XPOLY_NORMAL); + if (aP3.Y()!=rMeeting.Y()) { + aP3.X()=rMeeting.X(); aXP.Insert(XPOLY_APPEND,aP3,XPOLY_NORMAL); - if (aP3.Y()!=rMeeting.Y()) { - aP3.X()=rMeeting.X(); - aXP.Insert(XPOLY_APPEND,aP3,XPOLY_NORMAL); - } } - if ((bObn && rMeeting.Y()>aP2.Y()) || (bUnt && rMeeting.Y()<aP2.Y())) { // Aussenrum - if (rMeeting.X()<aP2.X()) { - aP3.X()=rRect.Left(); - if (rMeeting.X()<aP3.X()) aP3.X()=rMeeting.X(); - } else { - aP3.X()=rRect.Right(); - if (rMeeting.X()>aP3.X()) aP3.X()=rMeeting.X(); - } + } + if ((bObn && rMeeting.Y()>aP2.Y()) || (bUnt && rMeeting.Y()<aP2.Y())) { // Aussenrum + if (rMeeting.X()<aP2.X()) { + aP3.X()=rRect.Left(); + if (rMeeting.X()<aP3.X()) aP3.X()=rMeeting.X(); + } else { + aP3.X()=rRect.Right(); + if (rMeeting.X()>aP3.X()) aP3.X()=rMeeting.X(); + } + aXP.Insert(XPOLY_APPEND,aP3,XPOLY_NORMAL); + if (aP3.X()!=rMeeting.X()) { + aP3.Y()=rMeeting.Y(); aXP.Insert(XPOLY_APPEND,aP3,XPOLY_NORMAL); - if (aP3.X()!=rMeeting.X()) { - aP3.Y()=rMeeting.Y(); - aXP.Insert(XPOLY_APPEND,aP3,XPOLY_NORMAL); - } } } #ifdef DBG_UTIL @@ -724,8 +721,8 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const XPolygon& rTrack0, SdrObjConnection& aPt2=aOutRect.BottomRight(); } } - FASTBOOL bCon1=rCon1.pObj!=NULL && rCon1.pObj->GetPage()==pPage && rCon1.pObj->IsInserted(); - FASTBOOL bCon2=rCon2.pObj!=NULL && rCon2.pObj->GetPage()==pPage && rCon2.pObj->IsInserted(); + bool bCon1=rCon1.pObj!=NULL && rCon1.pObj->GetPage()==pPage && rCon1.pObj->IsInserted(); + bool bCon2=rCon2.pObj!=NULL && rCon2.pObj->GetPage()==pPage && rCon2.pObj->IsInserted(); const SfxItemSet& rSet = GetObjectItemSet(); if (bCon1) { @@ -779,8 +776,8 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const XPolygon& rTrack0, SdrObjConnection& XPolygon aBestXP; ULONG nBestQual=0xFFFFFFFF; SdrEdgeInfoRec aBestInfo; - FASTBOOL bAuto1=bCon1 && rCon1.bBestVertex; - FASTBOOL bAuto2=bCon2 && rCon2.bBestVertex; + bool bAuto1=bCon1 && rCon1.bBestVertex; + bool bAuto2=bCon2 && rCon2.bBestVertex; if (bAuto1) rCon1.bAutoVertex=TRUE; if (bAuto2) rCon2.bAutoVertex=TRUE; USHORT nBestAuto1=0; @@ -833,19 +830,19 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec ULONG* pnQuality, SdrEdgeInfoRec* pInfo) const { SdrEdgeKind eKind=((SdrEdgeKindItem&)(GetObjectItem(SDRATTR_EDGEKIND))).GetValue(); - FASTBOOL bRts1=nAngle1==0; - FASTBOOL bObn1=nAngle1==9000; - FASTBOOL bLks1=nAngle1==18000; - FASTBOOL bUnt1=nAngle1==27000; - FASTBOOL bHor1=bLks1 || bRts1; - FASTBOOL bVer1=bObn1 || bUnt1; - FASTBOOL bRts2=nAngle2==0; - FASTBOOL bObn2=nAngle2==9000; - FASTBOOL bLks2=nAngle2==18000; - FASTBOOL bUnt2=nAngle2==27000; - FASTBOOL bHor2=bLks2 || bRts2; - FASTBOOL bVer2=bObn2 || bUnt2; - FASTBOOL bInfo=pInfo!=NULL; + bool bRts1=nAngle1==0; + bool bObn1=nAngle1==9000; + bool bLks1=nAngle1==18000; + bool bUnt1=nAngle1==27000; + bool bHor1=bLks1 || bRts1; + bool bVer1=bObn1 || bUnt1; + bool bRts2=nAngle2==0; + bool bObn2=nAngle2==9000; + bool bLks2=nAngle2==18000; + bool bUnt2=nAngle2==27000; + bool bHor2=bLks2 || bRts2; + bool bVer2=bObn2 || bUnt2; + bool bInfo=pInfo!=NULL; if (bInfo) { pInfo->cOrthoForm=0; pInfo->nAngle1=nAngle1; @@ -861,8 +858,8 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec Rectangle aBewareRect1(rBewareRect1); Rectangle aBewareRect2(rBewareRect2); Point aMeeting((aPt1.X()+aPt2.X()+1)/2,(aPt1.Y()+aPt2.Y()+1)/2); - FASTBOOL bMeetingXMid=TRUE; - FASTBOOL bMeetingYMid=TRUE; + bool bMeetingXMid = true; + bool bMeetingYMid = true; if (eKind==SDREDGE_ONELINE) { XPolygon aXP(2); aXP[0]=rPt1; @@ -908,7 +905,7 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec return aXP; } USHORT nIntersections=0; - FASTBOOL bForceMeeting=FALSE; // Muss die Linie durch den MeetingPoint laufen? + bool bForceMeeting = false; // Muss die Linie durch den MeetingPoint laufen? { Point aC1(aBewareRect1.Center()); Point aC2(aBewareRect2.Center()); @@ -946,10 +943,10 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec long nXMax=Max(aBewareRect1.Right(),aBewareRect2.Right()); long nYMin=Min(aBewareRect1.Top(),aBewareRect2.Top()); long nYMax=Max(aBewareRect1.Bottom(),aBewareRect2.Bottom()); - //FASTBOOL bBoundOverlap=aBoundRect1.Right()>aBoundRect2.Left() && aBoundRect1.Left()<aBoundRect2.Right() && - aBoundRect1.Bottom()>aBoundRect2.Top() && aBoundRect1.Top()<aBoundRect2.Bottom(); - FASTBOOL bBewareOverlap=aBewareRect1.Right()>aBewareRect2.Left() && aBewareRect1.Left()<aBewareRect2.Right() && - aBewareRect1.Bottom()>aBewareRect2.Top() && aBewareRect1.Top()<aBewareRect2.Bottom(); + //bool bBoundOverlap=aBoundRect1.Right()>aBoundRect2.Left() && aBoundRect1.Left()<aBoundRect2.Right() && + // aBoundRect1.Bottom()>aBoundRect2.Top() && aBoundRect1.Top()<aBoundRect2.Bottom(); + bool bBewareOverlap=aBewareRect1.Right()>aBewareRect2.Left() && aBewareRect1.Left()<aBewareRect2.Right() && + aBewareRect1.Bottom()>aBewareRect2.Top() && aBewareRect1.Top()<aBewareRect2.Bottom(); unsigned nMainCase=3; if (nAngle1==nAngle2) nMainCase=1; else if ((bHor1 && bHor2) || (bVer1 && bVer2)) nMainCase=2; @@ -957,29 +954,29 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec if (bVer1) aMeeting.X()=(aPt1.X()+aPt2.X()+1)/2; // ist hier besser, als der if (bHor1) aMeeting.Y()=(aPt1.Y()+aPt2.Y()+1)/2; // Mittelpunkt des Freiraums // bX1Ok bedeutet, dass die Vertikale, die aus Obj1 austritt, keinen Konflikt mit Obj2 bildet, ... - FASTBOOL bX1Ok=aPt1.X()<=aBewareRect2.Left() || aPt1.X()>=aBewareRect2.Right(); - FASTBOOL bX2Ok=aPt2.X()<=aBewareRect1.Left() || aPt2.X()>=aBewareRect1.Right(); - FASTBOOL bY1Ok=aPt1.Y()<=aBewareRect2.Top() || aPt1.Y()>=aBewareRect2.Bottom(); - FASTBOOL bY2Ok=aPt2.Y()<=aBewareRect1.Top() || aPt2.Y()>=aBewareRect1.Bottom(); + bool bX1Ok=aPt1.X()<=aBewareRect2.Left() || aPt1.X()>=aBewareRect2.Right(); + bool bX2Ok=aPt2.X()<=aBewareRect1.Left() || aPt2.X()>=aBewareRect1.Right(); + bool bY1Ok=aPt1.Y()<=aBewareRect2.Top() || aPt1.Y()>=aBewareRect2.Bottom(); + bool bY2Ok=aPt2.Y()<=aBewareRect1.Top() || aPt2.Y()>=aBewareRect1.Bottom(); if (bLks1 && (bY1Ok || aBewareRect1.Left()<aBewareRect2.Right()) && (bY2Ok || aBewareRect2.Left()<aBewareRect1.Right())) { aMeeting.X()=nXMin; - bMeetingXMid=FALSE; + bMeetingXMid = false; } if (bRts1 && (bY1Ok || aBewareRect1.Right()>aBewareRect2.Left()) && (bY2Ok || aBewareRect2.Right()>aBewareRect1.Left())) { aMeeting.X()=nXMax; - bMeetingXMid=FALSE; + bMeetingXMid = false; } if (bObn1 && (bX1Ok || aBewareRect1.Top()<aBewareRect2.Bottom()) && (bX2Ok || aBewareRect2.Top()<aBewareRect1.Bottom())) { aMeeting.Y()=nYMin; - bMeetingYMid=FALSE; + bMeetingYMid = false; } if (bUnt1 && (bX1Ok || aBewareRect1.Bottom()>aBewareRect2.Top()) && (bX2Ok || aBewareRect2.Bottom()>aBewareRect1.Top())) { aMeeting.Y()=nYMax; - bMeetingYMid=FALSE; + bMeetingYMid = false; } } else if (nMainCase==2) { // Fall 2: - bForceMeeting=TRUE; + bForceMeeting = true; if (bHor1) { // beide waagerecht /* 9 Moeglichkeiten: */ /* 2.1 Gegenueber, Ueberschneidung */ @@ -1019,22 +1016,22 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec // Ueberschneidung der BewareRects ohne Ueberschneidung der // Boundrects wenn die Linienaustritte sonst das BewareRect // des jeweils anderen Objekts verletzen wuerden. - FASTBOOL bCase29Direct=FALSE; - FASTBOOL bCase29=aBewR1.Right()>aBewR2.Left(); + bool bCase29Direct = false; + bool bCase29=aBewR1.Right()>aBewR2.Left(); if (aBndR1.Right()<=aBndR2.Left()) { // Fall 2.9 und keine Boundrectueberschneidung if ((aPt1.Y()>aBewareRect2.Top() && aPt1.Y()<aBewareRect2.Bottom()) || (aPt2.Y()>aBewareRect1.Top() && aPt2.Y()<aBewareRect1.Bottom())) { - bCase29Direct=TRUE; + bCase29Direct = true; } } if (!bCase29Direct) { - FASTBOOL bObenLang=Abs(nYMin-aMeeting.Y())<=Abs(nYMax-aMeeting.Y()); + bool bObenLang=Abs(nYMin-aMeeting.Y())<=Abs(nYMax-aMeeting.Y()); if (bObenLang) { aMeeting.Y()=nYMin; } else { aMeeting.Y()=nYMax; } - bMeetingYMid=FALSE; + bMeetingYMid = false; if (bCase29) { // und nun noch dafuer sorgen, dass das // umzingelte Obj nicht durchquert wird @@ -1043,7 +1040,7 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec } else { aMeeting.X()=aBewR1.Left(); } - bMeetingXMid=FALSE; + bMeetingXMid = false; } } else { // Direkte Verbindung (3-Linien Z-Verbindung), da @@ -1079,22 +1076,22 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec // Ueberschneidung der BewareRects ohne Ueberschneidung der // Boundrects wenn die Linienaustritte sonst das BewareRect // des jeweils anderen Objekts verletzen wuerden. - FASTBOOL bCase29Direct=FALSE; - FASTBOOL bCase29=aBewR1.Bottom()>aBewR2.Top(); + bool bCase29Direct = false; + bool bCase29=aBewR1.Bottom()>aBewR2.Top(); if (aBndR1.Bottom()<=aBndR2.Top()) { // Fall 2.9 und keine Boundrectueberschneidung if ((aPt1.X()>aBewareRect2.Left() && aPt1.X()<aBewareRect2.Right()) || (aPt2.X()>aBewareRect1.Left() && aPt2.X()<aBewareRect1.Right())) { - bCase29Direct=TRUE; + bCase29Direct = true; } } if (!bCase29Direct) { - FASTBOOL bLinksLang=Abs(nXMin-aMeeting.X())<=Abs(nXMax-aMeeting.X()); + bool bLinksLang=Abs(nXMin-aMeeting.X())<=Abs(nXMax-aMeeting.X()); if (bLinksLang) { aMeeting.X()=nXMin; } else { aMeeting.X()=nXMax; } - bMeetingXMid=FALSE; + bMeetingXMid = false; if (bCase29) { // und nun noch dafuer sorgen, dass das // umzingelte Obj nicht durchquert wird @@ -1103,7 +1100,7 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec } else { aMeeting.Y()=aBewR1.Top(); } - bMeetingYMid=FALSE; + bMeetingYMid = false; } } else { // Direkte Verbindung (3-Linien Z-Verbindung), da @@ -1174,9 +1171,9 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec (((bRts2 && aTmpR2.Right ()<=aPt1.X()) || (bLks2 && aTmpR2.Left()>=aPt1.X())) && ((bUnt1 && aTmpR1.Bottom()<=aPt2.Y()) || (bObn1 && aTmpR1.Top ()>=aPt2.Y())))) { // Fall 3.2 trifft zu: Verbindung mit lediglich 2 Linien - bForceMeeting=TRUE; - bMeetingXMid=FALSE; - bMeetingYMid=FALSE; + bForceMeeting = true; + bMeetingXMid = false; + bMeetingYMid = false; if (bHor1) { aMeeting.X()=aPt2.X(); aMeeting.Y()=aPt1.Y(); @@ -1196,11 +1193,11 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec ((bUnt1 && aBewareRect1.Bottom()>aBewareRect2.Top ()) || (bObn1 && aBewareRect1.Top ()<aBewareRect2.Bottom())))) { // Fall 3.3 - bForceMeeting=TRUE; - if (bRts1 || bRts2) { aMeeting.X()=nXMax; bMeetingXMid=FALSE; } - if (bLks1 || bLks2) { aMeeting.X()=nXMin; bMeetingXMid=FALSE; } - if (bUnt1 || bUnt2) { aMeeting.Y()=nYMax; bMeetingYMid=FALSE; } - if (bObn1 || bObn2) { aMeeting.Y()=nYMin; bMeetingYMid=FALSE; } + bForceMeeting = true; + if (bRts1 || bRts2) { aMeeting.X()=nXMax; bMeetingXMid = false; } + if (bLks1 || bLks2) { aMeeting.X()=nXMin; bMeetingXMid = false; } + if (bUnt1 || bUnt2) { aMeeting.Y()=nYMax; bMeetingYMid = false; } + if (bObn1 || bObn2) { aMeeting.Y()=nYMin; bMeetingYMid = false; } } } } @@ -1215,15 +1212,15 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec } Point aEP1(aXP1[nXP1Anz-1]); Point aEP2(aXP2[nXP2Anz-1]); - FASTBOOL bInsMeetingPoint=aEP1.X()!=aEP2.X() && aEP1.Y()!=aEP2.Y(); - FASTBOOL bHorzE1=aEP1.Y()==aXP1[nXP1Anz-2].Y(); // letzte Linie von XP1 horizontal? - FASTBOOL bHorzE2=aEP2.Y()==aXP2[nXP2Anz-2].Y(); // letzte Linie von XP2 horizontal? + bool bInsMeetingPoint=aEP1.X()!=aEP2.X() && aEP1.Y()!=aEP2.Y(); + bool bHorzE1=aEP1.Y()==aXP1[nXP1Anz-2].Y(); // letzte Linie von XP1 horizontal? + bool bHorzE2=aEP2.Y()==aXP2[nXP2Anz-2].Y(); // letzte Linie von XP2 horizontal? if (aEP1==aEP2 && (bHorzE1 && bHorzE2 && aEP1.Y()==aEP2.Y()) || (!bHorzE1 && !bHorzE2 && aEP1.X()==aEP2.X())) { // Sonderbehandlung fuer 'I'-Verbinder nXP1Anz--; aXP1.Remove(nXP1Anz,1); nXP2Anz--; aXP2.Remove(nXP2Anz,1); - bMeetingXMid=FALSE; - bMeetingYMid=FALSE; + bMeetingXMid = false; + bMeetingYMid = false; } if (bInsMeetingPoint) { aXP1.Insert(XPOLY_APPEND,aMeeting,XPOLY_NORMAL); @@ -1303,12 +1300,12 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec if (pnQuality!=NULL) { ULONG nQual=0; ULONG nQual0=nQual; // Ueberlaeufe vorbeugen - FASTBOOL bOverflow=FALSE; + bool bOverflow = false; Point aPt0(aXP1[0]); for (USHORT nPntNum=1; nPntNum<nPntAnz; nPntNum++) { Point aPt1b(aXP1[nPntNum]); nQual+=Abs(aPt1b.X()-aPt0.X())+Abs(aPt1b.Y()-aPt0.Y()); - if (nQual<nQual0) bOverflow=TRUE; + if (nQual<nQual0) bOverflow = true; nQual0=nQual; aPt0=aPt1b; } @@ -1332,7 +1329,7 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec if (nTmp>=3) { nQual0=nQual; nQual+=(ULONG)nTmp*0x01000000; - if (nQual<nQual0 || nTmp>15) bOverflow=TRUE; + if (nQual<nQual0 || nTmp>15) bOverflow = true; } if (nPntAnz>=2) { // Austrittswinkel nochmal pruefen Point aP1(aXP1[1]); aP1-=aXP1[0]; @@ -1353,9 +1350,9 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec for (USHORT i=0; i<nPntAnz; i++) { Point aPt1b(aXP1[i]); - FASTBOOL b1=aPt1b.X()>aBewareRect1.Left() && aPt1b.X()<aBewareRect1.Right() && + bool b1=aPt1b.X()>aBewareRect1.Left() && aPt1b.X()<aBewareRect1.Right() && aPt1b.Y()>aBewareRect1.Top() && aPt1b.Y()<aBewareRect1.Bottom(); - FASTBOOL b2=aPt1b.X()>aBewareRect2.Left() && aPt1b.X()<aBewareRect2.Right() && + bool b2=aPt1b.X()>aBewareRect2.Left() && aPt1b.X()<aBewareRect2.Right() && aPt1b.Y()>aBewareRect2.Top() && aPt1b.Y()<aBewareRect2.Bottom(); USHORT nInt0=nIntersections; if (i==0 || i==nPntAnz-1) { @@ -1387,7 +1384,7 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec if (nPntAnz<=1) nIntersections++; nQual0=nQual; nQual+=(ULONG)nIntersections*0x10000000; - if (nQual<nQual0 || nIntersections>15) bOverflow=TRUE; + if (nQual<nQual0 || nIntersections>15) bOverflow = true; if (bOverflow || nQual==0xFFFFFFFF) nQual=0xFFFFFFFE; *pnQuality=nQual; @@ -1553,10 +1550,10 @@ void __EXPORT SdrEdgeObj::Notify(SfxBroadcaster& rBC, const SfxHint& rHint) { SfxSimpleHint* pSimple=PTR_CAST(SfxSimpleHint,&rHint); ULONG nId=pSimple==0 ? 0 : pSimple->GetId(); - FASTBOOL bDataChg=nId==SFX_HINT_DATACHANGED; - FASTBOOL bDying=nId==SFX_HINT_DYING; - FASTBOOL bObj1=aCon1.pObj!=NULL && aCon1.pObj->GetBroadcaster()==&rBC; - FASTBOOL bObj2=aCon2.pObj!=NULL && aCon2.pObj->GetBroadcaster()==&rBC; + bool bDataChg=nId==SFX_HINT_DATACHANGED; + bool bDying=nId==SFX_HINT_DYING; + bool bObj1=aCon1.pObj!=NULL && aCon1.pObj->GetBroadcaster()==&rBC; + bool bObj2=aCon2.pObj!=NULL && aCon2.pObj->GetBroadcaster()==&rBC; if (bDying && (bObj1 || bObj2)) { // #35605# Dying vorher abfangen, damit AttrObj nicht // wg. vermeintlicher Vorlagenaenderung rumbroadcastet @@ -2004,7 +2001,7 @@ basegfx::B2DPolygon SdrEdgeObj::ImplAddConnectorOverlay(SdrDragMethod& rDragMeth return aResult; } -FASTBOOL SdrEdgeObj::BegCreate(SdrDragStat& rDragStat) +bool SdrEdgeObj::BegCreate(SdrDragStat& rDragStat) { rDragStat.SetNoSnap(TRUE); pEdgeTrack->SetPointCount(2); @@ -2018,7 +2015,7 @@ FASTBOOL SdrEdgeObj::BegCreate(SdrDragStat& rDragStat) return TRUE; } -FASTBOOL SdrEdgeObj::MovCreate(SdrDragStat& rDragStat) +bool SdrEdgeObj::MovCreate(SdrDragStat& rDragStat) { USHORT nMax=pEdgeTrack->GetPointCount(); (*pEdgeTrack)[nMax-1]=rDragStat.GetNow(); @@ -2034,9 +2031,9 @@ FASTBOOL SdrEdgeObj::MovCreate(SdrDragStat& rDragStat) return TRUE; } -FASTBOOL SdrEdgeObj::EndCreate(SdrDragStat& rDragStat, SdrCreateCmd eCmd) +bool SdrEdgeObj::EndCreate(SdrDragStat& rDragStat, SdrCreateCmd eCmd) { - FASTBOOL bOk=(eCmd==SDRCREATE_FORCEEND || rDragStat.GetPointAnz()>=2); + bool bOk=(eCmd==SDRCREATE_FORCEEND || rDragStat.GetPointAnz()>=2); if (bOk) { ConnectToNode(TRUE,aCon1.pObj); ConnectToNode(FALSE,aCon2.pObj); @@ -2049,7 +2046,7 @@ FASTBOOL SdrEdgeObj::EndCreate(SdrDragStat& rDragStat, SdrCreateCmd eCmd) return bOk; } -FASTBOOL SdrEdgeObj::BckCreate(SdrDragStat& rDragStat) +bool SdrEdgeObj::BckCreate(SdrDragStat& rDragStat) { if (rDragStat.GetView()!=NULL) { rDragStat.GetView()->HideConnectMarker(); @@ -2076,7 +2073,7 @@ Pointer SdrEdgeObj::GetCreatePointer() const return Pointer(POINTER_DRAW_CONNECT); } -FASTBOOL SdrEdgeObj::ImpFindConnector(const Point& rPt, const SdrPageView& rPV, SdrObjConnection& rCon, const SdrEdgeObj* pThis, OutputDevice* pOut) +bool SdrEdgeObj::ImpFindConnector(const Point& rPt, const SdrPageView& rPV, SdrObjConnection& rCon, const SdrEdgeObj* pThis, OutputDevice* pOut) { rCon.ResetVars(); if (pOut==NULL) pOut=rPV.GetView().GetFirstOutputDevice(); // GetWin(0); @@ -2095,11 +2092,11 @@ FASTBOOL SdrEdgeObj::ImpFindConnector(const Point& rPt, const SdrPageView& rPV, aMouseRect.Bottom()+=aHalfConSiz.Height(); USHORT nBoundHitTol=(USHORT)aHalfConSiz.Width()/2; if (nBoundHitTol==0) nBoundHitTol=1; ULONG no=pOL->GetObjCount(); - FASTBOOL bFnd=FALSE; + bool bFnd = false; SdrObjConnection aTestCon; SdrObjConnection aBestCon; - FASTBOOL bTestBoundHit=FALSE; - //FASTBOOL bBestBoundHit=FALSE; + bool bTestBoundHit = false; + //bool bBestBoundHit=FALSE; while (no>0 && !bFnd) { // Problem: Gruppenobjekt mit verschiedenen Layern liefert LayerID 0 !!!! @@ -2112,43 +2109,43 @@ FASTBOOL SdrEdgeObj::ImpFindConnector(const Point& rPt, const SdrPageView& rPV, Rectangle aObjBound(pObj->GetCurrentBoundRect()); if (aObjBound.IsOver(aMouseRect)) { aTestCon.ResetVars(); - bTestBoundHit=FALSE; - FASTBOOL bEdge=HAS_BASE(SdrEdgeObj,pObj); // kein BestCon fuer Edge + bTestBoundHit = false; + bool bEdge=HAS_BASE(SdrEdgeObj,pObj); // kein BestCon fuer Edge // Die Userdefined Konnektoren haben absolute Prioritaet. // Danach kommt Vertex, Corner und Mitte(Best) gleich priorisiert. // Zum Schluss kommt noch ein HitTest aufs Obj. const SdrGluePointList* pGPL=pObj->GetGluePointList(); USHORT nConAnz=pGPL==NULL ? 0 : pGPL->GetCount(); USHORT nGesAnz=nConAnz+9; - FASTBOOL bUserFnd=FALSE; + bool bUserFnd = false; ULONG nBestDist=0xFFFFFFFF; for (USHORT i=0; i<nGesAnz; i++) { - FASTBOOL bUser=i<nConAnz; - FASTBOOL bVertex=i>=nConAnz+0 && i<nConAnz+4; - FASTBOOL bCorner=i>=nConAnz+4 && i<nConAnz+8; - FASTBOOL bCenter=i==nConAnz+8; - FASTBOOL bOk=FALSE; + bool bUser=i<nConAnz; + bool bVertex=i>=nConAnz+0 && i<nConAnz+4; + bool bCorner=i>=nConAnz+4 && i<nConAnz+8; + bool bCenter=i==nConAnz+8; + bool bOk = false; Point aConPos; USHORT nConNum=i; if (bUser) { const SdrGluePoint& rGP=(*pGPL)[nConNum]; aConPos=rGP.GetAbsolutePos(*pObj); nConNum=rGP.GetId(); - bOk=TRUE; + bOk = true; } else if (bVertex && !bUserFnd) { nConNum=nConNum-nConAnz; if (rPV.GetView().IsAutoVertexConnectors()) { SdrGluePoint aPt(pObj->GetVertexGluePoint(nConNum)); aConPos=aPt.GetAbsolutePos(*pObj); - bOk=TRUE; + bOk = true; } else i+=3; } else if (bCorner && !bUserFnd) { nConNum-=nConAnz+4; if (rPV.GetView().IsAutoCornerConnectors()) { SdrGluePoint aPt(pObj->GetCornerGluePoint(nConNum)); aConPos=aPt.GetAbsolutePos(*pObj); - bOk=TRUE; + bOk = true; } else i+=3; } else if (bCenter && !bUserFnd && !bEdge) @@ -2160,12 +2157,12 @@ FASTBOOL SdrEdgeObj::ImpFindConnector(const Point& rPt, const SdrPageView& rPV, // Edges nicht! nConNum=0; aConPos=aObjBound.Center(); - bOk=TRUE; + bOk = true; } } if (bOk && aMouseRect.IsInside(aConPos)) { - if (bUser) bUserFnd=TRUE; - bFnd=TRUE; + if (bUser) bUserFnd = true; + bFnd = true; ULONG nDist=(ULONG)Abs(aConPos.X()-rPt.X())+(ULONG)Abs(aConPos.Y()-rPt.Y()); if (nDist<nBestDist) { nBestDist=nDist; @@ -2188,7 +2185,7 @@ FASTBOOL SdrEdgeObj::ImpFindConnector(const Point& rPt, const SdrPageView& rPV, // Suppress default connect at object inside bound if(!pThis || !pThis->GetSuppressDefaultConnect()) { - bFnd=TRUE; + bFnd = true; aTestCon.pObj=pObj; aTestCon.bBestConn=TRUE; } diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx index d1f65c30050d..fd3450f1f5af 100644 --- a/svx/source/svdraw/svdograf.cxx +++ b/svx/source/svdraw/svdograf.cxx @@ -342,9 +342,9 @@ Graphic SdrGrafObj::GetTransformedGraphic( ULONG nTransformFlags ) const if( bMirror ) { - USHORT nMirrorCase = ( aGeo.nDrehWink == 18000 ) ? ( bMirrored ? 3 : 4 ) : ( bMirrored ? 2 : 1 ); - FASTBOOL bHMirr = nMirrorCase == 2 || nMirrorCase == 4; - FASTBOOL bVMirr = nMirrorCase == 3 || nMirrorCase == 4; + USHORT nMirrorCase = ( aGeo.nDrehWink == 18000 ) ? ( bMirrored ? 3 : 4 ) : ( bMirrored ? 2 : 1 ); + bool bHMirr = nMirrorCase == 2 || nMirrorCase == 4; + bool bVMirr = nMirrorCase == 3 || nMirrorCase == 4; aActAttr.SetMirrorFlags( ( bHMirr ? BMP_MIRROR_HORZ : 0 ) | ( bVMirr ? BMP_MIRROR_VERT : 0 ) ); } @@ -525,8 +525,8 @@ void SdrGrafObj::ReleaseGraphicLink() void SdrGrafObj::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const { - FASTBOOL bAnim = pGraphic->IsAnimated(); - FASTBOOL bNoPresGrf = ( pGraphic->GetType() != GRAPHIC_NONE ) && !bEmptyPresObj; + bool bAnim = pGraphic->IsAnimated(); + bool bNoPresGrf = ( pGraphic->GetType() != GRAPHIC_NONE ) && !bEmptyPresObj; rInfo.bResizeFreeAllowed = aGeo.nDrehWink % 9000 == 0 || aGeo.nDrehWink % 18000 == 0 || @@ -740,8 +740,8 @@ void SdrGrafObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fract { SdrRectObj::NbcResize( rRef, xFact, yFact ); - FASTBOOL bMirrX = xFact.GetNumerator() < 0; - FASTBOOL bMirrY = yFact.GetNumerator() < 0; + bool bMirrX = xFact.GetNumerator() < 0; + bool bMirrY = yFact.GetNumerator() < 0; if( bMirrX != bMirrY ) bMirrored = !bMirrored; @@ -764,7 +764,7 @@ void SdrGrafObj::NbcMirror(const Point& rRef1, const Point& rRef2) // ----------------------------------------------------------------------------- -void SdrGrafObj::NbcShear(const Point& rRef, long nWink, double tn, FASTBOOL bVShear) +void SdrGrafObj::NbcShear(const Point& rRef, long nWink, double tn, bool bVShear) { SdrRectObj::NbcRotate( rRef, nWink, tn, bVShear ); } @@ -780,7 +780,7 @@ void SdrGrafObj::NbcSetSnapRect(const Rectangle& rRect) void SdrGrafObj::NbcSetLogicRect( const Rectangle& rRect) { - //FASTBOOL bChg=rRect.GetSize()!=aRect.GetSize(); + //bool bChg=rRect.GetSize()!=aRect.GetSize(); SdrRectObj::NbcSetLogicRect(rRect); } @@ -806,7 +806,7 @@ void SdrGrafObj::RestGeoData(const SdrObjGeoData& rGeo) { //long nDrehMerk = aGeo.nDrehWink; //long nShearMerk = aGeo.nShearWink; - //FASTBOOL bMirrMerk = bMirrored; + //bool bMirrMerk = bMirrored; Size aSizMerk( aRect.GetSize() ); SdrRectObj::RestGeoData(rGeo); @@ -818,8 +818,8 @@ void SdrGrafObj::RestGeoData(const SdrObjGeoData& rGeo) void SdrGrafObj::SetPage( SdrPage* pNewPage ) { - FASTBOOL bRemove = pNewPage == NULL && pPage != NULL; - FASTBOOL bInsert = pNewPage != NULL && pPage == NULL; + bool bRemove = pNewPage == NULL && pPage != NULL; + bool bInsert = pNewPage != NULL && pPage == NULL; if( bRemove ) { @@ -841,7 +841,7 @@ void SdrGrafObj::SetPage( SdrPage* pNewPage ) void SdrGrafObj::SetModel( SdrModel* pNewModel ) { - FASTBOOL bChg = pNewModel != pModel; + bool bChg = pNewModel != pModel; if( bChg ) { @@ -882,7 +882,7 @@ void SdrGrafObj::StopAnimation(OutputDevice* /*pOutDev*/, long /*nExtraData*/) // ----------------------------------------------------------------------------- -FASTBOOL SdrGrafObj::HasGDIMetaFile() const +bool SdrGrafObj::HasGDIMetaFile() const { return( pGraphic->GetType() == GRAPHIC_GDIMETAFILE ); } diff --git a/svx/source/svdraw/svdogrp.cxx b/svx/source/svdraw/svdogrp.cxx index 4060369f8016..da0ffa26386b 100644 --- a/svx/source/svdraw/svdogrp.cxx +++ b/svx/source/svdraw/svdogrp.cxx @@ -177,13 +177,13 @@ UINT16 SdrObjGroup::GetObjIdentifier() const SdrLayerID SdrObjGroup::GetLayer() const { - FASTBOOL b1st=TRUE; + bool b1st = true; SdrLayerID nLay=SdrLayerID(SdrObject::GetLayer()); SdrObjList* pOL=pSub; ULONG nObjAnz=pOL->GetObjCount(); for (ULONG i=0; i<nObjAnz; i++) { SdrLayerID nLay1=pOL->GetObj(i)->GetLayer(); - if (b1st) { nLay=nLay1; b1st=FALSE; } + if (b1st) { nLay=nLay1; b1st = false; } else if (nLay1!=nLay) return 0; } return nLay; @@ -245,7 +245,7 @@ void SdrObjGroup::SetModel(SdrModel* pNewModel) } -FASTBOOL SdrObjGroup::HasRefPoint() const +bool SdrObjGroup::HasRefPoint() const { return bRefPoint; } @@ -385,7 +385,7 @@ bool SdrObjGroup::beginSpecialDrag(SdrDragStat& /*rDrag*/) const } -FASTBOOL SdrObjGroup::BegCreate(SdrDragStat& /*rStat*/) +bool SdrObjGroup::BegCreate(SdrDragStat& /*rStat*/) { return FALSE; } @@ -397,7 +397,7 @@ long SdrObjGroup::GetRotateAngle() const } -long SdrObjGroup::GetShearAngle(FASTBOOL /*bVertical*/) const +long SdrObjGroup::GetShearAngle(bool /*bVertical*/) const { return nShearWink; } @@ -448,8 +448,8 @@ void SdrObjGroup::NbcMove(const Size& rSiz) void SdrObjGroup::NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) { - FASTBOOL bXMirr=(xFact.GetNumerator()<0) != (xFact.GetDenominator()<0); - FASTBOOL bYMirr=(yFact.GetNumerator()<0) != (yFact.GetDenominator()<0); + bool bXMirr=(xFact.GetNumerator()<0) != (xFact.GetDenominator()<0); + bool bYMirr=(yFact.GetNumerator()<0) != (yFact.GetDenominator()<0); if (bXMirr || bYMirr) { Point aRef1(GetSnapRect().Center()); if (bXMirr) { @@ -509,7 +509,7 @@ void SdrObjGroup::NbcMirror(const Point& rRef1, const Point& rRef2) } -void SdrObjGroup::NbcShear(const Point& rRef, long nWink, double tn, FASTBOOL bVShear) +void SdrObjGroup::NbcShear(const Point& rRef, long nWink, double tn, bool bVShear) { SetGlueReallyAbsolute(TRUE); nShearWink+=nWink; @@ -604,8 +604,8 @@ void SdrObjGroup::Move(const Size& rSiz) void SdrObjGroup::Resize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) { if (xFact.GetNumerator()!=xFact.GetDenominator() || yFact.GetNumerator()!=yFact.GetDenominator()) { - FASTBOOL bXMirr=(xFact.GetNumerator()<0) != (xFact.GetDenominator()<0); - FASTBOOL bYMirr=(yFact.GetNumerator()<0) != (yFact.GetDenominator()<0); + bool bXMirr=(xFact.GetNumerator()<0) != (xFact.GetDenominator()<0); + bool bYMirr=(yFact.GetNumerator()<0) != (yFact.GetDenominator()<0); if (bXMirr || bYMirr) { Point aRef1(GetSnapRect().Center()); if (bXMirr) { @@ -700,7 +700,7 @@ void SdrObjGroup::Mirror(const Point& rRef1, const Point& rRef2) } -void SdrObjGroup::Shear(const Point& rRef, long nWink, double tn, FASTBOOL bVShear) +void SdrObjGroup::Shear(const Point& rRef, long nWink, double tn, bool bVShear) { if (nWink!=0) { SetGlueReallyAbsolute(TRUE); @@ -731,7 +731,7 @@ void SdrObjGroup::Shear(const Point& rRef, long nWink, double tn, FASTBOOL bVShe void SdrObjGroup::SetAnchorPos(const Point& rPnt) { Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetLastBoundRect(); - FASTBOOL bChg=aAnchor!=rPnt; + bool bChg=aAnchor!=rPnt; aAnchor=rPnt; Size aSiz(rPnt.X()-aAnchor.X(),rPnt.Y()-aAnchor.Y()); MovePoint(aRefPoint,aSiz); diff --git a/svx/source/svdraw/svdomeas.cxx b/svx/source/svdraw/svdomeas.cxx index 2bcf016d0e4a..b001a55d0aca 100644 --- a/svx/source/svdraw/svdomeas.cxx +++ b/svx/source/svdraw/svdomeas.cxx @@ -275,17 +275,17 @@ struct ImpMeasureRec : public SdrDragStatUserData long nHelplineDist; long nHelpline1Len; long nHelpline2Len; - FASTBOOL bBelowRefEdge; - FASTBOOL bTextRota90; - FASTBOOL bTextUpsideDown; + bool bBelowRefEdge; + bool bTextRota90; + bool bTextUpsideDown; long nMeasureOverhang; FieldUnit eMeasureUnit; Fraction aMeasureScale; - FASTBOOL bShowUnit; + bool bShowUnit; String aFormatString; - FASTBOOL bTextAutoAngle; + bool bTextAutoAngle; long nTextAutoAngleView; - FASTBOOL bTextIsFixedAngle; + bool bTextIsFixedAngle; long nTextFixedAngle; }; @@ -321,11 +321,11 @@ struct ImpMeasurePoly long nArrow1Wdt; // Breite des 1. Pfeils long nArrow2Wdt; // Breite des 2. Pfeils long nShortLineLen; // Linienlaenge, wenn PfeileAussen - FASTBOOL bArrow1Center; // Pfeil 1 zentriert? - FASTBOOL bArrow2Center; // Pfeil 2 zentriert? - FASTBOOL bAutoUpsideDown; // UpsideDown durch Automatik - FASTBOOL bPfeileAussen; - FASTBOOL bBreakedLine; + bool bArrow1Center; // Pfeil 1 zentriert? + bool bArrow2Center; // Pfeil 2 zentriert? + bool bAutoUpsideDown; // UpsideDown durch Automatik + bool bPfeileAussen; + bool bBreakedLine; }; void SdrMeasureObj::ImpTakeAttr(ImpMeasureRec& rRec) const @@ -389,7 +389,7 @@ void SdrMeasureObj::ImpCalcGeometrics(const ImpMeasureRec& rRec, ImpMeasurePoly& rPol.nArrow2Wdt=0; long nArrowNeed=0; long nShortLen=0; - FASTBOOL bPfeileAussen=FALSE; + bool bPfeileAussen = false; const SfxItemSet& rSet = GetObjectItemSet(); sal_Int32 nLineWdt = ((XLineWidthItem&)(rSet.Get(XATTR_LINEWIDTH))).GetValue(); // Strichstaerke @@ -413,13 +413,13 @@ void SdrMeasureObj::ImpCalcGeometrics(const ImpMeasureRec& rRec, ImpMeasurePoly& // nArrowLen ist bei bCenter bereits halbiert // Bei 2 Pfeilen a 4mm ist unter 10mm Schluss. nArrowNeed=nArrow1Len+nArrow2Len+(nArrow1Wdt+nArrow2Wdt)/2; - if (rPol.nLineLen<nArrowNeed) bPfeileAussen=TRUE; + if (rPol.nLineLen<nArrowNeed) bPfeileAussen = true; nShortLen=(nArrow1Len+nArrow1Wdt + nArrow2Len+nArrow2Wdt) /2; rPol.eUsedTextHPos=rRec.eWantTextHPos; rPol.eUsedTextVPos=rRec.eWantTextVPos; if (rPol.eUsedTextVPos==SDRMEASURE_TEXTVAUTO) rPol.eUsedTextVPos=SDRMEASURE_ABOVE; - FASTBOOL bBrkLine=rPol.eUsedTextVPos==SDRMEASURETEXT_BREAKEDLINE; + bool bBrkLine=rPol.eUsedTextVPos==SDRMEASURETEXT_BREAKEDLINE; if (rPol.eUsedTextVPos==SDRMEASURETEXT_VERTICALCENTERED) { OutlinerParaObject* pOutlinerParaObject = SdrTextObj::GetOutlinerParaObject(); @@ -430,18 +430,18 @@ void SdrMeasureObj::ImpCalcGeometrics(const ImpMeasureRec& rRec, ImpMeasurePoly& } rPol.bBreakedLine=bBrkLine; if (rPol.eUsedTextHPos==SDRMEASURE_TEXTHAUTO) { // bei zu breitem Text diesen eventuell nach aussen schieben - FASTBOOL bOutside=FALSE; + bool bOutside = false; long nNeedSiz=!rRec.bTextRota90 ? rPol.aTextSize.Width() : rPol.aTextSize.Height(); - if (nNeedSiz>rPol.nLineLen) bOutside=TRUE; // Text passt nicht in die Mitte + if (nNeedSiz>rPol.nLineLen) bOutside = true; // Text passt nicht in die Mitte if (bBrkLine) { - if (nNeedSiz+nArrowNeed>rPol.nLineLen) bPfeileAussen=TRUE; // Text passt in die Mitte, wenn die Pfeile nach aussen kommen + if (nNeedSiz+nArrowNeed>rPol.nLineLen) bPfeileAussen = true; // Text passt in die Mitte, wenn die Pfeile nach aussen kommen } else { long nSmallNeed=nArrow1Len+nArrow2Len+(nArrow1Wdt+nArrow2Wdt)/2/4; - if (nNeedSiz+nSmallNeed>rPol.nLineLen) bPfeileAussen=TRUE; // Text passt in die Mitte, wenn die Pfeile nach aussen kommen + if (nNeedSiz+nSmallNeed>rPol.nLineLen) bPfeileAussen = true; // Text passt in die Mitte, wenn die Pfeile nach aussen kommen } rPol.eUsedTextHPos=bOutside ? SDRMEASURE_TEXTLEFTOUTSIDE : SDRMEASURE_TEXTINSIDE; } - if (rPol.eUsedTextHPos!=SDRMEASURE_TEXTINSIDE) bPfeileAussen=TRUE; + if (rPol.eUsedTextHPos!=SDRMEASURE_TEXTINSIDE) bPfeileAussen = true; rPol.nArrow1Wdt=nArrow1Wdt; rPol.nArrow2Wdt=nArrow2Wdt; rPol.nShortLineLen=nShortLen; @@ -581,8 +581,8 @@ basegfx::B2DPolyPolygon SdrMeasureObj::ImpCalcXPoly(const ImpMeasurePoly& rPol) return aRetval; } -FASTBOOL SdrMeasureObj::CalcFieldValue(const SvxFieldItem& rField, USHORT nPara, USHORT nPos, - FASTBOOL bEdit, +bool SdrMeasureObj::CalcFieldValue(const SvxFieldItem& rField, USHORT nPara, USHORT nPos, + bool bEdit, Color*& rpTxtColor, Color*& rpFldColor, XubString& rRet) const { const SvxFieldData* pField=rField.GetField(); @@ -667,9 +667,9 @@ void SdrMeasureObj::TakeUnrotatedSnapRect(Rectangle& rRect) const } Point aTextPos; - FASTBOOL bRota90=aRec.bTextRota90; - FASTBOOL bUpsideDown=aRec.bTextUpsideDown!=aMPol.bAutoUpsideDown; - FASTBOOL bBelowRefEdge=aRec.bBelowRefEdge; + bool bRota90=aRec.bTextRota90; + bool bUpsideDown=aRec.bTextUpsideDown!=aMPol.bAutoUpsideDown; + bool bBelowRefEdge=aRec.bBelowRefEdge; SdrMeasureTextHPos eMH=aMPol.eUsedTextHPos; SdrMeasureTextVPos eMV=aMPol.eUsedTextVPos; if (!bRota90) { @@ -910,9 +910,9 @@ void SdrMeasureObj::ImpEvalDrag(ImpMeasureRec& rRec, const SdrDragStat& rDrag) c const SdrHdl* pHdl=rDrag.GetHdl(); sal_uInt32 nHdlNum(pHdl->GetObjHdlNum()); - FASTBOOL bOrtho=rDrag.GetView()!=NULL && rDrag.GetView()->IsOrtho(); - FASTBOOL bBigOrtho=bOrtho && rDrag.GetView()->IsBigOrtho(); - FASTBOOL bBelow=rRec.bBelowRefEdge; + bool bOrtho=rDrag.GetView()!=NULL && rDrag.GetView()->IsOrtho(); + bool bBigOrtho=bOrtho && rDrag.GetView()->IsBigOrtho(); + bool bBelow=rRec.bBelowRefEdge; Point aPt(rDrag.GetNow()); switch (nHdlNum) { @@ -929,22 +929,22 @@ void SdrMeasureObj::ImpEvalDrag(ImpMeasureRec& rRec, const SdrDragStat& rDrag) c if (bOrtho) rRec.nHelpline1Len=rRec.nHelpline2Len; } break; case 2: case 3: { - FASTBOOL bAnf=nHdlNum==2; + bool bAnf=nHdlNum==2; Point& rMov=bAnf ? rRec.aPt1 : rRec.aPt2; Point aMov(rMov); Point aFix(bAnf ? rRec.aPt2 : rRec.aPt1); if (bOrtho) { long ndx0=aMov.X()-aFix.X(); long ndy0=aMov.Y()-aFix.Y(); - FASTBOOL bHLin=ndy0==0; - FASTBOOL bVLin=ndx0==0; + bool bHLin=ndy0==0; + bool bVLin=ndx0==0; if (!bHLin || !bVLin) { // sonst ist aPt1==aPt2 long ndx=aPt.X()-aFix.X(); long ndy=aPt.Y()-aFix.Y(); double nXFact=0; if (!bVLin) nXFact=(double)ndx/(double)ndx0; double nYFact=0; if (!bHLin) nYFact=(double)ndy/(double)ndy0; - FASTBOOL bHor=bHLin || (!bVLin && (nXFact>nYFact) ==bBigOrtho); - FASTBOOL bVer=bVLin || (!bHLin && (nXFact<=nYFact)==bBigOrtho); + bool bHor=bHLin || (!bVLin && (nXFact>nYFact) ==bBigOrtho); + bool bVer=bVLin || (!bHLin && (nXFact<=nYFact)==bBigOrtho); if (bHor) ndy=long(ndy0*nXFact); if (bVer) ndx=long(ndx0*nYFact); aPt=aFix; @@ -971,7 +971,7 @@ void SdrMeasureObj::ImpEvalDrag(ImpMeasureRec& rRec, const SdrDragStat& rDrag) c //////////////////////////////////////////////////////////////////////////////////////////////////// -FASTBOOL SdrMeasureObj::BegCreate(SdrDragStat& rStat) +bool SdrMeasureObj::BegCreate(SdrDragStat& rStat) { rStat.SetOrtho8Possible(); aPt1=rStat.GetStart(); @@ -980,7 +980,7 @@ FASTBOOL SdrMeasureObj::BegCreate(SdrDragStat& rStat) return TRUE; } -FASTBOOL SdrMeasureObj::MovCreate(SdrDragStat& rStat) +bool SdrMeasureObj::MovCreate(SdrDragStat& rStat) { SdrView* pView=rStat.GetView(); aPt1=rStat.GetStart(); @@ -995,16 +995,16 @@ FASTBOOL SdrMeasureObj::MovCreate(SdrDragStat& rStat) return TRUE; } -FASTBOOL SdrMeasureObj::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) +bool SdrMeasureObj::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) { SetTextDirty(); SetRectsDirty(); return (eCmd==SDRCREATE_FORCEEND || rStat.GetPointAnz()>=2); } -FASTBOOL SdrMeasureObj::BckCreate(SdrDragStat& /*rStat*/) +bool SdrMeasureObj::BckCreate(SdrDragStat& /*rStat*/) { - return FALSE; + return false; } void SdrMeasureObj::BrkCreate(SdrDragStat& /*rStat*/) @@ -1073,7 +1073,7 @@ void SdrMeasureObj::NbcMirror(const Point& rRef1, const Point& rRef2) SetRectsDirty(); } -void SdrMeasureObj::NbcShear(const Point& rRef, long nWink, double tn, FASTBOOL bVShear) +void SdrMeasureObj::NbcShear(const Point& rRef, long nWink, double tn, bool bVShear) { SdrTextObj::NbcShear(rRef,nWink,tn,bVShear); ShearPoint(aPt1,rRef,tn,bVShear); @@ -1298,7 +1298,7 @@ void SdrMeasureObj::NbcSetOutlinerParaObject(OutlinerParaObject* pTextObject) SetTextDirty(); // Text neu berechnen! } -void SdrMeasureObj::TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRect, FASTBOOL bNoEditText, +void SdrMeasureObj::TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRect, bool bNoEditText, Rectangle* pAnchorRect, BOOL bLineWidth ) const { if (bTextDirty) UndirtyText(); @@ -1329,9 +1329,9 @@ USHORT SdrMeasureObj::GetOutlinerViewAnchorMode() const SdrTextVertAdjust eTV=GetTextVerticalAdjust(); SdrMeasureTextHPos eMH=aMPol.eUsedTextHPos; SdrMeasureTextVPos eMV=aMPol.eUsedTextVPos; - FASTBOOL bTextRota90=aRec.bTextRota90; - //FASTBOOL bTextUpsideDown=aRec.bTextUpsideDown; - FASTBOOL bBelowRefEdge=aRec.bBelowRefEdge; + bool bTextRota90=aRec.bTextRota90; + //bool bTextUpsideDown=aRec.bTextUpsideDown; + bool bBelowRefEdge=aRec.bBelowRefEdge; // bTextUpsideDown muss hier noch ausgewertet werden!!!! if (!bTextRota90) { diff --git a/svx/source/svdraw/svdomedia.cxx b/svx/source/svdraw/svdomedia.cxx index 9dd615490f9e..2dd4a112da30 100644 --- a/svx/source/svdraw/svdomedia.cxx +++ b/svx/source/svdraw/svdomedia.cxx @@ -63,9 +63,9 @@ SdrMediaObj::~SdrMediaObj() // ------------------------------------------------------------------------------ -FASTBOOL SdrMediaObj::HasTextEdit() const +bool SdrMediaObj::HasTextEdit() const { - return FALSE; + return false; } // ------------------------------------------------------------------------------ diff --git a/svx/source/svdraw/svdoole2.cxx b/svx/source/svdraw/svdoole2.cxx index 483c247c064f..5d5bda6359c2 100644 --- a/svx/source/svdraw/svdoole2.cxx +++ b/svx/source/svdraw/svdoole2.cxx @@ -752,7 +752,7 @@ sdr::contact::ViewContact* SdrOle2Obj::CreateObjectSpecificViewContact() TYPEINIT1(SdrOle2Obj,SdrRectObj); DBG_NAME(SdrOle2Obj) -SdrOle2Obj::SdrOle2Obj(FASTBOOL bFrame_) : m_bTypeAsked(false) +SdrOle2Obj::SdrOle2Obj(bool bFrame_) : m_bTypeAsked(false) ,m_bChart(false) { DBG_CTOR( SdrOle2Obj,NULL); @@ -762,7 +762,7 @@ SdrOle2Obj::SdrOle2Obj(FASTBOOL bFrame_) : m_bTypeAsked(false) } // ----------------------------------------------------------------------------- -SdrOle2Obj::SdrOle2Obj( const svt::EmbeddedObjectRef& rNewObjRef, FASTBOOL bFrame_) +SdrOle2Obj::SdrOle2Obj( const svt::EmbeddedObjectRef& rNewObjRef, bool bFrame_) : xObjRef( rNewObjRef ) , m_bTypeAsked(false) , m_bChart(false) @@ -783,7 +783,7 @@ SdrOle2Obj::SdrOle2Obj( const svt::EmbeddedObjectRef& rNewObjRef, FASTBOOL bFram // ----------------------------------------------------------------------------- -SdrOle2Obj::SdrOle2Obj( const svt::EmbeddedObjectRef& rNewObjRef, const XubString& rNewObjName, FASTBOOL bFrame_) +SdrOle2Obj::SdrOle2Obj( const svt::EmbeddedObjectRef& rNewObjRef, const XubString& rNewObjName, bool bFrame_) : xObjRef( rNewObjRef ) , m_bTypeAsked(false) , m_bChart(false) @@ -805,7 +805,7 @@ SdrOle2Obj::SdrOle2Obj( const svt::EmbeddedObjectRef& rNewObjRef, const XubStrin // ----------------------------------------------------------------------------- -SdrOle2Obj::SdrOle2Obj( const svt::EmbeddedObjectRef& rNewObjRef, const XubString& rNewObjName, const Rectangle& rNewRect, FASTBOOL bFrame_) +SdrOle2Obj::SdrOle2Obj( const svt::EmbeddedObjectRef& rNewObjRef, const XubString& rNewObjName, const Rectangle& rNewRect, bool bFrame_) : SdrRectObj(rNewRect) , xObjRef( rNewObjRef ) , m_bTypeAsked(false) @@ -911,7 +911,7 @@ void SdrOle2Obj::SetGraphic(const Graphic* pGrf) // ----------------------------------------------------------------------------- -FASTBOOL SdrOle2Obj::IsEmpty() const +bool SdrOle2Obj::IsEmpty() const { return !(xObjRef.is()); } @@ -1419,8 +1419,8 @@ void SdrOle2Obj::SetModel(SdrModel* pNewModel) void SdrOle2Obj::SetPage(SdrPage* pNewPage) { - FASTBOOL bRemove=pNewPage==NULL && pPage!=NULL; - FASTBOOL bInsert=pNewPage!=NULL && pPage==NULL; + bool bRemove=pNewPage==NULL && pPage!=NULL; + bool bInsert=pNewPage!=NULL && pPage==NULL; if (bRemove && mpImpl->mbConnected ) Disconnect(); diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx index 9d136ef82eae..0ad6fb250f2c 100644 --- a/svx/source/svdraw/svdopath.cxx +++ b/svx/source/svdraw/svdopath.cxx @@ -80,7 +80,7 @@ inline double ImplMMToTwips(double fVal) { return (fVal * (72.0 / 127.0)); } using namespace sdr; -inline USHORT GetPrevPnt(USHORT nPnt, USHORT nPntMax, FASTBOOL bClosed) +inline USHORT GetPrevPnt(USHORT nPnt, USHORT nPntMax, bool bClosed) { if (nPnt>0) { nPnt--; @@ -91,7 +91,7 @@ inline USHORT GetPrevPnt(USHORT nPnt, USHORT nPntMax, FASTBOOL bClosed) return nPnt; } -inline USHORT GetNextPnt(USHORT nPnt, USHORT nPntMax, FASTBOOL bClosed) +inline USHORT GetNextPnt(USHORT nPnt, USHORT nPntMax, bool bClosed) { nPnt++; if (nPnt>nPntMax || (bClosed && nPnt>=nPntMax)) nPnt=0; @@ -101,31 +101,31 @@ inline USHORT GetNextPnt(USHORT nPnt, USHORT nPntMax, FASTBOOL bClosed) struct ImpSdrPathDragData : public SdrDragStatUserData { XPolygon aXP; // Ausschnitt aud dem Originalpolygon - FASTBOOL bValid; // FALSE = zu wenig Punkte - FASTBOOL bClosed; // geschlossenes Objekt? + bool bValid; // FALSE = zu wenig Punkte + bool bClosed; // geschlossenes Objekt? USHORT nPoly; // Nummer des Polygons im PolyPolygon USHORT nPnt; // Punktnummer innerhalb des obigen Polygons USHORT nPntAnz; // Punktanzahl des Polygons USHORT nPntMax; // Maximaler Index - FASTBOOL bBegPnt; // Gedraggter Punkt ist der Anfangspunkt einer Polyline - FASTBOOL bEndPnt; // Gedraggter Punkt ist der Endpunkt einer Polyline + bool bBegPnt; // Gedraggter Punkt ist der Anfangspunkt einer Polyline + bool bEndPnt; // Gedraggter Punkt ist der Endpunkt einer Polyline USHORT nPrevPnt; // Index des vorherigen Punkts USHORT nNextPnt; // Index des naechsten Punkts - FASTBOOL bPrevIsBegPnt; // Vorheriger Punkt ist Anfangspunkt einer Polyline - FASTBOOL bNextIsEndPnt; // Folgepunkt ist Endpunkt einer Polyline + bool bPrevIsBegPnt; // Vorheriger Punkt ist Anfangspunkt einer Polyline + bool bNextIsEndPnt; // Folgepunkt ist Endpunkt einer Polyline USHORT nPrevPrevPnt; // Index des vorvorherigen Punkts USHORT nNextNextPnt; // Index des uebernaechsten Punkts - FASTBOOL bControl; // Punkt ist ein Kontrollpunkt - FASTBOOL bIsPrevControl; // Punkt ist Kontrollpunkt vor einem Stuetzpunkt - FASTBOOL bIsNextControl; // Punkt ist Kontrollpunkt hinter einem Stuetzpunkt - FASTBOOL bPrevIsControl; // Falls nPnt ein StPnt: Davor ist ein Kontrollpunkt - FASTBOOL bNextIsControl; // Falls nPnt ein StPnt: Dahinter ist ein Kontrollpunkt + bool bControl; // Punkt ist ein Kontrollpunkt + bool bIsPrevControl; // Punkt ist Kontrollpunkt vor einem Stuetzpunkt + bool bIsNextControl; // Punkt ist Kontrollpunkt hinter einem Stuetzpunkt + bool bPrevIsControl; // Falls nPnt ein StPnt: Davor ist ein Kontrollpunkt + bool bNextIsControl; // Falls nPnt ein StPnt: Dahinter ist ein Kontrollpunkt USHORT nPrevPrevPnt0; USHORT nPrevPnt0; USHORT nPnt0; USHORT nNextPnt0; USHORT nNextNextPnt0; - FASTBOOL bEliminate; // Punkt loeschen? (wird von MovDrag gesetzt) + bool bEliminate; // Punkt loeschen? (wird von MovDrag gesetzt) // ## BOOL mbMultiPointDrag; @@ -249,15 +249,15 @@ struct ImpPathCreateUser : public SdrDragStatUserData long nCircRadius; long nCircStWink; long nCircRelWink; - FASTBOOL bBezier; - FASTBOOL bBezHasCtrl0; - FASTBOOL bCurve; - FASTBOOL bCircle; - FASTBOOL bAngleSnap; - FASTBOOL bLine; - FASTBOOL bLine90; - FASTBOOL bRect; - FASTBOOL bMixedCreate; + bool bBezier; + bool bBezHasCtrl0; + bool bCurve; + bool bCircle; + bool bAngleSnap; + bool bLine; + bool bLine90; + bool bRect; + bool bMixedCreate; USHORT nBezierStartPoint; SdrObjKind eStartKind; SdrObjKind eAktKind; @@ -268,18 +268,18 @@ public: bMixedCreate(FALSE),nBezierStartPoint(0),eStartKind(OBJ_NONE),eAktKind(OBJ_NONE) { } void ResetFormFlags() { bBezier=FALSE; bCurve=FALSE; bCircle=FALSE; bLine=FALSE; bRect=FALSE; } - FASTBOOL IsFormFlag() const { return bBezier || bCurve || bCircle || bLine || bRect; } + bool IsFormFlag() const { return bBezier || bCurve || bCircle || bLine || bRect; } XPolygon GetFormPoly() const; - FASTBOOL CalcBezier(const Point& rP1, const Point& rP2, const Point& rDir, FASTBOOL bMouseDown); + bool CalcBezier(const Point& rP1, const Point& rP2, const Point& rDir, bool bMouseDown); XPolygon GetBezierPoly() const; - //FASTBOOL CalcCurve(const Point& rP1, const Point& rP2, const Point& rDir, SdrView* pView) { return FALSE; } + //bool CalcCurve(const Point& rP1, const Point& rP2, const Point& rDir, SdrView* pView) { return FALSE; } XPolygon GetCurvePoly() const { return XPolygon(); } - FASTBOOL CalcCircle(const Point& rP1, const Point& rP2, const Point& rDir, SdrView* pView); + bool CalcCircle(const Point& rP1, const Point& rP2, const Point& rDir, SdrView* pView); XPolygon GetCirclePoly() const; - FASTBOOL CalcLine(const Point& rP1, const Point& rP2, const Point& rDir, SdrView* pView); + bool CalcLine(const Point& rP1, const Point& rP2, const Point& rDir, SdrView* pView); Point CalcLine(const Point& rCsr, long nDirX, long nDirY, SdrView* pView) const; XPolygon GetLinePoly() const; - FASTBOOL CalcRect(const Point& rP1, const Point& rP2, const Point& rDir, SdrView* pView); + bool CalcRect(const Point& rP1, const Point& rP2, const Point& rDir, SdrView* pView); XPolygon GetRectPoly() const; }; @@ -293,9 +293,9 @@ XPolygon ImpPathCreateUser::GetFormPoly() const return XPolygon(); } -FASTBOOL ImpPathCreateUser::CalcBezier(const Point& rP1, const Point& rP2, const Point& rDir, FASTBOOL bMouseDown) +bool ImpPathCreateUser::CalcBezier(const Point& rP1, const Point& rP2, const Point& rDir, bool bMouseDown) { - FASTBOOL bRet=TRUE; + bool bRet = true; aBezStart=rP1; aBezCtrl1=rP1+rDir; aBezCtrl2=rP2; @@ -318,7 +318,7 @@ XPolygon ImpPathCreateUser::GetBezierPoly() const return aXP; } -FASTBOOL ImpPathCreateUser::CalcCircle(const Point& rP1, const Point& rP2, const Point& rDir, SdrView* pView) +bool ImpPathCreateUser::CalcCircle(const Point& rP1, const Point& rP2, const Point& rDir, SdrView* pView) { long nTangAngle=GetAngle(rDir); aCircStart=rP1; @@ -329,7 +329,7 @@ FASTBOOL ImpPathCreateUser::CalcCircle(const Point& rP1, const Point& rP2, const long dAngle=GetAngle(Point(dx,dy))-nTangAngle; dAngle=NormAngle360(dAngle); long nTmpAngle=NormAngle360(9000-dAngle); - FASTBOOL bRet=nTmpAngle!=9000 && nTmpAngle!=27000; + bool bRet=nTmpAngle!=9000 && nTmpAngle!=27000; long nRad=0; if (bRet) { double cs=cos(nTmpAngle*nPi180); @@ -351,7 +351,7 @@ FASTBOOL ImpPathCreateUser::CalcCircle(const Point& rP1, const Point& rP2, const if (bAngleSnap) { long nSA=pView->GetSnapAngle(); if (nSA!=0) { // Winkelfang - FASTBOOL bNeg=nCircRelWink<0; + bool bNeg=nCircRelWink<0; if (bNeg) nCircRelWink=-nCircRelWink; nCircRelWink+=nSA/2; nCircRelWink/=nSA; @@ -395,8 +395,8 @@ Point ImpPathCreateUser::CalcLine(const Point& aCsr, long nDirX, long nDirY, Sdr { long x=aCsr.X(),x1=x,x2=x; long y=aCsr.Y(),y1=y,y2=y; - FASTBOOL bHLin=nDirY==0; - FASTBOOL bVLin=nDirX==0; + bool bHLin=nDirY==0; + bool bVLin=nDirX==0; if (bHLin) y=0; else if (bVLin) x=0; else { @@ -413,7 +413,7 @@ Point ImpPathCreateUser::CalcLine(const Point& aCsr, long nDirX, long nDirY, Sdr return Point(x,y); } -FASTBOOL ImpPathCreateUser::CalcLine(const Point& rP1, const Point& rP2, const Point& rDir, SdrView* pView) +bool ImpPathCreateUser::CalcLine(const Point& rP1, const Point& rP2, const Point& rDir, SdrView* pView) { aLineStart=rP1; aLineEnd=rP2; @@ -443,7 +443,7 @@ XPolygon ImpPathCreateUser::GetLinePoly() const return aXP; } -FASTBOOL ImpPathCreateUser::CalcRect(const Point& rP1, const Point& rP2, const Point& rDir, SdrView* pView) +bool ImpPathCreateUser::CalcRect(const Point& rP1, const Point& rP2, const Point& rDir, SdrView* pView) { aRectP1=rP1; aRectP2=rP1; @@ -454,8 +454,8 @@ FASTBOOL ImpPathCreateUser::CalcRect(const Point& rP1, const Point& rP2, const P long nDirY=rDir.Y(); long x=aTmpPt.X(); long y=aTmpPt.Y(); - FASTBOOL bHLin=nDirY==0; - FASTBOOL bVLin=nDirX==0; + bool bHLin=nDirY==0; + bool bVLin=nDirX==0; if (bHLin) y=0; else if (bVLin) x=0; else { @@ -477,7 +477,7 @@ FASTBOOL ImpPathCreateUser::CalcRect(const Point& rP1, const Point& rP2, const P long dy1=aRectP2.Y()-aRectP1.Y(); long dy1a=Abs(dy1); long dx2=aRectP3.X()-aRectP2.X(); long dx2a=Abs(dx2); long dy2=aRectP3.Y()-aRectP2.Y(); long dy2a=Abs(dy2); - FASTBOOL b1MoreThan2=dx1a+dy1a>dx2a+dy2a; + bool b1MoreThan2=dx1a+dy1a>dx2a+dy2a; if (b1MoreThan2 != pView->IsBigOrtho()) { long xtemp=dy2a-dx1a; if (dx1<0) xtemp=-xtemp; long ytemp=dx2a-dy1a; if (dy1<0) ytemp=-ytemp; @@ -528,10 +528,10 @@ public: basegfx::B2DPolyPolygon getSpecialDragPoly(const SdrDragStat& rDrag) const; // create stuff - FASTBOOL BegCreate(SdrDragStat& rStat); - FASTBOOL MovCreate(SdrDragStat& rStat); - FASTBOOL EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd); - FASTBOOL BckCreate(SdrDragStat& rStat); + bool BegCreate(SdrDragStat& rStat); + bool MovCreate(SdrDragStat& rStat); + bool EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd); + bool BckCreate(SdrDragStat& rStat); void BrkCreate(SdrDragStat& rStat); Pointer GetCreatePointer() const; @@ -669,30 +669,30 @@ bool ImpPathForDragAndCreate::movePathDrag( SdrDragStat& rDrag ) const mpSdrPathDragData->ResetPoly(mrSdrPathObject); // Div. Daten lokal Kopieren fuer weniger Code und schnelleren Zugriff - FASTBOOL bClosed =mpSdrPathDragData->bClosed ; // geschlossenes Objekt? + bool bClosed =mpSdrPathDragData->bClosed ; // geschlossenes Objekt? USHORT nPnt =mpSdrPathDragData->nPnt ; // Punktnummer innerhalb des obigen Polygons - FASTBOOL bBegPnt =mpSdrPathDragData->bBegPnt ; // Gedraggter Punkt ist der Anfangspunkt einer Polyline - FASTBOOL bEndPnt =mpSdrPathDragData->bEndPnt ; // Gedraggter Punkt ist der Endpunkt einer Polyline + bool bBegPnt =mpSdrPathDragData->bBegPnt ; // Gedraggter Punkt ist der Anfangspunkt einer Polyline + bool bEndPnt =mpSdrPathDragData->bEndPnt ; // Gedraggter Punkt ist der Endpunkt einer Polyline USHORT nPrevPnt =mpSdrPathDragData->nPrevPnt ; // Index des vorherigen Punkts USHORT nNextPnt =mpSdrPathDragData->nNextPnt ; // Index des naechsten Punkts - FASTBOOL bPrevIsBegPnt =mpSdrPathDragData->bPrevIsBegPnt ; // Vorheriger Punkt ist Anfangspunkt einer Polyline - FASTBOOL bNextIsEndPnt =mpSdrPathDragData->bNextIsEndPnt ; // Folgepunkt ist Endpunkt einer Polyline + bool bPrevIsBegPnt =mpSdrPathDragData->bPrevIsBegPnt ; // Vorheriger Punkt ist Anfangspunkt einer Polyline + bool bNextIsEndPnt =mpSdrPathDragData->bNextIsEndPnt ; // Folgepunkt ist Endpunkt einer Polyline USHORT nPrevPrevPnt =mpSdrPathDragData->nPrevPrevPnt ; // Index des vorvorherigen Punkts USHORT nNextNextPnt =mpSdrPathDragData->nNextNextPnt ; // Index des uebernaechsten Punkts - FASTBOOL bControl =mpSdrPathDragData->bControl ; // Punkt ist ein Kontrollpunkt - //FASTBOOL bIsPrevControl=mpSdrPathDragData->bIsPrevControl; // Punkt ist Kontrollpunkt vor einem Stuetzpunkt - FASTBOOL bIsNextControl=mpSdrPathDragData->bIsNextControl; // Punkt ist Kontrollpunkt hinter einem Stuetzpunkt - FASTBOOL bPrevIsControl=mpSdrPathDragData->bPrevIsControl; // Falls nPnt ein StPnt: Davor ist ein Kontrollpunkt - FASTBOOL bNextIsControl=mpSdrPathDragData->bNextIsControl; // Falls nPnt ein StPnt: Dahinter ist ein Kontrollpunkt + bool bControl =mpSdrPathDragData->bControl ; // Punkt ist ein Kontrollpunkt + //bool bIsPrevControl=mpSdrPathDragData->bIsPrevControl; // Punkt ist Kontrollpunkt vor einem Stuetzpunkt + bool bIsNextControl =mpSdrPathDragData->bIsNextControl; // Punkt ist Kontrollpunkt hinter einem Stuetzpunkt + bool bPrevIsControl =mpSdrPathDragData->bPrevIsControl; // Falls nPnt ein StPnt: Davor ist ein Kontrollpunkt + bool bNextIsControl =mpSdrPathDragData->bNextIsControl; // Falls nPnt ein StPnt: Dahinter ist ein Kontrollpunkt // Ortho bei Linien/Polygonen = Winkel beibehalten if (!bControl && rDrag.GetView()!=NULL && rDrag.GetView()->IsOrtho()) { - FASTBOOL bBigOrtho=rDrag.GetView()->IsBigOrtho(); + bool bBigOrtho=rDrag.GetView()->IsBigOrtho(); Point aPos(rDrag.GetNow()); // die aktuelle Position Point aPnt(mpSdrPathDragData->aXP[nPnt]); // der gedraggte Punkt USHORT nPnt1=0xFFFF,nPnt2=0xFFFF; // seine Nachbarpunkte Point aNeuPos1,aNeuPos2; // die neuen Alternativen fuer aPos - FASTBOOL bPnt1=FALSE,bPnt2=FALSE; // die neuen Alternativen gueltig? + bool bPnt1 = false, bPnt2 = false; // die neuen Alternativen gueltig? if (!bClosed && mpSdrPathDragData->nPntAnz>=2) { // Mind. 2 Pt bei Linien if (!bBegPnt) nPnt1=nPrevPnt; if (!bEndPnt) nPnt2=nNextPnt; @@ -705,16 +705,16 @@ bool ImpPathForDragAndCreate::movePathDrag( SdrDragStat& rDrag ) const Point aPnt1=mpSdrPathDragData->aXP[nPnt1]; long ndx0=aPnt.X()-aPnt1.X(); long ndy0=aPnt.Y()-aPnt1.Y(); - FASTBOOL bHLin=ndy0==0; - FASTBOOL bVLin=ndx0==0; + bool bHLin=ndy0==0; + bool bVLin=ndx0==0; if (!bHLin || !bVLin) { long ndx=aPos.X()-aPnt1.X(); long ndy=aPos.Y()-aPnt1.Y(); bPnt1=TRUE; double nXFact=0; if (!bVLin) nXFact=(double)ndx/(double)ndx0; double nYFact=0; if (!bHLin) nYFact=(double)ndy/(double)ndy0; - FASTBOOL bHor=bHLin || (!bVLin && (nXFact>nYFact) ==bBigOrtho); - FASTBOOL bVer=bVLin || (!bHLin && (nXFact<=nYFact)==bBigOrtho); + bool bHor=bHLin || (!bVLin && (nXFact>nYFact) ==bBigOrtho); + bool bVer=bVLin || (!bHLin && (nXFact<=nYFact)==bBigOrtho); if (bHor) ndy=long(ndy0*nXFact); if (bVer) ndx=long(ndx0*nYFact); aNeuPos1=aPnt1; @@ -726,16 +726,16 @@ bool ImpPathForDragAndCreate::movePathDrag( SdrDragStat& rDrag ) const Point aPnt2=mpSdrPathDragData->aXP[nPnt2]; long ndx0=aPnt.X()-aPnt2.X(); long ndy0=aPnt.Y()-aPnt2.Y(); - FASTBOOL bHLin=ndy0==0; - FASTBOOL bVLin=ndx0==0; + bool bHLin=ndy0==0; + bool bVLin=ndx0==0; if (!bHLin || !bVLin) { long ndx=aPos.X()-aPnt2.X(); long ndy=aPos.Y()-aPnt2.Y(); bPnt2=TRUE; double nXFact=0; if (!bVLin) nXFact=(double)ndx/(double)ndx0; double nYFact=0; if (!bHLin) nYFact=(double)ndy/(double)ndy0; - FASTBOOL bHor=bHLin || (!bVLin && (nXFact>nYFact) ==bBigOrtho); - FASTBOOL bVer=bVLin || (!bHLin && (nXFact<=nYFact)==bBigOrtho); + bool bHor=bHLin || (!bVLin && (nXFact>nYFact) ==bBigOrtho); + bool bVer=bVLin || (!bHLin && (nXFact<=nYFact)==bBigOrtho); if (bHor) ndy=long(ndy0*nXFact); if (bVer) ndx=long(ndx0*nYFact); aNeuPos2=aPnt2; @@ -912,8 +912,8 @@ bool ImpPathForDragAndCreate::endPathDrag(SdrDragStat& rDrag) { // #40549# Point aLinePt1_(aPathPolygon[0][0]); Point aLinePt2_(aPathPolygon[0][1]); - FASTBOOL bXMirr=(aLinePt1_.X()>aLinePt2_.X())!=(aLinePt1.X()>aLinePt2.X()); - FASTBOOL bYMirr=(aLinePt1_.Y()>aLinePt2_.Y())!=(aLinePt1.Y()>aLinePt2.Y()); + bool bXMirr=(aLinePt1_.X()>aLinePt2_.X())!=(aLinePt1.X()>aLinePt2.X()); + bool bYMirr=(aLinePt1_.Y()>aLinePt2_.Y())!=(aLinePt1.Y()>aLinePt2.Y()); if (bXMirr || bYMirr) { Point aRef1(mrSdrPathObject.GetSnapRect().Center()); if (bXMirr) { @@ -1188,22 +1188,22 @@ basegfx::B2DPolyPolygon ImpPathForDragAndCreate::getSpecialDragPoly(const SdrDra return aRetval.getB2DPolyPolygon(); } // Div. Daten lokal Kopieren fuer weniger Code und schnelleren Zugriff - FASTBOOL bClosed =mpSdrPathDragData->bClosed ; // geschlossenes Objekt? + bool bClosed =mpSdrPathDragData->bClosed ; // geschlossenes Objekt? USHORT nPntAnz =mpSdrPathDragData->nPntAnz ; // Punktanzahl USHORT nPnt =mpSdrPathDragData->nPnt ; // Punktnummer innerhalb des Polygons - FASTBOOL bBegPnt =mpSdrPathDragData->bBegPnt ; // Gedraggter Punkt ist der Anfangspunkt einer Polyline - FASTBOOL bEndPnt =mpSdrPathDragData->bEndPnt ; // Gedraggter Punkt ist der Endpunkt einer Polyline + bool bBegPnt =mpSdrPathDragData->bBegPnt ; // Gedraggter Punkt ist der Anfangspunkt einer Polyline + bool bEndPnt =mpSdrPathDragData->bEndPnt ; // Gedraggter Punkt ist der Endpunkt einer Polyline USHORT nPrevPnt =mpSdrPathDragData->nPrevPnt ; // Index des vorherigen Punkts USHORT nNextPnt =mpSdrPathDragData->nNextPnt ; // Index des naechsten Punkts - FASTBOOL bPrevIsBegPnt =mpSdrPathDragData->bPrevIsBegPnt ; // Vorheriger Punkt ist Anfangspunkt einer Polyline - FASTBOOL bNextIsEndPnt =mpSdrPathDragData->bNextIsEndPnt ; // Folgepunkt ist Endpunkt einer Polyline + bool bPrevIsBegPnt =mpSdrPathDragData->bPrevIsBegPnt ; // Vorheriger Punkt ist Anfangspunkt einer Polyline + bool bNextIsEndPnt =mpSdrPathDragData->bNextIsEndPnt ; // Folgepunkt ist Endpunkt einer Polyline USHORT nPrevPrevPnt =mpSdrPathDragData->nPrevPrevPnt ; // Index des vorvorherigen Punkts USHORT nNextNextPnt =mpSdrPathDragData->nNextNextPnt ; // Index des uebernaechsten Punkts - FASTBOOL bControl =mpSdrPathDragData->bControl ; // Punkt ist ein Kontrollpunkt - //FASTBOOL bIsPrevControl=mpSdrPathDragData->bIsPrevControl; // Punkt ist Kontrollpunkt vor einem Stuetzpunkt - FASTBOOL bIsNextControl=mpSdrPathDragData->bIsNextControl; // Punkt ist Kontrollpunkt hinter einem Stuetzpunkt - FASTBOOL bPrevIsControl=mpSdrPathDragData->bPrevIsControl; // Falls nPnt ein StPnt: Davor ist ein Kontrollpunkt - FASTBOOL bNextIsControl=mpSdrPathDragData->bNextIsControl; // Falls nPnt ein StPnt: Dahinter ist ein Kontrollpunkt + bool bControl =mpSdrPathDragData->bControl ; // Punkt ist ein Kontrollpunkt + //bool bIsPrevControl=mpSdrPathDragData->bIsPrevControl; // Punkt ist Kontrollpunkt vor einem Stuetzpunkt + bool bIsNextControl =mpSdrPathDragData->bIsNextControl; // Punkt ist Kontrollpunkt hinter einem Stuetzpunkt + bool bPrevIsControl =mpSdrPathDragData->bPrevIsControl; // Falls nPnt ein StPnt: Davor ist ein Kontrollpunkt + bool bNextIsControl =mpSdrPathDragData->bNextIsControl; // Falls nPnt ein StPnt: Dahinter ist ein Kontrollpunkt XPolygon aXPoly(mpSdrPathDragData->aXP); XPolygon aLine1(2); XPolygon aLine2(2); @@ -1281,18 +1281,18 @@ basegfx::B2DPolyPolygon ImpPathForDragAndCreate::getSpecialDragPoly(const SdrDra return aRetval.getB2DPolyPolygon(); } -FASTBOOL ImpPathForDragAndCreate::BegCreate(SdrDragStat& rStat) +bool ImpPathForDragAndCreate::BegCreate(SdrDragStat& rStat) { bool bFreeHand(IsFreeHand(meObjectKind)); rStat.SetNoSnap(bFreeHand); rStat.SetOrtho8Possible(); aPathPolygon.Clear(); mbCreating=TRUE; - FASTBOOL bMakeStartPoint=TRUE; + bool bMakeStartPoint = true; SdrView* pView=rStat.GetView(); if (pView!=NULL && pView->IsUseIncompatiblePathCreateInterface() && (meObjectKind==OBJ_POLY || meObjectKind==OBJ_PLIN || meObjectKind==OBJ_PATHLINE || meObjectKind==OBJ_PATHFILL)) { - bMakeStartPoint=FALSE; + bMakeStartPoint = false; } aPathPolygon.Insert(XPolygon()); aPathPolygon[0][0]=rStat.GetStart(); @@ -1303,10 +1303,10 @@ FASTBOOL ImpPathForDragAndCreate::BegCreate(SdrDragStat& rStat) pU->eStartKind=meObjectKind; pU->eAktKind=meObjectKind; rStat.SetUser(pU); - return TRUE; + return true; } -FASTBOOL ImpPathForDragAndCreate::MovCreate(SdrDragStat& rStat) +bool ImpPathForDragAndCreate::MovCreate(SdrDragStat& rStat) { ImpPathCreateUser* pU=(ImpPathCreateUser*)rStat.GetUser(); SdrView* pView=rStat.GetView(); @@ -1343,7 +1343,7 @@ FASTBOOL ImpPathForDragAndCreate::MovCreate(SdrDragStat& rStat) if (nActPoint==0) { rXPoly[0]=rStat.GetPos0(); } else nActPoint--; - FASTBOOL bFreeHand=IsFreeHand(pU->eAktKind); + bool bFreeHand=IsFreeHand(pU->eAktKind); rStat.SetNoSnap(bFreeHand /*|| (pU->bMixed && pU->eAktKind==OBJ_LINE)*/); rStat.SetOrtho8Possible(pU->eAktKind!=OBJ_CARC && pU->eAktKind!=OBJ_RECT && (!pU->bMixedCreate || pU->eAktKind!=OBJ_LINE)); Point aActMerk(rXPoly[nActPoint]); @@ -1410,24 +1410,24 @@ FASTBOOL ImpPathForDragAndCreate::MovCreate(SdrDragStat& rStat) pU->CalcRect(rXPoly[nActPoint-1],rXPoly[nActPoint],rXPoly[nActPoint-1]-rXPoly[nActPoint-2],pView); } - return TRUE; + return true; } -FASTBOOL ImpPathForDragAndCreate::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) +bool ImpPathForDragAndCreate::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) { ImpPathCreateUser* pU=(ImpPathCreateUser*)rStat.GetUser(); - FASTBOOL bRet=FALSE; + bool bRet = false; SdrView* pView=rStat.GetView(); - FASTBOOL bIncomp=pView!=NULL && pView->IsUseIncompatiblePathCreateInterface(); + bool bIncomp=pView!=NULL && pView->IsUseIncompatiblePathCreateInterface(); XPolygon& rXPoly=aPathPolygon[aPathPolygon.Count()-1]; USHORT nActPoint=rXPoly.GetPointCount()-1; Point aAktMerk(rXPoly[nActPoint]); rXPoly[nActPoint]=rStat.Now(); if (!pU->bMixedCreate && pU->eStartKind==OBJ_LINE) { if (rStat.GetPointAnz()>=2) eCmd=SDRCREATE_FORCEEND; - bRet=eCmd==SDRCREATE_FORCEEND; + bRet = eCmd==SDRCREATE_FORCEEND; if (bRet) { - mbCreating=FALSE; + mbCreating = FALSE; delete pU; rStat.SetUser(NULL); } @@ -1529,7 +1529,7 @@ FASTBOOL ImpPathForDragAndCreate::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCm return bRet; } -FASTBOOL ImpPathForDragAndCreate::BckCreate(SdrDragStat& rStat) +bool ImpPathForDragAndCreate::BckCreate(SdrDragStat& rStat) { ImpPathCreateUser* pU=(ImpPathCreateUser*)rStat.GetUser(); if (aPathPolygon.Count()>0) { @@ -1867,8 +1867,8 @@ void SdrPathObj::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const { rInfo.bNoContortion=FALSE; - FASTBOOL bCanConv = !HasText() || ImpCanConvTextToCurve(); - FASTBOOL bIsPath = IsBezier() || IsSpline(); + bool bCanConv = !HasText() || ImpCanConvTextToCurve(); + bool bIsPath = IsBezier() || IsSpline(); rInfo.bEdgeRadiusAllowed = FALSE; rInfo.bCanConvToPath = bCanConv && !bIsPath; @@ -2061,7 +2061,7 @@ void SdrPathObj::AddToHdlList(SdrHdlList& rHdlList) const // keep old stuff to be able to keep old SdrHdl stuff, too const XPolyPolygon aOldPathPolygon(GetPathPoly()); USHORT nPolyCnt=aOldPathPolygon.Count(); - FASTBOOL bClosed=IsClosed(); + bool bClosed=IsClosed(); USHORT nIdx=0; for (USHORT i=0; i<nPolyCnt; i++) { @@ -2241,20 +2241,20 @@ basegfx::B2DPolyPolygon SdrPathObj::getSpecialDragPoly(const SdrDragStat& rDrag) //////////////////////////////////////////////////////////////////////////////////////////////////// -FASTBOOL SdrPathObj::BegCreate(SdrDragStat& rStat) +bool SdrPathObj::BegCreate(SdrDragStat& rStat) { impDeleteDAC(); return impGetDAC().BegCreate(rStat); } -FASTBOOL SdrPathObj::MovCreate(SdrDragStat& rStat) +bool SdrPathObj::MovCreate(SdrDragStat& rStat) { return impGetDAC().MovCreate(rStat); } -FASTBOOL SdrPathObj::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) +bool SdrPathObj::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) { - FASTBOOL bRetval(impGetDAC().EndCreate(rStat, eCmd)); + bool bRetval(impGetDAC().EndCreate(rStat, eCmd)); if(bRetval && mpDAC) { @@ -2299,7 +2299,7 @@ FASTBOOL SdrPathObj::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) return bRetval; } -FASTBOOL SdrPathObj::BckCreate(SdrDragStat& rStat) +bool SdrPathObj::BckCreate(SdrDragStat& rStat) { return impGetDAC().BckCreate(rStat); } @@ -2382,7 +2382,7 @@ void SdrPathObj::NbcRotate(const Point& rRef, long nWink, double sn, double cs) SdrTextObj::NbcRotate(rRef,nWink,sn,cs); } -void SdrPathObj::NbcShear(const Point& rRefPnt, long nAngle, double fTan, FASTBOOL bVShear) +void SdrPathObj::NbcShear(const Point& rRefPnt, long nAngle, double fTan, bool bVShear) { basegfx::B2DHomMatrix aTrans(basegfx::tools::createTranslateB2DHomMatrix(-rRefPnt.X(), -rRefPnt.Y())); diff --git a/svx/source/svdraw/svdorect.cxx b/svx/source/svdraw/svdorect.cxx index b03dbf5b903a..9da5214d0b57 100644 --- a/svx/source/svdraw/svdorect.cxx +++ b/svx/source/svdraw/svdorect.cxx @@ -136,9 +136,9 @@ void SdrRectObj::SetXPolyDirty() } } -FASTBOOL SdrRectObj::PaintNeedsXPoly(long nEckRad) const +bool SdrRectObj::PaintNeedsXPoly(long nEckRad) const { - FASTBOOL bNeed=aGeo.nDrehWink!=0 || aGeo.nShearWink!=0 || nEckRad!=0; + bool bNeed=aGeo.nDrehWink!=0 || aGeo.nShearWink!=0 || nEckRad!=0; return bNeed; } @@ -183,7 +183,7 @@ const XPolygon& SdrRectObj::GetXPoly() const void SdrRectObj::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const { - FASTBOOL bNoTextFrame=!IsTextFrame(); + bool bNoTextFrame=!IsTextFrame(); rInfo.bResizeFreeAllowed=bNoTextFrame || aGeo.nDrehWink%9000==0; rInfo.bResizePropAllowed=TRUE; rInfo.bRotateFreeAllowed=TRUE; @@ -202,7 +202,7 @@ void SdrRectObj::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const rInfo.bShearAllowed =bNoTextFrame; rInfo.bEdgeRadiusAllowed=TRUE; - FASTBOOL bCanConv=!HasText() || ImpCanConvTextToCurve(); + bool bCanConv=!HasText() || ImpCanConvTextToCurve(); if (bCanConv && !bNoTextFrame && !HasText()) { bCanConv=HasFill() || HasLine(); } @@ -509,7 +509,7 @@ void SdrRectObj::NbcRotate(const Point& rRef, long nWink, double sn, double cs) SetXPolyDirty(); } -void SdrRectObj::NbcShear(const Point& rRef, long nWink, double tn, FASTBOOL bVShear) +void SdrRectObj::NbcShear(const Point& rRef, long nWink, double tn, bool bVShear) { SdrTextObj::NbcShear(rRef,nWink,tn,bVShear); SetXPolyDirty(); @@ -521,7 +521,7 @@ void SdrRectObj::NbcMirror(const Point& rRef1, const Point& rRef2) SetXPolyDirty(); } -FASTBOOL SdrRectObj::DoMacro(const SdrObjMacroHitRec& rRec) +bool SdrRectObj::DoMacro(const SdrObjMacroHitRec& rRec) { return SdrTextObj::DoMacro(rRec); } diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx index c784859c731a..c5cb0f09e89b 100644 --- a/svx/source/svdraw/svdotext.cxx +++ b/svx/source/svdraw/svdotext.cxx @@ -390,7 +390,7 @@ const Size& SdrTextObj::GetTextSize() const return aTextSize; } -FASTBOOL SdrTextObj::IsAutoGrowHeight() const +bool SdrTextObj::IsAutoGrowHeight() const { if(!bTextFrame) return FALSE; // AutoGrow nur bei TextFrames @@ -415,7 +415,7 @@ FASTBOOL SdrTextObj::IsAutoGrowHeight() const return bRet; } -FASTBOOL SdrTextObj::IsAutoGrowWidth() const +bool SdrTextObj::IsAutoGrowWidth() const { if(!bTextFrame) return FALSE; // AutoGrow nur bei TextFrames @@ -528,7 +528,7 @@ void SdrTextObj::ImpCheckShear() void SdrTextObj::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const { - FASTBOOL bNoTextFrame=!IsTextFrame(); + bool bNoTextFrame=!IsTextFrame(); rInfo.bResizeFreeAllowed=bNoTextFrame || aGeo.nDrehWink%9000==0; rInfo.bResizePropAllowed=TRUE; rInfo.bRotateFreeAllowed=TRUE; @@ -545,7 +545,7 @@ void SdrTextObj::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const rInfo.bGradientAllowed = (eFillStyle == XFILL_GRADIENT); rInfo.bShearAllowed =bNoTextFrame; rInfo.bEdgeRadiusAllowed=TRUE; - FASTBOOL bCanConv=ImpCanConvTextToCurve(); + bool bCanConv=ImpCanConvTextToCurve(); rInfo.bCanConvToPath =bCanConv; rInfo.bCanConvToPoly =bCanConv; rInfo.bCanConvToPathLineToArea=bCanConv; @@ -582,16 +582,16 @@ bool SdrTextObj::HasTextImpl( SdrOutliner* pOutliner ) return bRet; } -FASTBOOL SdrTextObj::HasEditText() const +bool SdrTextObj::HasEditText() const { return HasTextImpl( pEdtOutl ); } void SdrTextObj::SetPage(SdrPage* pNewPage) { - FASTBOOL bRemove=pNewPage==NULL && pPage!=NULL; - FASTBOOL bInsert=pNewPage!=NULL && pPage==NULL; - FASTBOOL bLinked=IsLinkedText(); + bool bRemove=pNewPage==NULL && pPage!=NULL; + bool bInsert=pNewPage!=NULL && pPage==NULL; + bool bLinked=IsLinkedText(); if (bLinked && bRemove) { ImpLinkAbmeldung(); @@ -637,23 +637,23 @@ void SdrTextObj::SetModel(SdrModel* pNewModel) } } -FASTBOOL SdrTextObj::NbcSetEckenradius(long nRad) +bool SdrTextObj::NbcSetEckenradius(long nRad) { SetObjectItem(SdrEckenradiusItem(nRad)); - return TRUE; + return true; } -FASTBOOL SdrTextObj::NbcSetAutoGrowHeight(bool bAuto) +bool SdrTextObj::NbcSetAutoGrowHeight(bool bAuto) { if(bTextFrame) { SetObjectItem(SdrTextAutoGrowHeightItem(bAuto)); - return TRUE; + return true; } - return FALSE; + return false; } -FASTBOOL SdrTextObj::NbcSetMinTextFrameHeight(long nHgt) +bool SdrTextObj::NbcSetMinTextFrameHeight(long nHgt) { if( bTextFrame && ( !pModel || !pModel->isLocked() ) ) // SJ: #i44922# { @@ -667,32 +667,32 @@ FASTBOOL SdrTextObj::NbcSetMinTextFrameHeight(long nHgt) SetObjectItem(SdrTextAutoGrowHeightItem(FALSE)); } - return TRUE; + return true; } - return FALSE; + return false; } -FASTBOOL SdrTextObj::NbcSetMaxTextFrameHeight(long nHgt) +bool SdrTextObj::NbcSetMaxTextFrameHeight(long nHgt) { if(bTextFrame) { SetObjectItem(SdrTextMaxFrameHeightItem(nHgt)); - return TRUE; + return true; } - return FALSE; + return false; } -FASTBOOL SdrTextObj::NbcSetAutoGrowWidth(bool bAuto) +bool SdrTextObj::NbcSetAutoGrowWidth(bool bAuto) { if(bTextFrame) { SetObjectItem(SdrTextAutoGrowWidthItem(bAuto)); - return TRUE; + return true; } - return FALSE; + return false; } -FASTBOOL SdrTextObj::NbcSetMinTextFrameWidth(long nWdt) +bool SdrTextObj::NbcSetMinTextFrameWidth(long nWdt) { if( bTextFrame && ( !pModel || !pModel->isLocked() ) ) // SJ: #i44922# { @@ -706,29 +706,29 @@ FASTBOOL SdrTextObj::NbcSetMinTextFrameWidth(long nWdt) SetObjectItem(SdrTextAutoGrowWidthItem(FALSE)); } - return TRUE; + return true; } - return FALSE; + return false; } -FASTBOOL SdrTextObj::NbcSetMaxTextFrameWidth(long nWdt) +bool SdrTextObj::NbcSetMaxTextFrameWidth(long nWdt) { if(bTextFrame) { SetObjectItem(SdrTextMaxFrameWidthItem(nWdt)); - return TRUE; + return true; } - return FALSE; + return false; } -FASTBOOL SdrTextObj::NbcSetFitToSize(SdrFitToSizeType eFit) +bool SdrTextObj::NbcSetFitToSize(SdrFitToSizeType eFit) { if(bTextFrame) { SetObjectItem(SdrTextFitToSizeTypeItem(eFit)); - return TRUE; + return true; } - return FALSE; + return false; } void SdrTextObj::ImpSetContourPolygon( SdrOutliner& rOutliner, Rectangle& rAnchorRect, BOOL bLineWidth ) const @@ -800,7 +800,7 @@ void SdrTextObj::TakeTextAnchorRect(Rectangle& rAnchorRect) const long nUpperDist=GetTextUpperDistance(); long nLowerDist=GetTextLowerDistance(); Rectangle aAnkRect(aRect); // Rect innerhalb dem geankert wird - FASTBOOL bFrame=IsTextFrame(); + bool bFrame=IsTextFrame(); if (!bFrame) { TakeUnrotatedSnapRect(aAnkRect); } @@ -829,7 +829,7 @@ void SdrTextObj::TakeTextAnchorRect(Rectangle& rAnchorRect) const rAnchorRect=aAnkRect; } -void SdrTextObj::TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRect, FASTBOOL bNoEditText, +void SdrTextObj::TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRect, bool bNoEditText, Rectangle* pAnchorRect, BOOL bLineWidth ) const { Rectangle aAnkRect; // Rect innerhalb dem geankert wird @@ -839,10 +839,10 @@ void SdrTextObj::TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRect, FAS SdrTextAniKind eAniKind=GetTextAniKind(); SdrTextAniDirection eAniDirection=GetTextAniDirection(); - FASTBOOL bFitToSize(IsFitToSize()); - FASTBOOL bContourFrame=IsContourTextFrame(); + bool bFitToSize(IsFitToSize()); + bool bContourFrame=IsContourTextFrame(); - FASTBOOL bFrame=IsTextFrame(); + bool bFrame=IsTextFrame(); ULONG nStat0=rOutliner.GetControlWord(); Size aNullSize; if (!bContourFrame) @@ -1043,7 +1043,7 @@ void SdrTextObj::ImpSetCharStretching(SdrOutliner& rOutliner, const Size& rTextS #endif } unsigned nLoopCount=0; - FASTBOOL bNoMoreLoop=FALSE; + bool bNoMoreLoop = false; long nXDiff0=0x7FFFFFFF; long nWantWdt=rShapeSize.Width(); long nIsWdt=rTextSize.Width(); @@ -1059,8 +1059,8 @@ void SdrTextObj::ImpSetCharStretching(SdrOutliner& rOutliner, const Size& rTextS long nX=(nWantWdt*100) /nIsWdt; // X-Stretching berechnen long nY=(nWantHgt*100) /nIsHgt; // Y-Stretching berechnen - FASTBOOL bChkX=TRUE; - FASTBOOL bChkY=TRUE; + bool bChkX = true; + bool bChkY = true; if (bNoStretching) { // #35762# evtl. nur proportional moeglich if (nX>nY) { nX=nY; bChkX=FALSE; } else { nY=nX; bChkY=FALSE; } @@ -1068,25 +1068,25 @@ void SdrTextObj::ImpSetCharStretching(SdrOutliner& rOutliner, const Size& rTextS while (nLoopCount<5 && !bNoMoreLoop) { if (nX<0) nX=-nX; - if (nX<1) { nX=1; bNoMoreLoop=TRUE; } - if (nX>65535) { nX=65535; bNoMoreLoop=TRUE; } + if (nX<1) { nX=1; bNoMoreLoop = true; } + if (nX>65535) { nX=65535; bNoMoreLoop = true; } if (nY<0) nY=-nY; - if (nY<1) { nY=1; bNoMoreLoop=TRUE; } - if (nY>65535) { nY=65535; bNoMoreLoop=TRUE; } + if (nY<1) { nY=1; bNoMoreLoop = true; } + if (nY>65535) { nY=65535; bNoMoreLoop = true; } // exception, there is no text yet (horizontal case) if(nIsWdt <= 1) { nX = nY; - bNoMoreLoop = TRUE; + bNoMoreLoop = true; } // #87877# exception, there is no text yet (vertical case) if(nIsHgt <= 1) { nY = nX; - bNoMoreLoop = TRUE; + bNoMoreLoop = true; } rOutliner.SetGlobalCharStretching((USHORT)nX,(USHORT)nY); @@ -1095,7 +1095,7 @@ void SdrTextObj::ImpSetCharStretching(SdrOutliner& rOutliner, const Size& rTextS long nXDiff=aSiz.Width()-nWantWdt; rFitXKorreg=Fraction(nWantWdt,aSiz.Width()); if (((nXDiff>=nXTolMi || !bChkX) && nXDiff<=nXTolPl) || nXDiff==nXDiff0/*&& Abs(nYDiff)<=nYTol*/) { - bNoMoreLoop=TRUE; + bNoMoreLoop = true; } else { // Stretchingfaktoren korregieren long nMul=nWantWdt; @@ -1278,7 +1278,7 @@ basegfx::B2DPolyPolygon SdrTextObj::TakeContour() const Rectangle aR; TakeTextRect(rOutliner,aR,FALSE,&aAnchor2); rOutliner.Clear(); - FASTBOOL bFitToSize(IsFitToSize()); + bool bFitToSize(IsFitToSize()); if (bFitToSize) aR=aAnchor2; Polygon aPol(aR); if (aGeo.nDrehWink!=0) RotatePoly(aPol,aR.TopLeft(),aGeo.nSin,aGeo.nCos); @@ -1385,7 +1385,7 @@ boost::shared_ptr< SdrOutliner > SdrTextObj::CreateDrawOutliner() } // #101029#: Extracted from Paint() -void SdrTextObj::ImpSetupDrawOutlinerForPaint( FASTBOOL bContourFrame, +void SdrTextObj::ImpSetupDrawOutlinerForPaint( bool bContourFrame, SdrOutliner& rOutliner, Rectangle& rTextRect, Rectangle& rAnchorRect, @@ -1439,7 +1439,7 @@ void SdrTextObj::ImpAutoFitText( SdrOutliner& rOutliner, const Size& rTextSize, USHORT nMinStretchX=0, nMinStretchY=0; USHORT aOldStretchXVals[]={0,0,0,0,0,0,0,0,0,0}; const size_t aStretchArySize=sizeof(aOldStretchXVals)/sizeof(*aOldStretchXVals); - for(int i=0; i<aStretchArySize; ++i) + for(unsigned int i=0; i<aStretchArySize; ++i) { const Size aCurrTextSize = rOutliner.CalcTextSize(); double fFactor(1.0); @@ -1490,7 +1490,7 @@ void SdrTextObj::UpdateOutlinerFormatting( SdrOutliner& rOutl, Rectangle& rPaint Rectangle aAnchorRect; Fraction aFitXKorreg(1,1); - FASTBOOL bContourFrame=IsContourTextFrame(); + bool bContourFrame=IsContourTextFrame(); ImpSetupDrawOutlinerForPaint( bContourFrame, rOutl, aTextRect, aAnchorRect, rPaintRect, aFitXKorreg ); @@ -1928,21 +1928,21 @@ long SdrTextObj::GetMaxTextFrameWidth() const return ((SdrTextMaxFrameWidthItem&)(GetObjectItemSet().Get(SDRATTR_TEXT_MAXFRAMEWIDTH))).GetValue(); } -FASTBOOL SdrTextObj::IsFontwork() const +bool SdrTextObj::IsFontwork() const { - return (bTextFrame) ? FALSE // Default ist FALSE + return (bTextFrame) ? false // Default ist FALSE : ((XFormTextStyleItem&)(GetObjectItemSet().Get(XATTR_FORMTXTSTYLE))).GetValue()!=XFT_NONE; } -FASTBOOL SdrTextObj::IsHideContour() const +bool SdrTextObj::IsHideContour() const { - return (bTextFrame) ? FALSE // Default ist: Nein, kein HideContour; HideContour nicht bei TextFrames + return (bTextFrame) ? false // Default ist: Nein, kein HideContour; HideContour nicht bei TextFrames : ((XFormTextHideFormItem&)(GetObjectItemSet().Get(XATTR_FORMTXTHIDEFORM))).GetValue(); } -FASTBOOL SdrTextObj::IsContourTextFrame() const +bool SdrTextObj::IsContourTextFrame() const { - return (bTextFrame) ? FALSE // ContourFrame nicht bei normalen TextFrames + return (bTextFrame) ? false // ContourFrame nicht bei normalen TextFrames : ((SdrTextContourFrameItem&)(GetObjectItemSet().Get(SDRATTR_TEXT_CONTOURFRAME))).GetValue(); } @@ -2054,12 +2054,12 @@ bool SdrTextObj::IsTextAnimationAllowed() const return mbTextAnimationAllowed; } -FASTBOOL SdrTextObj::IsAutoFit() const +bool SdrTextObj::IsAutoFit() const { return GetFitToSize()==SDRTEXTFIT_AUTOFIT; } -FASTBOOL SdrTextObj::IsFitToSize() const +bool SdrTextObj::IsFitToSize() const { const SdrFitToSizeType eFit=GetFitToSize(); return (eFit==SDRTEXTFIT_PROPORTIONAL || eFit==SDRTEXTFIT_ALLLINES); diff --git a/svx/source/svdraw/svdotxat.cxx b/svx/source/svdraw/svdotxat.cxx index ddbd670a7ebc..7473890cf97f 100644 --- a/svx/source/svdraw/svdotxat.cxx +++ b/svx/source/svdraw/svdotxat.cxx @@ -75,18 +75,18 @@ // //////////////////////////////////////////////////////////////////////////////////////////////////// -FASTBOOL SdrTextObj::AdjustTextFrameWidthAndHeight(Rectangle& rR, FASTBOOL bHgt, FASTBOOL bWdt) const +bool SdrTextObj::AdjustTextFrameWidthAndHeight(Rectangle& rR, bool bHgt, bool bWdt) const { if (bTextFrame && pModel!=NULL && !rR.IsEmpty()) { - FASTBOOL bFitToSize(IsFitToSize()); - FASTBOOL bWdtGrow=bWdt && IsAutoGrowWidth(); - FASTBOOL bHgtGrow=bHgt && IsAutoGrowHeight(); + bool bFitToSize(IsFitToSize()); + bool bWdtGrow=bWdt && IsAutoGrowWidth(); + bool bHgtGrow=bHgt && IsAutoGrowHeight(); SdrTextAniKind eAniKind=GetTextAniKind(); SdrTextAniDirection eAniDir=GetTextAniDirection(); - FASTBOOL bScroll=eAniKind==SDRTEXTANI_SCROLL || eAniKind==SDRTEXTANI_ALTERNATE || eAniKind==SDRTEXTANI_SLIDE; - FASTBOOL bHScroll=bScroll && (eAniDir==SDRTEXTANI_LEFT || eAniDir==SDRTEXTANI_RIGHT); - FASTBOOL bVScroll=bScroll && (eAniDir==SDRTEXTANI_UP || eAniDir==SDRTEXTANI_DOWN); + bool bScroll=eAniKind==SDRTEXTANI_SCROLL || eAniKind==SDRTEXTANI_ALTERNATE || eAniKind==SDRTEXTANI_SLIDE; + bool bHScroll=bScroll && (eAniDir==SDRTEXTANI_LEFT || eAniDir==SDRTEXTANI_RIGHT); + bool bVScroll=bScroll && (eAniDir==SDRTEXTANI_UP || eAniDir==SDRTEXTANI_DOWN); if (!bFitToSize && (bWdtGrow || bHgtGrow)) { Rectangle aR0(rR); @@ -209,9 +209,9 @@ FASTBOOL SdrTextObj::AdjustTextFrameWidthAndHeight(Rectangle& rR, FASTBOOL bHgt, return FALSE; } -FASTBOOL SdrTextObj::NbcAdjustTextFrameWidthAndHeight(FASTBOOL bHgt, FASTBOOL bWdt) +bool SdrTextObj::NbcAdjustTextFrameWidthAndHeight(bool bHgt, bool bWdt) { - FASTBOOL bRet=AdjustTextFrameWidthAndHeight(aRect,bHgt,bWdt); + bool bRet=AdjustTextFrameWidthAndHeight(aRect,bHgt,bWdt); if (bRet) { SetRectsDirty(); if (HAS_BASE(SdrRectObj,this)) { // mal wieder 'nen Hack @@ -224,10 +224,10 @@ FASTBOOL SdrTextObj::NbcAdjustTextFrameWidthAndHeight(FASTBOOL bHgt, FASTBOOL bW return bRet; } -FASTBOOL SdrTextObj::AdjustTextFrameWidthAndHeight(FASTBOOL bHgt, FASTBOOL bWdt) +bool SdrTextObj::AdjustTextFrameWidthAndHeight(bool bHgt, bool bWdt) { Rectangle aNeuRect(aRect); - FASTBOOL bRet=AdjustTextFrameWidthAndHeight(aNeuRect,bHgt,bWdt); + bool bRet=AdjustTextFrameWidthAndHeight(aNeuRect,bHgt,bWdt); if (bRet) { Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetLastBoundRect(); // #110094#-14 SendRepaintBroadcast(); diff --git a/svx/source/svdraw/svdotxdr.cxx b/svx/source/svdraw/svdotxdr.cxx index 97da16876ac0..299e6cca2331 100644 --- a/svx/source/svdraw/svdotxdr.cxx +++ b/svx/source/svdraw/svdotxdr.cxx @@ -97,19 +97,19 @@ Rectangle SdrTextObj::ImpDragCalcRect(const SdrDragStat& rDrag) const Rectangle aTmpRect(aRect); const SdrHdl* pHdl=rDrag.GetHdl(); SdrHdlKind eHdl=pHdl==NULL ? HDL_MOVE : pHdl->GetKind(); - FASTBOOL bEcke=(eHdl==HDL_UPLFT || eHdl==HDL_UPRGT || eHdl==HDL_LWLFT || eHdl==HDL_LWRGT); - FASTBOOL bOrtho=rDrag.GetView()!=NULL && rDrag.GetView()->IsOrtho(); - FASTBOOL bBigOrtho=bEcke && bOrtho && rDrag.GetView()->IsBigOrtho(); + bool bEcke=(eHdl==HDL_UPLFT || eHdl==HDL_UPRGT || eHdl==HDL_LWLFT || eHdl==HDL_LWRGT); + bool bOrtho=rDrag.GetView()!=NULL && rDrag.GetView()->IsOrtho(); + bool bBigOrtho=bEcke && bOrtho && rDrag.GetView()->IsBigOrtho(); Point aPos(rDrag.GetNow()); // Unrotate: if (aGeo.nDrehWink!=0) RotatePoint(aPos,aTmpRect.TopLeft(),-aGeo.nSin,aGeo.nCos); // Unshear: if (aGeo.nShearWink!=0) ShearPoint(aPos,aTmpRect.TopLeft(),-aGeo.nTan); // - FASTBOOL bLft=(eHdl==HDL_UPLFT || eHdl==HDL_LEFT || eHdl==HDL_LWLFT); - FASTBOOL bRgt=(eHdl==HDL_UPRGT || eHdl==HDL_RIGHT || eHdl==HDL_LWRGT); - FASTBOOL bTop=(eHdl==HDL_UPRGT || eHdl==HDL_UPPER || eHdl==HDL_UPLFT); - FASTBOOL bBtm=(eHdl==HDL_LWRGT || eHdl==HDL_LOWER || eHdl==HDL_LWLFT); + bool bLft=(eHdl==HDL_UPLFT || eHdl==HDL_LEFT || eHdl==HDL_LWLFT); + bool bRgt=(eHdl==HDL_UPRGT || eHdl==HDL_RIGHT || eHdl==HDL_LWRGT); + bool bTop=(eHdl==HDL_UPRGT || eHdl==HDL_UPPER || eHdl==HDL_UPLFT); + bool bBtm=(eHdl==HDL_LWRGT || eHdl==HDL_LOWER || eHdl==HDL_LWLFT); if (bLft) aTmpRect.Left() =aPos.X(); if (bRgt) aTmpRect.Right() =aPos.X(); if (bTop) aTmpRect.Top() =aPos.Y(); @@ -121,8 +121,8 @@ Rectangle SdrTextObj::ImpDragCalcRect(const SdrDragStat& rDrag) const long nYMul=aTmpRect.Bottom()-aTmpRect.Top(); long nXDiv=nWdt0; long nYDiv=nHgt0; - FASTBOOL bXNeg=(nXMul<0)!=(nXDiv<0); - FASTBOOL bYNeg=(nYMul<0)!=(nYDiv<0); + bool bXNeg=(nXMul<0)!=(nXDiv<0); + bool bYNeg=(nYMul<0)!=(nYDiv<0); nXMul=Abs(nXMul); nYMul=Abs(nYMul); nXDiv=Abs(nXDiv); @@ -134,7 +134,7 @@ Rectangle SdrTextObj::ImpDragCalcRect(const SdrDragStat& rDrag) const nXDiv=aXFact.GetDenominator(); nYDiv=aYFact.GetDenominator(); if (bEcke) { // Eckpunkthandles - FASTBOOL bUseX=(aXFact<aYFact) != bBigOrtho; + bool bUseX=(aXFact<aYFact) != bBigOrtho; if (bUseX) { long nNeed=long(BigInt(nHgt0)*BigInt(nXMul)/BigInt(nXDiv)); if (bYNeg) nNeed=-nNeed; @@ -204,17 +204,17 @@ String SdrTextObj::getSpecialDragComment(const SdrDragStat& /*rDrag*/) const //////////////////////////////////////////////////////////////////////////////////////////////////// // Create -FASTBOOL SdrTextObj::BegCreate(SdrDragStat& rStat) +bool SdrTextObj::BegCreate(SdrDragStat& rStat) { rStat.SetOrtho4Possible(); Rectangle aRect1(rStat.GetStart(), rStat.GetNow()); aRect1.Justify(); rStat.SetActionRect(aRect1); aRect = aRect1; - return TRUE; + return true; } -FASTBOOL SdrTextObj::MovCreate(SdrDragStat& rStat) +bool SdrTextObj::MovCreate(SdrDragStat& rStat) { Rectangle aRect1; rStat.TakeCreateRect(aRect1); @@ -226,10 +226,10 @@ FASTBOOL SdrTextObj::MovCreate(SdrDragStat& rStat) if (HAS_BASE(SdrRectObj,this)) { ((SdrRectObj*)this)->SetXPolyDirty(); } - return TRUE; + return true; } -FASTBOOL SdrTextObj::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) +bool SdrTextObj::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) { rStat.TakeCreateRect(aRect); ImpJustifyRect(aRect); @@ -260,9 +260,9 @@ void SdrTextObj::BrkCreate(SdrDragStat& /*rStat*/) { } -FASTBOOL SdrTextObj::BckCreate(SdrDragStat& /*rStat*/) +bool SdrTextObj::BckCreate(SdrDragStat& /*rStat*/) { - return TRUE; + return true; } basegfx::B2DPolyPolygon SdrTextObj::TakeCreatePoly(const SdrDragStat& rDrag) const diff --git a/svx/source/svdraw/svdotxed.cxx b/svx/source/svdraw/svdotxed.cxx index d3d2d7e189e9..c7ffc057f3da 100644 --- a/svx/source/svdraw/svdotxed.cxx +++ b/svx/source/svdraw/svdotxed.cxx @@ -52,11 +52,11 @@ // //////////////////////////////////////////////////////////////////////////////////////////////////// -FASTBOOL SdrTextObj::HasTextEdit() const +bool SdrTextObj::HasTextEdit() const { // lt. Anweisung von MB duerfen gelinkte Textobjekte nun doch // geaendert werden (kein automatisches Reload) - return TRUE; + return true; } sal_Bool SdrTextObj::BegTextEdit(SdrOutliner& rOutl) @@ -73,8 +73,8 @@ sal_Bool SdrTextObj::BegTextEdit(SdrOutliner& rOutl) rOutl.Init( nOutlinerMode ); rOutl.SetRefDevice( pModel->GetRefDevice() ); - FASTBOOL bFitToSize(IsFitToSize()); - FASTBOOL bContourFrame=IsContourTextFrame(); + bool bFitToSize(IsFitToSize()); + bool bContourFrame=IsContourTextFrame(); ImpSetTextEditParams(); if (!bContourFrame) { @@ -152,7 +152,7 @@ sal_Bool SdrTextObj::BegTextEdit(SdrOutliner& rOutl) void SdrTextObj::TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, Rectangle* pViewInit, Rectangle* pViewMin) const { - FASTBOOL bFitToSize(IsFitToSize()); + bool bFitToSize(IsFitToSize()); Size aPaperMin,aPaperMax; Rectangle aViewInit; TakeTextAnchorRect(aViewInit); @@ -330,15 +330,15 @@ USHORT SdrTextObj::GetOutlinerViewAnchorMode() const void SdrTextObj::ImpSetTextEditParams() const { if (pEdtOutl!=NULL) { - FASTBOOL bUpdMerk=pEdtOutl->GetUpdateMode(); + bool bUpdMerk=pEdtOutl->GetUpdateMode(); if (bUpdMerk) pEdtOutl->SetUpdateMode(FALSE); Size aPaperMin; Size aPaperMax; Rectangle aEditArea; TakeTextEditArea(&aPaperMin,&aPaperMax,&aEditArea,NULL); //SdrFitToSizeType eFit=GetFitToSize(); - //FASTBOOL bFitToSize=(eFit==SDRTEXTFIT_PROPORTIONAL || eFit==SDRTEXTFIT_ALLLINES); - FASTBOOL bContourFrame=IsContourTextFrame(); + //bool bFitToSize=(eFit==SDRTEXTFIT_PROPORTIONAL || eFit==SDRTEXTFIT_ALLLINES); + bool bContourFrame=IsContourTextFrame(); //EVAnchorMode eAM=(EVAnchorMode)GetOutlinerViewAnchorMode(); //ULONG nViewAnz=pEdtOutl->GetViewCount(); pEdtOutl->SetMinAutoPaperSize(aPaperMin); diff --git a/svx/source/svdraw/svdotxfl.cxx b/svx/source/svdraw/svdotxfl.cxx index fe21621c1b9a..b9b2bff7c4c2 100644 --- a/svx/source/svdraw/svdotxfl.cxx +++ b/svx/source/svdraw/svdotxfl.cxx @@ -50,8 +50,8 @@ void SdrRegisterFieldClasses() ///////////////////////////////////////////////////////////////////////////////////////////////// */ -FASTBOOL SdrTextObj::CalcFieldValue(const SvxFieldItem& /*rField*/, USHORT /*nPara*/, USHORT /*nPos*/, - FASTBOOL /*bEdit*/, Color*& /*rpTxtColor*/, Color*& /*rpFldColor*/, XubString& /*rRet*/) const +bool SdrTextObj::CalcFieldValue(const SvxFieldItem& /*rField*/, USHORT /*nPara*/, USHORT /*nPos*/, + bool /*bEdit*/, Color*& /*rpTxtColor*/, Color*& /*rpFldColor*/, XubString& /*rRet*/) const { return FALSE; } diff --git a/svx/source/svdraw/svdotxln.cxx b/svx/source/svdraw/svdotxln.cxx index 7d176fbfe811..dd90a54f5555 100644 --- a/svx/source/svdraw/svdotxln.cxx +++ b/svx/source/svdraw/svdotxln.cxx @@ -101,7 +101,7 @@ void ImpSdrObjTextLink::Closed() void ImpSdrObjTextLink::DataChanged( const String& /*rMimeType*/, const ::com::sun::star::uno::Any & /*rValue */) { - FASTBOOL bForceReload=FALSE; + bool bForceReload = false; SdrModel* pModel = pSdrObj ? pSdrObj->GetModel() : 0; sfx2::LinkManager* pLinkManager= pModel ? pModel->GetLinkManager() : 0; if( pLinkManager ) @@ -119,7 +119,7 @@ void ImpSdrObjTextLink::DataChanged( const String& /*rMimeType*/, pData->aFileName = aFile; pData->aFilterName = aFilter; pSdrObj->SetChanged(); - bForceReload = TRUE; + bForceReload = true; } } } @@ -208,10 +208,10 @@ void SdrTextObj::ReleaseTextLink() } } -FASTBOOL SdrTextObj::ReloadLinkedText( FASTBOOL bForceLoad) +bool SdrTextObj::ReloadLinkedText( bool bForceLoad) { ImpSdrObjTextLinkUserData* pData = GetLinkUserData(); - FASTBOOL bRet = TRUE; + bool bRet = true; if( pData ) { @@ -260,7 +260,7 @@ FASTBOOL SdrTextObj::ReloadLinkedText( FASTBOOL bForceLoad) return bRet; } -FASTBOOL SdrTextObj::LoadText(const String& rFileName, const String& /*rFilterName*/, rtl_TextEncoding eCharSet) +bool SdrTextObj::LoadText(const String& rFileName, const String& /*rFilterName*/, rtl_TextEncoding eCharSet) { INetURLObject aFileURL( rFileName ); BOOL bRet = FALSE; diff --git a/svx/source/svdraw/svdotxtr.cxx b/svx/source/svdraw/svdotxtr.cxx index 96878f6926b6..4b0cd4671ea0 100644 --- a/svx/source/svdraw/svdotxtr.cxx +++ b/svx/source/svdraw/svdotxtr.cxx @@ -119,7 +119,7 @@ long SdrTextObj::GetRotateAngle() const return aGeo.nDrehWink; } -long SdrTextObj::GetShearAngle(FASTBOOL /*bVertical*/) const +long SdrTextObj::GetShearAngle(bool /*bVertical*/) const { return aGeo.nShearWink; } @@ -134,14 +134,14 @@ void SdrTextObj::NbcMove(const Size& rSiz) void SdrTextObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) { - FASTBOOL bNoShearMerk=aGeo.nShearWink==0; - FASTBOOL bRota90Merk=bNoShearMerk && aGeo.nDrehWink % 9000 ==0; + bool bNoShearMerk=aGeo.nShearWink==0; + bool bRota90Merk=bNoShearMerk && aGeo.nDrehWink % 9000 ==0; long nHDist=GetTextLeftDistance()+GetTextRightDistance(); long nVDist=GetTextUpperDistance()+GetTextLowerDistance(); long nTWdt0=aRect.GetWidth ()-1-nHDist; if (nTWdt0<0) nTWdt0=0; long nTHgt0=aRect.GetHeight()-1-nVDist; if (nTHgt0<0) nTHgt0=0; - FASTBOOL bXMirr=(xFact.GetNumerator()<0) != (xFact.GetDenominator()<0); - FASTBOOL bYMirr=(yFact.GetNumerator()<0) != (yFact.GetDenominator()<0); + bool bXMirr=(xFact.GetNumerator()<0) != (xFact.GetDenominator()<0); + bool bYMirr=(yFact.GetNumerator()<0) != (yFact.GetDenominator()<0); if (bXMirr || bYMirr) { Point aRef1(GetSnapRect().Center()); if (bXMirr) { @@ -199,7 +199,7 @@ void SdrTextObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fract } if (bRota90Merk) { - FASTBOOL bRota90=aGeo.nDrehWink % 9000 ==0; + bool bRota90=aGeo.nDrehWink % 9000 ==0; if (!bRota90) { // Scheinbar Rundungsfehler: Korregieren long a=NormAngle360(aGeo.nDrehWink); if (a<4500) a=0; @@ -252,7 +252,7 @@ void SdrTextObj::NbcRotate(const Point& rRef, long nWink, double sn, double cs) SetGlueReallyAbsolute(FALSE); } -void SdrTextObj::NbcShear(const Point& rRef, long nWink, double tn, FASTBOOL bVShear) +void SdrTextObj::NbcShear(const Point& rRef, long nWink, double tn, bool bVShear) { SetGlueReallyAbsolute(TRUE); @@ -277,8 +277,8 @@ void SdrTextObj::NbcShear(const Point& rRef, long nWink, double tn, FASTBOOL bVS void SdrTextObj::NbcMirror(const Point& rRef1, const Point& rRef2) { SetGlueReallyAbsolute(TRUE); - FASTBOOL bNoShearMerk=aGeo.nShearWink==0; - FASTBOOL bRota90Merk=FALSE; + bool bNoShearMerk=aGeo.nShearWink==0; + bool bRota90Merk = false; if (bNoShearMerk && (rRef1.X()==rRef2.X() || rRef1.Y()==rRef2.Y() || Abs(rRef1.X()-rRef2.X())==Abs(rRef1.Y()-rRef2.Y()))) { @@ -300,7 +300,7 @@ void SdrTextObj::NbcMirror(const Point& rRef1, const Point& rRef2) Poly2Rect(aPol,aRect,aGeo); if (bRota90Merk) { - FASTBOOL bRota90=aGeo.nDrehWink % 9000 ==0; + bool bRota90=aGeo.nDrehWink % 9000 ==0; if (bRota90Merk && !bRota90) { // Scheinbar Rundungsfehler: Korregieren long a=NormAngle360(aGeo.nDrehWink); if (a<4500) a=0; @@ -506,7 +506,7 @@ SdrObject* SdrTextObj::ImpConvertMakeObj(const basegfx::B2DPolyPolygon& rPolyPol return pPathObj; } -SdrObject* SdrTextObj::ImpConvertAddText(SdrObject* pObj, FASTBOOL bBezier) const +SdrObject* SdrTextObj::ImpConvertAddText(SdrObject* pObj, bool bBezier) const { if(!ImpCanConvTextToCurve()) { diff --git a/svx/source/svdraw/svdoutl.cxx b/svx/source/svdraw/svdoutl.cxx index 79e74a3382b8..9e5e37dec013 100644 --- a/svx/source/svdraw/svdoutl.cxx +++ b/svx/source/svdraw/svdoutl.cxx @@ -111,7 +111,7 @@ void SdrOutliner::SetTextObjNoInit( const SdrTextObj* pObj ) XubString SdrOutliner::CalcFieldValue(const SvxFieldItem& rField, USHORT nPara, USHORT nPos, Color*& rpTxtColor, Color*& rpFldColor) { - FASTBOOL bOk = FALSE; + bool bOk = false; XubString aRet; if(mpTextObj.is()) diff --git a/svx/source/svdraw/svdovirt.cxx b/svx/source/svdraw/svdovirt.cxx index c97af7abc37c..17118656e5a6 100644 --- a/svx/source/svdraw/svdovirt.cxx +++ b/svx/source/svdraw/svdovirt.cxx @@ -347,22 +347,22 @@ String SdrVirtObj::getSpecialDragComment(const SdrDragStat& rDrag) const //////////////////////////////////////////////////////////////////////////////////////////////////// -FASTBOOL SdrVirtObj::BegCreate(SdrDragStat& rStat) +bool SdrVirtObj::BegCreate(SdrDragStat& rStat) { return rRefObj.BegCreate(rStat); } -FASTBOOL SdrVirtObj::MovCreate(SdrDragStat& rStat) +bool SdrVirtObj::MovCreate(SdrDragStat& rStat) { return rRefObj.MovCreate(rStat); } -FASTBOOL SdrVirtObj::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) +bool SdrVirtObj::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) { return rRefObj.EndCreate(rStat,eCmd); } -FASTBOOL SdrVirtObj::BckCreate(SdrDragStat& rStat) +bool SdrVirtObj::BckCreate(SdrDragStat& rStat) { return rRefObj.BckCreate(rStat); } @@ -404,7 +404,7 @@ void SdrVirtObj::NbcMirror(const Point& rRef1, const Point& rRef2) SetRectsDirty(); } -void SdrVirtObj::NbcShear(const Point& rRef, long nWink, double tn, FASTBOOL bVShear) +void SdrVirtObj::NbcShear(const Point& rRef, long nWink, double tn, bool bVShear) { rRefObj.NbcShear(rRef-aAnchor,nWink,tn,bVShear); SetRectsDirty(); @@ -452,7 +452,7 @@ void SdrVirtObj::Mirror(const Point& rRef1, const Point& rRef2) SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0); } -void SdrVirtObj::Shear(const Point& rRef, long nWink, double tn, FASTBOOL bVShear) +void SdrVirtObj::Shear(const Point& rRef, long nWink, double tn, bool bVShear) { if (nWink!=0) { Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetLastBoundRect(); @@ -531,7 +531,7 @@ long SdrVirtObj::GetRotateAngle() const return rRefObj.GetRotateAngle(); } -long SdrVirtObj::GetShearAngle(FASTBOOL bVertical) const +long SdrVirtObj::GetShearAngle(bool bVertical) const { return rRefObj.GetShearAngle(bVertical); } @@ -620,7 +620,7 @@ void SdrVirtObj::ReformatText() //////////////////////////////////////////////////////////////////////////////////////////////////// -FASTBOOL SdrVirtObj::HasMacro() const +bool SdrVirtObj::HasMacro() const { return rRefObj.HasMacro(); } @@ -640,7 +640,7 @@ void SdrVirtObj::PaintMacro(OutputDevice& rOut, const Rectangle& rDirtyRect, con rRefObj.PaintMacro(rOut,rDirtyRect,rRec); // Todo: Positionsversatz } -FASTBOOL SdrVirtObj::DoMacro(const SdrObjMacroHitRec& rRec) +bool SdrVirtObj::DoMacro(const SdrObjMacroHitRec& rRec) { return rRefObj.DoMacro(rRec); // Todo: Positionsversatz } diff --git a/svx/source/svdraw/svdpage.cxx b/svx/source/svdraw/svdpage.cxx index 592f41543132..a3912be55610 100644 --- a/svx/source/svdraw/svdpage.cxx +++ b/svx/source/svdraw/svdpage.cxx @@ -772,9 +772,9 @@ SdrObject* SdrObjList::GetObj(ULONG nNum) const -FASTBOOL SdrObjList::IsReadOnly() const +bool SdrObjList::IsReadOnly() const { - FASTBOOL bRet=FALSE; + bool bRet = false; if (pPage!=NULL && pPage!=this) bRet=pPage->IsReadOnly(); return bRet; } @@ -1859,13 +1859,13 @@ SfxStyleSheet* SdrPage::GetTextStyleSheetForObject( SdrObject* pObj ) const return pObj->GetStyleSheet(); } -FASTBOOL SdrPage::HasTransparentObjects( BOOL bCheckForAlphaChannel ) const +bool SdrPage::HasTransparentObjects( BOOL bCheckForAlphaChannel ) const { - FASTBOOL bRet = FALSE; + bool bRet = false; for( ULONG n = 0, nCount = GetObjCount(); ( n < nCount ) && !bRet; n++ ) if( GetObj( n )->IsTransparent( bCheckForAlphaChannel ) ) - bRet = TRUE; + bRet = true; return bRet; } @@ -1936,12 +1936,12 @@ void SdrPage::ActionChanged() const } // NYI: Dummy implementations for declarations in svdpage.hxx -Bitmap SdrPage::GetBitmap(const SetOfByte& /*rVisibleLayers*/, FASTBOOL /*bTrimBorders*/) const +Bitmap SdrPage::GetBitmap(const SetOfByte& /*rVisibleLayers*/, bool /*bTrimBorders*/) const { DBG_ASSERT(0, "SdrPage::GetBitmap(): not yet implemented."); return Bitmap(); } -GDIMetaFile SdrPage::GetMetaFile(const SetOfByte& /*rVisibleLayers*/, FASTBOOL /*bTrimBorders*/) +GDIMetaFile SdrPage::GetMetaFile(const SetOfByte& /*rVisibleLayers*/, bool /*bTrimBorders*/) { DBG_ASSERT(0, "SdrPage::GetMetaFile(): not yet implemented."); return GDIMetaFile(); diff --git a/svx/source/svdraw/svdpagv.cxx b/svx/source/svdraw/svdpagv.cxx index bad1401c2305..f391e3ef94bf 100644 --- a/svx/source/svdraw/svdpagv.cxx +++ b/svx/source/svdraw/svdpagv.cxx @@ -330,7 +330,7 @@ void SdrPageView::PaintOutlinerView(OutputDevice* pOut, const Rectangle& rRect) if (GetView().pTextEditOutliner==NULL) return; //const SdrObject* pTextObjTmp=GetView().GetTextEditObject(); //const SdrTextObj* pText=PTR_CAST(SdrTextObj,pTextObjTmp); - //FASTBOOL bTextFrame=pText!=NULL && pText->IsTextFrame(); + //bool bTextFrame=pText!=NULL && pText->IsTextFrame(); ULONG nViewAnz=GetView().pTextEditOutliner->GetViewCount(); for (ULONG i=0; i<nViewAnz; i++) { OutlinerView* pOLV=GetView().pTextEditOutliner->GetView(i); @@ -535,8 +535,8 @@ void SdrPageView::DrawPageViewGrid(OutputDevice& rOut, const Rectangle& rRect, C Size aMinDotDist(rOut.PixelToLogic(Size(nMinDotPix,nMinDotPix))); //Size a3PixSiz(rOut.PixelToLogic(Size(2,2))); Size aMinLinDist(rOut.PixelToLogic(Size(nMinLinPix,nMinLinPix))); - FASTBOOL bHoriSolid=nx2<aMinDotDist.Width(); - FASTBOOL bVertSolid=ny2<aMinDotDist.Height(); + bool bHoriSolid=nx2<aMinDotDist.Width(); + bool bVertSolid=ny2<aMinDotDist.Height(); // Linienabstand vergroessern (mind. 4 Pixel) // Vergroesserung: *2 *5 *10 *20 *50 *100 ... int nTgl=0; @@ -571,10 +571,10 @@ void SdrPageView::DrawPageViewGrid(OutputDevice& rOut, const Rectangle& rRect, C //if (nx2<a2PixSiz.Width()) nx2=nx1; //if (ny2<a2PixSiz.Height()) ny2=ny1; - FASTBOOL bHoriFine=nx2<nx1; - FASTBOOL bVertFine=ny2<ny1; - FASTBOOL bHoriLines=bHoriSolid || bHoriFine || !bVertFine; - FASTBOOL bVertLines=bVertSolid || bVertFine; + bool bHoriFine=nx2<nx1; + bool bVertFine=ny2<ny1; + bool bHoriLines=bHoriSolid || bHoriFine || !bVertFine; + bool bVertLines=bVertSolid || bVertFine; Color aColorMerk( rOut.GetLineColor() ); rOut.SetLineColor( aColor ); @@ -845,11 +845,11 @@ void SdrPageView::SetHelpLines(const SdrHelpLineList& rHLL) void SdrPageView::SetHelpLine(USHORT nNum, const SdrHelpLine& rNewHelpLine) { if (nNum<aHelpLines.GetCount() && aHelpLines[nNum]!=rNewHelpLine) { - FASTBOOL bNeedRedraw=TRUE; + bool bNeedRedraw = true; if (aHelpLines[nNum].GetKind()==rNewHelpLine.GetKind()) { switch (rNewHelpLine.GetKind()) { - case SDRHELPLINE_VERTICAL : if (aHelpLines[nNum].GetPos().X()==rNewHelpLine.GetPos().X()) bNeedRedraw=FALSE; break; - case SDRHELPLINE_HORIZONTAL: if (aHelpLines[nNum].GetPos().Y()==rNewHelpLine.GetPos().Y()) bNeedRedraw=FALSE; break; + case SDRHELPLINE_VERTICAL : if (aHelpLines[nNum].GetPos().X()==rNewHelpLine.GetPos().X()) bNeedRedraw = false; break; + case SDRHELPLINE_HORIZONTAL: if (aHelpLines[nNum].GetPos().Y()==rNewHelpLine.GetPos().Y()) bNeedRedraw = false; break; default: break; } // switch } diff --git a/svx/source/svdraw/svdtext.cxx b/svx/source/svdraw/svdtext.cxx index 29018b6084ea..afa9f97a5d6c 100644 --- a/svx/source/svdraw/svdtext.cxx +++ b/svx/source/svdraw/svdtext.cxx @@ -144,7 +144,7 @@ void SdrText::SetModel( SdrModel* pNewModel ) MapUnit aOldUnit(pOldModel->GetScaleUnit()); MapUnit aNewUnit(pNewModel->GetScaleUnit()); - FASTBOOL bScaleUnitChanged=aNewUnit!=aOldUnit; + bool bScaleUnitChanged=aNewUnit!=aOldUnit; // und nun dem OutlinerParaObject einen neuen Pool verpassen // !!! Hier muss noch DefTab und RefDevice der beiden Models // !!! verglichen werden und dann ggf. AutoGrow zuschlagen !!! diff --git a/svx/source/svdraw/svdtrans.cxx b/svx/source/svdraw/svdtrans.cxx index ad4cf3763241..4e81f13a9fc4 100644 --- a/svx/source/svdraw/svdtrans.cxx +++ b/svx/source/svdraw/svdtrans.cxx @@ -51,7 +51,7 @@ void MoveXPoly(XPolyPolygon& rPoly, const Size& S) //////////////////////////////////////////////////////////////////////////////////////////////////// -void ResizeRect(Rectangle& rRect, const Point& rRef, const Fraction& rxFact, const Fraction& ryFact, FASTBOOL bNoJustify) +void ResizeRect(Rectangle& rRect, const Point& rRef, const Fraction& rxFact, const Fraction& ryFact, bool bNoJustify) { Fraction xFact(rxFact); Fraction yFact(ryFact); @@ -159,7 +159,7 @@ void RotateXPoly(XPolyPolygon& rPoly, const Point& rRef, double sn, double cs) //////////////////////////////////////////////////////////////////////////////////////////////////// -void MirrorRect(Rectangle& rRect, const Point& /*rRef1*/, const Point& /*rRef2*/, FASTBOOL bNoJustify) +void MirrorRect(Rectangle& rRect, const Point& /*rRef1*/, const Point& /*rRef2*/, bool bNoJustify) { // !!! fehlende Implementation !!! if (!bNoJustify) rRect.Justify(); @@ -234,7 +234,7 @@ void MirrorXPoly(XPolyPolygon& rPoly, const Point& rRef1, const Point& rRef2) //////////////////////////////////////////////////////////////////////////////////////////////////// -void ShearPoly(Polygon& rPoly, const Point& rRef, double tn, FASTBOOL bVShear) +void ShearPoly(Polygon& rPoly, const Point& rRef, double tn, bool bVShear) { USHORT nAnz=rPoly.GetSize(); for (USHORT i=0; i<nAnz; i++) { @@ -242,7 +242,7 @@ void ShearPoly(Polygon& rPoly, const Point& rRef, double tn, FASTBOOL bVShear) } } -void ShearXPoly(XPolygon& rPoly, const Point& rRef, double tn, FASTBOOL bVShear) +void ShearXPoly(XPolygon& rPoly, const Point& rRef, double tn, bool bVShear) { USHORT nAnz=rPoly.GetPointCount(); for (USHORT i=0; i<nAnz; i++) { @@ -250,7 +250,7 @@ void ShearXPoly(XPolygon& rPoly, const Point& rRef, double tn, FASTBOOL bVShear) } } -void ShearPoly(PolyPolygon& rPoly, const Point& rRef, double tn, FASTBOOL bVShear) +void ShearPoly(PolyPolygon& rPoly, const Point& rRef, double tn, bool bVShear) { USHORT nAnz=rPoly.Count(); for (USHORT i=0; i<nAnz; i++) { @@ -258,7 +258,7 @@ void ShearPoly(PolyPolygon& rPoly, const Point& rRef, double tn, FASTBOOL bVShea } } -void ShearXPoly(XPolyPolygon& rPoly, const Point& rRef, double tn, FASTBOOL bVShear) +void ShearXPoly(XPolyPolygon& rPoly, const Point& rRef, double tn, bool bVShear) { USHORT nAnz=rPoly.Count(); for (USHORT i=0; i<nAnz; i++) { @@ -279,10 +279,10 @@ void ShearXPoly(XPolyPolygon& rPoly, const Point& rRef, double tn, FASTBOOL bVSh //////////////////////////////////////////////////////////////////////////////////////////////////// double CrookRotateXPoint(Point& rPnt, Point* pC1, Point* pC2, const Point& rCenter, - const Point& rRad, double& rSin, double& rCos, FASTBOOL bVert) + const Point& rRad, double& rSin, double& rCos, bool bVert) { - FASTBOOL bC1=pC1!=NULL; - FASTBOOL bC2=pC2!=NULL; + bool bC1=pC1!=NULL; + bool bC2=pC2!=NULL; long x0=rPnt.X(); long y0=rPnt.Y(); long cx=rCenter.X(); @@ -333,10 +333,10 @@ double CrookRotateXPoint(Point& rPnt, Point* pC1, Point* pC2, const Point& rCent } double CrookSlantXPoint(Point& rPnt, Point* pC1, Point* pC2, const Point& rCenter, - const Point& rRad, double& rSin, double& rCos, FASTBOOL bVert) + const Point& rRad, double& rSin, double& rCos, bool bVert) { - FASTBOOL bC1=pC1!=NULL; - FASTBOOL bC2=pC2!=NULL; + bool bC1=pC1!=NULL; + bool bC2=pC2!=NULL; long x0=rPnt.X(); long y0=rPnt.Y(); long dx1=0,dy1=0; @@ -388,11 +388,11 @@ double CrookSlantXPoint(Point& rPnt, Point* pC1, Point* pC2, const Point& rCente } double CrookStretchXPoint(Point& rPnt, Point* pC1, Point* pC2, const Point& rCenter, - const Point& rRad, double& rSin, double& rCos, FASTBOOL bVert, + const Point& rRad, double& rSin, double& rCos, bool bVert, const Rectangle rRefRect) { - //FASTBOOL bC1=pC1!=NULL; - //FASTBOOL bC2=pC2!=NULL; + //bool bC1=pC1!=NULL; + //bool bC2=pC2!=NULL; //long x0=rPnt.X(); long y0=rPnt.Y(); CrookSlantXPoint(rPnt,pC1,pC2,rCenter,rRad,rSin,rCos,bVert); @@ -403,7 +403,7 @@ double CrookStretchXPoint(Point& rPnt, Point* pC1, Point* pC2, const Point& rCen long nBtm=rRefRect.Bottom(); long nHgt=nBtm-nTop; long dy=rPnt.Y()-y0; - //FASTBOOL bOben=rRad.Y()<0; + //bool bOben=rRad.Y()<0; double a=((double)(y0-nTop))/nHgt; a*=dy; rPnt.Y()=y0+Round(a); @@ -412,7 +412,7 @@ double CrookStretchXPoint(Point& rPnt, Point* pC1, Point* pC2, const Point& rCen //////////////////////////////////////////////////////////////////////////////////////////////////// -void CrookRotatePoly(XPolygon& rPoly, const Point& rCenter, const Point& rRad, FASTBOOL bVert) +void CrookRotatePoly(XPolygon& rPoly, const Point& rCenter, const Point& rRad, bool bVert) { double nSin,nCos; USHORT nPointAnz=rPoly.GetPointCount(); @@ -435,7 +435,7 @@ void CrookRotatePoly(XPolygon& rPoly, const Point& rCenter, const Point& rRad, F } } -void CrookSlantPoly(XPolygon& rPoly, const Point& rCenter, const Point& rRad, FASTBOOL bVert) +void CrookSlantPoly(XPolygon& rPoly, const Point& rCenter, const Point& rRad, bool bVert) { double nSin,nCos; USHORT nPointAnz=rPoly.GetPointCount(); @@ -458,7 +458,7 @@ void CrookSlantPoly(XPolygon& rPoly, const Point& rCenter, const Point& rRad, FA } } -void CrookStretchPoly(XPolygon& rPoly, const Point& rCenter, const Point& rRad, FASTBOOL bVert, const Rectangle rRefRect) +void CrookStretchPoly(XPolygon& rPoly, const Point& rCenter, const Point& rRad, bool bVert, const Rectangle rRefRect) { double nSin,nCos; USHORT nPointAnz=rPoly.GetPointCount(); @@ -483,7 +483,7 @@ void CrookStretchPoly(XPolygon& rPoly, const Point& rCenter, const Point& rRad, //////////////////////////////////////////////////////////////////////////////////////////////////// -void CrookRotatePoly(XPolyPolygon& rPoly, const Point& rCenter, const Point& rRad, FASTBOOL bVert) +void CrookRotatePoly(XPolyPolygon& rPoly, const Point& rCenter, const Point& rRad, bool bVert) { USHORT nPolyAnz=rPoly.Count(); for (USHORT nPolyNum=0; nPolyNum<nPolyAnz; nPolyNum++) { @@ -491,7 +491,7 @@ void CrookRotatePoly(XPolyPolygon& rPoly, const Point& rCenter, const Point& rRa } } -void CrookSlantPoly(XPolyPolygon& rPoly, const Point& rCenter, const Point& rRad, FASTBOOL bVert) +void CrookSlantPoly(XPolyPolygon& rPoly, const Point& rCenter, const Point& rRad, bool bVert) { USHORT nPolyAnz=rPoly.Count(); for (USHORT nPolyNum=0; nPolyNum<nPolyAnz; nPolyNum++) { @@ -499,7 +499,7 @@ void CrookSlantPoly(XPolyPolygon& rPoly, const Point& rCenter, const Point& rRad } } -void CrookStretchPoly(XPolyPolygon& rPoly, const Point& rCenter, const Point& rRad, FASTBOOL bVert, const Rectangle rRefRect) +void CrookStretchPoly(XPolyPolygon& rPoly, const Point& rCenter, const Point& rRad, bool bVert, const Rectangle rRefRect) { USHORT nPolyAnz=rPoly.Count(); for (USHORT nPolyNum=0; nPolyNum<nPolyAnz; nPolyNum++) { @@ -644,7 +644,7 @@ void Poly2Rect(const Polygon& rPol, Rectangle& rRect, GeoStat& rGeo) nShW-=27000; // ShearWink wird zur Senkrechten gemessen nShW=-nShW; // Negieren, denn '+' ist Rechtskursivierung - FASTBOOL bMirr=aPt3.Y()<0; + bool bMirr=aPt3.Y()<0; if (bMirr) { // "Punktetausch" bei Spiegelung nHgt=-nHgt; nShW+=18000; @@ -666,7 +666,7 @@ void Poly2Rect(const Polygon& rPol, Rectangle& rRect, GeoStat& rGeo) //////////////////////////////////////////////////////////////////////////////////////////////////// -void OrthoDistance8(const Point& rPt0, Point& rPt, FASTBOOL bBigOrtho) +void OrthoDistance8(const Point& rPt0, Point& rPt, bool bBigOrtho) { long dx=rPt.X()-rPt0.X(); long dy=rPt.Y()-rPt0.Y(); @@ -682,7 +682,7 @@ void OrthoDistance8(const Point& rPt0, Point& rPt, FASTBOOL bBigOrtho) } } -void OrthoDistance4(const Point& rPt0, Point& rPt, FASTBOOL bBigOrtho) +void OrthoDistance4(const Point& rPt0, Point& rPt, bool bBigOrtho) { long dx=rPt.X()-rPt0.X(); long dy=rPt.Y()-rPt0.Y(); @@ -718,7 +718,7 @@ void Kuerzen(Fraction& rF, unsigned nDigits) { INT32 nMul=rF.GetNumerator(); INT32 nDiv=rF.GetDenominator(); - FASTBOOL bNeg=FALSE; + bool bNeg = false; if (nMul<0) { nMul=-nMul; bNeg=!bNeg; } if (nDiv<0) { nDiv=-nDiv; bNeg=!bNeg; } if (nMul==0 || nDiv==0) return; @@ -809,8 +809,8 @@ FrPair GetMapFactor(MapUnit eS, MapUnit eD) if (eS==eD) return FrPair(1,1,1,1); FrPair aS(GetInchOrMM(eS)); FrPair aD(GetInchOrMM(eD)); - FASTBOOL bSInch=IsInch(eS); - FASTBOOL bDInch=IsInch(eD); + bool bSInch=IsInch(eS); + bool bDInch=IsInch(eD); FrPair aRet(aD.X()/aS.X(),aD.Y()/aS.Y()); if (bSInch && !bDInch) { aRet.X()*=Fraction(127,5); aRet.Y()*=Fraction(127,5); } if (!bSInch && bDInch) { aRet.X()*=Fraction(5,127); aRet.Y()*=Fraction(5,127); } @@ -821,8 +821,8 @@ FrPair GetMapFactor(MapUnit eS, FieldUnit eD) { FrPair aS(GetInchOrMM(eS)); FrPair aD(GetInchOrMM(eD)); - FASTBOOL bSInch=IsInch(eS); - FASTBOOL bDInch=IsInch(eD); + bool bSInch=IsInch(eS); + bool bDInch=IsInch(eD); FrPair aRet(aD.X()/aS.X(),aD.Y()/aS.Y()); if (bSInch && !bDInch) { aRet.X()*=Fraction(127,5); aRet.Y()*=Fraction(127,5); } if (!bSInch && bDInch) { aRet.X()*=Fraction(5,127); aRet.Y()*=Fraction(5,127); } @@ -833,8 +833,8 @@ FrPair GetMapFactor(FieldUnit eS, MapUnit eD) { FrPair aS(GetInchOrMM(eS)); FrPair aD(GetInchOrMM(eD)); - FASTBOOL bSInch=IsInch(eS); - FASTBOOL bDInch=IsInch(eD); + bool bSInch=IsInch(eS); + bool bDInch=IsInch(eD); FrPair aRet(aD.X()/aS.X(),aD.Y()/aS.Y()); if (bSInch && !bDInch) { aRet.X()*=Fraction(127,5); aRet.Y()*=Fraction(127,5); } if (!bSInch && bDInch) { aRet.X()*=Fraction(5,127); aRet.Y()*=Fraction(5,127); } @@ -846,8 +846,8 @@ FrPair GetMapFactor(FieldUnit eS, FieldUnit eD) if (eS==eD) return FrPair(1,1,1,1); FrPair aS(GetInchOrMM(eS)); FrPair aD(GetInchOrMM(eD)); - FASTBOOL bSInch=IsInch(eS); - FASTBOOL bDInch=IsInch(eD); + bool bSInch=IsInch(eS); + bool bDInch=IsInch(eD); FrPair aRet(aD.X()/aS.X(),aD.Y()/aS.Y()); if (bSInch && !bDInch) { aRet.X()*=Fraction(127,5); aRet.Y()*=Fraction(127,5); } if (!bSInch && bDInch) { aRet.X()*=Fraction(5,127); aRet.Y()*=Fraction(5,127); } @@ -863,24 +863,24 @@ FrPair GetMapFactor(FieldUnit eS, FieldUnit eD) // 1 yd = 3 ft = 36" = 914,4mm // 1 ft = 12 " = 1" = 304,8mm -void GetMeterOrInch(MapUnit eMU, short& rnKomma, long& rnMul, long& rnDiv, FASTBOOL& rbMetr, FASTBOOL& rbInch) +void GetMeterOrInch(MapUnit eMU, short& rnKomma, long& rnMul, long& rnDiv, bool& rbMetr, bool& rbInch) { rnMul=1; rnDiv=1; short nKomma=0; - FASTBOOL bMetr=FALSE,bInch=FALSE; + bool bMetr = false, bInch = false; switch (eMU) { // Metrisch - case MAP_100TH_MM : bMetr=TRUE; nKomma=5; break; - case MAP_10TH_MM : bMetr=TRUE; nKomma=4; break; - case MAP_MM : bMetr=TRUE; nKomma=3; break; - case MAP_CM : bMetr=TRUE; nKomma=2; break; + case MAP_100TH_MM : bMetr = true; nKomma=5; break; + case MAP_10TH_MM : bMetr = true; nKomma=4; break; + case MAP_MM : bMetr = true; nKomma=3; break; + case MAP_CM : bMetr = true; nKomma=2; break; // Inch - case MAP_1000TH_INCH: bInch=TRUE; nKomma=3; break; - case MAP_100TH_INCH : bInch=TRUE; nKomma=2; break; - case MAP_10TH_INCH : bInch=TRUE; nKomma=1; break; - case MAP_INCH : bInch=TRUE; nKomma=0; break; - case MAP_POINT : bInch=TRUE; rnDiv=72; break; // 1Pt = 1/72" - case MAP_TWIP : bInch=TRUE; rnDiv=144; nKomma=1; break; // 1Twip = 1/1440" + case MAP_1000TH_INCH: bInch = true; nKomma=3; break; + case MAP_100TH_INCH : bInch = true; nKomma=2; break; + case MAP_10TH_INCH : bInch = true; nKomma=1; break; + case MAP_INCH : bInch = true; nKomma=0; break; + case MAP_POINT : bInch = true; rnDiv=72; break; // 1Pt = 1/72" + case MAP_TWIP : bInch = true; rnDiv=144; nKomma=1; break; // 1Twip = 1/1440" // Sonstiges case MAP_PIXEL : break; case MAP_SYSFONT : break; @@ -893,26 +893,26 @@ void GetMeterOrInch(MapUnit eMU, short& rnKomma, long& rnMul, long& rnDiv, FASTB rbInch=bInch; } -void GetMeterOrInch(FieldUnit eFU, short& rnKomma, long& rnMul, long& rnDiv, FASTBOOL& rbMetr, FASTBOOL& rbInch) +void GetMeterOrInch(FieldUnit eFU, short& rnKomma, long& rnMul, long& rnDiv, bool& rbMetr, bool& rbInch) { rnMul=1; rnDiv=1; short nKomma=0; - FASTBOOL bMetr=FALSE,bInch=FALSE; + bool bMetr = false, bInch = false; switch (eFU) { case FUNIT_NONE : break; // Metrisch - case FUNIT_100TH_MM : bMetr=TRUE; nKomma=5; break; - case FUNIT_MM : bMetr=TRUE; nKomma=3; break; - case FUNIT_CM : bMetr=TRUE; nKomma=2; break; - case FUNIT_M : bMetr=TRUE; nKomma=0; break; - case FUNIT_KM : bMetr=TRUE; nKomma=-3; break; + case FUNIT_100TH_MM : bMetr = true; nKomma=5; break; + case FUNIT_MM : bMetr = true; nKomma=3; break; + case FUNIT_CM : bMetr = true; nKomma=2; break; + case FUNIT_M : bMetr = true; nKomma=0; break; + case FUNIT_KM : bMetr = true; nKomma=-3; break; // Inch - case FUNIT_TWIP : bInch=TRUE; rnDiv=144; nKomma=1; break; // 1Twip = 1/1440" - case FUNIT_POINT : bInch=TRUE; rnDiv=72; break; // 1Pt = 1/72" - case FUNIT_PICA : bInch=TRUE; rnDiv=6; break; // 1Pica = 1/6" ? - case FUNIT_INCH : bInch=TRUE; break; // 1" = 1" - case FUNIT_FOOT : bInch=TRUE; rnMul=12; break; // 1Ft = 12" - case FUNIT_MILE : bInch=TRUE; rnMul=6336; nKomma=-1; break; // 1mile = 63360" + case FUNIT_TWIP : bInch = true; rnDiv=144; nKomma=1; break; // 1Twip = 1/1440" + case FUNIT_POINT : bInch = true; rnDiv=72; break; // 1Pt = 1/72" + case FUNIT_PICA : bInch = true; rnDiv=6; break; // 1Pica = 1/6" ? + case FUNIT_INCH : bInch = true; break; // 1" = 1" + case FUNIT_FOOT : bInch = true; rnMul=12; break; // 1Ft = 12" + case FUNIT_MILE : bInch = true; rnMul=6336; nKomma=-1; break; // 1mile = 63360" // sonstiges case FUNIT_CUSTOM : break; case FUNIT_PERCENT : nKomma=2; break; @@ -925,7 +925,7 @@ void GetMeterOrInch(FieldUnit eFU, short& rnKomma, long& rnMul, long& rnDiv, FAS void SdrFormatter::Undirty() { if (aScale.GetNumerator()==0 || aScale.GetDenominator()==0) aScale=Fraction(1,1); - FASTBOOL bSrcMetr,bSrcInch,bDstMetr,bDstInch; + bool bSrcMetr,bSrcInch,bDstMetr,bDstInch; long nMul1,nDiv1,nMul2,nDiv2; short nKomma1,nKomma2; // Zunaechst normalisieren auf m bzw. " diff --git a/svx/source/svdraw/svdundo.cxx b/svx/source/svdraw/svdundo.cxx index 667dd3a340b5..8ca08dfe4ed8 100644 --- a/svx/source/svdraw/svdundo.cxx +++ b/svx/source/svdraw/svdundo.cxx @@ -245,7 +245,7 @@ SdrUndoObj::SdrUndoObj(SdrObject& rNewObj): { } -void SdrUndoObj::GetDescriptionStringForObject( const SdrObject& _rForObject, USHORT nStrCacheID, String& rStr, FASTBOOL bRepeat ) +void SdrUndoObj::GetDescriptionStringForObject( const SdrObject& _rForObject, USHORT nStrCacheID, String& rStr, bool bRepeat ) { rStr = ImpGetResStr(nStrCacheID); sal_Char aSearchText[] = "%1"; @@ -271,7 +271,7 @@ void SdrUndoObj::GetDescriptionStringForObject( const SdrObject& _rForObject, US } } -void SdrUndoObj::ImpTakeDescriptionStr(USHORT nStrCacheID, XubString& rStr, FASTBOOL bRepeat) const +void SdrUndoObj::ImpTakeDescriptionStr(USHORT nStrCacheID, XubString& rStr, bool bRepeat) const { if ( pObj ) GetDescriptionStringForObject( *pObj, nStrCacheID, rStr, bRepeat ); @@ -294,7 +294,7 @@ void SdrUndoObj::ImpShowPageOfThisObject() //////////////////////////////////////////////////////////////////////////////////////////////////// -SdrUndoAttrObj::SdrUndoAttrObj(SdrObject& rNewObj, FASTBOOL bStyleSheet1, FASTBOOL bSaveText) +SdrUndoAttrObj::SdrUndoAttrObj(SdrObject& rNewObj, bool bStyleSheet1, bool bSaveText) : SdrUndoObj(rNewObj), pUndoSet(NULL), pRedoSet(NULL), @@ -1209,7 +1209,7 @@ void SdrUndoObjSetText::SdrRepeat(SdrView& rView) bool SdrUndoObjSetText::CanSdrRepeat(SdrView& rView) const { - FASTBOOL bOk=FALSE; + bool bOk = false; if (bNewTextAvailable && rView.AreObjectsMarked()) { bOk=TRUE; } @@ -1470,7 +1470,7 @@ void SdrUndoPage::ImpMovePage(USHORT nOldNum, USHORT nNewNum) } } -void SdrUndoPage::ImpTakeDescriptionStr(USHORT nStrCacheID, XubString& rStr, USHORT /*n*/, FASTBOOL /*bRepeat*/) const +void SdrUndoPage::ImpTakeDescriptionStr(USHORT nStrCacheID, XubString& rStr, USHORT /*n*/, bool /*bRepeat*/) const { rStr=ImpGetResStr(nStrCacheID); } @@ -1572,7 +1572,7 @@ void SdrUndoDelPage::SdrRepeat(SdrView& /*rView*/) bool SdrUndoDelPage::CanSdrRepeat(SdrView& /*rView*/) const { - return FALSE; + return false; } //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -1621,7 +1621,7 @@ void SdrUndoCopyPage::SdrRepeat(SdrView& /*rView*/) bool SdrUndoCopyPage::CanSdrRepeat(SdrView& /*rView*/) const { - return FALSE; + return false; } //////////////////////////////////////////////////////////////////////////////////////////////////// |