diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-01-28 19:57:30 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-01-28 20:24:40 +0100 |
commit | bd9581d46d78c5742fbb50f1b4a9ff2fc1dae7e8 (patch) | |
tree | a62544334e8f6a22c66c07cae1b560e826fabc82 /svtools/source/brwbox | |
parent | 9d29f9913faaefe350d7e056330368b3dfa26d49 (diff) |
bool improvements
Change-Id: I23e29995bc7af791067de4996923b6279f7f8892
Diffstat (limited to 'svtools/source/brwbox')
-rw-r--r-- | svtools/source/brwbox/brwbox1.cxx | 36 | ||||
-rw-r--r-- | svtools/source/brwbox/brwbox2.cxx | 36 | ||||
-rw-r--r-- | svtools/source/brwbox/brwbox3.cxx | 4 | ||||
-rw-r--r-- | svtools/source/brwbox/datwin.cxx | 48 |
4 files changed, 62 insertions, 62 deletions
diff --git a/svtools/source/brwbox/brwbox1.cxx b/svtools/source/brwbox/brwbox1.cxx index 1f169165a3ad..6ec387356f9d 100644 --- a/svtools/source/brwbox/brwbox1.cxx +++ b/svtools/source/brwbox/brwbox1.cxx @@ -87,7 +87,7 @@ void BrowseBox::ConstructImpl( BrowserMode nMode ) nCurRow = BROWSER_ENDOFSELECTION; nCurColId = 0; bResizing = sal_False; - bSelect = sal_False; + bSelect = false; bSelecting = sal_False; bScrolling = sal_False; bSelectionIsVisible = sal_False; @@ -317,7 +317,7 @@ sal_uInt16 BrowseBox::ToggleSelectedColumn() DoHideCursor( "ToggleSelectedColumn" ); ToggleSelection(); nSelectedColId = (*pCols)[ pColSel->FirstSelected() ]->GetId(); - pColSel->SelectAll(sal_False); + pColSel->SelectAll(false); } return nSelectedColId; } @@ -798,7 +798,7 @@ void BrowseBox::RemoveColumns() // correct column selection if ( pColSel ) { - pColSel->SelectAll(sal_False); + pColSel->SelectAll(false); pColSel->SetTotalRange( Range( 0, 0 ) ); } @@ -1573,7 +1573,7 @@ sal_Bool BrowseBox::GoToRow( long nRow, sal_Bool bRowColMove, sal_Bool bKeepSele if ( !bSelecting ) Select(); else - bSelect = sal_True; + bSelect = true; } return sal_True; } @@ -1680,15 +1680,15 @@ void BrowseBox::SetNoSelection() // unselect all if ( bMultiSelection ) - uRow.pSel->SelectAll(sal_False); + uRow.pSel->SelectAll(false); else uRow.nSel = BROWSER_ENDOFSELECTION; if ( pColSel ) - pColSel->SelectAll(sal_False); + pColSel->SelectAll(false); if ( !bSelecting ) Select(); else - bSelect = sal_True; + bSelect = true; // restore screen OSL_TRACE( "BrowseBox: %p->ShowCursor", this ); @@ -1717,8 +1717,8 @@ void BrowseBox::SelectAll() // select all rows if ( pColSel ) - pColSel->SelectAll(sal_False); - uRow.pSel->SelectAll(sal_True); + pColSel->SelectAll(false); + uRow.pSel->SelectAll(true); // don't highlight handle column BrowserColumn *pFirstCol = (*pCols)[ 0 ]; @@ -1742,7 +1742,7 @@ void BrowseBox::SelectAll() if ( !bSelecting ) Select(); else - bSelect = sal_True; + bSelect = true; // restore screen OSL_TRACE( "BrowseBox: %p->ShowCursor", this ); @@ -1791,11 +1791,11 @@ void BrowseBox::SelectRow( long nRow, sal_Bool _bSelect, sal_Bool bExpand ) { ToggleSelection(); if ( bMultiSelection ) - uRow.pSel->SelectAll(sal_False); + uRow.pSel->SelectAll(false); else uRow.nSel = BROWSER_ENDOFSELECTION; if ( pColSel ) - pColSel->SelectAll(sal_False); + pColSel->SelectAll(false); } // set new selection @@ -1823,7 +1823,7 @@ void BrowseBox::SelectRow( long nRow, sal_Bool _bSelect, sal_Bool bExpand ) if ( !bSelecting ) Select(); else - bSelect = sal_True; + bSelect = true; // restore screen OSL_TRACE( "BrowseBox: %p->ShowCursor", this ); @@ -1878,10 +1878,10 @@ void BrowseBox::SelectColumnPos( sal_uInt16 nNewColPos, sal_Bool _bSelect, sal_B OSL_TRACE( "BrowseBox: %p->HideCursor", this ); ToggleSelection(); if ( bMultiSelection ) - uRow.pSel->SelectAll(sal_False); + uRow.pSel->SelectAll(false); else uRow.nSel = BROWSER_ENDOFSELECTION; - pColSel->SelectAll(sal_False); + pColSel->SelectAll(false); if ( pColSel->Select( nNewColPos, _bSelect ) ) { @@ -1898,7 +1898,7 @@ void BrowseBox::SelectColumnPos( sal_uInt16 nNewColPos, sal_Bool _bSelect, sal_B if ( !bSelecting ) Select(); else - bSelect = sal_True; + bSelect = true; if ( isAccessibleAlive() ) { @@ -2266,9 +2266,9 @@ void BrowseBox::SetMode( BrowserMode nMode ) DBG_ASSERT( !( getDataWindow()->bAutoVScroll && getDataWindow()->bNoVScroll ), "BrowseBox::SetMode: AutoVScroll *and* NoVScroll?" ); if ( getDataWindow()->bAutoHScroll ) - getDataWindow()->bNoHScroll = sal_False; + getDataWindow()->bNoHScroll = false; if ( getDataWindow()->bAutoVScroll ) - getDataWindow()->bNoVScroll = sal_False; + getDataWindow()->bNoVScroll = false; if ( getDataWindow()->bNoHScroll ) aHScroll.Hide(); diff --git a/svtools/source/brwbox/brwbox2.cxx b/svtools/source/brwbox/brwbox2.cxx index adc485cc7c69..1760056e3e27 100644 --- a/svtools/source/brwbox/brwbox2.cxx +++ b/svtools/source/brwbox/brwbox2.cxx @@ -317,7 +317,7 @@ void BrowseBox::ToggleSelection( sal_Bool bForce ) // only highlight painted areas! bNotToggleSel = sal_True; - if ( sal_False && !getDataWindow()->bInPaint ) + if ( false && !getDataWindow()->bInPaint ) pDataWin->Update(); // accumulate areas of rows to highlight @@ -535,7 +535,7 @@ void BrowseBox::ExpandRowSelection( const BrowserMouseEvent& rEvt ) if ( !IsRowSelected( aSelRange.Max() ) ) { SelectRow( aSelRange.Max(), bSelectThis, sal_True ); - bSelect = sal_True; + bSelect = true; } } while ( rEvt.GetRow() > aSelRange.Max() ) @@ -544,7 +544,7 @@ void BrowseBox::ExpandRowSelection( const BrowserMouseEvent& rEvt ) if ( !IsRowSelected( aSelRange.Max() ) ) { SelectRow( aSelRange.Max(), bSelectThis, sal_True ); - bSelect = sal_True; + bSelect = true; } } bSelecting = bOldSelecting; @@ -569,10 +569,10 @@ void BrowseBox::Resize() BrowseBox::StateChanged( STATE_CHANGE_INITSHOW ); if ( pCols->empty() ) { - getDataWindow()->bResizeOnPaint = sal_True; + getDataWindow()->bResizeOnPaint = true; return; } - getDataWindow()->bResizeOnPaint = sal_False; + getDataWindow()->bResizeOnPaint = false; // calc the size of the scrollbars // (we can't ask the scrollbars for their widths cause if we're zoomed they still have to be @@ -1161,10 +1161,10 @@ void BrowseBox::UpdateScrollbars() BrowserDataWin *pBDW = (BrowserDataWin*) pDataWin; if ( pBDW->bInUpdateScrollbars ) { - pBDW->bHadRecursion = sal_True; + pBDW->bHadRecursion = true; return; } - pBDW->bInUpdateScrollbars = sal_True; + pBDW->bInUpdateScrollbars = true; // the size of the corner window (and the width of the VSB/height of the HSB) sal_uLong nCornerSize = GetSettings().GetStyleSettings().GetScrollBarSize(); @@ -1315,10 +1315,10 @@ void BrowseBox::UpdateScrollbars() getDataWindow()->pHeaderBar->SetOffset( nWidth ); } - pBDW->bInUpdateScrollbars = sal_False; + pBDW->bInUpdateScrollbars = false; if ( pBDW->bHadRecursion ) { - pBDW->bHadRecursion = sal_False; + pBDW->bHadRecursion = false; UpdateScrollbars(); } } @@ -1499,7 +1499,7 @@ void BrowseBox::MouseButtonDown( const MouseEvent& rEvt ) // event occurred out of data area if ( rEvt.IsRight() ) pDataWin->Command( - CommandEvent( Point( 1, LONG_MAX ), COMMAND_CONTEXTMENU, sal_True ) ); + CommandEvent( Point( 1, LONG_MAX ), COMMAND_CONTEXTMENU, true ) ); else SetNoSelection(); } @@ -1661,19 +1661,19 @@ void BrowseBox::MouseButtonDown( const BrowserMouseEvent& rEvt ) { ToggleSelection(); if ( bMultiSelection ) - uRow.pSel->SelectAll(sal_False); + uRow.pSel->SelectAll(false); else uRow.nSel = BROWSER_ENDOFSELECTION; if ( pColSel ) - pColSel->SelectAll(sal_False); - bSelect = sal_True; + pColSel->SelectAll(false); + bSelect = true; } // expanding mode? if ( rEvt.GetMode() & MOUSE_RANGESELECT ) { // select the further touched rows too - bSelect = sal_True; + bSelect = true; ExpandRowSelection( rEvt ); return; } @@ -1696,7 +1696,7 @@ void BrowseBox::MouseButtonDown( const BrowserMouseEvent& rEvt ) aSelRange = Range( rEvt.GetRow(), rEvt.GetRow() ); SelectRow( rEvt.GetRow(), !uRow.pSel->IsSelected( rEvt.GetRow() ) ); - bSelect = sal_True; + bSelect = true; return; } } @@ -1706,7 +1706,7 @@ void BrowseBox::MouseButtonDown( const BrowserMouseEvent& rEvt ) GoToRow( rEvt.GetRow() ); SelectRow( rEvt.GetRow(), sal_True ); aSelRange = Range( rEvt.GetRow(), rEvt.GetRow() ); - bSelect = sal_True; + bSelect = true; } else // Column/Field-Selection { @@ -1721,7 +1721,7 @@ void BrowseBox::MouseButtonDown( const BrowserMouseEvent& rEvt ) SetNoSelection(); GoToRowColumnId( rEvt.GetRow(), rEvt.GetColumnId() ); - bSelect = sal_True; + bSelect = true; } } else @@ -1777,7 +1777,7 @@ void BrowseBox::MouseButtonUp( const BrowserMouseEvent &rEvt ) SelectRow( rEvt.GetRow(), sal_True ); } } - bSelect = sal_True; + bSelect = true; bExtendedMode = sal_False; bFieldMode = sal_False; bHit = sal_False; diff --git a/svtools/source/brwbox/brwbox3.cxx b/svtools/source/brwbox/brwbox3.cxx index 54ec2a248429..6facb704f34b 100644 --- a/svtools/source/brwbox/brwbox3.cxx +++ b/svtools/source/brwbox/brwbox3.cxx @@ -161,7 +161,7 @@ sal_Int32 BrowseBox::GetAccessibleControlCount() const Reference< XAccessible > BrowseBox::CreateAccessibleControl( sal_Int32 ) { - DBG_ASSERT( sal_False, "BrowseBox::CreateAccessibleControl: to be overwritten!" ); + DBG_ASSERT( false, "BrowseBox::CreateAccessibleControl: to be overwritten!" ); return NULL; } // ----------------------------------------------------------------------------- @@ -400,7 +400,7 @@ void BrowseBox::GrabTableFocus() // ----------------------------------------------------------------------------- OUString BrowseBox::GetCellText(long, sal_uInt16 ) const { - DBG_ASSERT(0,"This method has to be implemented by the derived classes! BUG!!"); + DBG_ASSERT(false,"This method has to be implemented by the derived classes! BUG!!"); return OUString(); } diff --git a/svtools/source/brwbox/datwin.cxx b/svtools/source/brwbox/datwin.cxx index 32bd4059b221..5c6c288369ab 100644 --- a/svtools/source/brwbox/datwin.cxx +++ b/svtools/source/brwbox/datwin.cxx @@ -192,18 +192,18 @@ BrowserDataWin::BrowserDataWin( BrowseBox* pParent ) ,pEventWin( pParent ) ,pCornerWin( 0 ) ,pDtorNotify( 0 ) - ,bInPaint( sal_False ) - ,bInCommand( sal_False ) - ,bNoScrollBack( sal_False ) - ,bNoHScroll( sal_False ) - ,bNoVScroll( sal_False ) - ,bUpdateMode( sal_True ) - ,bResizeOnPaint( sal_False ) - ,bUpdateOnUnlock( sal_False ) - ,bInUpdateScrollbars( sal_False ) - ,bHadRecursion( sal_False ) - ,bOwnDataChangedHdl( sal_False ) - ,bCallingDropCallback( sal_False ) + ,bInPaint( false ) + ,bInCommand( false ) + ,bNoScrollBack( false ) + ,bNoHScroll( false ) + ,bNoVScroll( false ) + ,bUpdateMode( true ) + ,bResizeOnPaint( false ) + ,bUpdateOnUnlock( false ) + ,bInUpdateScrollbars( false ) + ,bHadRecursion( false ) + ,bOwnDataChangedHdl( false ) + ,bCallingDropCallback( false ) ,nUpdateLock( 0 ) ,nCursorHidden( 0 ) ,m_nDragRowDividerLimit( 0 ) @@ -233,7 +233,7 @@ void BrowserDataWin::LeaveUpdateLock() if (bUpdateOnUnlock ) { Control::Update(); - bUpdateOnUnlock = sal_False; + bUpdateOnUnlock = false; } } } @@ -276,7 +276,7 @@ void BrowserDataWin::Update() if ( !nUpdateLock ) Control::Update(); else - bUpdateOnUnlock = sal_True; + bUpdateOnUnlock = true; } //------------------------------------------------------------------- @@ -308,9 +308,9 @@ void BrowserDataWin::Paint( const Rectangle& rRect ) aInvalidRegion.push_back( new Rectangle( rRect ) ); return; } - bInPaint = sal_True; + bInPaint = true; ( (BrowseBox*) GetParent() )->PaintData( *this, rRect ); - bInPaint = sal_False; + bInPaint = false; DoOutstandingInvalidations(); } else @@ -364,18 +364,18 @@ BrowseEvent BrowserDataWin::CreateBrowseEvent( const Point& rPosPixel ) //------------------------------------------------------------------- sal_Int8 BrowserDataWin::AcceptDrop( const AcceptDropEvent& _rEvt ) { - bCallingDropCallback = sal_True; + bCallingDropCallback = true; sal_Int8 nReturn = GetParent()->AcceptDrop( BrowserAcceptDropEvent( this, _rEvt ) ); - bCallingDropCallback = sal_False; + bCallingDropCallback = false; return nReturn; } //------------------------------------------------------------------- sal_Int8 BrowserDataWin::ExecuteDrop( const ExecuteDropEvent& _rEvt ) { - bCallingDropCallback = sal_True; + bCallingDropCallback = true; sal_Int8 nReturn = GetParent()->ExecuteDrop( BrowserExecuteDropEvent( this, _rEvt ) ); - bCallingDropCallback = sal_False; + bCallingDropCallback = false; return nReturn; } @@ -409,7 +409,7 @@ void BrowserDataWin::Command( const CommandEvent& rEvt ) { sal_Bool bDeleted = sal_False; pDtorNotify = &bDeleted; - bInCommand = sal_True; + bInCommand = true; MouseButtonDown( aMouseEvt ); if( bDeleted ) return; @@ -417,20 +417,20 @@ void BrowserDataWin::Command( const CommandEvent& rEvt ) if( bDeleted ) return; pDtorNotify = 0; - bInCommand = sal_False; + bInCommand = false; } aEventPos.Y() += GetParent()->GetTitleHeight(); CommandEvent aEvt( aEventPos, rEvt.GetCommand(), rEvt.IsMouseEvent(), rEvt.GetData() ); - bInCommand = sal_True; + bInCommand = true; sal_Bool bDeleted = sal_False; pDtorNotify = &bDeleted; GetParent()->Command( aEvt ); if( bDeleted ) return; pDtorNotify = 0; - bInCommand = sal_False; + bInCommand = false; if ( COMMAND_STARTDRAG == rEvt.GetCommand() ) MouseButtonUp( aMouseEvt ); |