From 0837a36d9d1734bc48e34cdce609451bbfb38f77 Mon Sep 17 00:00:00 2001 From: Takeshi Abe Date: Wed, 22 May 2013 09:11:28 +0900 Subject: sal_Bool to bool Change-Id: I9586db0082592a703dd791b4846a12529b131b9a --- vcl/source/edit/textdat2.hxx | 36 +++++++++++++++++----------------- vcl/source/edit/textdata.cxx | 16 +++++++-------- vcl/source/edit/texteng.cxx | 4 ++-- vcl/source/edit/textund2.hxx | 2 +- vcl/source/edit/textundo.cxx | 6 +++--- vcl/source/edit/textview.cxx | 20 +++++++++---------- vcl/source/edit/vclmedit.cxx | 46 ++++++++++++++++++++++---------------------- vcl/source/window/window.cxx | 2 +- 8 files changed, 66 insertions(+), 66 deletions(-) (limited to 'vcl') diff --git a/vcl/source/edit/textdat2.hxx b/vcl/source/edit/textdat2.hxx index 8c6da16e1b26..5267029e80d6 100644 --- a/vcl/source/edit/textdat2.hxx +++ b/vcl/source/edit/textdat2.hxx @@ -74,7 +74,7 @@ public: sal_uInt8& GetRightToLeft() { return nRightToLeft; } sal_Bool IsRightToLeft() const { return (nRightToLeft&1); } - sal_Bool HasValidSize() const { return nWidth != (-1); } + bool HasValidSize() const { return nWidth != (-1); } }; @@ -116,14 +116,14 @@ private: short mnStartX; - sal_Bool mbInvalid; // fuer geschickte Formatierung/Ausgabe + bool mbInvalid; // fuer geschickte Formatierung/Ausgabe public: TextLine() { mnStart = mnEnd = 0; mnStartPortion = mnEndPortion = 0; mnStartX = 0; - mbInvalid = sal_True; + mbInvalid = true; } sal_Bool IsIn( sal_uInt16 nIndex ) const @@ -150,18 +150,18 @@ public: sal_uInt16 GetLen() const { return mnEnd - mnStart; } - sal_Bool IsInvalid() const { return mbInvalid; } - sal_Bool IsValid() const { return !mbInvalid; } - void SetInvalid() { mbInvalid = sal_True; } - void SetValid() { mbInvalid = sal_False; } + bool IsInvalid() const { return mbInvalid; } + bool IsValid() const { return !mbInvalid; } + void SetInvalid() { mbInvalid = true; } + void SetValid() { mbInvalid = false; } - sal_Bool IsEmpty() const { return (mnEnd > mnStart) ? sal_False : sal_True; } + bool IsEmpty() const { return (mnEnd > mnStart) ? false : true; } short GetStartX() const { return mnStartX; } void SetStartX( short n ) { mnStartX = n; } - inline sal_Bool operator == ( const TextLine& rLine ) const; - inline sal_Bool operator != ( const TextLine& rLine ) const; + inline bool operator == ( const TextLine& rLine ) const; + inline bool operator != ( const TextLine& rLine ) const; }; class TextLines : public std::vector { @@ -173,7 +173,7 @@ public: } }; -inline sal_Bool TextLine::operator == ( const TextLine& rLine ) const +inline bool TextLine::operator == ( const TextLine& rLine ) const { return ( ( mnStart == rLine.mnStart ) && ( mnEnd == rLine.mnEnd ) && @@ -181,7 +181,7 @@ inline sal_Bool TextLine::operator == ( const TextLine& rLine ) const ( mnEndPortion == rLine.mnEndPortion ) ); } -inline sal_Bool TextLine::operator != ( const TextLine& rLine ) const +inline bool TextLine::operator != ( const TextLine& rLine ) const { return !( *this == rLine ); } @@ -201,8 +201,8 @@ private: sal_uInt16 mnInvalidPosStart; short mnInvalidDiff; - sal_Bool mbInvalid; - sal_Bool mbSimple; // nur lineares Tippen + bool mbInvalid; + bool mbSimple; // nur lineares Tippen TEParaPortion( const TEParaPortion& ) {;} @@ -212,10 +212,10 @@ public: ~TEParaPortion(); - sal_Bool IsInvalid() const { return mbInvalid; } - sal_Bool IsSimpleInvalid() const { return mbSimple; } - void SetNotSimpleInvalid() { mbSimple = sal_False; } - void SetValid() { mbInvalid = sal_False; mbSimple = sal_True;} + bool IsInvalid() const { return mbInvalid; } + bool IsSimpleInvalid() const { return mbSimple; } + void SetNotSimpleInvalid() { mbSimple = false; } + void SetValid() { mbInvalid = false; mbSimple = true;} void MarkInvalid( sal_uInt16 nStart, short nDiff); void MarkSelectionInvalid( sal_uInt16 nStart, sal_uInt16 nEnd ); diff --git a/vcl/source/edit/textdata.cxx b/vcl/source/edit/textdata.cxx index 10353c721116..94917b0d5062 100644 --- a/vcl/source/edit/textdata.cxx +++ b/vcl/source/edit/textdata.cxx @@ -100,8 +100,8 @@ TEParaPortion::TEParaPortion( TextNode* pN ) { mpNode = pN; mnInvalidPosStart = mnInvalidDiff = 0; - mbInvalid = sal_True; - mbSimple = sal_False; + mbInvalid = true; + mbSimple = false; } TEParaPortion::~TEParaPortion() @@ -110,7 +110,7 @@ TEParaPortion::~TEParaPortion() void TEParaPortion::MarkInvalid( sal_uInt16 nStart, short nDiff ) { - if ( mbInvalid == sal_False ) + if ( !mbInvalid ) { mnInvalidPosStart = ( nDiff >= 0 ) ? nStart : ( nStart + nDiff ); mnInvalidDiff = nDiff; @@ -134,18 +134,18 @@ void TEParaPortion::MarkInvalid( sal_uInt16 nStart, short nDiff ) DBG_ASSERT( ( nDiff >= 0 ) || ( (nStart+nDiff) >= 0 ), "MarkInvalid: Diff out of Range" ); mnInvalidPosStart = std::min( mnInvalidPosStart, (sal_uInt16) ( (nDiff < 0) ? nStart+nDiff : nDiff ) ); mnInvalidDiff = 0; - mbSimple = sal_False; + mbSimple = false; } } maWritingDirectionInfos.clear(); - mbInvalid = sal_True; + mbInvalid = true; } void TEParaPortion::MarkSelectionInvalid( sal_uInt16 nStart, sal_uInt16 /*nEnd*/ ) { - if ( mbInvalid == sal_False ) + if ( !mbInvalid ) { mnInvalidPosStart = nStart; // nInvalidPosEnd = nEnd; @@ -159,8 +159,8 @@ void TEParaPortion::MarkSelectionInvalid( sal_uInt16 nStart, sal_uInt16 /*nEnd*/ maWritingDirectionInfos.clear(); mnInvalidDiff = 0; - mbInvalid = sal_True; - mbSimple = sal_False; + mbInvalid = true; + mbSimple = false; } sal_uInt16 TEParaPortion::GetLineNumber( sal_uInt16 nChar, sal_Bool bInclEnd ) diff --git a/vcl/source/edit/texteng.cxx b/vcl/source/edit/texteng.cxx index 7e2186e47da7..14c864fab2bb 100644 --- a/vcl/source/edit/texteng.cxx +++ b/vcl/source/edit/texteng.cxx @@ -674,8 +674,8 @@ TextPaM TextEngine::ImpInsertText( sal_Unicode c, const TextSelection& rCurSel, if ( pNode->GetText().Len() < STRING_MAXLEN ) { - sal_Bool bDoOverwrite = ( bOverwrite && - ( aPaM.GetIndex() < pNode->GetText().Len() ) ) ? sal_True : sal_False; + bool bDoOverwrite = ( bOverwrite && + ( aPaM.GetIndex() < pNode->GetText().Len() ) ); bool bUndoAction = ( rCurSel.HasRange() || bDoOverwrite ); diff --git a/vcl/source/edit/textund2.hxx b/vcl/source/edit/textund2.hxx index 396317e937b0..0ff91792ed09 100644 --- a/vcl/source/edit/textund2.hxx +++ b/vcl/source/edit/textund2.hxx @@ -26,7 +26,7 @@ class TextUndoDelPara : public TextUndo { private: - sal_Bool mbDelObject; + bool mbDelObject; sal_uLong mnPara; TextNode* mpNode; // points at the valid not-destroyed object diff --git a/vcl/source/edit/textundo.cxx b/vcl/source/edit/textundo.cxx index 51b3826da802..fb6c00f1be17 100644 --- a/vcl/source/edit/textundo.cxx +++ b/vcl/source/edit/textundo.cxx @@ -152,7 +152,7 @@ TextUndoDelPara::TextUndoDelPara( TextEngine* pTextEngine, TextNode* pNode, sal_ { mpNode = pNode; mnPara = nPara; - mbDelObject = sal_True; + mbDelObject = true; } TextUndoDelPara::~TextUndoDelPara() @@ -164,7 +164,7 @@ TextUndoDelPara::~TextUndoDelPara() void TextUndoDelPara::Undo() { GetTextEngine()->InsertContent( mpNode, mnPara ); - mbDelObject = sal_False; // belongs again to the engine + mbDelObject = false; // belongs again to the engine if ( GetView() ) { @@ -185,7 +185,7 @@ void TextUndoDelPara::Redo() GetDoc()->GetNodes().Remove( mnPara ); GetTextEngine()->ImpParagraphRemoved( mnPara ); - mbDelObject = sal_True; // belongs again to the Undo + mbDelObject = true; // belongs again to the Undo sal_uLong nParas = GetDoc()->GetNodes().Count(); sal_uLong n = mnPara < nParas ? mnPara : (nParas-1); diff --git a/vcl/source/edit/textview.cxx b/vcl/source/edit/textview.cxx index 7c370e52ef92..1c6df893cb37 100644 --- a/vcl/source/edit/textview.cxx +++ b/vcl/source/edit/textview.cxx @@ -534,10 +534,10 @@ void TextView::EraseVirtualDevice() sal_Bool TextView::KeyInput( const KeyEvent& rKeyEvent ) { sal_Bool bDone = sal_True; - sal_Bool bModified = sal_False; - sal_Bool bMoved = sal_False; + bool bModified = false; + bool bMoved = false; sal_Bool bEndKey = sal_False; // special CursorPosition - sal_Bool bAllowIdle = sal_True; + bool bAllowIdle = true; // check mModified; // the local bModified is not set e.g. by Cut/Paste, as here @@ -625,7 +625,7 @@ sal_Bool TextView::KeyInput( const KeyEvent& rKeyEvent ) uno::Reference aSelection(GetWindow()->GetPrimarySelection()); Copy( aSelection ); } - bMoved = sal_True; + bMoved = true; if ( nCode == KEY_END ) bEndKey = sal_True; } @@ -691,8 +691,8 @@ sal_Bool TextView::KeyInput( const KeyEvent& rKeyEvent ) } aCurSel = ImpDelete( nDel, nMode ); mpImpl->mpTextEngine->UndoActionEnd(); - bModified = sal_True; - bAllowIdle = sal_False; + bModified = true; + bAllowIdle = false; } else bDone = sal_False; @@ -705,7 +705,7 @@ sal_Bool TextView::KeyInput( const KeyEvent& rKeyEvent ) ImplCheckTextLen( OUString('x') ) ) { aCurSel = mpImpl->mpTextEngine->ImpInsertText( aCurSel, '\t', !IsInsertMode() ); - bModified = sal_True; + bModified = true; } else bDone = sal_False; @@ -734,7 +734,7 @@ sal_Bool TextView::KeyInput( const KeyEvent& rKeyEvent ) aCurSel = mpImpl->mpTextEngine->ImpInsertText( aCurSel, pPrev->GetText().Copy( 0, n ) ); } mpImpl->mpTextEngine->UndoActionEnd(); - bModified = sal_True; + bModified = true; } else bDone = sal_False; @@ -754,7 +754,7 @@ sal_Bool TextView::KeyInput( const KeyEvent& rKeyEvent ) if ( !mpImpl->mbReadOnly && ImplCheckTextLen( OUString(nCharCode) ) ) // otherwise swallow the character anyway { aCurSel = mpImpl->mpTextEngine->ImpInsertText( nCharCode, aCurSel, !IsInsertMode(), sal_True ); - bModified = sal_True; + bModified = true; } } else @@ -1244,7 +1244,7 @@ TextSelection TextView::ImpMoveCursor( const KeyEvent& rKeyEvent ) KeyEvent aTranslatedKeyEvent = rKeyEvent.LogicalTextDirectionality( eTextDirection ); - sal_Bool bCtrl = aTranslatedKeyEvent.GetKeyCode().IsMod1() ? sal_True : sal_False; + bool bCtrl = aTranslatedKeyEvent.GetKeyCode().IsMod1(); sal_uInt16 nCode = aTranslatedKeyEvent.GetKeyCode().GetCode(); bool bSelect = aTranslatedKeyEvent.GetKeyCode().IsShift(); diff --git a/vcl/source/edit/vclmedit.cxx b/vcl/source/edit/vclmedit.cxx index b83be1d5d652..9a2b03c54722 100644 --- a/vcl/source/edit/vclmedit.cxx +++ b/vcl/source/edit/vclmedit.cxx @@ -42,11 +42,11 @@ private: ExtTextView* mpExtTextView; bool mbInMBDown; - sal_Bool mbFocusSelectionHide; - sal_Bool mbIgnoreTab; - sal_Bool mbActivePopup; - sal_Bool mbSelectOnTab; - sal_Bool mbTextSelectable; + bool mbFocusSelectionHide; + bool mbIgnoreTab; + bool mbActivePopup; + bool mbSelectOnTab; + bool mbTextSelectable; public: TextWindow( Window* pParent ); @@ -68,15 +68,15 @@ public: virtual void GetFocus(); virtual void LoseFocus(); - sal_Bool IsAutoFocusHide() const { return mbFocusSelectionHide; } - void SetAutoFocusHide( sal_Bool bAutoHide ) { mbFocusSelectionHide = bAutoHide; } + bool IsAutoFocusHide() const { return mbFocusSelectionHide; } + void SetAutoFocusHide( bool bAutoHide ) { mbFocusSelectionHide = bAutoHide; } - sal_Bool IsIgnoreTab() const { return mbIgnoreTab; } - void SetIgnoreTab( sal_Bool bIgnore ) { mbIgnoreTab = bIgnore; } + bool IsIgnoreTab() const { return mbIgnoreTab; } + void SetIgnoreTab( bool bIgnore ) { mbIgnoreTab = bIgnore; } - void DisableSelectionOnFocus() { mbSelectOnTab = sal_False; } + void DisableSelectionOnFocus() { mbSelectOnTab = false; } - void SetTextSelectable( sal_Bool bTextSelectable ) { mbTextSelectable = bTextSelectable; } + void SetTextSelectable( bool bTextSelectable ) { mbTextSelectable = bTextSelectable; } }; @@ -250,11 +250,11 @@ void ImpVclMEdit::InitFromStyle( WinBits nWinStyle ) if ( nWinStyle & WB_IGNORETAB ) { - mpTextWindow->SetIgnoreTab( sal_True ); + mpTextWindow->SetIgnoreTab( true ); } else { - mpTextWindow->SetIgnoreTab( sal_False ); + mpTextWindow->SetIgnoreTab( false ); // #103667# VclMultiLineEdit has the flag, but focusable window also needs this flag WinBits nStyle = mpTextWindow->GetStyle(); nStyle |= WINDOW_DLGCTRL_MOD1TAB; @@ -702,11 +702,11 @@ sal_Bool ImpVclMEdit::HandleCommand( const CommandEvent& rCEvt ) TextWindow::TextWindow( Window* pParent ) : Window( pParent ) { mbInMBDown = false; - mbFocusSelectionHide = sal_False; - mbIgnoreTab = sal_False; - mbActivePopup = sal_False; - mbSelectOnTab = sal_True; - mbTextSelectable = sal_True; + mbFocusSelectionHide = false; + mbIgnoreTab = false; + mbActivePopup = false; + mbSelectOnTab = true; + mbTextSelectable = true; SetPointer( Pointer( POINTER_TEXT ) ); @@ -771,14 +771,14 @@ void TextWindow::KeyInput( const KeyEvent& rKEvent ) if ( Edit::GetGetSpecialCharsFunction() ) { // to maintain the selection - mbActivePopup = sal_True; + mbActivePopup = true; OUString aChars = Edit::GetGetSpecialCharsFunction()( this, GetFont() ); if (!aChars.isEmpty()) { mpExtTextView->InsertText( aChars ); mpExtTextView->GetTextEngine()->SetModified( sal_True ); } - mbActivePopup = sal_False; + mbActivePopup = false; bDone = sal_True; } } @@ -838,7 +838,7 @@ void TextWindow::Command( const CommandEvent& rCEvt ) pPopup->RemoveItem( nPos-1 ); } - mbActivePopup = sal_True; + mbActivePopup = true; Point aPos = rCEvt.GetMousePosPixel(); if ( !rCEvt.IsMouseEvent() ) { @@ -883,7 +883,7 @@ void TextWindow::Command( const CommandEvent& rCEvt ) } break; } - mbActivePopup = sal_False; + mbActivePopup = false; } else { @@ -1547,7 +1547,7 @@ void VclMultiLineEdit::DisableSelectionOnFocus() pImpVclMEdit->GetTextWindow()->DisableSelectionOnFocus(); } -void VclMultiLineEdit::SetTextSelectable( sal_Bool bTextSelectable ) +void VclMultiLineEdit::SetTextSelectable( bool bTextSelectable ) { pImpVclMEdit->GetTextWindow()->SetTextSelectable( bTextSelectable ); } diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 1018bb80efcd..b50ca253307e 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -7068,7 +7068,7 @@ void Window::setPosSizePixel( long nX, long nY, { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); - sal_Bool bHasValidSize = !mpWindowImpl->mbDefSize; + bool bHasValidSize = !mpWindowImpl->mbDefSize; if ( nFlags & WINDOW_POSSIZE_POS ) mpWindowImpl->mbDefPos = sal_False; -- cgit v1.2.3