summaryrefslogtreecommitdiff
path: root/vcl/source/edit
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-02-21 12:53:51 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-02-21 12:53:51 +0100
commite8f8f24c8415898c787bbfb629247ed62e73a2b9 (patch)
treedae18a3acbf29c192118e7c003f80df8da8e21ae /vcl/source/edit
parent1c8402465cfd4df862409dc310f5f099d044c4d8 (diff)
vcl: sal_Bool -> bool
Change-Id: I2a3e3d3e3266ea0f0fafdd91362076a4aa160f0e
Diffstat (limited to 'vcl/source/edit')
-rw-r--r--vcl/source/edit/textdat2.hxx22
-rw-r--r--vcl/source/edit/textdata.cxx4
-rw-r--r--vcl/source/edit/textdoc.cxx36
-rw-r--r--vcl/source/edit/textdoc.hxx18
-rw-r--r--vcl/source/edit/texteng.cxx150
-rw-r--r--vcl/source/edit/textundo.cxx8
-rw-r--r--vcl/source/edit/textview.cxx230
-rw-r--r--vcl/source/edit/vclmedit.cxx134
-rw-r--r--vcl/source/edit/xtextedt.cxx38
9 files changed, 320 insertions, 320 deletions
diff --git a/vcl/source/edit/textdat2.hxx b/vcl/source/edit/textdat2.hxx
index fd91bd11e023..30c8dc49db7e 100644
--- a/vcl/source/edit/textdat2.hxx
+++ b/vcl/source/edit/textdat2.hxx
@@ -72,7 +72,7 @@ public:
sal_uInt8 GetRightToLeft() const { return nRightToLeft; }
sal_uInt8& GetRightToLeft() { return nRightToLeft; }
- sal_Bool IsRightToLeft() const { return (nRightToLeft&1); }
+ bool IsRightToLeft() const { return (nRightToLeft&1); }
bool HasValidSize() const { return nWidth != (-1); }
};
@@ -88,7 +88,7 @@ public:
~TETextPortionList();
void Reset();
- sal_uInt16 FindPortion( sal_uInt16 nCharPos, sal_uInt16& rPortionStart, sal_Bool bPreferStartingPortion = sal_False );
+ sal_uInt16 FindPortion( sal_uInt16 nCharPos, sal_uInt16& rPortionStart, bool bPreferStartingPortion = false );
sal_uInt16 GetPortionStartIndex( sal_uInt16 nPortion );
void DeleteFromPortion( sal_uInt16 nDelFrom );
};
@@ -126,10 +126,10 @@ public:
mbInvalid = true;
}
- sal_Bool IsIn( sal_uInt16 nIndex ) const
+ bool IsIn( sal_uInt16 nIndex ) const
{ return ( (nIndex >= mnStart ) && ( nIndex < mnEnd ) ); }
- sal_Bool IsIn( sal_uInt16 nIndex, sal_Bool bInclEnd ) const
+ bool IsIn( sal_uInt16 nIndex, bool bInclEnd ) const
{ return ( ( nIndex >= mnStart ) && ( bInclEnd ? ( nIndex <= mnEnd ) : ( nIndex < mnEnd ) ) ); }
void SetStart( sal_uInt16 n ) { mnStart = n; }
@@ -229,7 +229,7 @@ public:
std::vector<TEWritingDirectionInfo>& GetWritingDirectionInfos() { return maWritingDirectionInfos; }
- sal_uInt16 GetLineNumber( sal_uInt16 nIndex, sal_Bool bInclEnd );
+ sal_uInt16 GetLineNumber( sal_uInt16 nIndex, bool bInclEnd );
void CorrectValuesBehindLastFormattedLine( sal_uInt16 nLastFormattedLine );
};
@@ -255,9 +255,9 @@ public:
virtual void CreateAnchor();
- virtual sal_Bool SetCursorAtPoint( const Point& rPointPixel, sal_Bool bDontSelectAtCursor = sal_False );
+ virtual bool SetCursorAtPoint( const Point& rPointPixel, sal_Bool bDontSelectAtCursor = sal_False );
- virtual sal_Bool IsSelectionAtPoint( const Point& rPointPixel );
+ virtual bool IsSelectionAtPoint( const Point& rPointPixel );
virtual void DeselectAll();
virtual void DeselectAtPoint( const Point& );
@@ -285,14 +285,14 @@ struct TextDDInfo
Cursor maCursor;
TextPaM maDropPos;
- sal_Bool mbStarterOfDD;
- sal_Bool mbVisCursor;
+ bool mbStarterOfDD;
+ bool mbVisCursor;
TextDDInfo()
{
maCursor.SetStyle( CURSOR_SHADOW );
- mbStarterOfDD = sal_False;
- mbVisCursor = sal_False;
+ mbStarterOfDD = false;
+ mbVisCursor = false;
}
};
diff --git a/vcl/source/edit/textdata.cxx b/vcl/source/edit/textdata.cxx
index 6ac9459a26f4..892ffc1f4dba 100644
--- a/vcl/source/edit/textdata.cxx
+++ b/vcl/source/edit/textdata.cxx
@@ -73,7 +73,7 @@ void TETextPortionList::DeleteFromPortion( sal_uInt16 nDelFrom )
erase( begin() + nDelFrom, end() );
}
-sal_uInt16 TETextPortionList::FindPortion( sal_uInt16 nCharPos, sal_uInt16& nPortionStart, sal_Bool bPreferStartingPortion )
+sal_uInt16 TETextPortionList::FindPortion( sal_uInt16 nCharPos, sal_uInt16& nPortionStart, bool bPreferStartingPortion )
{
// find left portion at nCharPos at portion border
sal_uInt16 nTmpPos = 0;
@@ -163,7 +163,7 @@ void TEParaPortion::MarkSelectionInvalid( sal_uInt16 nStart, sal_uInt16 /*nEnd*/
mbSimple = false;
}
-sal_uInt16 TEParaPortion::GetLineNumber( sal_uInt16 nChar, sal_Bool bInclEnd )
+sal_uInt16 TEParaPortion::GetLineNumber( sal_uInt16 nChar, bool bInclEnd )
{
for ( sal_uInt16 nLine = 0; nLine < maLines.size(); nLine++ )
{
diff --git a/vcl/source/edit/textdoc.cxx b/vcl/source/edit/textdoc.cxx
index c2a4b74ceeec..698e521c32b5 100644
--- a/vcl/source/edit/textdoc.cxx
+++ b/vcl/source/edit/textdoc.cxx
@@ -47,7 +47,7 @@ TextCharAttrib::~TextCharAttrib()
TextCharAttribList::TextCharAttribList()
{
- mbHasEmptyAttribs = sal_False;
+ mbHasEmptyAttribs = false;
}
TextCharAttribList::~TextCharAttribList()
@@ -55,7 +55,7 @@ TextCharAttribList::~TextCharAttribList()
// PTRARR_DEL
}
-void TextCharAttribList::Clear( sal_Bool bDestroyAttribs )
+void TextCharAttribList::Clear( bool bDestroyAttribs )
{
if ( bDestroyAttribs )
for(iterator it = begin(); it != end(); ++it)
@@ -67,7 +67,7 @@ void TextCharAttribList::Clear( sal_Bool bDestroyAttribs )
void TextCharAttribList::InsertAttrib( TextCharAttrib* pAttrib )
{
if ( pAttrib->IsEmpty() )
- mbHasEmptyAttribs = sal_True;
+ mbHasEmptyAttribs = true;
const sal_uInt16 nCount = size();
const sal_uInt16 nStart = pAttrib->GetStart(); // maybe better for Comp.Opt.
@@ -124,18 +124,18 @@ TextCharAttrib* TextCharAttribList::FindNextAttrib( sal_uInt16 nWhich, sal_uInt1
return NULL;
}
-sal_Bool TextCharAttribList::HasAttrib( sal_uInt16 nWhich ) const
+bool TextCharAttribList::HasAttrib( sal_uInt16 nWhich ) const
{
for ( sal_uInt16 nAttr = size(); nAttr; )
{
const TextCharAttrib* pAttr = GetAttrib( --nAttr );
if ( pAttr->Which() == nWhich )
- return sal_True;
+ return true;
}
- return sal_False;
+ return false;
}
-sal_Bool TextCharAttribList::HasBoundingAttrib( sal_uInt16 nBound )
+bool TextCharAttribList::HasBoundingAttrib( sal_uInt16 nBound )
{
// backwards; if one ends there and the next starts there
// ==> the starting one counts
@@ -144,12 +144,12 @@ sal_Bool TextCharAttribList::HasBoundingAttrib( sal_uInt16 nBound )
TextCharAttrib* pAttr = GetAttrib( --nAttr );
if ( pAttr->GetEnd() < nBound )
- return sal_False;
+ return false;
if ( ( pAttr->GetStart() == nBound ) || ( pAttr->GetEnd() == nBound ) )
- return sal_True;
+ return true;
}
- return sal_False;
+ return false;
}
TextCharAttrib* TextCharAttribList::FindEmptyAttrib( sal_uInt16 nWhich, sal_uInt16 nPos )
@@ -182,7 +182,7 @@ void TextCharAttribList::DeleteEmptyAttribs()
nAttr--;
}
}
- mbHasEmptyAttribs = sal_False;
+ mbHasEmptyAttribs = false;
}
TextNode::TextNode( const OUString& rText ) :
@@ -310,7 +310,7 @@ void TextNode::CollapsAttribs( sal_uInt16 nIndex, sal_uInt16 nDeleted )
nAttr--;
}
else if ( pAttrib->IsEmpty() )
- maCharAttribs.HasEmptyAttribs() = sal_True;
+ maCharAttribs.HasEmptyAttribs() = true;
}
if ( bResort )
@@ -335,7 +335,7 @@ void TextNode::RemoveText( sal_uInt16 nPos, sal_uInt16 nChars )
CollapsAttribs( nPos, nChars );
}
-TextNode* TextNode::Split( sal_uInt16 nPos, sal_Bool bKeepEndingAttribs )
+TextNode* TextNode::Split( sal_uInt16 nPos, bool bKeepEndingAttribs )
{
OUString aNewText;
if ( nPos < maText.getLength() )
@@ -545,7 +545,7 @@ TextPaM TextDoc::InsertText( const TextPaM& rPaM, const OUString& rStr )
return aPaM;
}
-TextPaM TextDoc::InsertParaBreak( const TextPaM& rPaM, sal_Bool bKeepEndingAttribs )
+TextPaM TextDoc::InsertParaBreak( const TextPaM& rPaM, bool bKeepEndingAttribs )
{
TextNode* pNode = maTextNodes.GetObject( rPaM.GetPara() );
TextNode* pNew = pNode->Split( rPaM.GetIndex(), bKeepEndingAttribs );
@@ -579,20 +579,20 @@ TextPaM TextDoc::RemoveChars( const TextPaM& rPaM, sal_uInt16 nChars )
return rPaM;
}
-sal_Bool TextDoc::IsValidPaM( const TextPaM& rPaM )
+bool TextDoc::IsValidPaM( const TextPaM& rPaM )
{
if ( rPaM.GetPara() >= maTextNodes.Count() )
{
OSL_FAIL( "PaM: Para out of range" );
- return sal_False;
+ return false;
}
TextNode * pNode = maTextNodes.GetObject( rPaM.GetPara() );
if ( rPaM.GetIndex() > pNode->GetText().getLength() )
{
OSL_FAIL( "PaM: Index out of range" );
- return sal_False;
+ return false;
}
- return sal_True;
+ return true;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/edit/textdoc.hxx b/vcl/source/edit/textdoc.hxx
index e00cafddd664..06623ce218dd 100644
--- a/vcl/source/edit/textdoc.hxx
+++ b/vcl/source/edit/textdoc.hxx
@@ -37,7 +37,7 @@ public:
class TextCharAttribList : private TextCharAttribs
{
private:
- sal_Bool mbHasEmptyAttribs;
+ bool mbHasEmptyAttribs;
TextCharAttribList( const TextCharAttribList& ) : TextCharAttribs() {}
@@ -45,7 +45,7 @@ public:
TextCharAttribList();
~TextCharAttribList();
- void Clear( sal_Bool bDestroyAttribs );
+ void Clear( bool bDestroyAttribs );
sal_uInt16 Count() const { return TextCharAttribs::size(); }
TextCharAttrib* GetAttrib( sal_uInt16 n ) const { return TextCharAttribs::operator[]( n ); }
@@ -56,14 +56,14 @@ public:
void DeleteEmptyAttribs();
void ResortAttribs();
- sal_Bool HasEmptyAttribs() const { return mbHasEmptyAttribs; }
- sal_Bool& HasEmptyAttribs() { return mbHasEmptyAttribs; }
+ bool HasEmptyAttribs() const { return mbHasEmptyAttribs; }
+ bool& HasEmptyAttribs() { return mbHasEmptyAttribs; }
TextCharAttrib* FindAttrib( sal_uInt16 nWhich, sal_uInt16 nPos );
TextCharAttrib* FindNextAttrib( sal_uInt16 nWhich, sal_uInt16 nFromPos, sal_uInt16 nMaxPos = 0xFFFF ) const;
TextCharAttrib* FindEmptyAttrib( sal_uInt16 nWhich, sal_uInt16 nPos );
- sal_Bool HasAttrib( sal_uInt16 nWhich ) const;
- sal_Bool HasBoundingAttrib( sal_uInt16 nBound );
+ bool HasAttrib( sal_uInt16 nWhich ) const;
+ bool HasBoundingAttrib( sal_uInt16 nBound );
};
@@ -91,7 +91,7 @@ public:
void InsertText( sal_uInt16 nPos, sal_Unicode c );
void RemoveText( sal_uInt16 nPos, sal_uInt16 nChars );
- TextNode* Split( sal_uInt16 nPos, sal_Bool bKeepEndigAttribs );
+ TextNode* Split( sal_uInt16 nPos, bool bKeepEndigAttribs );
void Append( const TextNode& rNode );
};
@@ -117,7 +117,7 @@ public:
TextPaM InsertText( const TextPaM& rPaM, sal_Unicode c );
TextPaM InsertText( const TextPaM& rPaM, const OUString& rStr );
- TextPaM InsertParaBreak( const TextPaM& rPaM, sal_Bool bKeepEndingAttribs );
+ TextPaM InsertParaBreak( const TextPaM& rPaM, bool bKeepEndingAttribs );
TextPaM ConnectParagraphs( TextNode* pLeft, TextNode* pRight );
sal_uLong GetTextLen( const sal_Unicode* pSep, const TextSelection* pSel = NULL ) const;
@@ -127,7 +127,7 @@ public:
void SetLeftMargin( sal_uInt16 n ) { mnLeftMargin = n; }
sal_uInt16 GetLeftMargin() const { return mnLeftMargin; }
- sal_Bool IsValidPaM( const TextPaM& rPaM );
+ bool IsValidPaM( const TextPaM& rPaM );
};
#endif // INCLUDED_VCL_SOURCE_EDIT_TEXTDOC_HXX
diff --git a/vcl/source/edit/texteng.cxx b/vcl/source/edit/texteng.cxx
index cbd0f9847189..985347cb0b42 100644
--- a/vcl/source/edit/texteng.cxx
+++ b/vcl/source/edit/texteng.cxx
@@ -70,15 +70,15 @@ TextEngine::TextEngine()
mpViews = new TextViews;
mpActiveView = NULL;
- mbIsFormatting = sal_False;
- mbFormatted = sal_False;
- mbUpdate = sal_True;
- mbModified = sal_False;
- mbUndoEnabled = sal_False;
- mbIsInUndo = sal_False;
- mbDowning = sal_False;
- mbRightToLeft = sal_False;
- mbHasMultiLineParas = sal_False;
+ mbIsFormatting = false;
+ mbFormatted = false;
+ mbUpdate = true;
+ mbModified = false;
+ mbUndoEnabled = false;
+ mbIsInUndo = false;
+ mbDowning = false;
+ mbRightToLeft = false;
+ mbHasMultiLineParas = false;
meAlign = TXTALIGN_LEFT;
@@ -102,7 +102,7 @@ TextEngine::TextEngine()
maTextColor = COL_BLACK;
Font aFont;
- aFont.SetTransparent( sal_False );
+ aFont.SetTransparent( false );
Color aFillColor( aFont.GetFillColor() );
aFillColor.SetTransparency( 0 );
aFont.SetFillColor( aFillColor );
@@ -111,7 +111,7 @@ TextEngine::TextEngine()
TextEngine::~TextEngine()
{
- mbDowning = sal_True;
+ mbDowning = true;
delete mpIdleFormatter;
delete mpDoc;
@@ -188,7 +188,7 @@ void TextEngine::SetFont( const Font& rFont )
// Do not allow transparent fonts because of selection
// (otherwise delete the background in ImplPaint later differently)
- maFont.SetTransparent( sal_False );
+ maFont.SetTransparent( false );
// Tell VCL not to use the font color, use text color from OutputDevice
maFont.SetColor( COL_TRANSPARENT );
Color aFillColor( maFont.GetFillColor() );
@@ -306,7 +306,7 @@ sal_uInt16 TextEngine::GetTextLen( sal_uLong nPara ) const
return mpDoc->GetNodes().GetObject( nPara )->GetText().getLength();
}
-void TextEngine::SetUpdateMode( sal_Bool bUpdate )
+void TextEngine::SetUpdateMode( bool bUpdate )
{
if ( bUpdate != mbUpdate )
{
@@ -320,9 +320,9 @@ void TextEngine::SetUpdateMode( sal_Bool bUpdate )
}
}
-sal_Bool TextEngine::DoesKeyChangeText( const KeyEvent& rKeyEvent )
+bool TextEngine::DoesKeyChangeText( const KeyEvent& rKeyEvent )
{
- sal_Bool bDoesChange = sal_False;
+ bool bDoesChange = false;
KeyFuncType eFunc = rKeyEvent.GetKeyCode().GetFunction();
if ( eFunc != KEYFUNC_DONTKNOW )
@@ -332,7 +332,7 @@ sal_Bool TextEngine::DoesKeyChangeText( const KeyEvent& rKeyEvent )
case KEYFUNC_UNDO:
case KEYFUNC_REDO:
case KEYFUNC_CUT:
- case KEYFUNC_PASTE: bDoesChange = sal_True;
+ case KEYFUNC_PASTE: bDoesChange = true;
break;
default: // might get handled below
eFunc = KEYFUNC_DONTKNOW;
@@ -346,14 +346,14 @@ sal_Bool TextEngine::DoesKeyChangeText( const KeyEvent& rKeyEvent )
case KEY_BACKSPACE:
{
if ( !rKeyEvent.GetKeyCode().IsMod2() )
- bDoesChange = sal_True;
+ bDoesChange = true;
}
break;
case KEY_RETURN:
case KEY_TAB:
{
if ( !rKeyEvent.GetKeyCode().IsMod1() && !rKeyEvent.GetKeyCode().IsMod2() )
- bDoesChange = sal_True;
+ bDoesChange = true;
}
break;
default:
@@ -365,15 +365,15 @@ sal_Bool TextEngine::DoesKeyChangeText( const KeyEvent& rKeyEvent )
return bDoesChange;
}
-sal_Bool TextEngine::IsSimpleCharInput( const KeyEvent& rKeyEvent )
+bool TextEngine::IsSimpleCharInput( const KeyEvent& rKeyEvent )
{
if( rKeyEvent.GetCharCode() >= 32 && rKeyEvent.GetCharCode() != 127 &&
KEY_MOD1 != (rKeyEvent.GetKeyCode().GetModifier() & ~KEY_SHIFT) && // (ssa) #i45714#:
KEY_MOD2 != (rKeyEvent.GetKeyCode().GetModifier() & ~KEY_SHIFT) ) // check for Ctrl and Alt separately
{
- return sal_True;
+ return true;
}
- return sal_False;
+ return false;
}
void TextEngine::ImpInitDoc()
@@ -392,7 +392,7 @@ void TextEngine::ImpInitDoc()
TEParaPortion* pIniPortion = new TEParaPortion( pNode );
mpTEParaPortions->Insert( pIniPortion, (sal_uLong)0 );
- mbFormatted = sal_False;
+ mbFormatted = false;
ImpParagraphRemoved( TEXT_PARA_ALL );
ImpParagraphInserted( 0 );
@@ -447,9 +447,9 @@ void TextEngine::SetText( const OUString& rText )
{
ImpRemoveText();
- sal_Bool bUndoCurrentlyEnabled = IsUndoEnabled();
+ bool bUndoCurrentlyEnabled = IsUndoEnabled();
// the manually inserted text cannot be reversed by the user
- EnableUndo( sal_False );
+ EnableUndo( false );
TextPaM aStartPaM( 0, 0 );
TextSelection aEmptySel( aStartPaM, aStartPaM );
@@ -639,7 +639,7 @@ uno::Reference < i18n::XExtendedInputSequenceChecker > TextEngine::GetInputSeque
return mxISC;
}
-sal_Bool TextEngine::IsInputSequenceCheckingRequired( sal_Unicode c, const TextSelection& rCurSel ) const
+bool TextEngine::IsInputSequenceCheckingRequired( sal_Unicode c, const TextSelection& rCurSel ) const
{
SvtCTLOptions aCTLOptions;
@@ -663,12 +663,12 @@ sal_Bool TextEngine::IsInputSequenceCheckingRequired( sal_Unicode c, const TextS
return bIsSequenceChecking;
}
-TextPaM TextEngine::ImpInsertText( const TextSelection& rCurSel, sal_Unicode c, sal_Bool bOverwrite )
+TextPaM TextEngine::ImpInsertText( const TextSelection& rCurSel, sal_Unicode c, bool bOverwrite )
{
- return ImpInsertText( c, rCurSel, bOverwrite, sal_False );
+ return ImpInsertText( c, rCurSel, bOverwrite, false );
}
-TextPaM TextEngine::ImpInsertText( sal_Unicode c, const TextSelection& rCurSel, sal_Bool bOverwrite, sal_Bool bIsUserInput )
+TextPaM TextEngine::ImpInsertText( sal_Unicode c, const TextSelection& rCurSel, bool bOverwrite, bool bIsUserInput )
{
DBG_ASSERT( c != '\n', "InsertText: NewLine!" );
DBG_ASSERT( c != '\r', "InsertText: NewLine!" );
@@ -751,7 +751,7 @@ TextPaM TextEngine::ImpInsertText( sal_Unicode c, const TextSelection& rCurSel,
if ( IsUndoEnabled() && !IsInUndo() )
{
TextUndoInsertChars* pNewUndo = new TextUndoInsertChars( this, aPaM, OUString(c) );
- sal_Bool bTryMerge = ( !bDoOverwrite && ( c != ' ' ) ) ? sal_True : sal_False;
+ bool bTryMerge = ( !bDoOverwrite && ( c != ' ' ) ) ? sal_True : sal_False;
InsertUndo( pNewUndo, bTryMerge );
}
@@ -822,7 +822,7 @@ TextPaM TextEngine::ImpInsertText( const TextSelection& rCurSel, const OUString&
return aPaM;
}
-TextPaM TextEngine::ImpInsertParaBreak( const TextSelection& rCurSel, sal_Bool bKeepEndingAttribs )
+TextPaM TextEngine::ImpInsertParaBreak( const TextSelection& rCurSel, bool bKeepEndingAttribs )
{
TextPaM aPaM;
if ( rCurSel.HasRange() )
@@ -833,7 +833,7 @@ TextPaM TextEngine::ImpInsertParaBreak( const TextSelection& rCurSel, sal_Bool b
return ImpInsertParaBreak( aPaM, bKeepEndingAttribs );
}
-TextPaM TextEngine::ImpInsertParaBreak( const TextPaM& rPaM, sal_Bool bKeepEndingAttribs )
+TextPaM TextEngine::ImpInsertParaBreak( const TextPaM& rPaM, bool bKeepEndingAttribs )
{
if ( IsUndoEnabled() && !IsInUndo() )
InsertUndo( new TextUndoSplitPara( this, rPaM.GetPara(), rPaM.GetIndex() ) );
@@ -861,7 +861,7 @@ TextPaM TextEngine::ImpInsertParaBreak( const TextPaM& rPaM, sal_Bool bKeepEndin
return aPaM;
}
-Rectangle TextEngine::PaMtoEditCursor( const TextPaM& rPaM, sal_Bool bSpecial )
+Rectangle TextEngine::PaMtoEditCursor( const TextPaM& rPaM, bool bSpecial )
{
DBG_ASSERT( GetUpdateMode(), "PaMtoEditCursor: GetUpdateMode()" );
@@ -887,7 +887,7 @@ Rectangle TextEngine::PaMtoEditCursor( const TextPaM& rPaM, sal_Bool bSpecial )
return aEditCursor;
}
-Rectangle TextEngine::GetEditCursor( const TextPaM& rPaM, sal_Bool bSpecial, sal_Bool bPreferPortionStart )
+Rectangle TextEngine::GetEditCursor( const TextPaM& rPaM, bool bSpecial, bool bPreferPortionStart )
{
if ( !IsFormatted() && !IsFormatting() )
FormatAndUpdate();
@@ -940,16 +940,16 @@ Rectangle TextEngine::GetEditCursor( const TextPaM& rPaM, sal_Bool bSpecial, sal
return aEditCursor;
}
-long TextEngine::ImpGetXPos( sal_uLong nPara, TextLine* pLine, sal_uInt16 nIndex, sal_Bool bPreferPortionStart )
+long TextEngine::ImpGetXPos( sal_uLong nPara, TextLine* pLine, sal_uInt16 nIndex, bool bPreferPortionStart )
{
DBG_ASSERT( ( nIndex >= pLine->GetStart() ) && ( nIndex <= pLine->GetEnd() ) , "ImpGetXPos: Bad parameters!" );
- sal_Bool bDoPreferPortionStart = bPreferPortionStart;
+ bool bDoPreferPortionStart = bPreferPortionStart;
// Assure that the portion belongs to this line
if ( nIndex == pLine->GetStart() )
- bDoPreferPortionStart = sal_True;
+ bDoPreferPortionStart = true;
else if ( nIndex == pLine->GetEnd() )
- bDoPreferPortionStart = sal_False;
+ bDoPreferPortionStart = false;
TEParaPortion* pParaPortion = mpTEParaPortions->GetObject( nPara );
@@ -985,7 +985,7 @@ long TextEngine::ImpGetXPos( sal_uLong nPara, TextLine* pLine, sal_uInt16 nIndex
// nX += pNextPortion->GetWidth();
// End of the tab portion, use start of next for cursor pos
DBG_ASSERT( !bPreferPortionStart, "ImpGetXPos: How can we get here!" );
- nX = ImpGetXPos( nPara, pLine, nIndex, sal_True );
+ nX = ImpGetXPos( nPara, pLine, nIndex, true );
}
}
@@ -1039,9 +1039,9 @@ const TextCharAttrib* TextEngine::FindCharAttrib( const TextPaM& rPaM, sal_uInt1
return pAttr;
}
-sal_Bool TextEngine::HasAttrib( sal_uInt16 nWhich ) const
+bool TextEngine::HasAttrib( sal_uInt16 nWhich ) const
{
- sal_Bool bAttr = sal_False;
+ bool bAttr = false;
for ( sal_uLong n = mpDoc->GetNodes().Count(); --n && !bAttr; )
{
TextNode* pNode = mpDoc->GetNodes().GetObject( n );
@@ -1050,7 +1050,7 @@ sal_Bool TextEngine::HasAttrib( sal_uInt16 nWhich ) const
return bAttr;
}
-TextPaM TextEngine::GetPaM( const Point& rDocPos, sal_Bool bSmart )
+TextPaM TextEngine::GetPaM( const Point& rDocPos, bool bSmart )
{
DBG_ASSERT( GetUpdateMode(), "GetPaM: GetUpdateMode()" );
@@ -1078,7 +1078,7 @@ TextPaM TextEngine::GetPaM( const Point& rDocPos, sal_Bool bSmart )
return TextPaM( nLastNode, pLast->GetText().getLength() );
}
-sal_uInt16 TextEngine::ImpFindIndex( sal_uLong nPortion, const Point& rPosInPara, sal_Bool bSmart )
+sal_uInt16 TextEngine::ImpFindIndex( sal_uLong nPortion, const Point& rPosInPara, bool bSmart )
{
DBG_ASSERT( IsFormatted(), "GetPaM: Not formatted" );
TEParaPortion* pPortion = mpTEParaPortions->GetObject( nPortion );
@@ -1112,7 +1112,7 @@ sal_uInt16 TextEngine::ImpFindIndex( sal_uLong nPortion, const Point& rPosInPara
return nCurIndex;
}
-sal_uInt16 TextEngine::GetCharPos( sal_uLong nPortion, sal_uInt16 nLine, long nXPos, sal_Bool )
+sal_uInt16 TextEngine::GetCharPos( sal_uLong nPortion, sal_uInt16 nLine, long nXPos, bool )
{
TEParaPortion* pPortion = mpTEParaPortions->GetObject( nPortion );
@@ -1327,7 +1327,7 @@ sal_uLong TextEngine::GetParagraphCount() const
return mpDoc->GetNodes().Count();
}
-void TextEngine::EnableUndo( sal_Bool bEnable )
+void TextEngine::EnableUndo( bool bEnable )
{
// delete list when switching mode
if ( bEnable != IsUndoEnabled() )
@@ -1358,7 +1358,7 @@ void TextEngine::UndoActionEnd()
GetUndoManager().LeaveListAction();
}
-void TextEngine::InsertUndo( TextUndo* pUndo, sal_Bool bTryMerge )
+void TextEngine::InsertUndo( TextUndo* pUndo, bool bTryMerge )
{
DBG_ASSERT( !IsInUndo(), "InsertUndo: in Undo mode!" );
GetUndoManager().AddUndoAction( pUndo, bTryMerge );
@@ -1452,7 +1452,7 @@ void TextEngine::SeekCursor( sal_uLong nPara, sal_uInt16 nPos, Font& rFont, Outp
const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
rFont.SetColor( rStyleSettings.GetHighlightTextColor() );
rFont.SetFillColor( rStyleSettings.GetHighlightColor() );
- rFont.SetTransparent( sal_False );
+ rFont.SetTransparent( false );
}
else if ( nAttr & EXTTEXTINPUT_ATTR_GRAYWAVELINE )
{
@@ -1485,8 +1485,8 @@ void TextEngine::IdleFormatAndUpdate( TextView* pCurView, sal_uInt16 nMaxTimerRe
void TextEngine::TextModified()
{
- mbFormatted = sal_False;
- mbModified = sal_True;
+ mbFormatted = false;
+ mbModified = true;
}
void TextEngine::UpdateViews( TextView* pCurView )
@@ -1547,7 +1547,7 @@ void TextEngine::FormatFullDoc()
sal_Int32 nLen = pTEParaPortion->GetNode()->GetText().getLength();
pTEParaPortion->MarkSelectionInvalid( 0, nLen );
}
- mbFormatted = sal_False;
+ mbFormatted = false;
FormatDoc();
}
@@ -1556,8 +1556,8 @@ void TextEngine::FormatDoc()
if ( IsFormatted() || !GetUpdateMode() || IsFormatting() )
return;
- mbIsFormatting = sal_True;
- mbHasMultiLineParas = sal_False;
+ mbIsFormatting = true;
+ mbHasMultiLineParas = false;
long nY = 0;
bool bGrow = false;
@@ -1608,7 +1608,7 @@ void TextEngine::FormatDoc()
}
nY += CalcParaHeight( nPara );
if ( !mbHasMultiLineParas && pTEParaPortion->GetLines().size() > 1 )
- mbHasMultiLineParas = sal_True;
+ mbHasMultiLineParas = true;
}
if ( !maInvalidRect.IsEmpty() )
@@ -1630,13 +1630,13 @@ void TextEngine::FormatDoc()
mnCurTextHeight = nNewHeight;
if ( nDiff )
{
- mbFormatted = sal_True;
+ mbFormatted = true;
ImpTextHeightChanged();
}
}
- mbIsFormatting = sal_False;
- mbFormatted = sal_True;
+ mbIsFormatting = false;
+ mbFormatted = true;
ImpTextFormatted();
}
@@ -2020,9 +2020,9 @@ void TextEngine::ImpPaint( OutputDevice* pOutDev, const Point& rStartPos, Rectan
Font aFont;
SeekCursor( nPara, nIndex+1, aFont, pOutDev );
if( bTransparent )
- aFont.SetTransparent( sal_True );
+ aFont.SetTransparent( true );
else if ( pSelection )
- aFont.SetTransparent( sal_False );
+ aFont.SetTransparent( false );
pOutDev->SetFont( aFont );
sal_uInt16 nTmpIndex = nIndex;
@@ -2150,7 +2150,7 @@ void TextEngine::ImpPaint( OutputDevice* pOutDev, const Point& rStartPos, Rectan
}
}
-sal_Bool TextEngine::CreateLines( sal_uLong nPara )
+bool TextEngine::CreateLines( sal_uLong nPara )
{
// sal_Bool: changing Height of Paragraph Yes/No - sal_True/sal_False
@@ -2501,10 +2501,10 @@ OUString TextEngine::GetWord( const TextPaM& rCursorPos, TextPaM* pStartOfWord )
return aWord;
}
-sal_Bool TextEngine::Read( SvStream& rInput, const TextSelection* pSel )
+bool TextEngine::Read( SvStream& rInput, const TextSelection* pSel )
{
- sal_Bool bUpdate = GetUpdateMode();
- SetUpdateMode( sal_False );
+ bool bUpdate = GetUpdateMode();
+ SetUpdateMode( false );
UndoActionStart();
TextSelection aSel;
@@ -2521,7 +2521,7 @@ sal_Bool TextEngine::Read( SvStream& rInput, const TextSelection* pSel )
aSel = ImpDeleteText( aSel );
OString aLine;
- sal_Bool bDone = rInput.ReadLine( aLine );
+ bool bDone = rInput.ReadLine( aLine );
OUString aTmpStr(OStringToOUString(aLine, rInput.GetStreamCharSet()));
while ( bDone )
{
@@ -2546,7 +2546,7 @@ sal_Bool TextEngine::Read( SvStream& rInput, const TextSelection* pSel )
return rInput.GetError() ? sal_False : sal_True;
}
-sal_Bool TextEngine::Write( SvStream& rOutput, const TextSelection* pSel, sal_Bool bHTML )
+bool TextEngine::Write( SvStream& rOutput, const TextSelection* pSel, bool bHTML )
{
TextSelection aSel;
if ( pSel )
@@ -2634,19 +2634,19 @@ sal_Bool TextEngine::Write( SvStream& rOutput, const TextSelection* pSel, sal_Bo
return rOutput.GetError() ? sal_False : sal_True;
}
-void TextEngine::RemoveAttribs( sal_uLong nPara, sal_Bool bIdleFormatAndUpdate )
+void TextEngine::RemoveAttribs( sal_uLong nPara, bool bIdleFormatAndUpdate )
{
if ( nPara < mpDoc->GetNodes().Count() )
{
TextNode* pNode = mpDoc->GetNodes().GetObject( nPara );
if ( pNode->GetCharAttribs().Count() )
{
- pNode->GetCharAttribs().Clear( sal_True );
+ pNode->GetCharAttribs().Clear( true );
TEParaPortion* pTEParaPortion = mpTEParaPortions->GetObject( nPara );
pTEParaPortion->MarkSelectionInvalid( 0, pNode->GetText().getLength() );
- mbFormatted = sal_False;
+ mbFormatted = false;
if ( bIdleFormatAndUpdate )
IdleFormatAndUpdate( NULL, 0xFFFF );
@@ -2655,7 +2655,7 @@ void TextEngine::RemoveAttribs( sal_uLong nPara, sal_Bool bIdleFormatAndUpdate )
}
}
}
-void TextEngine::RemoveAttribs( sal_uLong nPara, sal_uInt16 nWhich, sal_Bool bIdleFormatAndUpdate )
+void TextEngine::RemoveAttribs( sal_uLong nPara, sal_uInt16 nWhich, bool bIdleFormatAndUpdate )
{
if ( nPara < mpDoc->GetNodes().Count() )
{
@@ -2671,7 +2671,7 @@ void TextEngine::RemoveAttribs( sal_uLong nPara, sal_uInt16 nWhich, sal_Bool bId
}
TEParaPortion* pTEParaPortion = mpTEParaPortions->GetObject( nPara );
pTEParaPortion->MarkSelectionInvalid( 0, pNode->GetText().getLength() );
- mbFormatted = sal_False;
+ mbFormatted = false;
if(bIdleFormatAndUpdate)
IdleFormatAndUpdate( NULL, 0xFFFF );
else
@@ -2698,13 +2698,13 @@ void TextEngine::RemoveAttrib( sal_uLong nPara, const TextCharAttrib& rAttrib )
}
TEParaPortion* pTEParaPortion = mpTEParaPortions->GetObject( nPara );
pTEParaPortion->MarkSelectionInvalid( 0, pNode->GetText().getLength() );
- mbFormatted = sal_False;
+ mbFormatted = false;
FormatAndUpdate( NULL );
}
}
}
-void TextEngine::SetAttrib( const TextAttrib& rAttr, sal_uLong nPara, sal_uInt16 nStart, sal_uInt16 nEnd, sal_Bool bIdleFormatAndUpdate )
+void TextEngine::SetAttrib( const TextAttrib& rAttr, sal_uLong nPara, sal_uInt16 nStart, sal_uInt16 nEnd, bool bIdleFormatAndUpdate )
{
// For now do not check if Attributes overlap!
@@ -2726,7 +2726,7 @@ void TextEngine::SetAttrib( const TextAttrib& rAttr, sal_uLong nPara, sal_uInt16
pNode->GetCharAttribs().InsertAttrib( new TextCharAttrib( rAttr, nStart, nEnd ) );
pTEParaPortion->MarkSelectionInvalid( nStart, nEnd );
- mbFormatted = sal_False;
+ mbFormatted = false;
if ( bIdleFormatAndUpdate )
IdleFormatAndUpdate( NULL, 0xFFFF );
else
@@ -2932,7 +2932,7 @@ LocaleDataWrapper* TextEngine::ImpGetLocaleDataWrapper()
return mpLocaleDataWrapper;
}
-void TextEngine::SetRightToLeft( sal_Bool bR2L )
+void TextEngine::SetRightToLeft( bool bR2L )
{
if ( mbRightToLeft != bR2L )
{
@@ -3084,7 +3084,7 @@ long TextEngine::ImpGetPortionXOffset( sal_uLong nPara, TextLine* pLine, sal_uIn
return nX;
}
-void TextEngine::ImpInitLayoutMode( OutputDevice* pOutDev, sal_Bool bDrawingR2LPortion )
+void TextEngine::ImpInitLayoutMode( OutputDevice* pOutDev, bool bDrawingR2LPortion )
{
sal_uLong nLayoutMode = pOutDev->GetLayoutMode();
@@ -3113,7 +3113,7 @@ long TextEngine::ImpGetOutputOffset( sal_uLong nPara, TextLine* pLine, sal_uInt1
TEParaPortion* pPortion = mpTEParaPortions->GetObject( nPara );
sal_uInt16 nPortionStart;
- sal_uInt16 nPortion = pPortion->GetTextPortions().FindPortion( nIndex, nPortionStart, sal_True );
+ sal_uInt16 nPortion = pPortion->GetTextPortions().FindPortion( nIndex, nPortionStart, true );
TETextPortion* pTextPortion = pPortion->GetTextPortions()[ nPortion ];
@@ -3134,7 +3134,7 @@ long TextEngine::ImpGetOutputOffset( sal_uLong nPara, TextLine* pLine, sal_uInt1
nX = ImpGetXPos( nPara, pLine, nIndex, nIndex == nPortionStart );
if ( nIndex2 != nIndex )
{
- long nX2 = ImpGetXPos( nPara, pLine, nIndex2, sal_False );
+ long nX2 = ImpGetXPos( nPara, pLine, nIndex2, false );
if ( ( !IsRightToLeft() && ( nX2 < nX ) ) ||
( IsRightToLeft() && ( nX2 > nX ) ) )
{
diff --git a/vcl/source/edit/textundo.cxx b/vcl/source/edit/textundo.cxx
index 709b61b040db..6cd4f339d642 100644
--- a/vcl/source/edit/textundo.cxx
+++ b/vcl/source/edit/textundo.cxx
@@ -82,9 +82,9 @@ bool TextUndoManager::Undo()
UndoRedoStart();
- mpTextEngine->SetIsInUndo( sal_True );
+ mpTextEngine->SetIsInUndo( true );
bool bDone = SfxUndoManager::Undo();
- mpTextEngine->SetIsInUndo( sal_False );
+ mpTextEngine->SetIsInUndo( false );
UndoRedoEnd();
@@ -99,9 +99,9 @@ bool TextUndoManager::Redo()
UndoRedoStart();
- mpTextEngine->SetIsInUndo( sal_True );
+ mpTextEngine->SetIsInUndo( true );
bool bDone = SfxUndoManager::Redo();
- mpTextEngine->SetIsInUndo( sal_False );
+ mpTextEngine->SetIsInUndo( false );
UndoRedoEnd();
diff --git a/vcl/source/edit/textview.cxx b/vcl/source/edit/textview.cxx
index 1f43143bba78..969e5898d29a 100644
--- a/vcl/source/edit/textview.cxx
+++ b/vcl/source/edit/textview.cxx
@@ -166,36 +166,36 @@ struct ImpTextView
sal_uInt16 mnTravelXPos;
- sal_Bool mbAutoScroll : 1;
- sal_Bool mbInsertMode : 1;
- sal_Bool mbReadOnly : 1;
- sal_Bool mbPaintSelection : 1;
- sal_Bool mbAutoIndent : 1;
- sal_Bool mbHighlightSelection : 1;
- sal_Bool mbCursorEnabled : 1;
- sal_Bool mbClickedInSelection : 1;
- sal_Bool mbSupportProtectAttribute : 1;
+ bool mbAutoScroll : 1;
+ bool mbInsertMode : 1;
+ bool mbReadOnly : 1;
+ bool mbPaintSelection : 1;
+ bool mbAutoIndent : 1;
+ bool mbHighlightSelection : 1;
+ bool mbCursorEnabled : 1;
+ bool mbClickedInSelection : 1;
+ bool mbSupportProtectAttribute : 1;
bool mbCursorAtEndOfLine;
};
TextView::TextView( TextEngine* pEng, Window* pWindow ) :
mpImpl(new ImpTextView)
{
- pWindow->EnableRTL( sal_False );
+ pWindow->EnableRTL( false );
mpImpl->mpWindow = pWindow;
mpImpl->mpTextEngine = pEng;
mpImpl->mpVirtDev = NULL;
- mpImpl->mbPaintSelection = sal_True;
- mpImpl->mbAutoScroll = sal_True;
- mpImpl->mbInsertMode = sal_True;
- mpImpl->mbReadOnly = sal_False;
- mpImpl->mbHighlightSelection = sal_False;
- mpImpl->mbAutoIndent = sal_False;
- mpImpl->mbCursorEnabled = sal_True;
- mpImpl->mbClickedInSelection = sal_False;
- mpImpl->mbSupportProtectAttribute = sal_False;
+ mpImpl->mbPaintSelection = true;
+ mpImpl->mbAutoScroll = true;
+ mpImpl->mbInsertMode = true;
+ mpImpl->mbReadOnly = false;
+ mpImpl->mbHighlightSelection = false;
+ mpImpl->mbAutoIndent = false;
+ mpImpl->mbCursorEnabled = true;
+ mpImpl->mbClickedInSelection = false;
+ mpImpl->mbSupportProtectAttribute = false;
mpImpl->mbCursorAtEndOfLine = false;
// mbInSelection = sal_False;
@@ -204,7 +204,7 @@ TextView::TextView( TextEngine* pEng, Window* pWindow ) :
mpImpl->mpSelFuncSet = new TextSelFunctionSet( this );
mpImpl->mpSelEngine = new SelectionEngine( mpImpl->mpWindow, mpImpl->mpSelFuncSet );
mpImpl->mpSelEngine->SetSelectionMode( RANGE_SELECTION );
- mpImpl->mpSelEngine->EnableDrag( sal_True );
+ mpImpl->mpSelEngine->EnableDrag( true );
mpImpl->mpCursor = new Cursor;
mpImpl->mpCursor->Show();
@@ -212,7 +212,7 @@ TextView::TextView( TextEngine* pEng, Window* pWindow ) :
pWindow->SetInputContext( InputContext( pEng->GetFont(), INPUTCONTEXT_TEXT|INPUTCONTEXT_EXTTEXTINPUT ) );
if ( pWindow->GetSettings().GetStyleSettings().GetSelectionOptions() & SELECTION_OPTION_INVERT )
- mpImpl->mbHighlightSelection = sal_True;
+ mpImpl->mbHighlightSelection = true;
pWindow->SetLineColor();
@@ -250,7 +250,7 @@ void TextView::Invalidate()
mpImpl->mpWindow->Invalidate();
}
-void TextView::SetSelection( const TextSelection& rTextSel, sal_Bool bGotoCursor )
+void TextView::SetSelection( const TextSelection& rTextSel, bool bGotoCursor )
{
// if someone left an empty attribute and then the Outliner manipulated the selection
if ( !mpImpl->maSelection.HasRange() )
@@ -319,10 +319,10 @@ void TextView::ImpPaint( OutputDevice* pOut, const Point& rStartPos, Rectangle c
void TextView::Paint( const Rectangle& rRect )
{
- ImpPaint( rRect, sal_False );
+ ImpPaint( rRect, false );
}
-void TextView::ImpPaint( const Rectangle& rRect, sal_Bool bUseVirtDev )
+void TextView::ImpPaint( const Rectangle& rRect, bool bUseVirtDev )
{
if ( !mpImpl->mpTextEngine->GetUpdateMode() || mpImpl->mpTextEngine->IsInUndo() )
return;
@@ -341,7 +341,7 @@ void TextView::ImpPaint( const Rectangle& rRect, sal_Bool bUseVirtDev )
if ( pVDev->GetBackground().GetColor() != rBackgroundColor )
pVDev->SetBackground( rBackgroundColor );
- sal_Bool bVDevValid = sal_True;
+ bool bVDevValid = true;
Size aOutSz( pVDev->GetOutputSizePixel() );
if ( ( aOutSz.Width() < rRect.GetWidth() ) ||
( aOutSz.Height() < rRect.GetHeight() ) )
@@ -364,7 +364,7 @@ void TextView::ImpPaint( const Rectangle& rRect, sal_Bool bUseVirtDev )
}
if ( !bVDevValid )
{
- ImpPaint( rRect, sal_False /* without VDev */ );
+ ImpPaint( rRect, false /* without VDev */ );
return;
}
@@ -413,9 +413,9 @@ void TextView::ImpHighlight( const TextSelection& rSel )
sal_uInt16 nStartLine = 0;
sal_uInt16 nEndLine = pTEParaPortion->GetLines().size() -1;
if ( nPara == nStartPara )
- nStartLine = pTEParaPortion->GetLineNumber( aSel.GetStart().GetIndex(), sal_False );
+ nStartLine = pTEParaPortion->GetLineNumber( aSel.GetStart().GetIndex(), false );
if ( nPara == nEndPara )
- nEndLine = pTEParaPortion->GetLineNumber( aSel.GetEnd().GetIndex(), sal_True );
+ nEndLine = pTEParaPortion->GetLineNumber( aSel.GetEnd().GetIndex(), true );
// iterate over all lines
for ( sal_uInt16 nLine = nStartLine; nLine <= nEndLine; nLine++ )
@@ -432,12 +432,12 @@ void TextView::ImpHighlight( const TextSelection& rSel )
if ( nEndIndex < nStartIndex )
nEndIndex = nStartIndex;
- Rectangle aTmpRect( mpImpl->mpTextEngine->GetEditCursor( TextPaM( nPara, nStartIndex ), sal_False ) );
+ Rectangle aTmpRect( mpImpl->mpTextEngine->GetEditCursor( TextPaM( nPara, nStartIndex ), false ) );
aTmpRect.Top() += nY;
aTmpRect.Bottom() += nY;
Point aTopLeft( aTmpRect.TopLeft() );
- aTmpRect = mpImpl->mpTextEngine->GetEditCursor( TextPaM( nPara, nEndIndex ), sal_True );
+ aTmpRect = mpImpl->mpTextEngine->GetEditCursor( TextPaM( nPara, nEndIndex ), true );
aTmpRect.Top() += nY;
aTmpRect.Bottom() += nY;
Point aBottomRight( aTmpRect.BottomRight() );
@@ -487,20 +487,20 @@ void TextView::ImpSetSelection( const TextSelection& rSelection )
void TextView::ShowSelection()
{
- ImpShowHideSelection( sal_True );
+ ImpShowHideSelection( true );
}
void TextView::HideSelection()
{
- ImpShowHideSelection( sal_False );
+ ImpShowHideSelection( false );
}
void TextView::ShowSelection( const TextSelection& rRange )
{
- ImpShowHideSelection( sal_True, &rRange );
+ ImpShowHideSelection( true, &rRange );
}
-void TextView::ImpShowHideSelection( sal_Bool bShow, const TextSelection* pRange )
+void TextView::ImpShowHideSelection( bool bShow, const TextSelection* pRange )
{
const TextSelection* pRangeOrSelection = pRange ? pRange : &mpImpl->maSelection;
@@ -520,7 +520,7 @@ void TextView::ImpShowHideSelection( sal_Bool bShow, const TextSelection* pRange
Point aStartPos( ImpGetOutputStartPos( mpImpl->maStartDocPos ) );
TextSelection aRange( *pRangeOrSelection );
aRange.Justify();
- sal_Bool bVisCursor = mpImpl->mpCursor->IsVisible();
+ bool bVisCursor = mpImpl->mpCursor->IsVisible();
mpImpl->mpCursor->Hide();
ImpPaint( mpImpl->mpWindow, aStartPos, &aOutArea, &aRange, bShow ? &mpImpl->maSelection : NULL );
if ( bVisCursor )
@@ -546,19 +546,19 @@ void TextView::EraseVirtualDevice()
mpImpl->mpVirtDev = 0;
}
-sal_Bool TextView::KeyInput( const KeyEvent& rKeyEvent )
+bool TextView::KeyInput( const KeyEvent& rKeyEvent )
{
- sal_Bool bDone = sal_True;
+ bool bDone = true;
bool bModified = false;
bool bMoved = false;
- sal_Bool bEndKey = sal_False; // special CursorPosition
+ bool bEndKey = false; // special CursorPosition
bool bAllowIdle = true;
// check mModified;
// the local bModified is not set e.g. by Cut/Paste, as here
// the update happens somewhere else
- sal_Bool bWasModified = mpImpl->mpTextEngine->IsModified();
- mpImpl->mpTextEngine->SetModified( sal_False );
+ bool bWasModified = mpImpl->mpTextEngine->IsModified();
+ mpImpl->mpTextEngine->SetModified( false );
TextSelection aCurSel( mpImpl->maSelection );
TextSelection aOldSel( aCurSel );
@@ -642,10 +642,10 @@ sal_Bool TextView::KeyInput( const KeyEvent& rKeyEvent )
}
bMoved = true;
if ( nCode == KEY_END )
- bEndKey = sal_True;
+ bEndKey = true;
}
else
- bDone = sal_False;
+ bDone = false;
}
break;
case KEY_BACKSPACE:
@@ -710,7 +710,7 @@ sal_Bool TextView::KeyInput( const KeyEvent& rKeyEvent )
bAllowIdle = false;
}
else
- bDone = sal_False;
+ bDone = false;
}
break;
case KEY_TAB:
@@ -723,7 +723,7 @@ sal_Bool TextView::KeyInput( const KeyEvent& rKeyEvent )
bModified = true;
}
else
- bDone = sal_False;
+ bDone = false;
}
break;
case KEY_RETURN:
@@ -752,7 +752,7 @@ sal_Bool TextView::KeyInput( const KeyEvent& rKeyEvent )
bModified = true;
}
else
- bDone = sal_False;
+ bDone = false;
}
break;
case KEY_INSERT:
@@ -768,12 +768,12 @@ sal_Bool TextView::KeyInput( const KeyEvent& rKeyEvent )
sal_Unicode nCharCode = rKeyEvent.GetCharCode();
if ( !mpImpl->mbReadOnly && ImplCheckTextLen( OUString(nCharCode) ) ) // otherwise swallow the character anyway
{
- aCurSel = mpImpl->mpTextEngine->ImpInsertText( nCharCode, aCurSel, !IsInsertMode(), sal_True );
+ aCurSel = mpImpl->mpTextEngine->ImpInsertText( nCharCode, aCurSel, !IsInsertMode(), true );
bModified = true;
}
}
else
- bDone = sal_False;
+ bDone = false;
}
}
}
@@ -797,20 +797,20 @@ sal_Bool TextView::KeyInput( const KeyEvent& rKeyEvent )
else if ( bMoved )
{
// selection is painted now in ImpMoveCursor
- ImpShowCursor( mpImpl->mbAutoScroll, sal_True, bEndKey );
+ ImpShowCursor( mpImpl->mbAutoScroll, true, bEndKey );
}
if ( mpImpl->mpTextEngine->IsModified() )
mpImpl->mpTextEngine->Broadcast( TextHint( TEXT_HINT_MODIFIED ) );
else if ( bWasModified )
- mpImpl->mpTextEngine->SetModified( sal_True );
+ mpImpl->mpTextEngine->SetModified( true );
return bDone;
}
void TextView::MouseButtonUp( const MouseEvent& rMouseEvent )
{
- mpImpl->mbClickedInSelection = sal_False;
+ mpImpl->mbClickedInSelection = false;
mpImpl->mnTravelXPos = TRAVEL_X_DONTKNOW;
mpImpl->mpSelEngine->SelMouseButtonUp( rMouseEvent );
if ( rMouseEvent.IsMiddle() && !IsReadOnly() &&
@@ -888,7 +888,7 @@ void TextView::MouseButtonDown( const MouseEvent& rMouseEvent )
}
ImpSetSelection( aNewSel );
ShowSelection();
- ShowCursor( sal_True, sal_True );
+ ShowCursor( true, true );
}
}
else if ( rMouseEvent.GetClicks() == 3 )
@@ -902,7 +902,7 @@ void TextView::MouseButtonDown( const MouseEvent& rMouseEvent )
aNewSel.GetEnd().GetIndex() = mpImpl->mpTextEngine->mpDoc->GetNodes().GetObject( mpImpl->maSelection.GetEnd().GetPara() )->GetText().getLength();
ImpSetSelection( aNewSel );
ShowSelection();
- ShowCursor( sal_True, sal_True );
+ ShowCursor( true, true );
}
}
}
@@ -936,7 +936,7 @@ void TextView::Command( const CommandEvent& rCEvt )
TEParaPortion* pPortion = mpImpl->mpTextEngine->mpTEParaPortions->GetObject( mpImpl->mpTextEngine->mpIMEInfos->aPos.GetPara() );
pPortion->MarkSelectionInvalid( mpImpl->mpTextEngine->mpIMEInfos->aPos.GetIndex(), 0 );
- sal_Bool bInsertMode = !mpImpl->mpTextEngine->mpIMEInfos->bWasCursorOverwrite;
+ bool bInsertMode = !mpImpl->mpTextEngine->mpIMEInfos->bWasCursorOverwrite;
delete mpImpl->mpTextEngine->mpIMEInfos;
mpImpl->mpTextEngine->mpIMEInfos = NULL;
@@ -1032,7 +1032,7 @@ void TextView::Command( const CommandEvent& rCEvt )
mpImpl->mpTextEngine->FormatDoc();
TEParaPortion* pParaPortion = mpImpl->mpTextEngine->mpTEParaPortions->GetObject( aPaM.GetPara() );
- sal_uInt16 nLine = pParaPortion->GetLineNumber( aPaM.GetIndex(), sal_True );
+ sal_uInt16 nLine = pParaPortion->GetLineNumber( aPaM.GetIndex(), true );
TextLine* pLine = pParaPortion->GetLines()[ nLine ];
if ( pLine && ( nInputEnd > pLine->GetEnd() ) )
nInputEnd = pLine->GetEnd();
@@ -1053,12 +1053,12 @@ void TextView::Command( const CommandEvent& rCEvt )
}
}
-void TextView::ShowCursor( sal_Bool bGotoCursor, sal_Bool bForceVisCursor )
+void TextView::ShowCursor( bool bGotoCursor, bool bForceVisCursor )
{
// this setting has more weight
if ( !mpImpl->mbAutoScroll )
- bGotoCursor = sal_False;
- ImpShowCursor( bGotoCursor, bForceVisCursor, sal_False );
+ bGotoCursor = false;
+ ImpShowCursor( bGotoCursor, bForceVisCursor, false );
}
void TextView::HideCursor()
@@ -1090,7 +1090,7 @@ void TextView::Scroll( long ndX, long ndY )
if ( nDiffX || nDiffY )
{
- sal_Bool bVisCursor = mpImpl->mpCursor->IsVisible();
+ bool bVisCursor = mpImpl->mpCursor->IsVisible();
mpImpl->mpCursor->Hide();
mpImpl->mpWindow->Update();
mpImpl->maStartDocPos = aNewStartPos;
@@ -1134,7 +1134,7 @@ void TextView::Copy( uno::Reference< datatransfer::clipboard::XClipboard >& rxCl
TETextDataObject* pDataObj = new TETextDataObject( GetSelected() );
if ( mpImpl->mpTextEngine->HasAttrib( TEXTATTR_HYPERLINK ) ) // then also as HTML
- mpImpl->mpTextEngine->Write( pDataObj->GetHTMLStream(), &mpImpl->maSelection, sal_True );
+ mpImpl->mpTextEngine->Write( pDataObj->GetHTMLStream(), &mpImpl->maSelection, true );
const sal_uInt32 nRef = Application::ReleaseSolarMutex();
@@ -1192,7 +1192,7 @@ void TextView::Paste( uno::Reference< datatransfer::clipboard::XClipboard >& rxC
bool bWasTruncated = false;
if( mpImpl->mpTextEngine->GetMaxTextLen() != 0 )
bWasTruncated = ImplTruncateNewText( aText );
- InsertText( aText, sal_False );
+ InsertText( aText, false );
mpImpl->mpTextEngine->Broadcast( TextHint( TEXT_HINT_MODIFIED ) );
if( bWasTruncated )
@@ -1222,22 +1222,22 @@ OUString TextView::GetSelected( LineEnd aSeparator )
return mpImpl->mpTextEngine->GetText( mpImpl->maSelection, aSeparator );
}
-void TextView::SetInsertMode( sal_Bool bInsert )
+void TextView::SetInsertMode( bool bInsert )
{
if ( mpImpl->mbInsertMode != bInsert )
{
mpImpl->mbInsertMode = bInsert;
- ShowCursor( mpImpl->mbAutoScroll, sal_False );
+ ShowCursor( mpImpl->mbAutoScroll, false );
}
}
-void TextView::SetReadOnly( sal_Bool bReadOnly )
+void TextView::SetReadOnly( bool bReadOnly )
{
if ( mpImpl->mbReadOnly != bReadOnly )
{
mpImpl->mbReadOnly = bReadOnly;
if ( !mpImpl->mbReadOnly )
- ShowCursor( mpImpl->mbAutoScroll, sal_False );
+ ShowCursor( mpImpl->mbAutoScroll, false );
else
HideCursor();
@@ -1348,7 +1348,7 @@ TextSelection TextView::ImpMoveCursor( const KeyEvent& rKeyEvent )
return mpImpl->maSelection;
}
-void TextView::InsertText( const OUString& rStr, sal_Bool bSelect )
+void TextView::InsertText( const OUString& rStr, bool bSelect )
{
mpImpl->mpTextEngine->UndoActionStart();
@@ -1531,14 +1531,14 @@ TextPaM TextView::CursorUp( const TextPaM& rPaM )
long nX;
if ( mpImpl->mnTravelXPos == TRAVEL_X_DONTKNOW )
{
- nX = mpImpl->mpTextEngine->GetEditCursor( rPaM, sal_False ).Left();
+ nX = mpImpl->mpTextEngine->GetEditCursor( rPaM, false ).Left();
mpImpl->mnTravelXPos = (sal_uInt16)nX+1;
}
else
nX = mpImpl->mnTravelXPos;
TEParaPortion* pPPortion = mpImpl->mpTextEngine->mpTEParaPortions->GetObject( rPaM.GetPara() );
- sal_uInt16 nLine = pPPortion->GetLineNumber( rPaM.GetIndex(), sal_False );
+ sal_uInt16 nLine = pPPortion->GetLineNumber( rPaM.GetIndex(), false );
if ( nLine ) // same paragraph
{
sal_uInt16 nCharPos = mpImpl->mpTextEngine->GetCharPos( rPaM.GetPara(), nLine-1, nX );
@@ -1569,14 +1569,14 @@ TextPaM TextView::CursorDown( const TextPaM& rPaM )
long nX;
if ( mpImpl->mnTravelXPos == TRAVEL_X_DONTKNOW )
{
- nX = mpImpl->mpTextEngine->GetEditCursor( rPaM, sal_False ).Left();
+ nX = mpImpl->mpTextEngine->GetEditCursor( rPaM, false ).Left();
mpImpl->mnTravelXPos = (sal_uInt16)nX+1;
}
else
nX = mpImpl->mnTravelXPos;
TEParaPortion* pPPortion = mpImpl->mpTextEngine->mpTEParaPortions->GetObject( rPaM.GetPara() );
- sal_uInt16 nLine = pPPortion->GetLineNumber( rPaM.GetIndex(), sal_False );
+ sal_uInt16 nLine = pPPortion->GetLineNumber( rPaM.GetIndex(), false );
if ( nLine < ( pPPortion->GetLines().size() - 1 ) )
{
sal_uInt16 nCharPos = mpImpl->mpTextEngine->GetCharPos( rPaM.GetPara(), nLine+1, nX );
@@ -1606,7 +1606,7 @@ TextPaM TextView::CursorStartOfLine( const TextPaM& rPaM )
TextPaM aPaM( rPaM );
TEParaPortion* pPPortion = mpImpl->mpTextEngine->mpTEParaPortions->GetObject( rPaM.GetPara() );
- sal_uInt16 nLine = pPPortion->GetLineNumber( aPaM.GetIndex(), sal_False );
+ sal_uInt16 nLine = pPPortion->GetLineNumber( aPaM.GetIndex(), false );
TextLine* pLine = pPPortion->GetLines()[ nLine ];
aPaM.GetIndex() = pLine->GetStart();
@@ -1618,7 +1618,7 @@ TextPaM TextView::CursorEndOfLine( const TextPaM& rPaM )
TextPaM aPaM( rPaM );
TEParaPortion* pPPortion = mpImpl->mpTextEngine->mpTEParaPortions->GetObject( rPaM.GetPara() );
- sal_uInt16 nLine = pPPortion->GetLineNumber( aPaM.GetIndex(), sal_False );
+ sal_uInt16 nLine = pPPortion->GetLineNumber( aPaM.GetIndex(), false );
TextLine* pLine = pPPortion->GetLines()[ nLine ];
aPaM.GetIndex() = pLine->GetEnd();
@@ -1692,11 +1692,11 @@ TextPaM TextView::PageDown( const TextPaM& rPaM )
return aPaM;
}
-void TextView::ImpShowCursor( sal_Bool bGotoCursor, sal_Bool bForceVisCursor, sal_Bool bSpecial )
+void TextView::ImpShowCursor( bool bGotoCursor, bool bForceVisCursor, bool bSpecial )
{
if ( mpImpl->mpTextEngine->IsFormatting() )
return;
- if ( mpImpl->mpTextEngine->GetUpdateMode() == sal_False )
+ if ( !mpImpl->mpTextEngine->GetUpdateMode() )
return;
if ( mpImpl->mpTextEngine->IsInUndo() )
return;
@@ -1715,7 +1715,7 @@ void TextView::ImpShowCursor( sal_Bool bGotoCursor, sal_Bool bForceVisCursor, sa
{
TEParaPortion* pParaPortion = mpImpl->mpTextEngine->mpTEParaPortions->GetObject( aPaM.GetPara() );
mpImpl->mbCursorAtEndOfLine =
- pParaPortion->GetLineNumber( aPaM.GetIndex(), sal_True ) != pParaPortion->GetLineNumber( aPaM.GetIndex(), sal_False );
+ pParaPortion->GetLineNumber( aPaM.GetIndex(), true ) != pParaPortion->GetLineNumber( aPaM.GetIndex(), false );
}
if ( !IsInsertMode() && !mpImpl->maSelection.HasRange() )
@@ -1724,12 +1724,12 @@ void TextView::ImpShowCursor( sal_Bool bGotoCursor, sal_Bool bForceVisCursor, sa
if ( !pNode->GetText().isEmpty() && ( aPaM.GetIndex() < pNode->GetText().getLength() ) )
{
// If we are behind a portion, and the next portion has other direction, we must change position...
- aEditCursor.Left() = aEditCursor.Right() = mpImpl->mpTextEngine->GetEditCursor( aPaM, sal_False, sal_True ).Left();
+ aEditCursor.Left() = aEditCursor.Right() = mpImpl->mpTextEngine->GetEditCursor( aPaM, false, true ).Left();
TEParaPortion* pParaPortion = mpImpl->mpTextEngine->mpTEParaPortions->GetObject( aPaM.GetPara() );
sal_uInt16 nTextPortionStart = 0;
- sal_uInt16 nTextPortion = pParaPortion->GetTextPortions().FindPortion( aPaM.GetIndex(), nTextPortionStart, sal_True );
+ sal_uInt16 nTextPortion = pParaPortion->GetTextPortions().FindPortion( aPaM.GetIndex(), nTextPortionStart, true );
TETextPortion* pTextPortion = pParaPortion->GetTextPortions()[ nTextPortion ];
if ( pTextPortion->GetKind() == PORTIONKIND_TAB )
{
@@ -1742,7 +1742,7 @@ void TextView::ImpShowCursor( sal_Bool bGotoCursor, sal_Bool bForceVisCursor, sa
else
{
TextPaM aNext = CursorRight( TextPaM( aPaM.GetPara(), aPaM.GetIndex() ), (sal_uInt16)i18n::CharacterIteratorMode::SKIPCELL );
- aEditCursor.Right() = mpImpl->mpTextEngine->GetEditCursor( aNext, sal_True ).Left();
+ aEditCursor.Right() = mpImpl->mpTextEngine->GetEditCursor( aNext, true ).Left();
}
}
}
@@ -1829,7 +1829,7 @@ void TextView::ImpShowCursor( sal_Bool bGotoCursor, sal_Bool bForceVisCursor, sa
mpImpl->mpCursor->Show();
}
-sal_Bool TextView::SetCursorAtPoint( const Point& rPosPixel )
+bool TextView::SetCursorAtPoint( const Point& rPosPixel )
{
mpImpl->mpTextEngine->CheckIdleFormatter();
@@ -1855,18 +1855,18 @@ sal_Bool TextView::SetCursorAtPoint( const Point& rPosPixel )
ShowSelection( aTmpNewSel );
}
- sal_Bool bForceCursor = mpImpl->mpDDInfo ? sal_False : sal_True; // && !mbInSelection
- ImpShowCursor( mpImpl->mbAutoScroll, bForceCursor, sal_False );
- return sal_True;
+ bool bForceCursor = mpImpl->mpDDInfo ? sal_False : sal_True; // && !mbInSelection
+ ImpShowCursor( mpImpl->mbAutoScroll, bForceCursor, false );
+ return true;
}
-sal_Bool TextView::IsSelectionAtPoint( const Point& rPosPixel )
+bool TextView::IsSelectionAtPoint( const Point& rPosPixel )
{
// if ( !Rectangle( Point(), mpImpl->mpWindow->GetOutputSizePixel() ).IsInside( rPosPixel ) && !mbInSelection )
// return sal_False;
Point aDocPos = GetDocPos( rPosPixel );
- TextPaM aPaM = mpImpl->mpTextEngine->GetPaM( aDocPos, sal_False );
+ TextPaM aPaM = mpImpl->mpTextEngine->GetPaM( aDocPos, false );
// For Hyperlinks D&D also start w/o a selection.
// BeginDrag is only called, however, if IsSelectionAtPoint()
// Problem: IsSelectionAtPoint is not called by Command()
@@ -1875,7 +1875,7 @@ sal_Bool TextView::IsSelectionAtPoint( const Point& rPosPixel )
( /* mpImpl->mpSelEngine->IsInCommand() && */ mpImpl->mpTextEngine->FindAttrib( aPaM, TEXTATTR_HYPERLINK ) ) );
}
-sal_Bool TextView::IsInSelection( const TextPaM& rPaM )
+bool TextView::IsInSelection( const TextPaM& rPaM )
{
TextSelection aSel = mpImpl->maSelection;
aSel.Justify();
@@ -1885,20 +1885,20 @@ sal_Bool TextView::IsInSelection( const TextPaM& rPaM )
sal_uLong nCurNode = rPaM.GetPara();
if ( ( nCurNode > nStartNode ) && ( nCurNode < nEndNode ) )
- return sal_True;
+ return true;
if ( nStartNode == nEndNode )
{
if ( nCurNode == nStartNode )
if ( ( rPaM.GetIndex() >= aSel.GetStart().GetIndex() ) && ( rPaM.GetIndex() < aSel.GetEnd().GetIndex() ) )
- return sal_True;
+ return true;
}
else if ( ( nCurNode == nStartNode ) && ( rPaM.GetIndex() >= aSel.GetStart().GetIndex() ) )
- return sal_True;
+ return true;
else if ( ( nCurNode == nEndNode ) && ( rPaM.GetIndex() < aSel.GetEnd().GetIndex() ) )
- return sal_True;
+ return true;
- return sal_False;
+ return false;
}
void TextView::ImpHideDDCursor()
@@ -1906,7 +1906,7 @@ void TextView::ImpHideDDCursor()
if ( mpImpl->mpDDInfo && mpImpl->mpDDInfo->mbVisCursor )
{
mpImpl->mpDDInfo->maCursor.Hide();
- mpImpl->mpDDInfo->mbVisCursor = sal_False;
+ mpImpl->mpDDInfo->mbVisCursor = false;
}
}
@@ -1914,7 +1914,7 @@ void TextView::ImpShowDDCursor()
{
if ( !mpImpl->mpDDInfo->mbVisCursor )
{
- Rectangle aCursor = mpImpl->mpTextEngine->PaMtoEditCursor( mpImpl->mpDDInfo->maDropPos, sal_True );
+ Rectangle aCursor = mpImpl->mpTextEngine->PaMtoEditCursor( mpImpl->mpDDInfo->maDropPos, true );
aCursor.Right()++;
aCursor.SetPos( GetWindowPos( aCursor.TopLeft() ) );
@@ -1922,11 +1922,11 @@ void TextView::ImpShowDDCursor()
mpImpl->mpDDInfo->maCursor.SetPos( aCursor.TopLeft() );
mpImpl->mpDDInfo->maCursor.SetSize( aCursor.GetSize() );
mpImpl->mpDDInfo->maCursor.Show();
- mpImpl->mpDDInfo->mbVisCursor = sal_True;
+ mpImpl->mpDDInfo->mbVisCursor = true;
}
}
-void TextView::SetPaintSelection( sal_Bool bPaint )
+void TextView::SetPaintSelection( bool bPaint )
{
if ( bPaint != mpImpl->mbPaintSelection )
{
@@ -1935,9 +1935,9 @@ void TextView::SetPaintSelection( sal_Bool bPaint )
}
}
-sal_Bool TextView::Read( SvStream& rInput )
+bool TextView::Read( SvStream& rInput )
{
- sal_Bool bDone = mpImpl->mpTextEngine->Read( rInput, &mpImpl->maSelection );
+ bool bDone = mpImpl->mpTextEngine->Read( rInput, &mpImpl->maSelection );
ShowCursor();
return bDone;
}
@@ -1968,9 +1968,9 @@ bool TextView::ImplTruncateNewText( OUString& rNewText ) const
return bTruncated;
}
-sal_Bool TextView::ImplCheckTextLen( const OUString& rNewText )
+bool TextView::ImplCheckTextLen( const OUString& rNewText )
{
- sal_Bool bOK = sal_True;
+ bool bOK = true;
if ( mpImpl->mpTextEngine->GetMaxTextLen() )
{
sal_uLong n = mpImpl->mpTextEngine->GetTextLen();
@@ -1980,7 +1980,7 @@ sal_Bool TextView::ImplCheckTextLen( const OUString& rNewText )
// calculate how much text is being deleted
n -= mpImpl->mpTextEngine->GetTextLen( mpImpl->maSelection );
if ( n > mpImpl->mpTextEngine->GetMaxTextLen() )
- bOK = sal_False;
+ bOK = false;
}
}
return bOK;
@@ -1996,12 +1996,12 @@ void TextView::dragGestureRecognized( const ::com::sun::star::datatransfer::dnd:
delete mpImpl->mpDDInfo;
mpImpl->mpDDInfo = new TextDDInfo;
- mpImpl->mpDDInfo->mbStarterOfDD = sal_True;
+ mpImpl->mpDDInfo->mbStarterOfDD = true;
TETextDataObject* pDataObj = new TETextDataObject( GetSelected() );
if ( mpImpl->mpTextEngine->HasAttrib( TEXTATTR_HYPERLINK ) ) // then also as HTML
- mpImpl->mpTextEngine->Write( pDataObj->GetHTMLStream(), &mpImpl->maSelection, sal_True );
+ mpImpl->mpTextEngine->Write( pDataObj->GetHTMLStream(), &mpImpl->maSelection, true );
/*
@@ -2045,7 +2045,7 @@ void TextView::drop( const ::com::sun::star::datatransfer::dnd::DropTargetDropEv
{
SolarMutexGuard aVclGuard;
- sal_Bool bChanges = sal_False;
+ bool bChanges = false;
if ( !mpImpl->mbReadOnly && mpImpl->mpDDInfo )
{
ImpHideDDCursor();
@@ -2056,7 +2056,7 @@ void TextView::drop( const ::com::sun::star::datatransfer::dnd::DropTargetDropEv
sal_uLong nPrevParaCount = mpImpl->mpTextEngine->GetParagraphCount();
sal_uInt16 nPrevStartParaLen = mpImpl->mpTextEngine->GetTextLen( aPrevSel.GetStart().GetPara() );
- sal_Bool bStarterOfDD = sal_False;
+ bool bStarterOfDD = false;
for ( sal_uInt16 nView = mpImpl->mpTextEngine->GetViewCount(); nView && !bStarterOfDD; )
bStarterOfDD = mpImpl->mpTextEngine->GetView( --nView )->mpImpl->mpDDInfo ? mpImpl->mpTextEngine->GetView( nView )->mpImpl->mpDDInfo->mbStarterOfDD : sal_False;
@@ -2091,7 +2091,7 @@ void TextView::drop( const ::com::sun::star::datatransfer::dnd::DropTargetDropEv
mpImpl->mpTextEngine->SetAttrib( TextAttribProtect(),
aTempStart.GetPara(),
aTempStart.GetIndex(),
- mpImpl->maSelection.GetEnd().GetIndex(), sal_False );
+ mpImpl->maSelection.GetEnd().GetIndex(), false );
}
if ( aPrevSel.HasRange() &&
@@ -2263,7 +2263,7 @@ sal_Int32 TextView::GetLineNumberOfCursorInSelection() const
{
TextPaM aPaM = GetSelection().GetEnd();
TEParaPortion* pPPortion = mpImpl->mpTextEngine->mpTEParaPortions->GetObject( aPaM.GetPara() );
- nLineNo = pPPortion->GetLineNumber( aPaM.GetIndex(), sal_False );
+ nLineNo = pPPortion->GetLineNumber( aPaM.GetIndex(), false );
if( mpImpl->mbCursorAtEndOfLine )
--nLineNo;
}
@@ -2294,12 +2294,12 @@ void TextSelFunctionSet::CreateAnchor()
mpView->ImpSetSelection( mpView->mpImpl->maSelection.GetEnd() );
}
-sal_Bool TextSelFunctionSet::SetCursorAtPoint( const Point& rPointPixel, sal_Bool )
+bool TextSelFunctionSet::SetCursorAtPoint( const Point& rPointPixel, sal_Bool )
{
return mpView->SetCursorAtPoint( rPointPixel );
}
-sal_Bool TextSelFunctionSet::IsSelectionAtPoint( const Point& rPointPixel )
+bool TextSelFunctionSet::IsSelectionAtPoint( const Point& rPointPixel )
{
return mpView->IsSelectionAtPoint( rPointPixel );
}
@@ -2322,27 +2322,27 @@ TextEngine* TextView::GetTextEngine() const
{ return mpImpl->mpTextEngine; }
Window* TextView::GetWindow() const
{ return mpImpl->mpWindow; }
-void TextView::EnableCursor( sal_Bool bEnable )
+void TextView::EnableCursor( bool bEnable )
{ mpImpl->mbCursorEnabled = bEnable; }
-sal_Bool TextView::IsCursorEnabled() const
+bool TextView::IsCursorEnabled() const
{ return mpImpl->mbCursorEnabled; }
void TextView::SetStartDocPos( const Point& rPos )
{ mpImpl->maStartDocPos = rPos; }
const Point& TextView::GetStartDocPos() const
{ return mpImpl->maStartDocPos; }
-void TextView::SetAutoIndentMode( sal_Bool bAutoIndent )
+void TextView::SetAutoIndentMode( bool bAutoIndent )
{ mpImpl->mbAutoIndent = bAutoIndent; }
-sal_Bool TextView::IsReadOnly() const
+bool TextView::IsReadOnly() const
{ return mpImpl->mbReadOnly; }
-void TextView::SetAutoScroll( sal_Bool bAutoScroll )
+void TextView::SetAutoScroll( bool bAutoScroll )
{ mpImpl->mbAutoScroll = bAutoScroll; }
-sal_Bool TextView::IsAutoScroll() const
+bool TextView::IsAutoScroll() const
{ return mpImpl->mbAutoScroll; }
-sal_Bool TextView::HasSelection() const
+bool TextView::HasSelection() const
{ return mpImpl->maSelection.HasRange(); }
-sal_Bool TextView::IsInsertMode() const
+bool TextView::IsInsertMode() const
{ return mpImpl->mbInsertMode; }
-void TextView::SupportProtectAttribute(sal_Bool bSupport)
+void TextView::SupportProtectAttribute(bool bSupport)
{ mpImpl->mbSupportProtectAttribute = bSupport;}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/edit/vclmedit.cxx b/vcl/source/edit/vclmedit.cxx
index 2c616175a0d0..ea5237903c38 100644
--- a/vcl/source/edit/vclmedit.cxx
+++ b/vcl/source/edit/vclmedit.cxx
@@ -107,18 +107,18 @@ public:
ImpVclMEdit( VclMultiLineEdit* pVclMultiLineEdit, WinBits nWinStyle );
~ImpVclMEdit();
- void SetModified( sal_Bool bMod );
- sal_Bool IsModified() const;
+ void SetModified( bool bMod );
+ bool IsModified() const;
- void SetReadOnly( sal_Bool bRdOnly );
- sal_Bool IsReadOnly() const;
+ void SetReadOnly( bool bRdOnly );
+ bool IsReadOnly() const;
void SetMaxTextLen(sal_Int32 nLen);
sal_Int32 GetMaxTextLen() const;
void SetMaxTextWidth( sal_uLong nMaxWidth );
- sal_Bool IsInsertMode() const;
+ bool IsInsertMode() const;
void InsertText( const OUString& rStr );
OUString GetSelected() const;
@@ -139,9 +139,9 @@ public:
void Resize();
void GetFocus();
- sal_Bool HandleCommand( const CommandEvent& rCEvt );
+ bool HandleCommand( const CommandEvent& rCEvt );
- void Enable( sal_Bool bEnable );
+ void Enable( bool bEnable );
Size CalcMinimumSize() const;
Size CalcBlockSize( sal_uInt16 nColumns, sal_uInt16 nLines ) const;
@@ -247,9 +247,9 @@ void ImpVclMEdit::InitFromStyle( WinBits nWinStyle )
mpTextWindow->SetAutoFocusHide( true );
if ( nWinStyle & WB_READONLY )
- mpTextWindow->GetTextView()->SetReadOnly( sal_True );
+ mpTextWindow->GetTextView()->SetReadOnly( true );
else
- mpTextWindow->GetTextView()->SetReadOnly( sal_False );
+ mpTextWindow->GetTextView()->SetReadOnly( false );
if ( nWinStyle & WB_IGNORETAB )
{
@@ -345,7 +345,7 @@ IMPL_LINK( ImpVclMEdit, ScrollHdl, ScrollBar*, pCurScrollBar )
void ImpVclMEdit::SetAlign( WinBits nWinStyle )
{
- sal_Bool bRTL = Application::GetSettings().GetLayoutRTL();
+ bool bRTL = Application::GetSettings().GetLayoutRTL();
mpTextWindow->GetTextEngine()->SetRightToLeft( bRTL );
if ( nWinStyle & WB_CENTER )
@@ -356,23 +356,23 @@ void ImpVclMEdit::SetAlign( WinBits nWinStyle )
mpTextWindow->GetTextEngine()->SetTextAlign( !bRTL ? TXTALIGN_LEFT : TXTALIGN_RIGHT );
}
-void ImpVclMEdit::SetModified( sal_Bool bMod )
+void ImpVclMEdit::SetModified( bool bMod )
{
mpTextWindow->GetTextEngine()->SetModified( bMod );
}
-sal_Bool ImpVclMEdit::IsModified() const
+bool ImpVclMEdit::IsModified() const
{
return mpTextWindow->GetTextEngine()->IsModified();
}
-void ImpVclMEdit::SetReadOnly( sal_Bool bRdOnly )
+void ImpVclMEdit::SetReadOnly( bool bRdOnly )
{
mpTextWindow->GetTextView()->SetReadOnly( bRdOnly );
// TODO: Adjust color?
}
-sal_Bool ImpVclMEdit::IsReadOnly() const
+bool ImpVclMEdit::IsReadOnly() const
{
return mpTextWindow->GetTextView()->IsReadOnly();
}
@@ -493,10 +493,10 @@ void ImpVclMEdit::Paste()
void ImpVclMEdit::SetText( const OUString& rStr )
{
- sal_Bool bWasModified = mpTextWindow->GetTextEngine()->IsModified();
+ bool bWasModified = mpTextWindow->GetTextEngine()->IsModified();
mpTextWindow->GetTextEngine()->SetText( rStr );
if ( !bWasModified )
- mpTextWindow->GetTextEngine()->SetModified( sal_False );
+ mpTextWindow->GetTextEngine()->SetModified( false );
mpTextWindow->GetTextView()->SetSelection( TextSelection() );
@@ -691,7 +691,7 @@ void ImpVclMEdit::GetMaxVisColumnsAndLines( sal_uInt16& rnCols, sal_uInt16& rnLi
rnLines = (sal_uInt16) (aOutSz.Height()/aCharSz.Height());
}
-void ImpVclMEdit::Enable( sal_Bool bEnable )
+void ImpVclMEdit::Enable( bool bEnable )
{
mpTextWindow->Enable( bEnable );
if ( mpHScrollBar )
@@ -700,15 +700,15 @@ void ImpVclMEdit::Enable( sal_Bool bEnable )
mpVScrollBar->Enable( bEnable );
}
-sal_Bool ImpVclMEdit::HandleCommand( const CommandEvent& rCEvt )
+bool ImpVclMEdit::HandleCommand( const CommandEvent& rCEvt )
{
- sal_Bool bDone = sal_False;
+ bool bDone = false;
if ( ( rCEvt.GetCommand() == COMMAND_WHEEL ) ||
( rCEvt.GetCommand() == COMMAND_STARTAUTOSCROLL ) ||
( rCEvt.GetCommand() == COMMAND_AUTOSCROLL ) )
{
mpTextWindow->HandleScrollCommand( rCEvt, mpHScrollBar, mpVScrollBar );
- bDone = sal_True;
+ bDone = true;
}
return bDone;
}
@@ -732,7 +732,7 @@ TextWindow::TextWindow( Window* pParent ) : Window( pParent )
mpExtTextEngine->SetLocale( GetSettings().GetLanguageTag().getLocale() );
mpExtTextView = new ExtTextView( mpExtTextEngine, this );
mpExtTextEngine->InsertView( mpExtTextView );
- mpExtTextEngine->EnableUndo( sal_True );
+ mpExtTextEngine->EnableUndo( true );
mpExtTextView->ShowCursor();
Color aBackgroundColor = GetSettings().GetStyleSettings().GetWorkspaceColor();
@@ -772,14 +772,14 @@ void TextWindow::MouseButtonUp( const MouseEvent& rMEvt )
void TextWindow::KeyInput( const KeyEvent& rKEvent )
{
- sal_Bool bDone = sal_False;
+ bool bDone = false;
sal_uInt16 nCode = rKEvent.GetKeyCode().GetCode();
if ( nCode == com::sun::star::awt::Key::SELECT_ALL ||
( (nCode == KEY_A) && rKEvent.GetKeyCode().IsMod1() && !rKEvent.GetKeyCode().IsMod2() )
)
{
mpExtTextView->SetSelection( TextSelection( TextPaM( 0, 0 ), TextPaM( 0xFFFF, 0xFFFF ) ) );
- bDone = sal_True;
+ bDone = true;
}
else if ( (nCode == KEY_S) && rKEvent.GetKeyCode().IsShift() && rKEvent.GetKeyCode().IsMod1() )
{
@@ -791,10 +791,10 @@ void TextWindow::KeyInput( const KeyEvent& rKEvent )
if (!aChars.isEmpty())
{
mpExtTextView->InsertText( aChars );
- mpExtTextView->GetTextEngine()->SetModified( sal_True );
+ mpExtTextView->GetTextEngine()->SetModified( true );
}
mbActivePopup = false;
- bDone = sal_True;
+ bDone = true;
}
}
else if ( nCode == KEY_TAB )
@@ -827,20 +827,20 @@ void TextWindow::Command( const CommandEvent& rCEvt )
PopupMenu* pPopup = Edit::CreatePopupMenu();
if ( !mpExtTextView->HasSelection() )
{
- pPopup->EnableItem( SV_MENU_EDIT_CUT, sal_False );
- pPopup->EnableItem( SV_MENU_EDIT_COPY, sal_False );
- pPopup->EnableItem( SV_MENU_EDIT_DELETE, sal_False );
+ pPopup->EnableItem( SV_MENU_EDIT_CUT, false );
+ pPopup->EnableItem( SV_MENU_EDIT_COPY, false );
+ pPopup->EnableItem( SV_MENU_EDIT_DELETE, false );
}
if ( mpExtTextView->IsReadOnly() )
{
- pPopup->EnableItem( SV_MENU_EDIT_CUT, sal_False );
- pPopup->EnableItem( SV_MENU_EDIT_PASTE, sal_False );
- pPopup->EnableItem( SV_MENU_EDIT_DELETE, sal_False );
- pPopup->EnableItem( SV_MENU_EDIT_INSERTSYMBOL, sal_False );
+ pPopup->EnableItem( SV_MENU_EDIT_CUT, false );
+ pPopup->EnableItem( SV_MENU_EDIT_PASTE, false );
+ pPopup->EnableItem( SV_MENU_EDIT_DELETE, false );
+ pPopup->EnableItem( SV_MENU_EDIT_INSERTSYMBOL, false );
}
if ( !mpExtTextView->GetTextEngine()->HasUndoManager() || !mpExtTextView->GetTextEngine()->GetUndoManager().GetUndoActionCount() )
{
- pPopup->EnableItem( SV_MENU_EDIT_UNDO, sal_False );
+ pPopup->EnableItem( SV_MENU_EDIT_UNDO, false );
}
// if ( ( maSelection.Min() == 0 ) && ( maSelection.Max() == maText.Len() ) )
// {
@@ -867,21 +867,21 @@ void TextWindow::Command( const CommandEvent& rCEvt )
switch ( n )
{
case SV_MENU_EDIT_UNDO: mpExtTextView->Undo();
- mpExtTextEngine->SetModified( sal_True );
+ mpExtTextEngine->SetModified( true );
mpExtTextEngine->Broadcast( TextHint( TEXT_HINT_MODIFIED ) );
break;
case SV_MENU_EDIT_CUT: mpExtTextView->Cut();
- mpExtTextEngine->SetModified( sal_True );
+ mpExtTextEngine->SetModified( true );
mpExtTextEngine->Broadcast( TextHint( TEXT_HINT_MODIFIED ) );
break;
case SV_MENU_EDIT_COPY: mpExtTextView->Copy();
break;
case SV_MENU_EDIT_PASTE: mpExtTextView->Paste();
- mpExtTextEngine->SetModified( sal_True );
+ mpExtTextEngine->SetModified( true );
mpExtTextEngine->Broadcast( TextHint( TEXT_HINT_MODIFIED ) );
break;
case SV_MENU_EDIT_DELETE: mpExtTextView->DeleteSelected();
- mpExtTextEngine->SetModified( sal_True );
+ mpExtTextEngine->SetModified( true );
mpExtTextEngine->Broadcast( TextHint( TEXT_HINT_MODIFIED ) );
break;
case SV_MENU_EDIT_SELECTALL: mpExtTextView->SetSelection( TextSelection( TextPaM( 0, 0 ), TextPaM( 0xFFFFFFFF, 0xFFFF ) ) );
@@ -892,7 +892,7 @@ void TextWindow::Command( const CommandEvent& rCEvt )
if (!aChars.isEmpty())
{
mpExtTextView->InsertText( aChars );
- mpExtTextEngine->SetModified( sal_True );
+ mpExtTextEngine->SetModified( true );
mpExtTextEngine->Broadcast( TextHint( TEXT_HINT_MODIFIED ) );
}
}
@@ -911,19 +911,19 @@ void TextWindow::GetFocus()
{
if ( !mbActivePopup )
{
- sal_Bool bGotoCursor = !mpExtTextView->IsReadOnly();
+ bool bGotoCursor = !mpExtTextView->IsReadOnly();
if ( mbFocusSelectionHide && IsReallyVisible() && !mpExtTextView->IsReadOnly()
&& ( mbSelectOnTab &&
(!mbInMBDown || ( GetSettings().GetStyleSettings().GetSelectionOptions() & SELECTION_OPTION_FOCUS ) )) )
{
// select everything, but do not scroll
- sal_Bool bAutoScroll = mpExtTextView->IsAutoScroll();
- mpExtTextView->SetAutoScroll( sal_False );
+ bool bAutoScroll = mpExtTextView->IsAutoScroll();
+ mpExtTextView->SetAutoScroll( false );
mpExtTextView->SetSelection( TextSelection( TextPaM( 0, 0 ), TextPaM( 0xFFFF, 0xFFFF ) ) );
mpExtTextView->SetAutoScroll( bAutoScroll );
- bGotoCursor = sal_False;
+ bGotoCursor = false;
}
- mpExtTextView->SetPaintSelection( sal_True );
+ mpExtTextView->SetPaintSelection( true );
mpExtTextView->ShowCursor( bGotoCursor );
}
}
@@ -933,7 +933,7 @@ void TextWindow::LoseFocus()
Window::LoseFocus();
if ( mbFocusSelectionHide && !mbActivePopup )
- mpExtTextView->SetPaintSelection( sal_False );
+ mpExtTextView->SetPaintSelection( false );
}
VclMultiLineEdit::VclMultiLineEdit( Window* pParent, WinBits nWinStyle )
@@ -941,10 +941,10 @@ VclMultiLineEdit::VclMultiLineEdit( Window* pParent, WinBits nWinStyle )
{
SetType( WINDOW_MULTILINEEDIT );
pImpVclMEdit = new ImpVclMEdit( this, nWinStyle );
- ImplInitSettings( sal_True, sal_True, sal_True );
+ ImplInitSettings( true, true, true );
pUpdateDataTimer = 0;
- SetCompoundControl( sal_True );
+ SetCompoundControl( true );
SetStyle( ImplInitStyle( nWinStyle ) );
}
@@ -954,7 +954,7 @@ VclMultiLineEdit::VclMultiLineEdit( Window* pParent, const ResId& rResId )
SetType( WINDOW_MULTILINEEDIT );
WinBits nWinStyle = rResId.GetWinBits();
pImpVclMEdit = new ImpVclMEdit( this, nWinStyle );
- ImplInitSettings( sal_True, sal_True, sal_True );
+ ImplInitSettings( true, true, true );
pUpdateDataTimer = 0;
sal_Int32 nMaxLen = Edit::GetMaxTextLen();
@@ -966,7 +966,7 @@ VclMultiLineEdit::VclMultiLineEdit( Window* pParent, const ResId& rResId )
if ( IsVisible() )
pImpVclMEdit->Resize();
- SetCompoundControl( sal_True );
+ SetCompoundControl( true );
SetStyle( ImplInitStyle( nWinStyle ) );
// Base Edit ctor could call Show already, but that would cause problems
@@ -1002,7 +1002,7 @@ WinBits VclMultiLineEdit::ImplInitStyle( WinBits nStyle )
}
-void VclMultiLineEdit::ImplInitSettings( sal_Bool /*bFont*/, sal_Bool /*bForeground*/, sal_Bool bBackground )
+void VclMultiLineEdit::ImplInitSettings( bool /*bFont*/, bool /*bForeground*/, bool bBackground )
{
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
@@ -1034,7 +1034,7 @@ void VclMultiLineEdit::ImplInitSettings( sal_Bool /*bFont*/, sal_Bool /*bForegro
{
if( IsPaintTransparent() )
{
- pImpVclMEdit->GetTextWindow()->SetPaintTransparent( sal_True );
+ pImpVclMEdit->GetTextWindow()->SetPaintTransparent( true );
pImpVclMEdit->GetTextWindow()->SetBackground();
pImpVclMEdit->GetTextWindow()->SetControlBackground();
SetBackground();
@@ -1085,12 +1085,12 @@ void VclMultiLineEdit::UpdateData()
void VclMultiLineEdit::SetModifyFlag()
{
- pImpVclMEdit->SetModified( sal_True );
+ pImpVclMEdit->SetModified( true );
}
void VclMultiLineEdit::ClearModifyFlag()
{
- pImpVclMEdit->SetModified( sal_False );
+ pImpVclMEdit->SetModified( false );
}
bool VclMultiLineEdit::IsModified() const
@@ -1127,7 +1127,7 @@ void VclMultiLineEdit::SetReadOnly( sal_Bool bReadOnly )
SetStyle( nStyle );
}
-sal_Bool VclMultiLineEdit::IsReadOnly() const
+bool VclMultiLineEdit::IsReadOnly() const
{
return pImpVclMEdit->IsReadOnly();
}
@@ -1278,7 +1278,7 @@ void VclMultiLineEdit::StateChanged( StateChangedType nType )
if( nType == STATE_CHANGE_ENABLE )
{
pImpVclMEdit->Enable( IsEnabled() );
- ImplInitSettings( sal_True, sal_False, sal_False );
+ ImplInitSettings( true, false, false );
}
else if( nType == STATE_CHANGE_READONLY )
{
@@ -1287,23 +1287,23 @@ void VclMultiLineEdit::StateChanged( StateChangedType nType )
else if ( nType == STATE_CHANGE_ZOOM )
{
pImpVclMEdit->GetTextWindow()->SetZoom( GetZoom() );
- ImplInitSettings( sal_True, sal_False, sal_False );
+ ImplInitSettings( true, false, false );
Resize();
}
else if ( nType == STATE_CHANGE_CONTROLFONT )
{
- ImplInitSettings( sal_True, sal_False, sal_False );
+ ImplInitSettings( true, false, false );
Resize();
Invalidate();
}
else if ( nType == STATE_CHANGE_CONTROLFOREGROUND )
{
- ImplInitSettings( sal_False, sal_True, sal_False );
+ ImplInitSettings( false, true, false );
Invalidate();
}
else if ( nType == STATE_CHANGE_CONTROLBACKGROUND )
{
- ImplInitSettings( sal_False, sal_False, sal_True );
+ ImplInitSettings( false, false, true );
Invalidate();
}
else if ( nType == STATE_CHANGE_STYLE )
@@ -1315,7 +1315,7 @@ void VclMultiLineEdit::StateChanged( StateChangedType nType )
{
if( IsPaintTransparent() )
{
- pImpVclMEdit->GetTextWindow()->SetPaintTransparent( sal_True );
+ pImpVclMEdit->GetTextWindow()->SetPaintTransparent( true );
pImpVclMEdit->GetTextWindow()->SetBackground();
pImpVclMEdit->GetTextWindow()->SetControlBackground();
SetBackground();
@@ -1331,7 +1331,7 @@ void VclMultiLineEdit::DataChanged( const DataChangedEvent& rDCEvt )
if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) &&
(rDCEvt.GetFlags() & SETTINGS_STYLE) )
{
- ImplInitSettings( sal_True, sal_True, sal_True );
+ ImplInitSettings( true, true, true );
Resize();
Invalidate();
}
@@ -1341,12 +1341,12 @@ void VclMultiLineEdit::DataChanged( const DataChangedEvent& rDCEvt )
void VclMultiLineEdit::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags )
{
- ImplInitSettings( sal_True, sal_True, sal_True );
+ ImplInitSettings( true, true, true );
Point aPos = pDev->LogicToPixel( rPos );
Size aSize = pDev->LogicToPixel( rSize );
Font aFont = pImpVclMEdit->GetTextWindow()->GetDrawPixelFont( pDev );
- aFont.SetTransparent( sal_True );
+ aFont.SetTransparent( true );
OutDevType eOutDevType = pDev->GetOutDevType();
pDev->Push();
@@ -1540,7 +1540,7 @@ ScrollBar* VclMultiLineEdit::GetVScrollBar() const
return pImpVclMEdit->GetVScrollBar();
}
-void VclMultiLineEdit::EnableFocusSelectionHide( sal_Bool bHide )
+void VclMultiLineEdit::EnableFocusSelectionHide( bool bHide )
{
pImpVclMEdit->GetTextWindow()->SetAutoFocusHide( bHide );
}
@@ -1551,7 +1551,7 @@ void VclMultiLineEdit::SetLeftMargin( sal_uInt16 n )
GetTextEngine()->SetLeftMargin( n );
}
-void VclMultiLineEdit::SetRightToLeft( sal_Bool bRightToLeft )
+void VclMultiLineEdit::SetRightToLeft( bool bRightToLeft )
{
if ( GetTextEngine() )
{
@@ -1560,9 +1560,9 @@ void VclMultiLineEdit::SetRightToLeft( sal_Bool bRightToLeft )
}
}
-sal_Bool VclMultiLineEdit::IsRightToLeft() const
+bool VclMultiLineEdit::IsRightToLeft() const
{
- sal_Bool bRightToLeft = sal_False;
+ bool bRightToLeft = false;
if ( GetTextEngine() )
bRightToLeft = GetTextEngine()->IsRightToLeft();
@@ -1580,7 +1580,7 @@ void VclMultiLineEdit::SetTextSelectable( bool bTextSelectable )
pImpVclMEdit->GetTextWindow()->SetTextSelectable( bTextSelectable );
}
-void VclMultiLineEdit::EnableCursor( sal_Bool bEnable )
+void VclMultiLineEdit::EnableCursor( bool bEnable )
{
GetTextView()->EnableCursor( bEnable );
}
diff --git a/vcl/source/edit/xtextedt.cxx b/vcl/source/edit/xtextedt.cxx
index 4bdc040b24fa..c543c563d4e1 100644
--- a/vcl/source/edit/xtextedt.cxx
+++ b/vcl/source/edit/xtextedt.cxx
@@ -135,7 +135,7 @@ TextSelection ExtTextEngine::MatchGroup( const TextPaM& rCursor ) const
return aSel;
}
-sal_Bool ExtTextEngine::Search( TextSelection& rSel, const util::SearchOptions& rSearchOptions, sal_Bool bForward )
+bool ExtTextEngine::Search( TextSelection& rSel, const util::SearchOptions& rSearchOptions, bool bForward )
{
TextSelection aSel( rSel );
aSel.Justify();
@@ -235,14 +235,14 @@ ExtTextView::~ExtTextView()
{
}
-sal_Bool ExtTextView::MatchGroup()
+bool ExtTextView::MatchGroup()
{
TextSelection aTmpSel( GetSelection() );
aTmpSel.Justify();
if ( ( aTmpSel.GetStart().GetPara() != aTmpSel.GetEnd().GetPara() ) ||
( ( aTmpSel.GetEnd().GetIndex() - aTmpSel.GetStart().GetIndex() ) > 1 ) )
{
- return sal_False;
+ return false;
}
TextSelection aMatchSel = ((ExtTextEngine*)GetTextEngine())->MatchGroup( aTmpSel.GetStart() );
@@ -252,17 +252,17 @@ sal_Bool ExtTextView::MatchGroup()
return aMatchSel.HasRange() ? sal_True : sal_False;
}
-sal_Bool ExtTextView::Search( const util::SearchOptions& rSearchOptions, sal_Bool bForward )
+bool ExtTextView::Search( const util::SearchOptions& rSearchOptions, bool bForward )
{
- sal_Bool bFound = sal_False;
+ bool bFound = false;
TextSelection aSel( GetSelection() );
if ( ((ExtTextEngine*)GetTextEngine())->Search( aSel, rSearchOptions, bForward ) )
{
- bFound = sal_True;
+ bFound = true;
// First add the beginning of the word to the selection,
// so that the whole word is in the visible region.
SetSelection( aSel.GetStart() );
- ShowCursor( sal_True, sal_False );
+ ShowCursor( true, false );
}
else
{
@@ -275,7 +275,7 @@ sal_Bool ExtTextView::Search( const util::SearchOptions& rSearchOptions, sal_Boo
return bFound;
}
-sal_uInt16 ExtTextView::Replace( const util::SearchOptions& rSearchOptions, sal_Bool bAll, sal_Bool bForward )
+sal_uInt16 ExtTextView::Replace( const util::SearchOptions& rSearchOptions, bool bAll, bool bForward )
{
sal_uInt16 nFound = 0;
@@ -311,7 +311,7 @@ sal_uInt16 ExtTextView::Replace( const util::SearchOptions& rSearchOptions, sal_
TextSelection aSearchSel( aSel );
- sal_Bool bFound = pTextEngine->Search( aSel, rSearchOptions, sal_True );
+ bool bFound = pTextEngine->Search( aSel, rSearchOptions, true );
if ( bFound )
pTextEngine->UndoActionStart();
while ( bFound )
@@ -321,7 +321,7 @@ sal_uInt16 ExtTextView::Replace( const util::SearchOptions& rSearchOptions, sal_
TextPaM aNewStart = pTextEngine->ImpInsertText( aSel, rSearchOptions.replaceString );
aSel = aSearchSel;
aSel.GetStart() = aNewStart;
- bFound = pTextEngine->Search( aSel, rSearchOptions, sal_True );
+ bFound = pTextEngine->Search( aSel, rSearchOptions, true );
}
if ( nFound )
{
@@ -333,9 +333,9 @@ sal_uInt16 ExtTextView::Replace( const util::SearchOptions& rSearchOptions, sal_
return nFound;
}
-sal_Bool ExtTextView::ImpIndentBlock( sal_Bool bRight )
+bool ExtTextView::ImpIndentBlock( bool bRight )
{
- sal_Bool bDone = sal_False;
+ bool bDone = false;
TextSelection aSel = GetSelection();
aSel.Justify();
@@ -356,7 +356,7 @@ sal_Bool ExtTextView::ImpIndentBlock( sal_Bool bRight )
{
// add tabs
GetTextEngine()->ImpInsertText( TextPaM( nPara, 0 ), '\t' );
- bDone = sal_True;
+ bDone = true;
}
else
{
@@ -367,14 +367,14 @@ sal_Bool ExtTextView::ImpIndentBlock( sal_Bool bRight )
( aText[ 0 ] == ' ' ) ) )
{
GetTextEngine()->ImpDeleteText( TextSelection( TextPaM( nPara, 0 ), TextPaM( nPara, 1 ) ) );
- bDone = sal_True;
+ bDone = true;
}
}
}
GetTextEngine()->UndoActionEnd();
- sal_Bool bRange = aSel.HasRange();
+ bool bRange = aSel.HasRange();
if ( bRight )
{
aSel.GetStart().GetIndex()++;
@@ -395,14 +395,14 @@ sal_Bool ExtTextView::ImpIndentBlock( sal_Bool bRight )
return bDone;
}
-sal_Bool ExtTextView::IndentBlock()
+bool ExtTextView::IndentBlock()
{
- return ImpIndentBlock( sal_True );
+ return ImpIndentBlock( true );
}
-sal_Bool ExtTextView::UnindentBlock()
+bool ExtTextView::UnindentBlock()
{
- return ImpIndentBlock( sal_False );
+ return ImpIndentBlock( false );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */