diff options
author | Frank Schoenheit [fs] <frank.schoenheit@oracle.com> | 2011-02-14 23:00:48 +0100 |
---|---|---|
committer | Frank Schoenheit [fs] <frank.schoenheit@oracle.com> | 2011-02-14 23:00:48 +0100 |
commit | 2b7675c9b0b3fe6accea195d6f009706c0d114ad (patch) | |
tree | d8004c2ba451a30a234d19c6978530d923d37e88 /svtools/source/brwbox/datwin.cxx | |
parent | ac2741f0361ea516ffe8ead57a6e43665ec99937 (diff) | |
parent | ce5f1dd187c3a7d8113c7653fa887b98fd50aaf6 (diff) |
gridsort: pulled and merged DEV300_m100
Diffstat (limited to 'svtools/source/brwbox/datwin.cxx')
-rw-r--r-- | svtools/source/brwbox/datwin.cxx | 98 |
1 files changed, 49 insertions, 49 deletions
diff --git a/svtools/source/brwbox/datwin.cxx b/svtools/source/brwbox/datwin.cxx index 2c771f778d92..377180653780 100644 --- a/svtools/source/brwbox/datwin.cxx +++ b/svtools/source/brwbox/datwin.cxx @@ -67,7 +67,7 @@ void ButtonFrame::Draw( OutputDevice& rDev ) { Window *pWin = (Window*) &rDev; if( bPressed ) - pWin->DrawSelectionBackground( aRect, 0, TRUE, FALSE, FALSE ); + pWin->DrawSelectionBackground( aRect, 0, sal_True, sal_False, sal_False ); } else { @@ -84,10 +84,10 @@ void ButtonFrame::Draw( OutputDevice& rDev ) String aVal = rDev.GetEllipsisString(aText,aInnerRect.GetWidth() - 2*MIN_COLUMNWIDTH); Font aFont( rDev.GetFont() ); - BOOL bOldTransp = aFont.IsTransparent(); + sal_Bool bOldTransp = aFont.IsTransparent(); if ( !bOldTransp ) { - aFont.SetTransparent( TRUE ); + aFont.SetTransparent( sal_True ); rDev.SetFont( aFont ); } @@ -102,7 +102,7 @@ void ButtonFrame::Draw( OutputDevice& rDev ) // restore settings if ( !bOldTransp ) { - aFont.SetTransparent(FALSE); + aFont.SetTransparent(sal_False); rDev.SetFont( aFont ); } if (m_bDrawDisabled) @@ -123,14 +123,14 @@ void ButtonFrame::Draw( OutputDevice& rDev ) //------------------------------------------------------------------- -BrowserColumn::BrowserColumn( USHORT nItemId, const class Image &rImage, - const String& rTitle, ULONG nWidthPixel, const Fraction& rCurrentZoom, +BrowserColumn::BrowserColumn( sal_uInt16 nItemId, const class Image &rImage, + const String& rTitle, sal_uLong nWidthPixel, const Fraction& rCurrentZoom, HeaderBarItemBits nFlags ) : _nId( nItemId ), _nWidth( nWidthPixel ), _aImage( rImage ), _aTitle( rTitle ), - _bFrozen( FALSE ), + _bFrozen( sal_False ), _nFlags( nFlags ) { double n = (double)_nWidth; @@ -145,7 +145,7 @@ BrowserColumn::~BrowserColumn() //------------------------------------------------------------------- -void BrowserColumn::SetWidth(ULONG nNewWidthPixel, const Fraction& rCurrentZoom) +void BrowserColumn::SetWidth(sal_uLong nNewWidthPixel, const Fraction& rCurrentZoom) { _nWidth = nNewWidthPixel; double n = (double)_nWidth; @@ -156,13 +156,13 @@ void BrowserColumn::SetWidth(ULONG nNewWidthPixel, const Fraction& rCurrentZoom) //------------------------------------------------------------------- -void BrowserColumn::Draw( BrowseBox& rBox, OutputDevice& rDev, const Point& rPos, BOOL bCurs ) +void BrowserColumn::Draw( BrowseBox& rBox, OutputDevice& rDev, const Point& rPos, sal_Bool bCurs ) { if ( _nId == 0 ) { // paint handle column ButtonFrame( rPos, Size( Width()-1, rBox.GetDataRowHeight()-1 ), - String(), FALSE, bCurs, + String(), sal_False, bCurs, 0 != (BROWSER_COLUMN_TITLEABBREVATION&_nFlags) ).Draw( rDev ); Color aOldLineColor = rDev.GetLineColor(); rDev.SetLineColor( Color( COL_BLACK ) ); @@ -216,18 +216,18 @@ BrowserDataWin::BrowserDataWin( BrowseBox* pParent ) ,pEventWin( pParent ) ,pCornerWin( 0 ) ,pDtorNotify( 0 ) - ,bInPaint( FALSE ) - ,bInCommand( FALSE ) - ,bNoScrollBack( FALSE ) - ,bNoHScroll( FALSE ) - ,bNoVScroll( FALSE ) - ,bUpdateMode( TRUE ) - ,bResizeOnPaint( FALSE ) - ,bUpdateOnUnlock( FALSE ) - ,bInUpdateScrollbars( FALSE ) - ,bHadRecursion( FALSE ) - ,bOwnDataChangedHdl( FALSE ) - ,bCallingDropCallback( FALSE ) + ,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 ) ,nUpdateLock( 0 ) ,nCursorHidden( 0 ) ,m_nDragRowDividerLimit( 0 ) @@ -241,7 +241,7 @@ BrowserDataWin::BrowserDataWin( BrowseBox* pParent ) BrowserDataWin::~BrowserDataWin() { if( pDtorNotify ) - *pDtorNotify = TRUE; + *pDtorNotify = sal_True; } //------------------------------------------------------------------- @@ -253,14 +253,14 @@ void BrowserDataWin::LeaveUpdateLock() if (bUpdateOnUnlock ) { Control::Update(); - bUpdateOnUnlock = FALSE; + bUpdateOnUnlock = sal_False; } } } //------------------------------------------------------------------- void InitSettings_Impl( Window *pWin, - BOOL bFont, BOOL bForeground, BOOL bBackground ) + sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground ) { const StyleSettings& rStyleSettings = pWin->GetSettings().GetStyleSettings(); @@ -296,7 +296,7 @@ void BrowserDataWin::Update() if ( !nUpdateLock ) Control::Update(); else - bUpdateOnUnlock = TRUE; + bUpdateOnUnlock = sal_True; } //------------------------------------------------------------------- @@ -307,9 +307,9 @@ void BrowserDataWin::DataChanged( const DataChangedEvent& rDCEvt ) { if( !bOwnDataChangedHdl ) { - InitSettings_Impl( this, TRUE, TRUE, TRUE ); + InitSettings_Impl( this, sal_True, sal_True, sal_True ); Invalidate(); - InitSettings_Impl( GetParent(), TRUE, TRUE, TRUE ); + InitSettings_Impl( GetParent(), sal_True, sal_True, sal_True ); GetParent()->Invalidate(); GetParent()->Resize(); } @@ -328,9 +328,9 @@ void BrowserDataWin::Paint( const Rectangle& rRect ) aInvalidRegion.Insert( new Rectangle( rRect ) ); return; } - bInPaint = TRUE; + bInPaint = sal_True; ( (BrowseBox*) GetParent() )->PaintData( *this, rRect ); - bInPaint = FALSE; + bInPaint = sal_False; DoOutstandingInvalidations(); } else @@ -352,7 +352,7 @@ BrowseEvent BrowserDataWin::CreateBrowseEvent( const Point& rPosPixel ) // find column under mouse long nMouseX = rPosPixel.X(); long nColX = 0; - USHORT nCol; + sal_uInt16 nCol; for ( nCol = 0; nCol < pBox->pCols->Count() && nColX < GetSizePixel().Width(); ++nCol ) @@ -362,7 +362,7 @@ BrowseEvent BrowserDataWin::CreateBrowseEvent( const Point& rPosPixel ) if ( nMouseX < nColX ) break; } - USHORT nColId = BROWSER_INVALIDID; + sal_uInt16 nColId = BROWSER_INVALIDID; if ( nCol < pBox->pCols->Count() ) nColId = pBox->pCols->GetObject(nCol)->GetId(); @@ -424,14 +424,14 @@ void BrowserDataWin::Command( const CommandEvent& rEvt ) return; Point aEventPos( rEvt.GetMousePosPixel() ); - long nRow = pBox->GetRowAtYPosPixel( aEventPos.Y(), FALSE); + long nRow = pBox->GetRowAtYPosPixel( aEventPos.Y(), sal_False); MouseEvent aMouseEvt( aEventPos, 1, MOUSE_SELECT, MOUSE_LEFT ); if ( COMMAND_CONTEXTMENU == rEvt.GetCommand() && rEvt.IsMouseEvent() && nRow < pBox->GetRowCount() && !pBox->IsRowSelected(nRow) ) { - BOOL bDeleted = FALSE; + sal_Bool bDeleted = sal_False; pDtorNotify = &bDeleted; - bInCommand = TRUE; + bInCommand = sal_True; MouseButtonDown( aMouseEvt ); if( bDeleted ) return; @@ -439,20 +439,20 @@ void BrowserDataWin::Command( const CommandEvent& rEvt ) if( bDeleted ) return; pDtorNotify = 0; - bInCommand = FALSE; + bInCommand = sal_False; } aEventPos.Y() += GetParent()->GetTitleHeight(); CommandEvent aEvt( aEventPos, rEvt.GetCommand(), rEvt.IsMouseEvent(), rEvt.GetData() ); - bInCommand = TRUE; - BOOL bDeleted = FALSE; + bInCommand = sal_True; + sal_Bool bDeleted = sal_False; pDtorNotify = &bDeleted; GetParent()->Command( aEvt ); if( bDeleted ) return; pDtorNotify = 0; - bInCommand = FALSE; + bInCommand = sal_False; if ( COMMAND_STARTDRAG == rEvt.GetCommand() ) MouseButtonUp( aMouseEvt ); @@ -462,7 +462,7 @@ void BrowserDataWin::Command( const CommandEvent& rEvt ) //------------------------------------------------------------------- -BOOL BrowserDataWin::ImplRowDividerHitTest( const BrowserMouseEvent& _rEvent ) +sal_Bool BrowserDataWin::ImplRowDividerHitTest( const BrowserMouseEvent& _rEvent ) { if ( ! ( GetParent()->IsInteractiveRowHeightEnabled() && ( _rEvent.GetRow() >= 0 ) @@ -470,7 +470,7 @@ BOOL BrowserDataWin::ImplRowDividerHitTest( const BrowserMouseEvent& _rEvent ) && ( _rEvent.GetColumnId() == 0 ) ) ) - return FALSE; + return sal_False; long nDividerDistance = GetParent()->GetDataRowHeight() - ( _rEvent.GetPosPixel().Y() % GetParent()->GetDataRowHeight() ); return ( nDividerDistance <= 4 ); @@ -570,7 +570,7 @@ void BrowserDataWin::StartRowDividerDrag( const Point& _rStartPos ) m_nDragRowDividerLimit = nDragRowDividerCurrentPos - nDataRowHeight; - GetParent()->bRowDividerDrag = TRUE; + GetParent()->bRowDividerDrag = sal_True; GetParent()->ImplStartTracking(); Rectangle aDragSplitRect( 0, m_nDragRowDividerLimit, GetOutputSizePixel().Width(), nDragRowDividerCurrentPos ); @@ -594,7 +594,7 @@ void BrowserDataWin::Tracking( const TrackingEvent& rTEvt ) if ( rTEvt.IsTrackingEnded() ) { HideTracking(); - GetParent()->bRowDividerDrag = FALSE; + GetParent()->bRowDividerDrag = sal_False; GetParent()->ImplEndTracking(); if ( !rTEvt.IsTrackingCanceled() ) @@ -645,7 +645,7 @@ void BrowserDataWin::RequestHelp( const HelpEvent& rHEvt ) //=================================================================== BrowseEvent::BrowseEvent( Window* pWindow, - long nAbsRow, USHORT nColumn, USHORT nColumnId, + long nAbsRow, sal_uInt16 nColumn, sal_uInt16 nColumnId, const Rectangle& rRect ): pWin(pWindow), nRow(nAbsRow), @@ -666,7 +666,7 @@ BrowserMouseEvent::BrowserMouseEvent( BrowserDataWin *pWindow, //------------------------------------------------------------------- BrowserMouseEvent::BrowserMouseEvent( Window *pWindow, const MouseEvent& rEvt, - long nAbsRow, USHORT nColumn, USHORT nColumnId, + long nAbsRow, sal_uInt16 nColumn, sal_uInt16 nColumnId, const Rectangle& rRect ): MouseEvent(rEvt), BrowseEvent( pWindow, nAbsRow, nColumn, nColumnId, rRect ) @@ -693,7 +693,7 @@ BrowserExecuteDropEvent::BrowserExecuteDropEvent( BrowserDataWin *pWindow, const //------------------------------------------------------------------- -void BrowserDataWin::SetUpdateMode( BOOL bMode ) +void BrowserDataWin::SetUpdateMode( sal_Bool bMode ) { DBG_ASSERT( !bUpdateMode || aInvalidRegion.Count() == 0, "invalid region not empty" ); @@ -720,7 +720,7 @@ void BrowserDataWin::DoOutstandingInvalidations() //------------------------------------------------------------------- -void BrowserDataWin::Invalidate( USHORT nFlags ) +void BrowserDataWin::Invalidate( sal_uInt16 nFlags ) { if ( !GetUpdateMode() ) { @@ -737,7 +737,7 @@ void BrowserDataWin::Invalidate( USHORT nFlags ) //------------------------------------------------------------------- -void BrowserDataWin::Invalidate( const Rectangle& rRect, USHORT nFlags ) +void BrowserDataWin::Invalidate( const Rectangle& rRect, sal_uInt16 nFlags ) { if ( !GetUpdateMode() ) aInvalidRegion.Insert( new Rectangle( rRect ) ); @@ -749,7 +749,7 @@ void BrowserDataWin::Invalidate( const Rectangle& rRect, USHORT nFlags ) void BrowserScrollBar::Tracking( const TrackingEvent& rTEvt ) { - ULONG nPos = GetThumbPos(); + sal_uLong nPos = GetThumbPos(); if ( nPos != _nLastPos ) { String aTip( String::CreateFromInt32(nPos) ); |