Kaydet (Commit) 3bcd82a7 authored tarafından Matteo Casalin's avatar Matteo Casalin

sal_Bool to bool

Change-Id: I576b21dc61324a3bcbe346992e742541e7262f17
üst a6c03db3
...@@ -948,7 +948,7 @@ static void lcl_VisualMoveRecursion( const SwLineLayout& rCurrLine, sal_Int32 nI ...@@ -948,7 +948,7 @@ static void lcl_VisualMoveRecursion( const SwLineLayout& rCurrLine, sal_Int32 nI
if ( bRight ) if ( bRight )
{ {
sal_Bool bRecurse = pPor && pPor->IsMultiPortion() && bool bRecurse = pPor && pPor->IsMultiPortion() &&
((SwMultiPortion*)pPor)->IsBidi(); ((SwMultiPortion*)pPor)->IsBidi();
// 1. special case: at beginning of bidi portion // 1. special case: at beginning of bidi portion
...@@ -959,7 +959,7 @@ static void lcl_VisualMoveRecursion( const SwLineLayout& rCurrLine, sal_Int32 nI ...@@ -959,7 +959,7 @@ static void lcl_VisualMoveRecursion( const SwLineLayout& rCurrLine, sal_Int32 nI
// leave bidi portion // leave bidi portion
if ( nCrsrLevel != nDefaultDir ) if ( nCrsrLevel != nDefaultDir )
{ {
bRecurse = sal_False; bRecurse = false;
} }
else else
// special case: // special case:
...@@ -976,7 +976,7 @@ static void lcl_VisualMoveRecursion( const SwLineLayout& rCurrLine, sal_Int32 nI ...@@ -976,7 +976,7 @@ static void lcl_VisualMoveRecursion( const SwLineLayout& rCurrLine, sal_Int32 nI
// enter bidi portion // enter bidi portion
if ( nCrsrLevel != nDefaultDir ) if ( nCrsrLevel != nDefaultDir )
{ {
bRecurse = sal_True; bRecurse = true;
nIdx = nIdx - pLast->GetLen(); nIdx = nIdx - pLast->GetLen();
pPor = pLast; pPor = pLast;
} }
......
...@@ -1268,8 +1268,8 @@ SwLinePortion *SwTxtFormatter::NewPortion( SwTxtFormatInfo &rInf ) ...@@ -1268,8 +1268,8 @@ SwLinePortion *SwTxtFormatter::NewPortion( SwTxtFormatInfo &rInf )
else if ( SW_MC_RUBY == pCreate->nId ) else if ( SW_MC_RUBY == pCreate->nId )
{ {
Seek( rInf.GetIdx() ); Seek( rInf.GetIdx() );
sal_Bool bRubyTop; bool bRubyTop = false;
sal_Bool* pRubyPos = 0; bool* pRubyPos = 0;
if ( rInf.SnapToGrid() ) if ( rInf.SnapToGrid() )
{ {
......
...@@ -72,7 +72,7 @@ class SwTxtFormatter : public SwTxtPainter ...@@ -72,7 +72,7 @@ class SwTxtFormatter : public SwTxtPainter
// The center pice of formatting // The center pice of formatting
void BuildPortions( SwTxtFormatInfo &rInf ); void BuildPortions( SwTxtFormatInfo &rInf );
sal_Bool BuildMultiPortion( SwTxtFormatInfo &rInf, SwMultiPortion& rMulti ); bool BuildMultiPortion( SwTxtFormatInfo &rInf, SwMultiPortion& rMulti );
/** /**
Calculation of the emulated right side. Calculation of the emulated right side.
......
...@@ -83,16 +83,16 @@ class SwMultiPortion : public SwLinePortion ...@@ -83,16 +83,16 @@ class SwMultiPortion : public SwLinePortion
{ {
SwLineLayout aRoot; // One or more lines SwLineLayout aRoot; // One or more lines
SwFldPortion *pFldRest; // Field rest from the previous line SwFldPortion *pFldRest; // Field rest from the previous line
sal_Bool bTab1 :1; // First line tabulator bool bTab1 :1; // First line tabulator
sal_Bool bTab2 :1; // Second line includes tabulator bool bTab2 :1; // Second line includes tabulator
sal_Bool bDouble :1; // Double line bool bDouble :1; // Double line
bool bRuby :1; // Phonetics bool bRuby :1; // Phonetics
sal_Bool bBidi :1; bool bBidi :1;
sal_Bool bTop :1; // Phonetic position bool bTop :1; // Phonetic position
sal_Bool bFormatted :1; // Already formatted bool bFormatted :1; // Already formatted
sal_Bool bFollowFld :1; // Field follow inside bool bFollowFld :1; // Field follow inside
bool bFlyInCntnt:1; // Fly as character inside
sal_uInt8 nDirection:2; // Direction (0/90/180/270 degrees) sal_uInt8 nDirection:2; // Direction (0/90/180/270 degrees)
sal_Bool bFlyInCntnt:1; // Fly as character inside
protected: protected:
SwMultiPortion(sal_Int32 nEnd) SwMultiPortion(sal_Int32 nEnd)
: pFldRest(0) : pFldRest(0)
...@@ -104,21 +104,21 @@ protected: ...@@ -104,21 +104,21 @@ protected:
, bTop(false) , bTop(false)
, bFormatted(false) , bFormatted(false)
, bFollowFld(false) , bFollowFld(false)
, nDirection(0)
, bFlyInCntnt(false) , bFlyInCntnt(false)
, nDirection(0)
{ {
SetWhichPor(POR_MULTI); SetWhichPor(POR_MULTI);
SetLen(nEnd); SetLen(nEnd);
} }
void SetDouble() { bDouble = sal_True; } void SetDouble() { bDouble = true; }
void SetRuby() { bRuby = true; } void SetRuby() { bRuby = true; }
void SetBidi() { bBidi = sal_True; } void SetBidi() { bBidi = true; }
void SetTop( sal_Bool bNew ) { bTop = bNew; } void SetTop( bool bNew ) { bTop = bNew; }
void SetTab1( sal_Bool bNew ) { bTab1 = bNew; } void SetTab1( bool bNew ) { bTab1 = bNew; }
void SetTab2( sal_Bool bNew ) { bTab2 = bNew; } void SetTab2( bool bNew ) { bTab2 = bNew; }
void SetDirection( sal_uInt8 nNew ) { nDirection = nNew; } void SetDirection( sal_uInt8 nNew ) { nDirection = nNew; }
sal_Bool GetTab1() const { return bTab1; } bool GetTab1() const { return bTab1; }
sal_Bool GetTab2() const { return bTab2; } bool GetTab2() const { return bTab2; }
public: public:
~SwMultiPortion(); ~SwMultiPortion();
const SwLineLayout& GetRoot() const { return aRoot; } const SwLineLayout& GetRoot() const { return aRoot; }
...@@ -126,22 +126,22 @@ public: ...@@ -126,22 +126,22 @@ public:
SwFldPortion* GetFldRest() { return pFldRest; } SwFldPortion* GetFldRest() { return pFldRest; }
void SetFldRest( SwFldPortion* pNew ) { pFldRest = pNew; } void SetFldRest( SwFldPortion* pNew ) { pFldRest = pNew; }
inline sal_Bool HasTabulator() const { return bTab1 || bTab2; } inline bool HasTabulator() const { return bTab1 || bTab2; }
inline sal_Bool IsFormatted() const { return bFormatted; } inline bool IsFormatted() const { return bFormatted; }
inline void SetFormatted() { bFormatted = sal_True; } inline void SetFormatted() { bFormatted = true; }
inline sal_Bool IsFollowFld() const { return bFollowFld; } inline bool IsFollowFld() const { return bFollowFld; }
inline void SetFollowFld() { bFollowFld = sal_True; } inline void SetFollowFld() { bFollowFld = true; }
inline sal_Bool HasFlyInCntnt() const { return bFlyInCntnt; } inline bool HasFlyInCntnt() const { return bFlyInCntnt; }
inline void SetFlyInCntnt( sal_Bool bNew ) { bFlyInCntnt = bNew; } inline void SetFlyInCntnt( bool bNew ) { bFlyInCntnt = bNew; }
inline sal_Bool IsDouble() const { return bDouble; } inline bool IsDouble() const { return bDouble; }
inline bool IsRuby() const { return bRuby; } inline bool IsRuby() const { return bRuby; }
inline sal_Bool IsBidi() const { return bBidi; } inline bool IsBidi() const { return bBidi; }
inline bool OnTop() const { return bTop; } inline bool OnTop() const { return bTop; }
void ActualizeTabulator(); void ActualizeTabulator();
virtual void Paint( const SwTxtPaintInfo &rInf ) const; virtual void Paint( const SwTxtPaintInfo &rInf ) const;
virtual long CalcSpacing( long nSpaceAdd, const SwTxtSizeInfo &rInf ) const; virtual long CalcSpacing( long nSpaceAdd, const SwTxtSizeInfo &rInf ) const;
virtual sal_Bool ChgSpaceAdd( SwLineLayout* pCurr, long nSpaceAdd ) const; virtual bool ChgSpaceAdd( SwLineLayout* pCurr, long nSpaceAdd ) const;
// Summarize the internal lines to calculate the (external) size // Summarize the internal lines to calculate the (external) size
void CalcSize( SwTxtFormatter& rLine, SwTxtFormatInfo &rInf ); void CalcSize( SwTxtFormatter& rLine, SwTxtFormatInfo &rInf );
...@@ -172,7 +172,7 @@ public: ...@@ -172,7 +172,7 @@ public:
inline SwBracket* GetBrackets() const { return pBracket; } inline SwBracket* GetBrackets() const { return pBracket; }
void SetBrackets( const SwDoubleLinePortion& rDouble ); void SetBrackets( const SwDoubleLinePortion& rDouble );
void PaintBracket( SwTxtPaintInfo& rInf, long nSpaceAdd, sal_Bool bOpen ) const; void PaintBracket( SwTxtPaintInfo& rInf, long nSpaceAdd, bool bOpen ) const;
void FormatBrackets( SwTxtFormatInfo &rInf, SwTwips& nMaxWidth ); void FormatBrackets( SwTxtFormatInfo &rInf, SwTwips& nMaxWidth );
inline KSHORT PreWidth() const { return pBracket->nPreWidth; }; inline KSHORT PreWidth() const { return pBracket->nPreWidth; };
inline KSHORT PostWidth() const { return pBracket->nPostWidth; } inline KSHORT PostWidth() const { return pBracket->nPostWidth; }
...@@ -191,7 +191,7 @@ public: ...@@ -191,7 +191,7 @@ public:
inline sal_Int32 GetBlank2() const { return nBlank2; } inline sal_Int32 GetBlank2() const { return nBlank2; }
virtual long CalcSpacing( long nSpaceAdd, const SwTxtSizeInfo &rInf ) const; virtual long CalcSpacing( long nSpaceAdd, const SwTxtSizeInfo &rInf ) const;
virtual sal_Bool ChgSpaceAdd( SwLineLayout* pCurr, long nSpaceAdd ) const; virtual bool ChgSpaceAdd( SwLineLayout* pCurr, long nSpaceAdd ) const;
}; };
class SwRubyPortion : public SwMultiPortion class SwRubyPortion : public SwMultiPortion
...@@ -205,7 +205,7 @@ public: ...@@ -205,7 +205,7 @@ public:
SwRubyPortion( const SwMultiCreator& rCreate, const SwFont& rFnt, SwRubyPortion( const SwMultiCreator& rCreate, const SwFont& rFnt,
const IDocumentSettingAccess& rIDocumentSettingAccess, const IDocumentSettingAccess& rIDocumentSettingAccess,
sal_Int32 nEnd, sal_Int32 nOffs, sal_Int32 nEnd, sal_Int32 nOffs,
const sal_Bool* pForceRubyPos ); const bool* pForceRubyPos );
void CalcRubyOffset(); void CalcRubyOffset();
inline void Adjust( SwTxtFormatInfo &rInf ) inline void Adjust( SwTxtFormatInfo &rInf )
...@@ -220,7 +220,7 @@ public: ...@@ -220,7 +220,7 @@ public:
SwRotatedPortion( sal_Int32 nEnd, sal_uInt8 nDir = 1 ) SwRotatedPortion( sal_Int32 nEnd, sal_uInt8 nDir = 1 )
: SwMultiPortion( nEnd ) { SetDirection( nDir ); } : SwMultiPortion( nEnd ) { SetDirection( nDir ); }
SwRotatedPortion( const SwMultiCreator& rCreate, sal_Int32 nEnd, SwRotatedPortion( const SwMultiCreator& rCreate, sal_Int32 nEnd,
sal_Bool bRTL ); bool bRTL );
}; };
class SwBidiPortion : public SwMultiPortion class SwBidiPortion : public SwMultiPortion
...@@ -236,7 +236,7 @@ public: ...@@ -236,7 +236,7 @@ public:
// Calculates extra spacing based on number of blanks // Calculates extra spacing based on number of blanks
virtual long CalcSpacing( long nSpaceAdd, const SwTxtSizeInfo &rInf ) const; virtual long CalcSpacing( long nSpaceAdd, const SwTxtSizeInfo &rInf ) const;
// Manipulate the spacing array at pCurr // Manipulate the spacing array at pCurr
virtual sal_Bool ChgSpaceAdd( SwLineLayout* pCurr, long nSpaceAdd ) const; virtual bool ChgSpaceAdd( SwLineLayout* pCurr, long nSpaceAdd ) const;
}; };
// For cursor travelling in multiportions // For cursor travelling in multiportions
...@@ -248,7 +248,7 @@ class SwTxtCursorSave ...@@ -248,7 +248,7 @@ class SwTxtCursorSave
SwTwips nWidth; SwTwips nWidth;
sal_Int32 nStart; sal_Int32 nStart;
sal_uInt8 nOldProp; sal_uInt8 nOldProp;
sal_Bool bSpaceChg; bool bSpaceChg;
public: public:
SwTxtCursorSave( SwTxtCursor* pTxtCursor, SwMultiPortion* pMulti, SwTxtCursorSave( SwTxtCursor* pTxtCursor, SwMultiPortion* pMulti,
SwTwips nY, sal_uInt16& nX, sal_Int32 nCurrStart, long nSpaceAdd ); SwTwips nY, sal_uInt16& nX, sal_Int32 nCurrStart, long nSpaceAdd );
......
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