diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2013-06-05 11:06:27 +0900 |
---|---|---|
committer | Takeshi Abe <tabe@fixedpoint.jp> | 2013-06-05 11:08:15 +0900 |
commit | 14fa2983af505be39bd72259c41e8ae122830374 (patch) | |
tree | 6249ca21b735519a571432aff3569da7a467fc73 /vcl/source | |
parent | 246d7e280ea8b7d1e27e14a6568d2a65cc8c9e7b (diff) |
sal_Bool to bool
Change-Id: I45bb595a40fe79a4b04096436819a6ec6200eedc
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/filter/sgvspln.cxx | 62 | ||||
-rw-r--r-- | vcl/source/filter/sgvspln.hxx | 8 | ||||
-rw-r--r-- | vcl/source/filter/sgvtext.cxx | 103 |
3 files changed, 86 insertions, 87 deletions
diff --git a/vcl/source/filter/sgvspln.cxx b/vcl/source/filter/sgvspln.cxx index a648ac264a33..79c8ae1139a7 100644 --- a/vcl/source/filter/sgvspln.cxx +++ b/vcl/source/filter/sgvspln.cxx @@ -130,7 +130,7 @@ short basis() /* BASIS maschinenunabhaengig bestimmen */ /*---------------------- MODUL TRIDIAGONAL ------------------------*/ -sal_uInt16 TriDiagGS(sal_Bool rep, sal_uInt16 n, double* lower, +sal_uInt16 TriDiagGS(bool rep, sal_uInt16 n, double* lower, double* diag, double* upper, double* b) /************************/ /* GAUSS-Verfahren fuer */ @@ -173,12 +173,12 @@ sal_uInt16 TriDiagGS(sal_Bool rep, sal_uInt16 n, double* lower, /* diag Hauptdiagonale double diag[n] */ /* upper obere Nebendiagonale double upper[n] */ /* */ -/* bei rep != 0 enthalten lower, diag und upper die */ +/* bei rep = true enthalten lower, diag und upper die */ /* Dreieckzerlegung der Ausgangsmatrix. */ /* */ /* b rechte Seite des Systems double b[n] */ -/* rep = 0 erstmaliger Aufruf sal_Bool rep */ -/* !=0 wiederholter Aufruf */ +/* rep = false erstmaliger Aufruf bool rep */ +/* = true wiederholter Aufruf */ /* fuer gleiche Matrix, */ /* aber verschiedenes b. */ /* */ @@ -187,11 +187,11 @@ sal_uInt16 TriDiagGS(sal_Bool rep, sal_uInt16 n, double* lower, /* b Loesungsvektor des Systems; double b[n] */ /* die urspruengliche rechte Seite wird ueberspeichert */ /* */ -/* lower ) enthalten bei rep = 0 die Zerlegung der Matrix; */ +/* lower ) enthalten bei rep = false die Zerlegung der Matrix;*/ /* diag ) die urspruenglichen Werte von lower u. diag werden */ /* upper ) ueberschrieben */ /* */ -/* Die Determinante der Matrix ist bei rep = 0 durch */ +/* Die Determinante der Matrix ist bei rep = false durch */ /* det A = diag[0] * ... * diag[n-1] bestimmt. */ /* */ /* Rueckgabewert: */ @@ -218,9 +218,9 @@ sal_uInt16 TriDiagGS(sal_Bool rep, sal_uInt16 n, double* lower, if ( n < 2 ) return(1); /* n mindestens 2 */ - /* Wenn rep = 0 ist, */ + /* Wenn rep = false ist, */ /* Dreieckzerlegung der */ - if (rep == 0) /* Matrix u. det be- */ + if (!rep) /* Matrix u. det be- */ { /* stimmen */ for (i = 1; i < n; i++) { if ( fabs(diag[i-1]) < MACH_EPS ) /* Wenn ein diag[i] = 0 */ @@ -262,7 +262,7 @@ sal_uInt16 TriDiagGS(sal_Bool rep, sal_uInt16 n, double* lower, /*---------------- MODUL ZYKLISCH TRIDIAGONAL ----------------------*/ -sal_uInt16 ZyklTriDiagGS(sal_Bool rep, sal_uInt16 n, double* lower, double* diag, +sal_uInt16 ZyklTriDiagGS(bool rep, sal_uInt16 n, double* lower, double* diag, double* upper, double* lowrow, double* ricol, double* b) /******************************/ /* Systeme mit zyklisch tri- */ @@ -308,8 +308,8 @@ sal_uInt16 ZyklTriDiagGS(sal_Bool rep, sal_uInt16 n, double* lower, double* diag /* diag Hauptdiagonale double diag[n] */ /* upper obere Nebendiagonale double upper[n] */ /* b rechte Seite des Systems double b[n] */ -/* rep = 0 erstmaliger Aufruf sal_Bool rep */ -/* !=0 wiederholter Aufruf */ +/* rep = false erstmaliger Aufruf bool rep */ +/* = true wiederholter Aufruf */ /* fuer gleiche Matrix, */ /* aber verschiedenes b. */ /* */ @@ -318,13 +318,13 @@ sal_uInt16 ZyklTriDiagGS(sal_Bool rep, sal_uInt16 n, double* lower, double* diag /* b Loesungsvektor des Systems, double b[n] */ /* die urspruengliche rechte Seite wird ueberspeichert */ /* */ -/* lower ) enthalten bei rep = 0 die Zerlegung der Matrix; */ +/* lower ) enthalten bei rep = false die Zerlegung der Matrix;*/ /* diag ) die urspruenglichen Werte von lower u. diag werden */ /* upper ) ueberschrieben */ /* lowrow ) double lowrow[n-2] */ /* ricol ) double ricol[n-2] */ /* */ -/* Die Determinante der Matrix ist bei rep = 0 durch */ +/* Die Determinante der Matrix ist bei rep = false durch */ /* det A = diag[0] * ... * diag[n-1] bestimmt. */ /* */ /* Rueckgabewert: */ @@ -350,7 +350,7 @@ sal_uInt16 ZyklTriDiagGS(sal_Bool rep, sal_uInt16 n, double* lower, double* diag if ( n < 3 ) return(1); - if (rep == 0) /* Wenn rep = 0 ist, */ + if (!rep) /* Wenn rep = false ist, */ { /* Zerlegung der */ lower[0] = upper[n-1] = 0.0; /* Matrix berechnen. */ @@ -382,7 +382,7 @@ sal_uInt16 ZyklTriDiagGS(sal_Bool rep, sal_uInt16 n, double* lower, double* diag diag[n-1] += temp - lower[n-1] * upper[n-2]; if ( fabs(diag[n-1]) < MACH_EPS ) return(2); - } /* end if ( rep == 0 ) */ + } b[0] /= diag[0]; /* Vorwaertselemination */ for (i = 1; i < n-1; i++) @@ -474,7 +474,7 @@ sal_uInt16 NaturalSpline(sal_uInt16 n, double* x, double* y, if (n==2) { c[1]=a[0]/d[0]; } else { - error=TriDiagGS(sal_False,n-1,b,d,c,a); + error=TriDiagGS(false,n-1,b,d,c,a); if (error!=0) { delete[] a; delete[] h; return error+2; } for (i=0;i<n-1;i++) c[i+1]=a[i]; } @@ -564,7 +564,7 @@ sal_uInt16 PeriodicSpline(sal_uInt16 n, double* x, double* y, lowrow[0]=hr; ricol[0]=hr; a[nm1]=3.0*((y[1]-y[0])/hr-(y[n]-y[nm1])/hl); - Error=ZyklTriDiagGS(sal_False,n,b,d,c,lowrow,ricol,a); + Error=ZyklTriDiagGS(false,n,b,d,c,lowrow,ricol,a); if ( Error != 0 ) { delete[] a; @@ -602,7 +602,7 @@ sal_uInt16 PeriodicSpline(sal_uInt16 n, double* x, double* y, sal_uInt16 ParaSpline(sal_uInt16 n, double* x, double* y, sal_uInt8 MargCond, double Marg01, double Marg02, double MargN1, double MargN2, - sal_Bool CondT, double* T, + bool CondT, double* T, double* bx, double* cx, double* dx, double* by, double* cy, double* dy) { @@ -614,7 +614,7 @@ sal_uInt16 ParaSpline(sal_uInt16 n, double* x, double* y, sal_uInt8 MargCond, if (n<2) return 1; if ((MargCond & ~3) && (MargCond != 4)) return 2; // ungueltige Randbedingung - if (CondT==sal_False) { + if (!CondT) { T[0]=0.0; for (i=0;i<n;i++) { deltX=x[i+1]-x[i]; deltY=y[i+1]-y[i]; @@ -676,14 +676,14 @@ sal_uInt16 ParaSpline(sal_uInt16 n, double* x, double* y, sal_uInt8 MargCond, |* Polygons werden als Stuetzstellen angenommen. |* n liefert die Anzahl der Teilpolynome. |* Ist die Berechnung fehlerfrei verlaufen, so -|* liefert die Funktion sal_True. Nur in diesem Fall +|* liefert die Funktion true. Nur in diesem Fall |* ist Speicher fuer die Koeffizientenarrays |* allokiert, der dann spaeter vom Aufrufer mittels |* delete freizugeben ist. |* *************************************************************************/ -sal_Bool CalcSpline(Polygon& rPoly, sal_Bool Periodic, sal_uInt16& n, +bool CalcSpline(Polygon& rPoly, bool Periodic, sal_uInt16& n, double*& ax, double*& ay, double*& bx, double*& by, double*& cx, double*& cy, double*& dx, double*& dy, double*& T) { @@ -731,12 +731,12 @@ sal_Bool CalcSpline(Polygon& rPoly, sal_Bool Periodic, sal_uInt16& n, MargN2=0.0; if (n>0) n--; // n Korregieren (Anzahl der Teilpolynome) - sal_Bool bRet = sal_False; + bool bRet = false; if ( ( Marg == 3 && n >= 3 ) || ( Marg == 2 && n >= 2 ) ) { - bRet = ParaSpline(n,ax,ay,Marg,Marg01,Marg01,MargN1,MargN2,sal_False,T,bx,cx,dx,by,cy,dy) == 0; + bRet = ParaSpline(n,ax,ay,Marg,Marg01,Marg01,MargN1,MargN2,false,T,bx,cx,dx,by,cy,dy) == 0; } - if ( bRet == sal_False ) + if ( !bRet ) { delete[] ax; delete[] ay; @@ -760,7 +760,7 @@ sal_Bool CalcSpline(Polygon& rPoly, sal_Bool Periodic, sal_uInt16& n, |* Beschreibung Konvertiert einen parametrichen kubischen |* Polynomspline Spline (natuerlich oder periodisch) |* in ein angenaehertes Polygon. -|* Die Funktion liefert sal_False, wenn ein Fehler bei +|* Die Funktion liefert false, wenn ein Fehler bei |* der Koeffizientenberechnung aufgetreten ist oder |* das Polygon zu gross wird (>PolyMax=16380). Im 1. |* Fall hat das Polygon 0, im 2. Fall PolyMax Punkte. @@ -768,7 +768,7 @@ sal_Bool CalcSpline(Polygon& rPoly, sal_Bool Periodic, sal_uInt16& n, |* auf +/-32000 begrenzt. |* *************************************************************************/ -sal_Bool Spline2Poly(Polygon& rSpln, sal_Bool Periodic, Polygon& rPoly) +bool Spline2Poly(Polygon& rSpln, bool Periodic, Polygon& rPoly) { short MinKoord=-32000; // zur Vermeidung short MaxKoord=32000; // von Ueberlaeufen @@ -786,10 +786,10 @@ sal_Bool Spline2Poly(Polygon& rSpln, sal_Bool Periodic, Polygon& rPoly) double Step; // Schrittweite fuer t double dt1,dt2,dt3; // Delta t, y, ^3 double t; - sal_Bool bEnde; // Teilpolynom zu Ende? + bool bEnde; // Teilpolynom zu Ende? sal_uInt16 n; // Anzahl der zu zeichnenden Teilpolynome sal_uInt16 i; // aktuelles Teilpolynom - sal_Bool bOk; // noch alles ok? + bool bOk; // noch alles ok? sal_uInt16 PolyMax=16380;// Maximale Anzahl von Polygonpunkten long x,y; @@ -802,7 +802,7 @@ sal_Bool Spline2Poly(Polygon& rSpln, sal_Bool Periodic, Polygon& rPoly) i=0; while (i<n) { // n Teilpolynome malen t=tv[i]+Step; - bEnde=sal_False; + bEnde=false; while (!bEnde) { // ein Teilpolynom interpolieren bEnde=t>=tv[i+1]; if (bEnde) t=tv[i+1]; @@ -815,7 +815,7 @@ sal_Bool Spline2Poly(Polygon& rSpln, sal_Bool Periodic, Polygon& rPoly) rPoly.SetSize(rPoly.GetSize()+1); rPoly.SetPoint(Point(short(x),short(y)),rPoly.GetSize()-1); } else { - bOk=sal_False; // Fehler: Polygon wird zu gross + bOk=false; // Fehler: Polygon wird zu gross } t=t+Step; } // Ende von Teilpolynom @@ -833,7 +833,7 @@ sal_Bool Spline2Poly(Polygon& rSpln, sal_Bool Periodic, Polygon& rPoly) return bOk; } // Ende von if (bOk) rPoly.SetSize(0); - return sal_False; + return false; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/filter/sgvspln.hxx b/vcl/source/filter/sgvspln.hxx index 93c08ab62883..8c3a57a5144b 100644 --- a/vcl/source/filter/sgvspln.hxx +++ b/vcl/source/filter/sgvspln.hxx @@ -30,14 +30,14 @@ |* Polygons werden als Sttzstellen angenommen. |* n liefert die Anzahl der Teilpolynome. |* Ist die Berechnung fehlerfrei verlaufen, so -|* liefert die Funktion sal_True. Nur in diesem Fall +|* liefert die Funktion true. Nur in diesem Fall |* ist Speicher fr die Koeffizientenarrays |* allokiert, der dann spter vom Aufrufer mittels |* delete freizugeben ist. |* *************************************************************************/ -sal_Bool CalcSpline(Polygon& rPoly, sal_Bool Periodic, sal_uInt16& n, +bool CalcSpline(Polygon& rPoly, bool Periodic, sal_uInt16& n, double*& ax, double*& ay, double*& bx, double*& by, double*& cx, double*& cy, double*& dx, double*& dy, double*& T); @@ -48,7 +48,7 @@ sal_Bool CalcSpline(Polygon& rPoly, sal_Bool Periodic, sal_uInt16& n, |* Beschreibung Konvertiert einen parametrichen kubischen |* Polynomspline Spline (natrlich oder periodisch) |* in ein angenhertes Polygon. -|* Die Funktion liefert sal_False, wenn ein Fehler bei +|* Die Funktion liefert false, wenn ein Fehler bei |* der Koeffizientenberechnung aufgetreten ist oder |* das Polygon zu gro?wird (>PolyMax=16380). Im 1. |* Fall hat das Polygon 0, im 2. Fall PolyMax Punkte. @@ -56,7 +56,7 @@ sal_Bool CalcSpline(Polygon& rPoly, sal_Bool Periodic, sal_uInt16& n, |* auf +/-32000 begrenzt. |* *************************************************************************/ -sal_Bool Spline2Poly(Polygon& rSpln, sal_Bool Periodic, Polygon& rPoly); +bool Spline2Poly(Polygon& rSpln, bool Periodic, Polygon& rPoly); #endif //_SGVSPLN_HXX diff --git a/vcl/source/filter/sgvtext.cxx b/vcl/source/filter/sgvtext.cxx index f611371ad91f..8373ac58c7fa 100644 --- a/vcl/source/filter/sgvtext.cxx +++ b/vcl/source/filter/sgvtext.cxx @@ -183,7 +183,7 @@ extern SgfFontLst* pSgfFonts; ///////////////////////////////////////////////////////////////////////////////// -sal_Bool CheckTextOutl(ObjAreaType& F, ObjLineType& L) +bool CheckTextOutl(ObjAreaType& F, ObjLineType& L) { return (F.FIntens!=L.LIntens) || ((F.FFarbe!=L.LFarbe) && (F.FIntens>0)) || @@ -310,22 +310,22 @@ UCHAR GetNextChar(UCHAR* TBuf, sal_uInt16 Index) UCHAR ProcessOne(UCHAR* TBuf, sal_uInt16& Index, ObjTextType& Atr0, ObjTextType& AktAtr, - sal_Bool ScanEsc) + bool ScanEsc) { UCHAR c; UCHAR Ident; - sal_Bool Ende; - sal_Bool q; + bool Ende; + bool q; UCHAR FlgVal; long NumVal; long Sgn; short i; - sal_Bool EoVal; + bool EoVal; do { c=TBuf[Index]; Index++; Ende=(c!=Escape); - if (Ende==sal_False) { + if (!Ende) { c=TBuf[Index]; Index++; Ident=c; // Identifer merken FlgVal=EscNoFlg; @@ -339,9 +339,9 @@ UCHAR ProcessOne(UCHAR* TBuf, sal_uInt16& Index, do { NumVal=10*NumVal+c-'0'; EoVal=(TBuf[Index]<'0' || TBuf[Index]>'9'); - if (EoVal==sal_False) { c=TBuf[Index]; Index++; } + if (!EoVal) { c=TBuf[Index]; Index++; } i--; - } while (i>0 && EoVal==sal_False); + } while (i>0 && !EoVal); NumVal=Sgn*NumVal; } q=!CheckTextOutl(AktAtr.F,AktAtr.L); @@ -389,21 +389,21 @@ UCHAR ProcessOne(UCHAR* TBuf, sal_uInt16& Index, case EscEbShd: ChgSchnittBit(TextShEbBit,TextSh2DBit,TextSh3DBit,TextSh4DBit,FlgVal,Atr0.Schnitt,AktAtr.Schnitt); break; } //endcase if (TBuf[Index]==Escape) Index++; // zweites Esc weglesen } - } // if Ende==sal_False - } while (Ende==sal_False && ScanEsc==sal_False); - if (Ende==sal_False) c=Escape; + } + } while (!Ende && !ScanEsc); + if (!Ende) c=Escape; return c; } // end of ProcessOne UCHAR GetTextChar(UCHAR* TBuf, sal_uInt16& Index, ObjTextType& Atr0, ObjTextType& AktAtr, - sal_uInt16 Rest, sal_Bool ScanEsc) + sal_uInt16 Rest, bool ScanEsc) { UCHAR c,c0,nc; c=ProcessOne(TBuf,Index,Atr0,AktAtr,ScanEsc); - if (ScanEsc==sal_False) { + if (!ScanEsc) { if (c==SoftTrennAdd || c==SoftTrennK || c==SoftTrenn) { nc=GetNextChar(TBuf,Index); c0=c; @@ -435,7 +435,7 @@ UCHAR GetTextChar(UCHAR* TBuf, sal_uInt16& Index, UCHAR GetTextCharConv(UCHAR* TBuf, sal_uInt16& Index, ObjTextType& Atr0, ObjTextType& AktAtr, - sal_uInt16 Rest, sal_Bool ScanEsc) + sal_uInt16 Rest, bool ScanEsc) { UCHAR c; @@ -460,11 +460,11 @@ sal_uInt16 GetLineFeed(UCHAR* TBuf, sal_uInt16 Index, ObjTextType Atr0, ObjTextT sal_uInt16 nChar, sal_uInt16& LF, sal_uInt16& MaxGrad) { UCHAR c=0; - sal_Bool AbsEnd=sal_False; + bool AbsEnd=false; sal_uLong LF100=0; sal_uLong MaxLF100=0; - sal_Bool LFauto=0; - sal_Bool First=sal_True; + bool LFauto=false; + bool First=true; sal_uInt16 Grad; sal_uInt16 i=0; sal_uInt16 r=1; @@ -472,7 +472,7 @@ sal_uInt16 GetLineFeed(UCHAR* TBuf, sal_uInt16 Index, ObjTextType Atr0, ObjTextT MaxGrad=0; while (!AbsEnd && nChar>0) { nChar--; - c=GetTextChar(TBuf,Index,Atr0,AktAtr,nChar,sal_False); + c=GetTextChar(TBuf,Index,Atr0,AktAtr,nChar,false); i++; AbsEnd=(c==TextEnd || c==AbsatzEnd); if (First || (!AbsEnd && c!=' ' && c!=HardTrenn)) { @@ -484,7 +484,7 @@ sal_uInt16 GetLineFeed(UCHAR* TBuf, sal_uInt16 Index, ObjTextType Atr0, ObjTextT Grad=AktAtr.Grad; if (AktAtr.ChrVPos>0) Grad=Grad-AktAtr.ChrVPos; if (Grad>MaxGrad) MaxGrad=Grad; - First=sal_False; + First=false; } if (!AbsEnd && c!=' ') r=i; } @@ -513,7 +513,7 @@ sal_uInt16 GetLineFeed(UCHAR* TBuf, sal_uInt16 Index, ObjTextType Atr0, ObjTextT #define SuperSubFact 60 /* SuperScript/SubScript: 60% vom Schriftgrad */ #define DefaultSpace 40 /* Default: Space ist 40% vom SchriftGrad */ -sal_uInt16 SetTextContext(OutputDevice& rOut, ObjTextType& Atr, sal_Bool Kapt, sal_uInt16 Dreh, +sal_uInt16 SetTextContext(OutputDevice& rOut, ObjTextType& Atr, bool Kapt, sal_uInt16 Dreh, sal_uInt16 FitXMul, sal_uInt16 FitXDiv, sal_uInt16 FitYMul, sal_uInt16 FitYDiv) { SgfFontOne* pSgfFont; // Font aus dem IniFile @@ -523,7 +523,7 @@ sal_uInt16 SetTextContext(OutputDevice& rOut, ObjTextType& Atr, sal_Bool Kapt, s sal_uLong Brei; String FNam; sal_uInt16 StdBrei=50; // Durchschnittliche Zeichenbreite in % von Schriftgrad - sal_Bool bFit=(FitXMul!=1 || FitXDiv!=1 || FitYMul!=1 || FitYDiv!=1); + bool bFit=(FitXMul!=1 || FitXDiv!=1 || FitYMul!=1 || FitYDiv!=1); pSgfFont = pSgfFonts->GetFontDesc(Atr.GetFont()); @@ -630,7 +630,7 @@ struct ProcChrSta { sal_uInt16 Index; sal_uInt16 ChrXP; UCHAR OutCh; - sal_Bool Kapt; + bool Kapt; ObjTextType Attrib; }; @@ -640,13 +640,12 @@ void InitProcessCharState(ProcChrSta& State, ObjTextType& AktAtr, sal_uInt16 Ind State.OutCh=0; State.Index=IndexA; State.ChrXP=0; - State.Kapt=sal_False; + State.Kapt=false; } -sal_Bool UpcasePossible(UCHAR c) +bool UpcasePossible(UCHAR c) { - if ((c>='a' && c<='z') || c == 0xe4 || c == 0xf6 || c == 0xfc ) return sal_True; - else return sal_False; + return ((c>='a' && c<='z') || c == 0xe4 || c == 0xf6 || c == 0xfc ); } UCHAR Upcase(UCHAR c) @@ -695,12 +694,12 @@ UCHAR ProcessChar(OutputDevice& rOut, UCHAR* TBuf, ProcChrSta& R, ObjTextType& A sal_uInt16 ChrWidth; UCHAR c; UCHAR c1; - sal_Bool AbsEnd; + bool AbsEnd; - c=GetTextChar(TBuf,R.Index,Atr0,R.Attrib,Rest,sal_False); // versucht evtl. zu trennen, wenn Rest entsprechenden Wert besitzt + c=GetTextChar(TBuf,R.Index,Atr0,R.Attrib,Rest,false); // versucht evtl. zu trennen, wenn Rest entsprechenden Wert besitzt AbsEnd=(c==AbsatzEnd || c==TextEnd); - if (AbsEnd==sal_False) { + if (!AbsEnd) { R.OutCh=ConvertTextChar(c); // von HardTrenn nach '-', ... R.Kapt=(R.Attrib.Schnitt & TextKaptBit) !=0 && UpcasePossible(R.OutCh); if (R.Kapt) R.OutCh=Upcase(R.OutCh); @@ -727,16 +726,16 @@ void FormatLine(UCHAR* TBuf, sal_uInt16& Index, ObjTextType& Atr0, ObjTextType& sal_uInt16 UmbWdt, sal_uInt16 AdjWdt, short* Line, sal_uInt16& nChars, double, double, - UCHAR* cLine, sal_Bool TextFit) + UCHAR* cLine, bool TextFit) { VirtualDevice vOut; UCHAR c,c0; UCHAR ct; - sal_Bool First; // erster Char ? + bool First; // erster Char ? sal_uInt8 Just = 0; // Absatzformatierung - sal_Bool Border; // Rand der Box erreicht ? - sal_Bool Border0; - sal_Bool AbsEnd; // Ende des Absatzes erreicht ? + bool Border; // Rand der Box erreicht ? + bool Border0; + bool AbsEnd; // Ende des Absatzes erreicht ? ProcChrSta* R=new ProcChrSta; ProcChrSta* R0=new ProcChrSta; ProcChrSta* WErec=new ProcChrSta; @@ -747,8 +746,8 @@ void FormatLine(UCHAR* TBuf, sal_uInt16& Index, ObjTextType& Atr0, ObjTextType& sal_uInt16 TRnChar; sal_uInt16 WordEndCnt; // Justieren und Trennen - sal_Bool WordEnd; - sal_Bool Trenn; + bool WordEnd; + bool Trenn; short BoxRest; // zum Quetschen und formatieren sal_uInt16 i,j,k,h; @@ -757,10 +756,10 @@ void FormatLine(UCHAR* TBuf, sal_uInt16& Index, ObjTextType& Atr0, ObjTextType& vOut.SetMapMode(MapMode(MAP_10TH_MM,Point(),Fraction(1,4),Fraction(1,4))); nChars=0; - SetTextContext(vOut,AktAtr,sal_False,0,1,1,1,1); + SetTextContext(vOut,AktAtr,false,0,1,1,1,1); InitProcessCharState(*R,AktAtr,Index); - (*R0)=(*R); (*WErec)=(*R); WEnChar=0; c0=0; Border0=sal_False; - Border=sal_False; First=sal_True; + (*R0)=(*R); (*WErec)=(*R); WEnChar=0; c0=0; Border0=false; + Border=false; First=true; WordEndCnt=0; do { // mal schauen, wieviele Worte so in die Zeile passen @@ -788,16 +787,16 @@ void FormatLine(UCHAR* TBuf, sal_uInt16& Index, ObjTextType& Atr0, ObjTextType& } (*R0)=(*R); c0=c; Border0=Border; - First=sal_False; + First=false; AbsEnd=AbsEnd || (nChars>=MaxLineChars); } while (!(AbsEnd || (Border && ((WordEndCnt>0) || WordEnd || Trenn)))); if (Border) { // Trennen und Quetschen (*WErec0)=(*WErec); WEnChar0=WEnChar; - AbsEnd=sal_False; c0=0; + AbsEnd=false; c0=0; (*R)=(*WErec); nChars=WEnChar; (*TRrec)=(*R); TRnChar=nChars; - Border0=sal_False; Border=sal_False; + Border0=false; Border=false; do { // erst mal gucken wieviele Silben noch reinpassen ct=ProcessChar(vOut,TBuf,*TRrec,Atr0,TRnChar,DoTrenn,Line,cLine); c=ProcessChar(vOut,TBuf,*R,Atr0,nChars,NoTrenn,Line,cLine); @@ -844,7 +843,7 @@ void FormatLine(UCHAR* TBuf, sal_uInt16& Index, ObjTextType& Atr0, ObjTextType& if (!AbsEnd) { do { // Leerzeichen weglesen (*WErec)=(*R); - c=GetTextChar(TBuf,R->Index,Atr0,R->Attrib,NoTrenn,sal_False); + c=GetTextChar(TBuf,R->Index,Atr0,R->Attrib,NoTrenn,false); nChars++; Line[nChars]=R->ChrXP; cLine[nChars]=c; @@ -860,7 +859,7 @@ void FormatLine(UCHAR* TBuf, sal_uInt16& Index, ObjTextType& Atr0, ObjTextType& nChars++; Line[nChars]=R->ChrXP; // Damit AbsatzEnde auch weggelesen wird Line[nChars+1]=R->ChrXP; // denn die Breite von CR oder #0 ist nun mal sehr klein if (TBuf[R->Index-1]!=AbsatzEnd && TBuf[R->Index-1]!=TextEnd) { - c=GetTextChar(TBuf,R->Index,Atr0,R->Attrib,NoTrenn,sal_False); // Kleine Korrektur. Notig, wenn nur 1 Wort in + c=GetTextChar(TBuf,R->Index,Atr0,R->Attrib,NoTrenn,false); // Kleine Korrektur. Notig, wenn nur 1 Wort in } } @@ -979,17 +978,17 @@ void TextType::Draw(OutputDevice& rOut) short ySize; double sn,cs; sal_uInt16 TopToBase; - sal_Bool Ende = 0; + bool Ende = false; sal_uInt16 lc; - sal_Bool LineFit; // FitSize.x=0? oder Flags -> jede Zeile stretchen - sal_Bool TextFit; + bool LineFit; // FitSize.x=0? oder Flags -> jede Zeile stretchen + bool TextFit; short* xLine; UCHAR* cLine; // Buffer fuer FormatLine sal_uInt16 FitXMul; sal_uInt16 FitXDiv; sal_uInt16 FitYMul; sal_uInt16 FitYDiv; - sal_Bool Fehler; + bool Fehler; UCHAR* Buf=Buffer; // Zeiger auf die Buchstaben pSgfFonts->ReadList(); @@ -997,9 +996,9 @@ void TextType::Draw(OutputDevice& rOut) cLine=new UCHAR[CharLineSize]; TextFit=(Flags & TextFitBits)!=0; - LineFit=sal_False; + LineFit=false; LineFit=((Flags & TextFitZBit)!=0); - if (TextFit && FitSize.x==0) LineFit=sal_True; + if (TextFit && FitSize.x==0) LineFit=true; if (DrehWink==0) { sn=0.0; @@ -1014,7 +1013,7 @@ void TextType::Draw(OutputDevice& rOut) ySize=Pos2.y-Pos1.y; xSize=32000 /2; // Umbruch xSAdj=Pos2.x-Pos1.x; // zum Ausrichten bei Zentriert/Blocksatz - //if (xSize<=0) { xSize=32000 /2; LineFit=sal_True; } + //if (xSize<=0) { xSize=32000 /2; LineFit=true; } FitXMul=sal::static_int_cast< sal_uInt16 >(abs(Pos2.x-Pos1.x)); FitXDiv=FitSize.x; if (FitXDiv==0) FitXDiv=1; FitYMul=sal::static_int_cast< sal_uInt16 >(abs(Pos2.y-Pos1.y)); FitYDiv=FitSize.y; if (FitYDiv==0) FitYDiv=1; } else { @@ -1055,7 +1054,7 @@ void TextType::Draw(OutputDevice& rOut) T2=T1; Index2=Index1; i=1; while (i<=l) { - c=GetTextCharConv(Buf,Index2,T,T2,l-i,sal_False); + c=GetTextCharConv(Buf,Index2,T,T2,l-i,false); long xp1,yp1; // wegen Overflowgefahr PointType Pos; xp1=long(Pos1.x)+xPos+long(xLine[i]); |