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

sal_Bool to bool

Change-Id: Ia3b89bc6c51874e66e5923b5f2a0352967b6ec41
üst cb0d8ba5
...@@ -79,7 +79,7 @@ class SwDropPortion : public SwTxtPortion ...@@ -79,7 +79,7 @@ class SwDropPortion : public SwTxtPortion
short nX; // X PaintOffset short nX; // X PaintOffset
short nY; // Y Offset short nY; // Y Offset
sal_Bool FormatTxt( SwTxtFormatInfo &rInf ); bool FormatTxt( SwTxtFormatInfo &rInf );
void PaintTxt( const SwTxtPaintInfo &rInf ) const; void PaintTxt( const SwTxtPaintInfo &rInf ) const;
inline void Fix( const KSHORT nNew ) { nFix = nNew; } inline void Fix( const KSHORT nNew ) { nFix = nNew; }
......
...@@ -74,7 +74,7 @@ bool SwExpandPortion::Format( SwTxtFormatInfo &rInf ) ...@@ -74,7 +74,7 @@ bool SwExpandPortion::Format( SwTxtFormatInfo &rInf )
// So komisch es aussieht, die Abfrage auf GetLen() muss wegen der // So komisch es aussieht, die Abfrage auf GetLen() muss wegen der
// ExpandPortions _hinter_ aDiffTxt (vgl. SoftHyphs) // ExpandPortions _hinter_ aDiffTxt (vgl. SoftHyphs)
// sal_False returnen wegen SetFull ... // false returnen wegen SetFull ...
if( !nFullLen ) if( !nFullLen )
{ {
// nicht Init(), weil wir Hoehe und Ascent brauchen // nicht Init(), weil wir Hoehe und Ascent brauchen
...@@ -137,7 +137,7 @@ SwLinePortion *SwBlankPortion::Compress() { return this; } ...@@ -137,7 +137,7 @@ SwLinePortion *SwBlankPortion::Compress() { return this; }
// Komplikationen bei Flys... // Komplikationen bei Flys...
MSHORT SwBlankPortion::MayUnderFlow( const SwTxtFormatInfo &rInf, MSHORT SwBlankPortion::MayUnderFlow( const SwTxtFormatInfo &rInf,
sal_Int32 nIdx, sal_Bool bUnderFlow ) const sal_Int32 nIdx, bool bUnderFlow ) const
{ {
if( rInf.StopUnderFlow() ) if( rInf.StopUnderFlow() )
return 0; return 0;
...@@ -189,7 +189,7 @@ MSHORT SwBlankPortion::MayUnderFlow( const SwTxtFormatInfo &rInf, ...@@ -189,7 +189,7 @@ MSHORT SwBlankPortion::MayUnderFlow( const SwTxtFormatInfo &rInf,
void SwBlankPortion::FormatEOL( SwTxtFormatInfo &rInf ) void SwBlankPortion::FormatEOL( SwTxtFormatInfo &rInf )
{ {
MSHORT nMay = MayUnderFlow( rInf, rInf.GetIdx() - nLineLength, sal_True ); MSHORT nMay = MayUnderFlow( rInf, rInf.GetIdx() - nLineLength, true );
if( nMay ) if( nMay )
{ {
if( nMay > 1 ) if( nMay > 1 )
...@@ -259,7 +259,7 @@ void SwBlankPortion::HandlePortion( SwPortionHandler& rPH ) const ...@@ -259,7 +259,7 @@ void SwBlankPortion::HandlePortion( SwPortionHandler& rPH ) const
* class SwPostItsPortion * class SwPostItsPortion
*************************************************************************/ *************************************************************************/
SwPostItsPortion::SwPostItsPortion( sal_Bool bScrpt ) SwPostItsPortion::SwPostItsPortion( bool bScrpt )
: bScript( bScrpt ) : bScript( bScrpt )
{ {
nLineLength = 1; nLineLength = 1;
......
...@@ -65,7 +65,7 @@ public: ...@@ -65,7 +65,7 @@ public:
virtual bool Format( SwTxtFormatInfo &rInf ); virtual bool Format( SwTxtFormatInfo &rInf );
virtual void Paint( const SwTxtPaintInfo &rInf ) const; virtual void Paint( const SwTxtPaintInfo &rInf ) const;
MSHORT MayUnderFlow( const SwTxtFormatInfo &rInf, sal_Int32 nIdx, MSHORT MayUnderFlow( const SwTxtFormatInfo &rInf, sal_Int32 nIdx,
sal_Bool bUnderFlow ) const; bool bUnderFlow ) const;
// Accessibility: pass information about this portion to the PortionHandler // Accessibility: pass information about this portion to the PortionHandler
virtual void HandlePortion( SwPortionHandler& rPH ) const; virtual void HandlePortion( SwPortionHandler& rPH ) const;
...@@ -79,14 +79,14 @@ public: ...@@ -79,14 +79,14 @@ public:
class SwPostItsPortion : public SwExpandPortion class SwPostItsPortion : public SwExpandPortion
{ {
sal_Bool bScript; bool bScript;
public: public:
SwPostItsPortion( sal_Bool bScrpt ); SwPostItsPortion( bool bScrpt );
virtual void Paint( const SwTxtPaintInfo &rInf ) const; virtual void Paint( const SwTxtPaintInfo &rInf ) const;
virtual bool Format( SwTxtFormatInfo &rInf ); virtual bool Format( SwTxtFormatInfo &rInf );
virtual KSHORT GetViewWidth( const SwTxtSizeInfo &rInf ) const; virtual KSHORT GetViewWidth( const SwTxtSizeInfo &rInf ) const;
virtual bool GetExpTxt( const SwTxtSizeInfo &rInf, OUString &rTxt ) const; virtual bool GetExpTxt( const SwTxtSizeInfo &rInf, OUString &rTxt ) const;
sal_Bool IsScript() const { return bScript; } bool IsScript() const { return bScript; }
OUTPUT_OPERATOR OUTPUT_OPERATOR
}; };
......
...@@ -49,7 +49,7 @@ using namespace ::com::sun::star; ...@@ -49,7 +49,7 @@ using namespace ::com::sun::star;
* the position is calculated from the values in rInf * the position is calculated from the values in rInf
*************************************************************************/ *************************************************************************/
static sal_Bool lcl_IsDropFlyInter( const SwTxtFormatInfo &rInf, static bool lcl_IsDropFlyInter( const SwTxtFormatInfo &rInf,
sal_uInt16 nWidth, sal_uInt16 nHeight ) sal_uInt16 nWidth, sal_uInt16 nHeight )
{ {
const SwTxtFly *pTxtFly = rInf.GetTxtFly(); const SwTxtFly *pTxtFly = rInf.GetTxtFly();
...@@ -63,7 +63,7 @@ static sal_Bool lcl_IsDropFlyInter( const SwTxtFormatInfo &rInf, ...@@ -63,7 +63,7 @@ static sal_Bool lcl_IsDropFlyInter( const SwTxtFormatInfo &rInf,
return aRect.HasArea(); return aRect.HasArea();
} }
return sal_False; return false;
} }
/************************************************************************* /*************************************************************************
...@@ -168,7 +168,7 @@ MSHORT SwTxtNode::GetDropLen( MSHORT nWishLen ) const ...@@ -168,7 +168,7 @@ MSHORT SwTxtNode::GetDropLen( MSHORT nWishLen ) const
Boundary aBound = Boundary aBound =
g_pBreakIt->GetBreakIter()->getWordBoundary( GetTxt(), 0, g_pBreakIt->GetBreakIter()->getWordBoundary( GetTxt(), 0,
g_pBreakIt->GetLocale( eLanguage ), WordType::DICTIONARY_WORD, sal_True ); g_pBreakIt->GetLocale( eLanguage ), WordType::DICTIONARY_WORD, true );
nEnd = aBound.endPos; nEnd = aBound.endPos;
} }
...@@ -401,20 +401,19 @@ void SwDropPortion::Paint( const SwTxtPaintInfo &rInf ) const ...@@ -401,20 +401,19 @@ void SwDropPortion::Paint( const SwTxtPaintInfo &rInf ) const
*************************************************************************/ *************************************************************************/
sal_Bool SwDropPortion::FormatTxt( SwTxtFormatInfo &rInf ) bool SwDropPortion::FormatTxt( SwTxtFormatInfo &rInf )
{ {
const sal_Int32 nOldLen = GetLen(); const sal_Int32 nOldLen = GetLen();
const sal_Int32 nOldInfLen = rInf.GetLen(); const sal_Int32 nOldInfLen = rInf.GetLen();
const sal_Bool bFull = SwTxtPortion::Format( rInf ); if (!SwTxtPortion::Format( rInf ))
if( bFull ) return false;
{
// sieht zwar Scheisse aus, aber was soll man schon machen? // sieht zwar Scheisse aus, aber was soll man schon machen?
rInf.SetUnderFlow( 0 ); rInf.SetUnderFlow( 0 );
Truncate(); Truncate();
SetLen( nOldLen ); SetLen( nOldLen );
rInf.SetLen( nOldInfLen ); rInf.SetLen( nOldInfLen );
} return true;
return bFull;
} }
/************************************************************************* /*************************************************************************
......
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