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

sal_Bool to bool

Change-Id: I19fd47f773d2b88dec2bff2abe25aee1c7b76e0d
üst d611fbc2
This diff is collapsed.
...@@ -61,7 +61,7 @@ class SwContourCache ...@@ -61,7 +61,7 @@ class SwContourCache
MSHORT nObjCnt; MSHORT nObjCnt;
const SwRect ContourRect( const SwFmt* pFmt, const SdrObject* pObj, const SwRect ContourRect( const SwFmt* pFmt, const SdrObject* pObj,
const SwTxtFrm* pFrm, const SwRect &rLine, const long nXPos, const SwTxtFrm* pFrm, const SwRect &rLine, const long nXPos,
const sal_Bool bRight ); const bool bRight );
public: public:
SwContourCache(); SwContourCache();
...@@ -81,7 +81,7 @@ public: ...@@ -81,7 +81,7 @@ public:
const SwRect &rLine, const SwRect &rLine,
const SwTxtFrm* pFrm, const SwTxtFrm* pFrm,
const long nXPos, const long nXPos,
const sal_Bool bRight ); const bool bRight );
}; };
/** /**
...@@ -128,15 +128,15 @@ class SwTxtFly ...@@ -128,15 +128,15 @@ class SwTxtFly
long nNextTop; /// Stores the upper edge of the "next" frame long nNextTop; /// Stores the upper edge of the "next" frame
sal_uLong nIndex; sal_uLong nIndex;
sal_Bool bOn : 1; bool bOn : 1;
sal_Bool bTopRule: 1; bool bTopRule: 1;
sal_Bool mbIgnoreCurrentFrame: 1; bool mbIgnoreCurrentFrame: 1;
sal_Bool mbIgnoreContour: 1; bool mbIgnoreContour: 1;
/** boolean, indicating if objects in page header|footer are considered for /** boolean, indicating if objects in page header|footer are considered for
text frames not in page header|footer. text frames not in page header|footer.
*/ */
sal_Bool mbIgnoreObjsInHeaderFooter: 1; bool mbIgnoreObjsInHeaderFooter: 1;
/** /**
This method will be called during the LineIter formatting This method will be called during the LineIter formatting
...@@ -146,7 +146,7 @@ class SwTxtFly ...@@ -146,7 +146,7 @@ class SwTxtFly
\param[in] rPortion \param[in] rPortion
Scope: document global. Scope: document global.
*/ */
SwRect _GetFrm( const SwRect &rPortion, sal_Bool bTop ) const; SwRect _GetFrm( const SwRect &rPortion, bool bTop ) const;
SwAnchoredObjList* InitAnchoredObjList(); SwAnchoredObjList* InitAnchoredObjList();
...@@ -156,7 +156,7 @@ class SwTxtFly ...@@ -156,7 +156,7 @@ class SwTxtFly
Look for the first object which overlaps with the rectangle. Look for the first object which overlaps with the rectangle.
Iterates over the anchored object list mpAnchoredObjList. Iterates over the anchored object list mpAnchoredObjList.
*/ */
sal_Bool ForEach( const SwRect &rRect, SwRect* pRect, sal_Bool bAvoid ) const; bool ForEach( const SwRect &rRect, SwRect* pRect, bool bAvoid ) const;
/** /**
\li There is less than 2cm space on both sides for the text: \li There is less than 2cm space on both sides for the text:
...@@ -195,9 +195,9 @@ class SwTxtFly ...@@ -195,9 +195,9 @@ class SwTxtFly
*/ */
SwAnchoredObjList::size_type GetPos( const SwAnchoredObject* pAnchoredObj ) const; SwAnchoredObjList::size_type GetPos( const SwAnchoredObject* pAnchoredObj ) const;
sal_Bool GetTop( const SwAnchoredObject* _pAnchoredObj, bool GetTop( const SwAnchoredObject* _pAnchoredObj,
const sal_Bool bInFtn, const bool bInFtn,
const sal_Bool bInFooterOrHeader ); const bool bInFooterOrHeader );
SwTwips CalcMinBottom() const; SwTwips CalcMinBottom() const;
...@@ -214,8 +214,8 @@ public: ...@@ -214,8 +214,8 @@ public:
void SetTopRule(); void SetTopRule();
SwRect GetFrm( const SwRect &rPortion, sal_Bool bTop = sal_True ) const; SwRect GetFrm( const SwRect &rPortion, bool bTop = true ) const;
sal_Bool IsOn() const; bool IsOn() const;
/** /**
If there is no flying object frame standing in rRect (usually the current row), If there is no flying object frame standing in rRect (usually the current row),
...@@ -223,8 +223,8 @@ public: ...@@ -223,8 +223,8 @@ public:
\param rRect is global to the document! \param rRect is global to the document!
*/ */
sal_Bool Relax( const SwRect &rRect ); bool Relax( const SwRect &rRect );
sal_Bool Relax(); bool Relax();
SwTwips GetMinBottom() const; SwTwips GetMinBottom() const;
const SwCntntFrm* GetMaster() const; const SwCntntFrm* GetMaster() const;
...@@ -255,7 +255,7 @@ public: ...@@ -255,7 +255,7 @@ public:
DrawText() takes over the on optimization! DrawText() takes over the on optimization!
*/ */
sal_Bool DrawTextOpaque( SwDrawTextInfo &rInf ); bool DrawTextOpaque( SwDrawTextInfo &rInf );
/** /**
Two subtleties needs to be mentioned: Two subtleties needs to be mentioned:
...@@ -266,7 +266,7 @@ public: ...@@ -266,7 +266,7 @@ public:
won't be scribbled won't be scribbled
*/ */
void DrawFlyRect( OutputDevice* pOut, const SwRect &rRect, void DrawFlyRect( OutputDevice* pOut, const SwRect &rRect,
const SwTxtPaintInfo &rInf, sal_Bool bNoGraphic = sal_False ); const SwTxtPaintInfo &rInf, bool bNoGraphic = false );
/** /**
Used to switch off the SwTxtFly when there is no overlapping object (Relax). Used to switch off the SwTxtFly when there is no overlapping object (Relax).
...@@ -274,29 +274,29 @@ public: ...@@ -274,29 +274,29 @@ public:
\param[in] the line area \param[in] the line area
\return whether the line will be overlapped by a frame \return whether the line will be overlapped by a frame
*/ */
sal_Bool IsAnyFrm( const SwRect &rLine ) const; bool IsAnyFrm( const SwRect &rLine ) const;
/** /**
Same as IsAnyFrm(const SwRect&), but uses the current frame print Same as IsAnyFrm(const SwRect&), but uses the current frame print
area area
*/ */
sal_Bool IsAnyFrm() const; bool IsAnyFrm() const;
/** /**
sal_True when a frame or DrawObj must to be taken in account. The optimizations true when a frame or DrawObj must to be taken in account. The optimizations
like Paint/FormatEmpty for empty sentences or the virtual OutputDevice can like Paint/FormatEmpty for empty sentences or the virtual OutputDevice can
be used only when sal_False is returned. be used only when false is returned.
\param rRect \param rRect
The rectangle can be empty, the current frame is then used. The value is The rectangle can be empty, the current frame is then used. The value is
global to the document. global to the document.
*/ */
sal_Bool IsAnyObj( const SwRect& rRect ) const; bool IsAnyObj( const SwRect& rRect ) const;
void SetIgnoreCurrentFrame( sal_Bool bNew ); void SetIgnoreCurrentFrame( bool bNew );
void SetIgnoreContour( sal_Bool bNew ); void SetIgnoreContour( bool bNew );
void SetIgnoreObjsInHeaderFooter( const sal_Bool _bNew ); void SetIgnoreObjsInHeaderFooter( const bool bNew );
}; };
...@@ -309,22 +309,24 @@ inline SwAnchoredObjList* SwTxtFly::GetAnchoredObjList() const ...@@ -309,22 +309,24 @@ inline SwAnchoredObjList* SwTxtFly::GetAnchoredObjList() const
inline void SwTxtFly::SetTopRule() inline void SwTxtFly::SetTopRule()
{ {
bTopRule = sal_False; bTopRule = false;
} }
inline sal_Bool SwTxtFly::IsOn() const inline bool SwTxtFly::IsOn() const
{ {
return bOn; return bOn;
} }
inline sal_Bool SwTxtFly::Relax( const SwRect &rRect ) inline bool SwTxtFly::Relax( const SwRect &rRect )
{ {
return 0 != (bOn = bOn && IsAnyFrm( rRect )); bOn &= IsAnyFrm( rRect );
return bOn;
} }
inline sal_Bool SwTxtFly::Relax() inline bool SwTxtFly::Relax()
{ {
return 0 != (bOn = bOn && IsAnyFrm()); bOn &= IsAnyFrm();
return bOn;
} }
inline SwTwips SwTxtFly::GetMinBottom() const inline SwTwips SwTxtFly::GetMinBottom() const
...@@ -347,24 +349,24 @@ inline void SwTxtFly::SetNextTop( long nNew ) const ...@@ -347,24 +349,24 @@ inline void SwTxtFly::SetNextTop( long nNew ) const
((SwTxtFly*)this)->nNextTop = nNew; ((SwTxtFly*)this)->nNextTop = nNew;
} }
inline SwRect SwTxtFly::GetFrm( const SwRect &rRect, sal_Bool bTop ) const inline SwRect SwTxtFly::GetFrm( const SwRect &rRect, bool bTop ) const
{ {
return bOn ? _GetFrm( rRect, bTop ) : SwRect(); return bOn ? _GetFrm( rRect, bTop ) : SwRect();
} }
inline void SwTxtFly::SetIgnoreCurrentFrame( sal_Bool bNew ) inline void SwTxtFly::SetIgnoreCurrentFrame( bool bNew )
{ {
mbIgnoreCurrentFrame = bNew; mbIgnoreCurrentFrame = bNew;
} }
inline void SwTxtFly::SetIgnoreContour( sal_Bool bNew ) inline void SwTxtFly::SetIgnoreContour( bool bNew )
{ {
mbIgnoreContour = bNew; mbIgnoreContour = bNew;
} }
inline void SwTxtFly::SetIgnoreObjsInHeaderFooter( const sal_Bool _bNew ) inline void SwTxtFly::SetIgnoreObjsInHeaderFooter( const bool bNew )
{ {
mbIgnoreObjsInHeaderFooter = _bNew; mbIgnoreObjsInHeaderFooter = bNew;
} }
#endif #endif
......
...@@ -2692,13 +2692,13 @@ void SwTxtFrm::CalcBaseOfstForFly() ...@@ -2692,13 +2692,13 @@ void SwTxtFrm::CalcBaseOfstForFly()
} }
SwTxtFly aTxtFly( this ); SwTxtFly aTxtFly( this );
aTxtFly.SetIgnoreCurrentFrame( sal_True ); aTxtFly.SetIgnoreCurrentFrame( true );
aTxtFly.SetIgnoreContour( sal_True ); aTxtFly.SetIgnoreContour( true );
// #118809# - ignore objects in page header|footer for // #118809# - ignore objects in page header|footer for
// text frames not in page header|footer // text frames not in page header|footer
aTxtFly.SetIgnoreObjsInHeaderFooter( sal_True ); aTxtFly.SetIgnoreObjsInHeaderFooter( true );
SwTwips nRet1 = lcl_CalcFlyBasePos( *this, aFlyRect, aTxtFly ); SwTwips nRet1 = lcl_CalcFlyBasePos( *this, aFlyRect, aTxtFly );
aTxtFly.SetIgnoreCurrentFrame( sal_False ); aTxtFly.SetIgnoreCurrentFrame( false );
SwTwips nRet2 = lcl_CalcFlyBasePos( *this, aFlyRect, aTxtFly ); SwTwips nRet2 = lcl_CalcFlyBasePos( *this, aFlyRect, aTxtFly );
// make values relative to frame start position // make values relative to frame start position
......
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