Kaydet (Commit) 9f1c57b4 authored tarafından Kohei Yoshida's avatar Kohei Yoshida

Bool-ness.

üst 659c008f
...@@ -873,7 +873,9 @@ void ConvertAndPutItems( SfxItemSet& rDest, const SfxItemSet& rSource, const Map ...@@ -873,7 +873,9 @@ void ConvertAndPutItems( SfxItemSet& rDest, const SfxItemSet& rSource, const Map
} }
} }
EditLine::EditLine() EditLine::EditLine() :
bHangingPunctuation(false),
bInvalid(true)
{ {
DBG_CTOR( EE_EditLine, 0 ); DBG_CTOR( EE_EditLine, 0 );
...@@ -887,11 +889,11 @@ EditLine::EditLine() ...@@ -887,11 +889,11 @@ EditLine::EditLine()
nTxtWidth = 0; nTxtWidth = 0;
nCrsrHeight = 0; nCrsrHeight = 0;
nMaxAscent = 0; nMaxAscent = 0;
bHangingPunctuation = sal_False;
bInvalid = sal_True;
} }
EditLine::EditLine( const EditLine& r ) EditLine::EditLine( const EditLine& r ) :
bHangingPunctuation(r.bHangingPunctuation),
bInvalid(true)
{ {
DBG_CTOR( EE_EditLine, 0 ); DBG_CTOR( EE_EditLine, 0 );
...@@ -899,7 +901,6 @@ EditLine::EditLine( const EditLine& r ) ...@@ -899,7 +901,6 @@ EditLine::EditLine( const EditLine& r )
nStart = r.nStart; nStart = r.nStart;
nStartPortion = r.nStartPortion; nStartPortion = r.nStartPortion;
nEndPortion = r.nEndPortion; nEndPortion = r.nEndPortion;
bHangingPunctuation = r.bHangingPunctuation;
nHeight = 0; nHeight = 0;
nStartPosX = 0; nStartPosX = 0;
...@@ -907,7 +908,6 @@ EditLine::EditLine( const EditLine& r ) ...@@ -907,7 +908,6 @@ EditLine::EditLine( const EditLine& r )
nTxtWidth = 0; nTxtWidth = 0;
nCrsrHeight = 0; nCrsrHeight = 0;
nMaxAscent = 0; nMaxAscent = 0;
bInvalid = sal_True;
} }
EditLine::~EditLine() EditLine::~EditLine()
......
...@@ -464,8 +464,8 @@ private: ...@@ -464,8 +464,8 @@ private:
sal_uInt16 nTxtHeight; // Pure Text height sal_uInt16 nTxtHeight; // Pure Text height
sal_uInt16 nCrsrHeight; // For contour flow high lines => cursor is large. sal_uInt16 nCrsrHeight; // For contour flow high lines => cursor is large.
sal_uInt16 nMaxAscent; sal_uInt16 nMaxAscent;
sal_Bool bHangingPunctuation; bool bHangingPunctuation:1;
sal_Bool bInvalid; // for skillful formatting bool bInvalid:1; // for skillful formatting
public: public:
EditLine(); EditLine();
...@@ -509,8 +509,8 @@ public: ...@@ -509,8 +509,8 @@ public:
void SetMaxAscent( sal_uInt16 n ) { nMaxAscent = n; } void SetMaxAscent( sal_uInt16 n ) { nMaxAscent = n; }
sal_uInt16 GetMaxAscent() const { return nMaxAscent; } sal_uInt16 GetMaxAscent() const { return nMaxAscent; }
void SetHangingPunctuation( sal_Bool b ) { bHangingPunctuation = b; } void SetHangingPunctuation( bool b ) { bHangingPunctuation = b; }
sal_Bool IsHangingPunctuation() const { return bHangingPunctuation; } bool IsHangingPunctuation() const { return bHangingPunctuation; }
sal_uInt16 GetLen() const { return nEnd - nStart; } sal_uInt16 GetLen() const { return nEnd - nStart; }
...@@ -519,10 +519,10 @@ public: ...@@ -519,10 +519,10 @@ public:
Size CalcTextSize( ParaPortion& rParaPortion ); Size CalcTextSize( ParaPortion& rParaPortion );
sal_Bool IsInvalid() const { return bInvalid; } bool IsInvalid() const { return bInvalid; }
sal_Bool IsValid() const { return !bInvalid; } bool IsValid() const { return !bInvalid; }
void SetInvalid() { bInvalid = sal_True; } void SetInvalid() { bInvalid = true; }
void SetValid() { bInvalid = sal_False; } void SetValid() { bInvalid = false; }
sal_Bool IsEmpty() const { return (nEnd > nStart) ? sal_False : sal_True; } sal_Bool IsEmpty() const { return (nEnd > nStart) ? sal_False : sal_True; }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment