summaryrefslogtreecommitdiff
path: root/svtools/source/brwbox
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2011-03-18 15:55:08 +0100
committerJan Holesovsky <kendy@suse.cz>2011-03-18 15:55:08 +0100
commit4fdd55226d2972e3a256426db3122ac23b0615c6 (patch)
tree23f5b3a68382d6d3b8db0cb5e2537ed74a228d7c /svtools/source/brwbox
parentc3d5444d84e18fa82235bb9d419861ac5e54f544 (diff)
parente1028d9225bc47922c387aa462887c7643bc6c40 (diff)
Merge remote-tracking branch 'origin/integration/dev300_m101'
Conflicts: comphelper/source/misc/servicedecl.cxx i18npool/source/breakiterator/breakiteratorImpl.cxx l10ntools/scripts/localize.pl svl/source/items/itemset.cxx svl/source/memtools/svarray.cxx svl/source/numbers/zformat.cxx svtools/source/brwbox/brwbox1.cxx tools/source/stream/strmwnt.cxx vcl/inc/vcl/graphite_adaptors.hxx vcl/inc/vcl/graphite_layout.hxx vcl/inc/vcl/graphite_serverfont.hxx vcl/source/control/imgctrl.cxx vcl/source/gdi/outdev.cxx vcl/source/gdi/outdev3.cxx vcl/source/glyphs/gcach_ftyp.cxx vcl/source/glyphs/graphite_adaptors.cxx vcl/source/glyphs/graphite_layout.cxx vcl/source/window/winproc.cxx vcl/unx/source/fontmanager/fontconfig.cxx
Diffstat (limited to 'svtools/source/brwbox')
-rw-r--r--svtools/source/brwbox/brwbox1.cxx340
-rw-r--r--svtools/source/brwbox/brwbox2.cxx322
-rw-r--r--svtools/source/brwbox/brwbox3.cxx14
-rw-r--r--svtools/source/brwbox/brwhead.cxx4
-rw-r--r--svtools/source/brwbox/datwin.cxx105
-rw-r--r--svtools/source/brwbox/datwin.hxx60
-rw-r--r--svtools/source/brwbox/ebbcontrols.cxx28
-rw-r--r--svtools/source/brwbox/editbrowsebox.cxx2
-rw-r--r--svtools/source/brwbox/editbrowsebox2.cxx8
-rw-r--r--svtools/source/brwbox/makefile.mk59
10 files changed, 442 insertions, 500 deletions
diff --git a/svtools/source/brwbox/brwbox1.cxx b/svtools/source/brwbox/brwbox1.cxx
index 2f05507a61b5..31e4a187574f 100644
--- a/svtools/source/brwbox/brwbox1.cxx
+++ b/svtools/source/brwbox/brwbox1.cxx
@@ -77,7 +77,7 @@ namespace
void BrowseBox::ConstructImpl( BrowserMode nMode )
{
OSL_TRACE( "BrowseBox: %p->ConstructImpl", this );
- bMultiSelection = FALSE;
+ bMultiSelection = sal_False;
pColSel = 0;
pDataWin = 0;
pVScroll = 0;
@@ -90,26 +90,26 @@ void BrowseBox::ConstructImpl( BrowserMode nMode )
InitSettings_Impl( this );
InitSettings_Impl( pDataWin );
- bBootstrapped = FALSE;
+ bBootstrapped = sal_False;
nDataRowHeight = 0;
nTitleLines = 1;
nFirstCol = 0;
nTopRow = 0;
nCurRow = BROWSER_ENDOFSELECTION;
nCurColId = 0;
- bResizing = FALSE;
- bSelect = FALSE;
- bSelecting = FALSE;
- bScrolling = FALSE;
- bSelectionIsVisible = FALSE;
- bNotToggleSel = FALSE;
- bRowDividerDrag = FALSE;
- bHit = FALSE;
- mbInteractiveRowHeight = FALSE;
- bHideSelect = FALSE;
+ bResizing = sal_False;
+ bSelect = sal_False;
+ bSelecting = sal_False;
+ bScrolling = sal_False;
+ bSelectionIsVisible = sal_False;
+ bNotToggleSel = sal_False;
+ bRowDividerDrag = sal_False;
+ bHit = sal_False;
+ mbInteractiveRowHeight = sal_False;
+ bHideSelect = sal_False;
bHideCursor = NO_CURSOR_HIDE;
nRowCount = 0;
- m_bFocusOnlyCursor = TRUE;
+ m_bFocusOnlyCursor = sal_True;
m_aCursorColor = COL_TRANSPARENT;
m_nCurrentMode = 0;
nControlAreaWidth = USHRT_MAX;
@@ -239,14 +239,14 @@ void BrowseBox::SetFont( const Font& rNewFont )
//-------------------------------------------------------------------
-ULONG BrowseBox::GetDefaultColumnWidth( const String& _rText ) const
+sal_uLong BrowseBox::GetDefaultColumnWidth( const String& _rText ) const
{
return GetDataWindow().GetTextWidth( _rText ) + GetDataWindow().GetTextWidth( '0' ) * 4;
}
//-------------------------------------------------------------------
-void BrowseBox::InsertHandleColumn( ULONG nWidth )
+void BrowseBox::InsertHandleColumn( sal_uLong nWidth )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
@@ -266,8 +266,8 @@ void BrowseBox::InsertHandleColumn( ULONG nWidth )
}
//-------------------------------------------------------------------
-void BrowseBox::InsertDataColumn( USHORT nItemId, const Image& rImage,
- long nWidth, HeaderBarItemBits nBits, USHORT nPos )
+void BrowseBox::InsertDataColumn( sal_uInt16 nItemId, const Image& rImage,
+ long nWidth, HeaderBarItemBits nBits, sal_uInt16 nPos )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
@@ -286,7 +286,7 @@ void BrowseBox::InsertDataColumn( USHORT nItemId, const Image& rImage,
if ( getDataWindow()->pHeaderBar )
{
// Handlecolumn nicht in der Headerbar
- USHORT nHeaderPos = nPos;
+ sal_uInt16 nHeaderPos = nPos;
if (nHeaderPos != HEADERBAR_APPEND && !GetColumnId(0))
nHeaderPos--;
getDataWindow()->pHeaderBar->InsertItem(
@@ -297,8 +297,8 @@ void BrowseBox::InsertDataColumn( USHORT nItemId, const Image& rImage,
//-------------------------------------------------------------------
-void BrowseBox::InsertDataColumn( USHORT nItemId, const XubString& rText,
- long nWidth, HeaderBarItemBits nBits, USHORT nPos )
+void BrowseBox::InsertDataColumn( sal_uInt16 nItemId, const XubString& rText,
+ long nWidth, HeaderBarItemBits nBits, sal_uInt16 nPos )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
@@ -318,7 +318,7 @@ void BrowseBox::InsertDataColumn( USHORT nItemId, const XubString& rText,
if ( getDataWindow()->pHeaderBar )
{
// Handlecolumn nicht in der Headerbar
- USHORT nHeaderPos = nPos;
+ sal_uInt16 nHeaderPos = nPos;
if (nHeaderPos != HEADERBAR_APPEND && !GetColumnId(0))
nHeaderPos--;
getDataWindow()->pHeaderBar->InsertItem(
@@ -329,9 +329,9 @@ void BrowseBox::InsertDataColumn( USHORT nItemId, const XubString& rText,
//-------------------------------------------------------------------
-void BrowseBox::InsertDataColumn( USHORT nItemId,
+void BrowseBox::InsertDataColumn( sal_uInt16 nItemId,
const Image& rImage, const XubString& rText,
- long nWidth, HeaderBarItemBits nBits, USHORT nPos,
+ long nWidth, HeaderBarItemBits nBits, sal_uInt16 nPos,
const String* pHelpText )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
@@ -352,7 +352,7 @@ void BrowseBox::InsertDataColumn( USHORT nItemId,
if ( getDataWindow()->pHeaderBar )
{
// Handlecolumn nicht in der Headerbar
- USHORT nHeaderPos = nPos;
+ sal_uInt16 nHeaderPos = nPos;
if (nHeaderPos != HEADERBAR_APPEND && !GetColumnId(0))
nHeaderPos--;
@@ -367,20 +367,20 @@ void BrowseBox::InsertDataColumn( USHORT nItemId,
ColumnInserted( nPos );
}
//-------------------------------------------------------------------
-USHORT BrowseBox::ToggleSelectedColumn()
+sal_uInt16 BrowseBox::ToggleSelectedColumn()
{
- USHORT nSelectedColId = USHRT_MAX;
+ sal_uInt16 nSelectedColId = USHRT_MAX;
if ( pColSel && pColSel->GetSelectCount() )
{
DoHideCursor( "ToggleSelectedColumn" );
ToggleSelection();
nSelectedColId = (*pCols)[ pColSel->FirstSelected() ]->GetId();
- pColSel->SelectAll(FALSE);
+ pColSel->SelectAll(sal_False);
}
return nSelectedColId;
}
// -----------------------------------------------------------------------------
-void BrowseBox::SetToggledSelectedColumn(USHORT _nSelectedColumnId)
+void BrowseBox::SetToggledSelectedColumn(sal_uInt16 _nSelectedColumnId)
{
if ( pColSel && _nSelectedColumnId != USHRT_MAX )
{
@@ -391,7 +391,7 @@ void BrowseBox::SetToggledSelectedColumn(USHORT _nSelectedColumnId)
}
}
// -----------------------------------------------------------------------------
-void BrowseBox::FreezeColumn( USHORT nItemId, BOOL bFreeze )
+void BrowseBox::FreezeColumn( sal_uInt16 nItemId, sal_Bool bFreeze )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
@@ -410,7 +410,7 @@ void BrowseBox::FreezeColumn( USHORT nItemId, BOOL bFreeze )
return;
// remark the column selection
- USHORT nSelectedColId = ToggleSelectedColumn();
+ sal_uInt16 nSelectedColId = ToggleSelectedColumn();
// freeze or unfreeze?
if ( bFreeze )
@@ -419,7 +419,7 @@ void BrowseBox::FreezeColumn( USHORT nItemId, BOOL bFreeze )
if ( nItemPos != 0 && !(*pCols)[ nItemPos-1 ]->IsFrozen() )
{
// move to the right of the last frozen column
- USHORT nFirstScrollable = FrozenColCount();
+ sal_uInt16 nFirstScrollable = FrozenColCount();
BrowserColumn *pColumn = (*pCols)[ nItemPos ];
BrowserColumns::iterator it = pCols->begin();
::std::advance( it, nItemPos );
@@ -440,7 +440,7 @@ void BrowseBox::FreezeColumn( USHORT nItemId, BOOL bFreeze )
if ( (sal_Int32)nItemPos != FrozenColCount()-1 )
{
// move to the leftmost scrollable colum
- USHORT nFirstScrollable = FrozenColCount();
+ sal_uInt16 nFirstScrollable = FrozenColCount();
BrowserColumn *pColumn = (*pCols)[ nItemPos ];
BrowserColumns::iterator it = pCols->begin();
::std::advance( it, nItemPos );
@@ -471,7 +471,7 @@ void BrowseBox::FreezeColumn( USHORT nItemId, BOOL bFreeze )
//-------------------------------------------------------------------
-void BrowseBox::SetColumnPos( USHORT nColumnId, USHORT nPos )
+void BrowseBox::SetColumnPos( sal_uInt16 nColumnId, sal_uInt16 nPos )
{
// never set pos of the handle-column
if ( nColumnId == 0 )
@@ -482,7 +482,7 @@ void BrowseBox::SetColumnPos( USHORT nColumnId, USHORT nPos )
return;
// get the position in the current array
- USHORT nOldPos = GetColumnPos( nColumnId );
+ sal_uInt16 nOldPos = GetColumnPos( nColumnId );
if ( nOldPos >= pCols->size() )
// not available!
return;
@@ -491,7 +491,7 @@ void BrowseBox::SetColumnPos( USHORT nColumnId, USHORT nPos )
if (nOldPos != nPos)
{
// remark the column selection
- USHORT nSelectedColId = ToggleSelectedColumn();
+ sal_uInt16 nSelectedColId = ToggleSelectedColumn();
// determine old column area
Size aDataWinSize( pDataWin->GetSizePixel() );
@@ -501,7 +501,7 @@ void BrowseBox::SetColumnPos( USHORT nColumnId, USHORT nPos )
Rectangle aFromRect( GetFieldRect( nColumnId) );
aFromRect.Right() += 2*MIN_COLUMNWIDTH;
- USHORT nNextPos = nOldPos + 1;
+ sal_uInt16 nNextPos = nOldPos + 1;
if ( nOldPos > nPos )
nNextPos = nOldPos - 1;
@@ -552,7 +552,7 @@ void BrowseBox::SetColumnPos( USHORT nColumnId, USHORT nPos )
// adjust header bar positions
if ( getDataWindow()->pHeaderBar )
{
- USHORT nNewPos = nPos;
+ sal_uInt16 nNewPos = nPos;
if ( !GetColumnId(0) )
--nNewPos;
getDataWindow()->pHeaderBar->MoveItem(nColumnId,nNewPos);
@@ -594,7 +594,7 @@ void BrowseBox::SetColumnPos( USHORT nColumnId, USHORT nPos )
//-------------------------------------------------------------------
-void BrowseBox::SetColumnMode( USHORT nColumnId, BrowserColumnMode nFlags )
+void BrowseBox::SetColumnMode( sal_uInt16 nColumnId, BrowserColumnMode nFlags )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
@@ -623,7 +623,7 @@ void BrowseBox::SetColumnMode( USHORT nColumnId, BrowserColumnMode nFlags )
//-------------------------------------------------------------------
-void BrowseBox::SetColumnTitle( USHORT nItemId, const String& rTitle )
+void BrowseBox::SetColumnTitle( sal_uInt16 nItemId, const String& rTitle )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
@@ -632,7 +632,7 @@ void BrowseBox::SetColumnTitle( USHORT nItemId, const String& rTitle )
return;
// get the position in the current array
- USHORT nItemPos = GetColumnPos( nItemId );
+ sal_uInt16 nItemPos = GetColumnPos( nItemId );
if ( nItemPos >= pCols->size() )
// not available!
return;
@@ -670,7 +670,7 @@ void BrowseBox::SetColumnTitle( USHORT nItemId, const String& rTitle )
//-------------------------------------------------------------------
-void BrowseBox::SetColumnWidth( USHORT nItemId, ULONG nWidth )
+void BrowseBox::SetColumnWidth( sal_uInt16 nItemId, sal_uLong nWidth )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
@@ -692,7 +692,7 @@ void BrowseBox::SetColumnWidth( USHORT nItemId, ULONG nWidth )
nMaxWidth -= getDataWindow()->bAutoSizeLastCol
? GetFieldRect(nItemId).Left()
: GetFrozenWidth();
- if ( ( (BrowserDataWin*)pDataWin )->bAutoSizeLastCol || nWidth > (ULONG)nMaxWidth )
+ if ( ( (BrowserDataWin*)pDataWin )->bAutoSizeLastCol || nWidth > (sal_uLong)nMaxWidth )
{
nWidth = nMaxWidth > 16 ? nMaxWidth : nOldWidth;
nWidth = QueryColumnResize( nItemId, nWidth );
@@ -703,11 +703,11 @@ void BrowseBox::SetColumnWidth( USHORT nItemId, ULONG nWidth )
// In AutoSizeLastColumn() wird SetColumnWidth mit nWidth==0xffff
// gerufen. Deshalb muss hier nochmal geprueft werden, ob sich die
// Breite tatsaechlich geaendert hat.
- if( (ULONG)nOldWidth == nWidth )
+ if( (sal_uLong)nOldWidth == nWidth )
return;
// soll die Aenderung sofort dargestellt werden?
- BOOL bUpdate = GetUpdateMode() &&
+ sal_Bool bUpdate = GetUpdateMode() &&
( (*pCols)[ nItemPos ]->IsFrozen() || nItemPos >= nFirstCol );
if ( bUpdate )
@@ -727,7 +727,7 @@ void BrowseBox::SetColumnWidth( USHORT nItemId, ULONG nWidth )
{
// X-Pos der veraenderten Spalte ermitteln
long nX = 0;
- for ( USHORT nCol = 0; nCol < nItemPos; ++nCol )
+ for ( sal_uInt16 nCol = 0; nCol < nItemPos; ++nCol )
{
BrowserColumn *pCol = (*pCols)[ nCol ];
if ( pCol->IsFrozen() || nCol >= nFirstCol )
@@ -736,18 +736,18 @@ void BrowseBox::SetColumnWidth( USHORT nItemId, ULONG nWidth )
// eigentliches scroll+invalidate
pDataWin->SetClipRegion();
- BOOL bSelVis = bSelectionIsVisible;
- bSelectionIsVisible = FALSE;
+ sal_Bool bSelVis = bSelectionIsVisible;
+ bSelectionIsVisible = sal_False;
if( GetBackground().IsScrollable() )
{
- Rectangle aScrRect( nX + std::min( (ULONG)nOldWidth, nWidth ), 0,
+ Rectangle aScrRect( nX + std::min( (sal_uLong)nOldWidth, nWidth ), 0,
GetSizePixel().Width() , // the header is longer than the datawin
pDataWin->GetPosPixel().Y() - 1 );
Control::Scroll( nWidth-nOldWidth, 0, aScrRect, SCROLL_FLAGS );
aScrRect.Bottom() = pDataWin->GetSizePixel().Height();
getDataWindow()->Scroll( nWidth-nOldWidth, 0, aScrRect, SCROLL_FLAGS );
- Rectangle aInvRect( nX, 0, nX + std::max( nWidth, (ULONG)nOldWidth ), USHRT_MAX );
+ Rectangle aInvRect( nX, 0, nX + std::max( nWidth, (sal_uLong)nOldWidth ), USHRT_MAX );
Control::Invalidate( aInvRect, INVALIDATE_NOCHILDREN );
( (BrowserDataWin*)pDataWin )->Invalidate( aInvRect );
}
@@ -785,7 +785,7 @@ void BrowseBox::AutoSizeLastColumn()
if ( getDataWindow()->bAutoSizeLastCol &&
getDataWindow()->GetUpdateMode() )
{
- USHORT nId = GetColumnId( (USHORT)pCols->size() - 1 );
+ sal_uInt16 nId = GetColumnId( (sal_uInt16)pCols->size() - 1 );
SetColumnWidth( nId, LONG_MAX );
ColumnResized( nId );
}
@@ -793,12 +793,12 @@ void BrowseBox::AutoSizeLastColumn()
//-------------------------------------------------------------------
-void BrowseBox::RemoveColumn( USHORT nItemId )
+void BrowseBox::RemoveColumn( sal_uInt16 nItemId )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
// Spaltenposition ermitteln
- USHORT nPos = GetColumnPos(nItemId);
+ sal_uInt16 nPos = GetColumnPos(nItemId);
if ( nPos >= ColCount() )
// nicht vorhanden
return;
@@ -892,7 +892,7 @@ void BrowseBox::RemoveColumns()
// Spaltenselektion korrigieren
if ( pColSel )
{
- pColSel->SelectAll(FALSE);
+ pColSel->SelectAll(sal_False);
pColSel->SetTotalRange( Range( 0, 0 ) );
}
@@ -950,11 +950,11 @@ void BrowseBox::RemoveColumns()
//-------------------------------------------------------------------
-String BrowseBox::GetColumnTitle( USHORT nId ) const
+String BrowseBox::GetColumnTitle( sal_uInt16 nId ) const
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
- USHORT nItemPos = GetColumnPos( nId );
+ sal_uInt16 nItemPos = GetColumnPos( nId );
if ( nItemPos >= pCols->size() )
return String();
return (*pCols)[ nItemPos ]->Title();
@@ -969,11 +969,11 @@ long BrowseBox::GetRowCount() const
//-------------------------------------------------------------------
-USHORT BrowseBox::ColCount() const
+sal_uInt16 BrowseBox::ColCount() const
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
- return (USHORT) pCols->size();
+ return (sal_uInt16) pCols->size();
}
//-------------------------------------------------------------------
@@ -1002,7 +1002,7 @@ void BrowseBox::SetDataRowHeight( long nPixel )
//-------------------------------------------------------------------
-void BrowseBox::SetTitleLines( USHORT nLines )
+void BrowseBox::SetTitleLines( sal_uInt16 nLines )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
@@ -1021,9 +1021,9 @@ long BrowseBox::ScrollColumns( long nCols )
// implicitly hides cursor while scrolling
StartScroll();
- bScrolling = TRUE;
- BOOL bScrollable = pDataWin->GetBackground().IsScrollable();
- BOOL bInvalidateView = FALSE;
+ bScrolling = sal_True;
+ sal_Bool bScrollable = pDataWin->GetBackground().IsScrollable();
+ sal_Bool bInvalidateView = sal_False;
// scrolling one column to the right?
if ( nCols == 1 )
@@ -1034,7 +1034,7 @@ long BrowseBox::ScrollColumns( long nCols )
if ( !bScrollable )
{
- bInvalidateView = TRUE;
+ bInvalidateView = sal_True;
}
else
{
@@ -1080,7 +1080,7 @@ long BrowseBox::ScrollColumns( long nCols )
if ( !bScrollable )
{
- bInvalidateView = TRUE;
+ bInvalidateView = sal_True;
}
else
{
@@ -1115,7 +1115,7 @@ long BrowseBox::ScrollColumns( long nCols )
pDataWin->GetSizePixel() ) );
}
- nFirstCol = nFirstCol + (USHORT)nCols;
+ nFirstCol = nFirstCol + (sal_uInt16)nCols;
aHScroll.SetThumbPos( nFirstCol - FrozenColCount() );
}
@@ -1147,7 +1147,7 @@ long BrowseBox::ScrollColumns( long nCols )
getDataWindow()->Update();
Update();
}
- bScrolling = FALSE;
+ bScrolling = sal_False;
EndScroll();
return nCols;
@@ -1171,8 +1171,8 @@ long BrowseBox::ScrollRows( long nRows )
if ( nNewTopRow == nTopRow )
return 0;
- USHORT nVisibleRows =
- (USHORT)(pDataWin->GetOutputSizePixel().Height() / GetDataRowHeight() + 1);
+ sal_uInt16 nVisibleRows =
+ (sal_uInt16)(pDataWin->GetOutputSizePixel().Height() / GetDataRowHeight() + 1);
VisibleRowsChanged(nNewTopRow, nVisibleRows);
@@ -1222,7 +1222,7 @@ long BrowseBox::ScrollPages( long )
//-------------------------------------------------------------------
-void BrowseBox::RowModified( long nRow, USHORT nColId )
+void BrowseBox::RowModified( long nRow, sal_uInt16 nColId )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
@@ -1237,7 +1237,7 @@ void BrowseBox::RowModified( long nRow, USHORT nColId )
else
{
// invalidate the specific field
- aRect = GetFieldRectPixel( nRow, nColId, FALSE );
+ aRect = GetFieldRectPixel( nRow, nColId, sal_False );
}
getDataWindow()->Invalidate( aRect );
}
@@ -1303,7 +1303,7 @@ void BrowseBox::Clear()
}
}
// -----------------------------------------------------------------------------
-void BrowseBox::RowInserted( long nRow, long nNumRows, BOOL bDoPaint, BOOL bKeepSelection )
+void BrowseBox::RowInserted( long nRow, long nNumRows, sal_Bool bDoPaint, sal_Bool bKeepSelection )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
@@ -1316,7 +1316,7 @@ void BrowseBox::RowInserted( long nRow, long nNumRows, BOOL bDoPaint, BOOL bKeep
return;
// adjust total row count
- BOOL bLastRow = nRow >= nRowCount;
+ sal_Bool bLastRow = nRow >= nRowCount;
nRowCount += nNumRows;
DoHideCursor( "RowInserted" );
@@ -1360,9 +1360,9 @@ void BrowseBox::RowInserted( long nRow, long nNumRows, BOOL bDoPaint, BOOL bKeep
// adjust the cursor
if ( nCurRow == BROWSER_ENDOFSELECTION )
- GoToRow( 0, FALSE, bKeepSelection );
+ GoToRow( 0, sal_False, bKeepSelection );
else if ( nRow <= nCurRow )
- GoToRow( nCurRow += nNumRows, FALSE, bKeepSelection );
+ GoToRow( nCurRow += nNumRows, sal_False, bKeepSelection );
// adjust the vertical scrollbar
if ( bDoPaint )
@@ -1409,7 +1409,7 @@ void BrowseBox::RowInserted( long nRow, long nNumRows, BOOL bDoPaint, BOOL bKeep
//-------------------------------------------------------------------
-void BrowseBox::RowRemoved( long nRow, long nNumRows, BOOL bDoPaint )
+void BrowseBox::RowRemoved( long nRow, long nNumRows, sal_Bool bDoPaint )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
@@ -1582,20 +1582,20 @@ void BrowseBox::RowRemoved( long nRow, long nNumRows, BOOL bDoPaint )
//-------------------------------------------------------------------
-BOOL BrowseBox::GoToRow( long nRow)
+sal_Bool BrowseBox::GoToRow( long nRow)
{
- return GoToRow(nRow, FALSE, FALSE);
+ return GoToRow(nRow, sal_False, sal_False);
}
//-------------------------------------------------------------------
-BOOL BrowseBox::GoToRowAndDoNotModifySelection( long nRow )
+sal_Bool BrowseBox::GoToRowAndDoNotModifySelection( long nRow )
{
- return GoToRow( nRow, FALSE, TRUE );
+ return GoToRow( nRow, sal_False, sal_True );
}
//-------------------------------------------------------------------
-BOOL BrowseBox::GoToRow( long nRow, BOOL bRowColMove, BOOL bKeepSelection )
+sal_Bool BrowseBox::GoToRow( long nRow, sal_Bool bRowColMove, sal_Bool bKeepSelection )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
@@ -1603,22 +1603,22 @@ BOOL BrowseBox::GoToRow( long nRow, BOOL bRowColMove, BOOL bKeepSelection )
// nothing to do?
if ( nRow == nCurRow && ( bMultiSelection || uRow.nSel == nRow ) )
- return TRUE;
+ return sal_True;
// out of range?
if ( nRow < 0 || nRow >= nRowCount )
- return FALSE;
+ return sal_False;
// nicht erlaubt?
if ( ( !bRowColMove && !IsCursorMoveAllowed( nRow, nCurColId ) ) )
- return FALSE;
+ return sal_False;
if ( getDataWindow()->bNoScrollBack && nRow < nTopRow )
nRow = nTopRow;
// compute the last visible row
Size aSz( pDataWin->GetSizePixel() );
- USHORT nVisibleRows = USHORT( aSz.Height() / GetDataRowHeight() - 1 );
+ sal_uInt16 nVisibleRows = sal_uInt16( aSz.Height() / GetDataRowHeight() - 1 );
long nLastRow = nTopRow + nVisibleRows;
// suspend Updates
@@ -1630,11 +1630,11 @@ BOOL BrowseBox::GoToRow( long nRow, BOOL bRowColMove, BOOL bKeepSelection )
DoHideCursor( "GoToRow" );
// must we scroll?
- BOOL bWasVisible = bSelectionIsVisible;
+ sal_Bool bWasVisible = bSelectionIsVisible;
if (! bMultiSelection)
{
if( !bKeepSelection )
- bSelectionIsVisible = FALSE;
+ bSelectionIsVisible = sal_False;
}
if ( nRow < nTopRow )
ScrollRows( nRow - nTopRow );
@@ -1676,46 +1676,46 @@ BOOL BrowseBox::GoToRow( long nRow, BOOL bRowColMove, BOOL bKeepSelection )
if ( !bSelecting )
Select();
else
- bSelect = TRUE;
+ bSelect = sal_True;
}
- return TRUE;
+ return sal_True;
}
//-------------------------------------------------------------------
-BOOL BrowseBox::GoToColumnId( USHORT nColId)
+sal_Bool BrowseBox::GoToColumnId( sal_uInt16 nColId)
{
- return GoToColumnId(nColId,TRUE,FALSE);
+ return GoToColumnId(nColId,sal_True,sal_False);
}
-BOOL BrowseBox::GoToColumnId( USHORT nColId, BOOL bMakeVisible, BOOL bRowColMove)
+sal_Bool BrowseBox::GoToColumnId( sal_uInt16 nColId, sal_Bool bMakeVisible, sal_Bool bRowColMove)
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
if (!bColumnCursor)
- return FALSE;
+ return sal_False;
// erlaubt?
if (!bRowColMove && !IsCursorMoveAllowed( nCurRow, nColId ) )
- return FALSE;
+ return sal_False;
- if ( nColId != nCurColId || (bMakeVisible && !IsFieldVisible(nCurRow, nColId, TRUE)))
+ if ( nColId != nCurColId || (bMakeVisible && !IsFieldVisible(nCurRow, nColId, sal_True)))
{
- USHORT nNewPos = GetColumnPos(nColId);
+ sal_uInt16 nNewPos = GetColumnPos(nColId);
BrowserColumn* pColumn = (nNewPos < pCols->size()) ? (*pCols)[ nNewPos ] : NULL;
DBG_ASSERT( pColumn, "no column object - invalid id?" );
if ( !pColumn )
- return FALSE;
+ return sal_False;
DoHideCursor( "GoToColumnId" );
nCurColId = nColId;
- USHORT nFirstPos = nFirstCol;
- USHORT nWidth = (USHORT)pColumn->Width();
- USHORT nLastPos = GetColumnAtXPosPixel(
- pDataWin->GetSizePixel().Width()-nWidth, FALSE );
- USHORT nFrozen = FrozenColCount();
+ sal_uInt16 nFirstPos = nFirstCol;
+ sal_uInt16 nWidth = (sal_uInt16)pColumn->Width();
+ sal_uInt16 nLastPos = GetColumnAtXPosPixel(
+ pDataWin->GetSizePixel().Width()-nWidth, sal_False );
+ sal_uInt16 nFrozen = FrozenColCount();
if ( bMakeVisible && nLastPos &&
nNewPos >= nFrozen && ( nNewPos < nFirstPos || nNewPos > nLastPos ) )
{
@@ -1728,35 +1728,35 @@ BOOL BrowseBox::GoToColumnId( USHORT nColId, BOOL bMakeVisible, BOOL bRowColMove
DoShowCursor( "GoToColumnId" );
if (!bRowColMove)
CursorMoved();
- return TRUE;
+ return sal_True;
}
- return TRUE;
+ return sal_True;
}
//-------------------------------------------------------------------
-BOOL BrowseBox::GoToRowColumnId( long nRow, USHORT nColId )
+sal_Bool BrowseBox::GoToRowColumnId( long nRow, sal_uInt16 nColId )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
// out of range?
if ( nRow < 0 || nRow >= nRowCount )
- return FALSE;
+ return sal_False;
if (!bColumnCursor)
- return FALSE;
+ return sal_False;
// nothing to do ?
if ( nRow == nCurRow && ( bMultiSelection || uRow.nSel == nRow ) &&
- nColId == nCurColId && IsFieldVisible(nCurRow, nColId, TRUE))
- return TRUE;
+ nColId == nCurColId && IsFieldVisible(nCurRow, nColId, sal_True))
+ return sal_True;
// erlaubt?
if (!IsCursorMoveAllowed(nRow, nColId))
- return FALSE;
+ return sal_False;
DoHideCursor( "GoToRowColumnId" );
- BOOL bMoved = GoToRow(nRow, TRUE) && GoToColumnId(nColId, TRUE, TRUE);
+ sal_Bool bMoved = GoToRow(nRow, sal_True) && GoToColumnId(nColId, sal_True, sal_True);
DoShowCursor( "GoToRowColumnId" );
if (bMoved)
@@ -1783,15 +1783,15 @@ void BrowseBox::SetNoSelection()
// unselect all
if ( bMultiSelection )
- uRow.pSel->SelectAll(FALSE);
+ uRow.pSel->SelectAll(sal_False);
else
uRow.nSel = BROWSER_ENDOFSELECTION;
if ( pColSel )
- pColSel->SelectAll(FALSE);
+ pColSel->SelectAll(sal_False);
if ( !bSelecting )
Select();
else
- bSelect = TRUE;
+ bSelect = sal_True;
// restore screen
OSL_TRACE( "BrowseBox: %p->ShowCursor", this );
@@ -1827,7 +1827,7 @@ void BrowseBox::SetSelection( const MultiSelection &rSel )
if ( !bSelecting )
Select();
else
- bSelect = TRUE;
+ bSelect = sal_True;
// restore screen
ToggleSelection();
@@ -1857,8 +1857,8 @@ void BrowseBox::SelectAll()
// select all rows
if ( pColSel )
- pColSel->SelectAll(FALSE);
- uRow.pSel->SelectAll(TRUE);
+ pColSel->SelectAll(sal_False);
+ uRow.pSel->SelectAll(sal_True);
// Handle-Column nicht highlighten
BrowserColumn *pFirstCol = (*pCols)[ 0 ];
@@ -1868,8 +1868,8 @@ void BrowseBox::SelectAll()
if ( !bHideSelect )
{
Rectangle aHighlightRect;
- USHORT nVisibleRows =
- (USHORT)(pDataWin->GetOutputSizePixel().Height() / GetDataRowHeight() + 1);
+ sal_uInt16 nVisibleRows =
+ (sal_uInt16)(pDataWin->GetOutputSizePixel().Height() / GetDataRowHeight() + 1);
for ( long nRow = Max( nTopRow, uRow.pSel->FirstSelected() );
nRow != BROWSER_ENDOFSELECTION && nRow < nTopRow + nVisibleRows;
nRow = uRow.pSel->NextSelected() )
@@ -1882,7 +1882,7 @@ void BrowseBox::SelectAll()
if ( !bSelecting )
Select();
else
- bSelect = TRUE;
+ bSelect = sal_True;
// restore screen
OSL_TRACE( "BrowseBox: %p->ShowCursor", this );
@@ -1912,7 +1912,7 @@ void BrowseBox::SelectAll()
//-------------------------------------------------------------------
-void BrowseBox::SelectRow( long nRow, BOOL _bSelect, BOOL bExpand )
+void BrowseBox::SelectRow( long nRow, sal_Bool _bSelect, sal_Bool bExpand )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
@@ -1920,7 +1920,7 @@ void BrowseBox::SelectRow( long nRow, BOOL _bSelect, BOOL bExpand )
{
// deselecting is impossible, selecting via cursor
if ( _bSelect )
- GoToRow(nRow, FALSE);
+ GoToRow(nRow, sal_False);
return;
}
@@ -1931,11 +1931,11 @@ void BrowseBox::SelectRow( long nRow, BOOL _bSelect, BOOL bExpand )
{
ToggleSelection();
if ( bMultiSelection )
- uRow.pSel->SelectAll(FALSE);
+ uRow.pSel->SelectAll(sal_False);
else
uRow.nSel = BROWSER_ENDOFSELECTION;
if ( pColSel )
- pColSel->SelectAll(FALSE);
+ pColSel->SelectAll(sal_False);
}
// set new selection
@@ -1963,7 +1963,7 @@ void BrowseBox::SelectRow( long nRow, BOOL _bSelect, BOOL bExpand )
if ( !bSelecting )
Select();
else
- bSelect = TRUE;
+ bSelect = sal_True;
// restore screen
OSL_TRACE( "BrowseBox: %p->ShowCursor", this );
@@ -1996,7 +1996,7 @@ long BrowseBox::GetSelectRowCount() const
//-------------------------------------------------------------------
-void BrowseBox::SelectColumnPos( USHORT nNewColPos, BOOL _bSelect, BOOL bMakeVisible )
+void BrowseBox::SelectColumnPos( sal_uInt16 nNewColPos, sal_Bool _bSelect, sal_Bool bMakeVisible )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
@@ -2018,10 +2018,10 @@ void BrowseBox::SelectColumnPos( USHORT nNewColPos, BOOL _bSelect, BOOL bMakeVis
OSL_TRACE( "BrowseBox: %p->HideCursor", this );
ToggleSelection();
if ( bMultiSelection )
- uRow.pSel->SelectAll(FALSE);
+ uRow.pSel->SelectAll(sal_False);
else
uRow.nSel = BROWSER_ENDOFSELECTION;
- pColSel->SelectAll(FALSE);
+ pColSel->SelectAll(sal_False);
if ( pColSel->Select( nNewColPos, _bSelect ) )
{
@@ -2029,7 +2029,7 @@ void BrowseBox::SelectColumnPos( USHORT nNewColPos, BOOL _bSelect, BOOL bMakeVis
// only highlight painted areas
pDataWin->Update();
- Rectangle aFieldRectPix( GetFieldRectPixel( nCurRow, nCurColId, FALSE ) );
+ Rectangle aFieldRectPix( GetFieldRectPixel( nCurRow, nCurColId, sal_False ) );
Rectangle aRect(
Point( aFieldRectPix.Left() - MIN_COLUMNWIDTH, 0 ),
Size( (*pCols)[ nNewColPos ]->Width(),
@@ -2038,7 +2038,7 @@ void BrowseBox::SelectColumnPos( USHORT nNewColPos, BOOL _bSelect, BOOL bMakeVis
if ( !bSelecting )
Select();
else
- bSelect = TRUE;
+ bSelect = sal_True;
if ( isAccessibleAlive() )
{
@@ -2062,12 +2062,12 @@ void BrowseBox::SelectColumnPos( USHORT nNewColPos, BOOL _bSelect, BOOL bMakeVis
//-------------------------------------------------------------------
-USHORT BrowseBox::GetSelectColumnCount() const
+sal_uInt16 BrowseBox::GetSelectColumnCount() const
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
// while bAutoSelect (==!pColSel), 1 if any rows (yes rows!) else none
- return pColSel ? (USHORT) pColSel->GetSelectCount() :
+ return pColSel ? (sal_uInt16) pColSel->GetSelectCount() :
nCurRow >= 0 ? 1 : 0;
}
@@ -2085,7 +2085,7 @@ long BrowseBox::NextSelectedColumn( ) const
//-------------------------------------------------------------------
-long BrowseBox::FirstSelectedRow( BOOL bInverse )
+long BrowseBox::FirstSelectedRow( sal_Bool bInverse )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
@@ -2130,7 +2130,7 @@ bool BrowseBox::IsRowSelected( long nRow ) const
//-------------------------------------------------------------------
-bool BrowseBox::IsColumnSelected( USHORT nColumnId ) const
+bool BrowseBox::IsColumnSelected( sal_uInt16 nColumnId ) const
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
@@ -2149,11 +2149,11 @@ sal_Bool BrowseBox::IsAllSelected() const
//-------------------------------------------------------------------
-BOOL BrowseBox::MakeFieldVisible
+sal_Bool BrowseBox::MakeFieldVisible
(
long nRow, // Zeilen-Nr des Feldes (beginnend mit 0)
- USHORT nColId, // Spalten-Id des Feldes
- BOOL bComplete // (== FALSE), TRUE => vollst"andig sichtbar machen
+ sal_uInt16 nColId, // Spalten-Id des Feldes
+ sal_Bool bComplete // (== sal_False), sal_True => vollst"andig sichtbar machen
)
/* [Beschreibung]
@@ -2164,11 +2164,11 @@ BOOL BrowseBox::MakeFieldVisible
[R"uckgabewert]
- BOOL TRUE
+ sal_Bool sal_True
Das angegebene Feld wurde sichtbar gemacht, bzw. war
bereits sichtbar.
- FALSE
+ sal_False
Das angegebene Feld konnte nicht sichtbar bzw. bei
'bComplete' nicht vollst"andig sichtbar gemacht werden.
*/
@@ -2178,16 +2178,16 @@ BOOL BrowseBox::MakeFieldVisible
if ( !bBootstrapped ||
( aTestSize.Width() == 0 && aTestSize.Height() == 0 ) )
- return FALSE;
+ return sal_False;
// ist es schon sichtbar?
- BOOL bVisible = IsFieldVisible( nRow, nColId, bComplete );
+ sal_Bool bVisible = IsFieldVisible( nRow, nColId, bComplete );
if ( bVisible )
- return TRUE;
+ return sal_True;
// Spaltenposition und Feld-Rechteck und Ausgabebereich berechnen
- USHORT nColPos = GetColumnPos( nColId );
- Rectangle aFieldRect = GetFieldRectPixel( nRow, nColId, FALSE );
+ sal_uInt16 nColPos = GetColumnPos( nColId );
+ Rectangle aFieldRect = GetFieldRectPixel( nRow, nColId, sal_False );
Rectangle aDataRect = Rectangle( Point(0, 0), pDataWin->GetSizePixel() );
// links au\serhalb?
@@ -2204,7 +2204,7 @@ BOOL BrowseBox::MakeFieldVisible
if ( ScrollColumns( 1 ) != 1 )
// nichts mehr zu scrollen
break;
- aFieldRect = GetFieldRectPixel( nRow, nColId, FALSE );
+ aFieldRect = GetFieldRectPixel( nRow, nColId, sal_False );
}
// oben au\serhalb?
@@ -2230,19 +2230,19 @@ BOOL BrowseBox::MakeFieldVisible
//-------------------------------------------------------------------
-BOOL BrowseBox::IsFieldVisible( long nRow, USHORT nColumnId,
- BOOL bCompletely ) const
+sal_Bool BrowseBox::IsFieldVisible( long nRow, sal_uInt16 nColumnId,
+ sal_Bool bCompletely ) const
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
// durch frozen-Column verdeckt?
- USHORT nColPos = GetColumnPos( nColumnId );
+ sal_uInt16 nColPos = GetColumnPos( nColumnId );
if ( nColPos >= FrozenColCount() && nColPos < nFirstCol )
- return FALSE;
+ return sal_False;
Rectangle aRect( ImplFieldRectPixel( nRow, nColumnId ) );
if ( aRect.IsEmpty() )
- return FALSE;
+ return sal_False;
// get the visible area
Rectangle aOutRect( Point(0, 0), pDataWin->GetOutputSizePixel() );
@@ -2257,8 +2257,8 @@ BOOL BrowseBox::IsFieldVisible( long nRow, USHORT nColumnId,
//-------------------------------------------------------------------
-Rectangle BrowseBox::GetFieldRectPixel( long nRow, USHORT nColumnId,
- BOOL bRelToBrowser) const
+Rectangle BrowseBox::GetFieldRectPixel( long nRow, sal_uInt16 nColumnId,
+ sal_Bool bRelToBrowser) const
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
@@ -2280,7 +2280,7 @@ Rectangle BrowseBox::GetFieldRectPixel( long nRow, USHORT nColumnId,
//-------------------------------------------------------------------
-Rectangle BrowseBox::GetRowRectPixel( long nRow, BOOL bRelToBrowser ) const
+Rectangle BrowseBox::GetRowRectPixel( long nRow, sal_Bool bRelToBrowser ) const
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
@@ -2309,13 +2309,13 @@ Rectangle BrowseBox::GetRowRectPixel( long nRow, BOOL bRelToBrowser ) const
//-------------------------------------------------------------------
-Rectangle BrowseBox::ImplFieldRectPixel( long nRow, USHORT nColumnId ) const
+Rectangle BrowseBox::ImplFieldRectPixel( long nRow, sal_uInt16 nColumnId ) const
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
// compute the X-coordinte realtiv to DataWin by accumulation
long nColX = 0;
- USHORT nFrozenCols = FrozenColCount();
+ sal_uInt16 nFrozenCols = FrozenColCount();
size_t nCol;
for ( nCol = 0;
nCol < pCols->size() && (*pCols)[ nCol ]->GetId() != nColumnId;
@@ -2340,7 +2340,7 @@ Rectangle BrowseBox::ImplFieldRectPixel( long nRow, USHORT nColumnId ) const
//-------------------------------------------------------------------
-long BrowseBox::GetRowAtYPosPixel( long nY, BOOL bRelToBrowser ) const
+long BrowseBox::GetRowAtYPosPixel( long nY, sal_Bool bRelToBrowser ) const
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
@@ -2361,7 +2361,7 @@ long BrowseBox::GetRowAtYPosPixel( long nY, BOOL bRelToBrowser ) const
//-------------------------------------------------------------------
-Rectangle BrowseBox::GetFieldRect( USHORT nColumnId ) const
+Rectangle BrowseBox::GetFieldRect( sal_uInt16 nColumnId ) const
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
@@ -2370,7 +2370,7 @@ Rectangle BrowseBox::GetFieldRect( USHORT nColumnId ) const
//-------------------------------------------------------------------
-USHORT BrowseBox::GetColumnAtXPosPixel( long nX, BOOL ) const
+sal_uInt16 BrowseBox::GetColumnAtXPosPixel( long nX, sal_Bool ) const
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
@@ -2391,7 +2391,7 @@ USHORT BrowseBox::GetColumnAtXPosPixel( long nX, BOOL ) const
//-------------------------------------------------------------------
-void BrowseBox::ReserveControlArea( USHORT nWidth )
+void BrowseBox::ReserveControlArea( sal_uInt16 nWidth )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
@@ -2431,9 +2431,9 @@ void BrowseBox::SetMode( BrowserMode nMode )
DBG_ASSERT( !( getDataWindow()->bAutoVScroll && getDataWindow()->bNoVScroll ),
"BrowseBox::SetMode: AutoVScroll *and* NoVScroll?" );
if ( getDataWindow()->bAutoHScroll )
- getDataWindow()->bNoHScroll = FALSE;
+ getDataWindow()->bNoHScroll = sal_False;
if ( getDataWindow()->bAutoVScroll )
- getDataWindow()->bNoVScroll = FALSE;
+ getDataWindow()->bNoVScroll = sal_False;
if ( getDataWindow()->bNoHScroll )
aHScroll.Hide();
@@ -2547,40 +2547,40 @@ void BrowseBox::SetMode( BrowserMode nMode )
//-------------------------------------------------------------------
-void BrowseBox::VisibleRowsChanged( long, USHORT )
+void BrowseBox::VisibleRowsChanged( long, sal_uInt16 )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
// Das alte Verhalten: NumRows automatisch korrigieren:
if ( nRowCount < GetRowCount() )
{
- RowInserted(nRowCount,GetRowCount() - nRowCount,FALSE);
+ RowInserted(nRowCount,GetRowCount() - nRowCount,sal_False);
}
else if ( nRowCount > GetRowCount() )
{
- RowRemoved(nRowCount-(nRowCount - GetRowCount()),nRowCount - GetRowCount(),FALSE);
+ RowRemoved(nRowCount-(nRowCount - GetRowCount()),nRowCount - GetRowCount(),sal_False);
}
}
//-------------------------------------------------------------------
-sal_Bool BrowseBox::IsCursorMoveAllowed( long, USHORT ) const
+sal_Bool BrowseBox::IsCursorMoveAllowed( long, sal_uInt16 ) const
/* [Beschreibung]
Diese virtuelle Methode wird immer gerufen bevor der Cursor direkt
- bewegt werden soll. Durch 'return FALSE' kann verhindert werden, da\s
+ bewegt werden soll. Durch 'return sal_False' kann verhindert werden, da\s
dies geschieht, wenn z.B. ein Datensatz irgendwelchen Rules widerspricht.
Diese Methode wird nicht gerufen, wenn die Cursorbewegung durch
ein L"oschen oder Einf"ugen (einer Zeile/Spalte) ausgel"ost wird, also
genaugenommen nur eine Cursor-Korrektur vorliegt.
- Die Basisimplementierung liefert derzeit immer TRUE.
+ Die Basisimplementierung liefert derzeit immer sal_True.
*/
{
- return TRUE;
+ return sal_True;
}
//-------------------------------------------------------------------
@@ -2698,10 +2698,10 @@ void BrowseBox::LoseFocus()
if ( !bKeepHighlight )
{
ToggleSelection();
- bSelectionIsVisible = FALSE;
+ bSelectionIsVisible = sal_False;
}
- bHasFocus = FALSE;
+ bHasFocus = sal_False;
}
Control::LoseFocus();
}
@@ -2717,12 +2717,12 @@ void BrowseBox::GetFocus()
{
if ( !bSelectionIsVisible )
{
- bSelectionIsVisible = TRUE;
+ bSelectionIsVisible = sal_True;
if ( bBootstrapped )
ToggleSelection();
}
- bHasFocus = TRUE;
+ bHasFocus = sal_True;
DoShowCursor( "GetFocus" );
}
Control::GetFocus();
diff --git a/svtools/source/brwbox/brwbox2.cxx b/svtools/source/brwbox/brwbox2.cxx
index c4dcc4d9d74b..9c9796baa90b 100644
--- a/svtools/source/brwbox/brwbox2.cxx
+++ b/svtools/source/brwbox/brwbox2.cxx
@@ -174,7 +174,7 @@ void BrowseBox::StateChanged( StateChangedType nStateChange )
}
else if ( STATE_CHANGE_INITSHOW == nStateChange )
{
- bBootstrapped = TRUE; // muss zuerst gesetzt werden!
+ bBootstrapped = sal_True; // muss zuerst gesetzt werden!
Resize();
if ( bMultiSelection )
@@ -187,8 +187,8 @@ void BrowseBox::StateChanged( StateChangedType nStateChange )
if ( HasFocus() )
{
- bSelectionIsVisible = TRUE;
- bHasFocus = TRUE;
+ bSelectionIsVisible = sal_True;
+ bHasFocus = sal_True;
}
UpdateScrollbars();
AutoSizeLastColumn();
@@ -282,7 +282,7 @@ void BrowseBox::RowHeightChanged()
//-------------------------------------------------------------------
-long BrowseBox::QueryColumnResize( USHORT, long nWidth )
+long BrowseBox::QueryColumnResize( sal_uInt16, long nWidth )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
return nWidth;
@@ -290,14 +290,14 @@ long BrowseBox::QueryColumnResize( USHORT, long nWidth )
//-------------------------------------------------------------------
-void BrowseBox::ColumnResized( USHORT )
+void BrowseBox::ColumnResized( sal_uInt16 )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
}
//-------------------------------------------------------------------
-void BrowseBox::ColumnMoved( USHORT )
+void BrowseBox::ColumnMoved( sal_uInt16 )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
}
@@ -326,7 +326,7 @@ void BrowseBox::EndScroll()
#pragma optimize( "", off )
#endif
-void BrowseBox::ToggleSelection( BOOL bForce )
+void BrowseBox::ToggleSelection( sal_Bool bForce )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
@@ -338,8 +338,8 @@ void BrowseBox::ToggleSelection( BOOL bForce )
return;
// only highlight painted areas!
- bNotToggleSel = TRUE;
- if ( FALSE && !getDataWindow()->bInPaint )
+ bNotToggleSel = sal_True;
+ if ( sal_False && !getDataWindow()->bInPaint )
pDataWin->Update();
// accumulate areas of rows to highlight
@@ -388,7 +388,7 @@ void BrowseBox::ToggleSelection( BOOL bForce )
{
Rectangle aRect( GetFieldRectPixel(nCurRow,
(*pCols)[ nColId ]->GetId(),
- FALSE ) );
+ sal_False ) );
aRect.Left() -= MIN_COLUMNWIDTH;
aRect.Right() += MIN_COLUMNWIDTH;
aRect.Top() = 0;
@@ -396,7 +396,7 @@ void BrowseBox::ToggleSelection( BOOL bForce )
pDataWin->Invalidate( aRect );
}
- bNotToggleSel = FALSE;
+ bNotToggleSel = sal_False;
}
#ifdef _MSC_VER
@@ -407,15 +407,15 @@ void BrowseBox::ToggleSelection( BOOL bForce )
void BrowseBox::DrawCursor()
{
- BOOL bReallyHide = FALSE;
+ sal_Bool bReallyHide = sal_False;
if ( SMART_CURSOR_HIDE == bHideCursor )
{
if ( !GetSelectRowCount() && !GetSelectColumnCount() )
- bReallyHide = TRUE;
+ bReallyHide = sal_True;
}
else if ( HARD_CURSOR_HIDE == bHideCursor )
{
- bReallyHide = TRUE;
+ bReallyHide = sal_True;
}
bReallyHide |= !bSelectionIsVisible || !IsUpdateMode() || bScrolling || nCurRow < 0;
@@ -433,7 +433,7 @@ void BrowseBox::DrawCursor()
Rectangle aCursor;
if ( bColumnCursor )
{
- aCursor = GetFieldRectPixel( nCurRow, nCurColId, FALSE );
+ aCursor = GetFieldRectPixel( nCurRow, nCurColId, sal_False );
aCursor.Left() -= MIN_COLUMNWIDTH;
aCursor.Right() += 1;
aCursor.Bottom() += 1;
@@ -475,11 +475,11 @@ void BrowseBox::DrawCursor()
//-------------------------------------------------------------------
-ULONG BrowseBox::GetColumnWidth( USHORT nId ) const
+sal_uLong BrowseBox::GetColumnWidth( sal_uInt16 nId ) const
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
- USHORT nItemPos = GetColumnPos( nId );
+ sal_uInt16 nItemPos = GetColumnPos( nId );
if ( nItemPos >= pCols->size() )
return 0;
return (*pCols)[ nItemPos ]->Width();
@@ -487,7 +487,7 @@ ULONG BrowseBox::GetColumnWidth( USHORT nId ) const
//-------------------------------------------------------------------
-USHORT BrowseBox::GetColumnId( USHORT nPos ) const
+sal_uInt16 BrowseBox::GetColumnId( sal_uInt16 nPos ) const
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
@@ -498,11 +498,11 @@ USHORT BrowseBox::GetColumnId( USHORT nPos ) const
//-------------------------------------------------------------------
-USHORT BrowseBox::GetColumnPos( USHORT nId ) const
+sal_uInt16 BrowseBox::GetColumnPos( sal_uInt16 nId ) const
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
- for ( USHORT nPos = 0; nPos < pCols->size(); ++nPos )
+ for ( sal_uInt16 nPos = 0; nPos < pCols->size(); ++nPos )
if ( (*pCols)[ nPos ]->GetId() == nId )
return nPos;
return BROWSER_INVALIDID;
@@ -510,14 +510,14 @@ USHORT BrowseBox::GetColumnPos( USHORT nId ) const
//-------------------------------------------------------------------
-BOOL BrowseBox::IsFrozen( USHORT nColumnId ) const
+sal_Bool BrowseBox::IsFrozen( sal_uInt16 nColumnId ) const
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
for ( size_t nPos = 0; nPos < pCols->size(); ++nPos )
if ( (*pCols)[ nPos ]->GetId() == nColumnId )
return (*pCols)[ nPos ]->IsFrozen();
- return FALSE;
+ return sal_False;
}
//-------------------------------------------------------------------
@@ -534,34 +534,34 @@ void BrowseBox::ExpandRowSelection( const BrowserMouseEvent& rEvt )
Range aJustifiedRange( aSelRange );
aJustifiedRange.Justify();
- BOOL bSelectThis = ( bSelect != aJustifiedRange.IsInside( rEvt.GetRow() ) );
+ sal_Bool bSelectThis = ( bSelect != aJustifiedRange.IsInside( rEvt.GetRow() ) );
if ( aJustifiedRange.IsInside( rEvt.GetRow() ) )
{
// down and up
while ( rEvt.GetRow() < aSelRange.Max() )
{ // ZTC/Mac bug - dont put these statemants together!
- SelectRow( aSelRange.Max(), bSelectThis, TRUE );
+ SelectRow( aSelRange.Max(), bSelectThis, sal_True );
--aSelRange.Max();
}
while ( rEvt.GetRow() > aSelRange.Max() )
{ // ZTC/Mac bug - dont put these statemants together!
- SelectRow( aSelRange.Max(), bSelectThis, TRUE );
+ SelectRow( aSelRange.Max(), bSelectThis, sal_True );
++aSelRange.Max();
}
}
else
{
// up and down
- BOOL bOldSelecting = bSelecting;
- bSelecting = TRUE;
+ sal_Bool bOldSelecting = bSelecting;
+ bSelecting = sal_True;
while ( rEvt.GetRow() < aSelRange.Max() )
{ // ZTC/Mac bug - dont put these statemants together!
--aSelRange.Max();
if ( !IsRowSelected( aSelRange.Max() ) )
{
- SelectRow( aSelRange.Max(), bSelectThis, TRUE );
- bSelect = TRUE;
+ SelectRow( aSelRange.Max(), bSelectThis, sal_True );
+ bSelect = sal_True;
}
}
while ( rEvt.GetRow() > aSelRange.Max() )
@@ -569,8 +569,8 @@ void BrowseBox::ExpandRowSelection( const BrowserMouseEvent& rEvt )
++aSelRange.Max();
if ( !IsRowSelected( aSelRange.Max() ) )
{
- SelectRow( aSelRange.Max(), bSelectThis, TRUE );
- bSelect = TRUE;
+ SelectRow( aSelRange.Max(), bSelectThis, sal_True );
+ bSelect = sal_True;
}
}
bSelecting = bOldSelecting;
@@ -580,9 +580,9 @@ void BrowseBox::ExpandRowSelection( const BrowserMouseEvent& rEvt )
}
else
if ( !bMultiSelection || !IsRowSelected( rEvt.GetRow() ) )
- SelectRow( rEvt.GetRow(), TRUE );
+ SelectRow( rEvt.GetRow(), sal_True );
- GoToRow( rEvt.GetRow(), FALSE );
+ GoToRow( rEvt.GetRow(), sal_False );
DoShowCursor( "ExpandRowSelection" );
}
@@ -595,21 +595,21 @@ void BrowseBox::Resize()
BrowseBox::StateChanged( STATE_CHANGE_INITSHOW );
if ( pCols->empty() )
{
- getDataWindow()->bResizeOnPaint = TRUE;
+ getDataWindow()->bResizeOnPaint = sal_True;
return;
}
- getDataWindow()->bResizeOnPaint = FALSE;
+ getDataWindow()->bResizeOnPaint = sal_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
// resized - which is done in UpdateScrollbars)
- ULONG nSBSize = GetSettings().GetStyleSettings().GetScrollBarSize();
+ sal_uLong nSBSize = GetSettings().GetStyleSettings().GetScrollBarSize();
if (IsZoom())
- nSBSize = (ULONG)(nSBSize * (double)GetZoom());
+ nSBSize = (sal_uLong)(nSBSize * (double)GetZoom());
DoHideCursor( "Resize" );
- USHORT nOldVisibleRows =
- (USHORT)(pDataWin->GetOutputSizePixel().Height() / GetDataRowHeight() + 1);
+ sal_uInt16 nOldVisibleRows =
+ (sal_uInt16)(pDataWin->GetOutputSizePixel().Height() / GetDataRowHeight() + 1);
// did we need a horiz. scroll bar oder gibt es eine Control Area?
if ( !getDataWindow()->bNoHScroll &&
@@ -632,8 +632,8 @@ void BrowseBox::Resize()
Point( 0, GetTitleHeight() ),
Size( nDataWidth, nDataHeight ) );
- USHORT nVisibleRows =
- (USHORT)(pDataWin->GetOutputSizePixel().Height() / GetDataRowHeight() + 1);
+ sal_uInt16 nVisibleRows =
+ (sal_uInt16)(pDataWin->GetOutputSizePixel().Height() / GetDataRowHeight() + 1);
// TopRow ist unveraendert, aber die Anzahl sichtbarer Zeilen hat sich
// geaendert
@@ -675,8 +675,8 @@ void BrowseBox::Paint( const Rectangle& rRect )
return;
BrowserColumn *pFirstCol = (*pCols)[ 0 ];
- BOOL bHandleCol = pFirstCol && pFirstCol->GetId() == 0;
- BOOL bHeaderBar = getDataWindow()->pHeaderBar != NULL;
+ sal_Bool bHandleCol = pFirstCol && pFirstCol->GetId() == 0;
+ sal_Bool bHeaderBar = getDataWindow()->pHeaderBar != NULL;
// draw delimitational lines
if ( !getDataWindow()->bNoHScroll )
@@ -723,7 +723,7 @@ void BrowseBox::Paint( const Rectangle& rRect )
{
ButtonFrame aButtonFrame( Point( nX, 0 ),
Size( pCol->Width()-1, GetTitleHeight()-1 ),
- pCol->Title(), FALSE, FALSE,
+ pCol->Title(), sal_False, sal_False,
0 != (BROWSER_COLUMN_TITLEABBREVATION&pCol->Flags()),
!IsEnabled());
aButtonFrame.Draw( *this );
@@ -768,9 +768,9 @@ void BrowseBox::PaintRow( OutputDevice&, const Rectangle& )
//-------------------------------------------------------------------
-void BrowseBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, ULONG nFlags )
+void BrowseBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags )
{
- BOOL bDrawSelection = (nFlags & WINDOW_DRAW_NOSELECTION) == 0;
+ sal_Bool bDrawSelection = (nFlags & WINDOW_DRAW_NOSELECTION) == 0;
// we need pixel coordinates
Size aRealSize = pDev->LogicToPixel(rSize);
@@ -859,7 +859,7 @@ void BrowseBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
{
ButtonFrame aButtonFrame( aRealPos,
Size( pFirstCol->Width()-1, nTitleHeight-1 ),
- pFirstCol->Title(), FALSE, FALSE, FALSE, !IsEnabled());
+ pFirstCol->Title(), sal_False, sal_False, sal_False, !IsEnabled());
aButtonFrame.Draw( *pDev );
pDev->Push( PUSH_LINECOLOR );
@@ -882,7 +882,7 @@ void BrowseBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
pDev->SetClipRegion( pDev->PixelToLogic( aRegion ) );
// do we have to paint the background
- BOOL bBackground = !(nFlags & WINDOW_DRAW_NOBACKGROUND) && GetDataWindow().IsControlBackground();
+ sal_Bool bBackground = !(nFlags & WINDOW_DRAW_NOBACKGROUND) && GetDataWindow().IsControlBackground();
if ( bBackground )
{
Rectangle aRect( aRealPos, aRealSize );
@@ -890,7 +890,7 @@ void BrowseBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
pDev->DrawRect( aRect );
}
- ImplPaintData( *pDev, Rectangle( aRealPos, aRealSize ), TRUE, bDrawSelection );
+ ImplPaintData( *pDev, Rectangle( aRealPos, aRealSize ), sal_True, bDrawSelection );
// restore the column widths/data row height
nDataRowHeight = nOriginalHeight;
@@ -911,7 +911,7 @@ void BrowseBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
//-------------------------------------------------------------------
-void BrowseBox::ImplPaintData(OutputDevice& _rOut, const Rectangle& _rRect, BOOL _bForeignDevice, BOOL _bDrawSelections)
+void BrowseBox::ImplPaintData(OutputDevice& _rOut, const Rectangle& _rRect, sal_Bool _bForeignDevice, sal_Bool _bDrawSelections)
{
Point aOverallAreaPos = _bForeignDevice ? _rRect.TopLeft() : Point(0,0);
Size aOverallAreaSize = _bForeignDevice ? _rRect.GetSize() : GetDataWindow().GetOutputSizePixel();
@@ -920,8 +920,8 @@ void BrowseBox::ImplPaintData(OutputDevice& _rOut, const Rectangle& _rRect, BOOL
long nDataRowHeigt = GetDataRowHeight();
// compute relative rows to redraw
- ULONG nRelTopRow = _bForeignDevice ? 0 : ((ULONG)_rRect.Top() / nDataRowHeigt);
- ULONG nRelBottomRow = (ULONG)(_bForeignDevice ? aOverallAreaSize.Height() : _rRect.Bottom()) / nDataRowHeigt;
+ sal_uLong nRelTopRow = _bForeignDevice ? 0 : ((sal_uLong)_rRect.Top() / nDataRowHeigt);
+ sal_uLong nRelBottomRow = (sal_uLong)(_bForeignDevice ? aOverallAreaSize.Height() : _rRect.Bottom()) / nDataRowHeigt;
// cache frequently used values
Point aPos( aOverallAreaPos.X(), nRelTopRow * nDataRowHeigt + aOverallAreaPos.Y() );
@@ -939,18 +939,18 @@ void BrowseBox::ImplPaintData(OutputDevice& _rOut, const Rectangle& _rRect, BOOL
Color aDelimiterLineColor( ::svtools::ColorConfig().GetColorValue( ::svtools::CALCGRID ).nColor );
// redraw the invalid fields
- for ( ULONG nRelRow = nRelTopRow;
- nRelRow <= nRelBottomRow && (ULONG)nTopRow+nRelRow < (ULONG)nRowCount;
+ for ( sal_uLong nRelRow = nRelTopRow;
+ nRelRow <= nRelBottomRow && (sal_uLong)nTopRow+nRelRow < (sal_uLong)nRowCount;
++nRelRow, aPos.Y() += nDataRowHeigt )
{
// get row
// Zur Sicherheit auf zul"assigen Bereich abfragen:
- DBG_ASSERT( (USHORT)(nTopRow+nRelRow) < nRowCount, "BrowseBox::ImplPaintData: invalid seek" );
- if ( (nTopRow+long(nRelRow)) < 0 || (USHORT)(nTopRow+nRelRow) >= nRowCount )
+ DBG_ASSERT( (sal_uInt16)(nTopRow+nRelRow) < nRowCount, "BrowseBox::ImplPaintData: invalid seek" );
+ if ( (nTopRow+long(nRelRow)) < 0 || (sal_uInt16)(nTopRow+nRelRow) >= nRowCount )
continue;
// prepare row
- ULONG nRow = nTopRow+nRelRow;
+ sal_uLong nRow = nTopRow+nRelRow;
if ( !SeekRow( nRow) ) {
OSL_FAIL("BrowseBox::ImplPaintData: SeekRow gescheitert");
}
@@ -964,7 +964,7 @@ void BrowseBox::ImplPaintData(OutputDevice& _rOut, const Rectangle& _rRect, BOOL
Size( _rRect.GetSize().Width(), nDataRowHeigt ) );
PaintRow( _rOut, aRowRect );
- BOOL bRowSelected = _bDrawSelections
+ sal_Bool bRowSelected = _bDrawSelections
&& !bHideSelect
&& IsRowSelected( nRow );
if ( bRowSelected )
@@ -1000,7 +1000,7 @@ void BrowseBox::ImplPaintData(OutputDevice& _rOut, const Rectangle& _rRect, BOOL
}
// prepare Column-AutoHighlight
- BOOL bColAutoHighlight = _bDrawSelections
+ sal_Bool bColAutoHighlight = _bDrawSelections
&& bColumnCursor
&& IsColumnSelected( pCol->GetId() );
if ( bColAutoHighlight )
@@ -1014,7 +1014,7 @@ void BrowseBox::ImplPaintData(OutputDevice& _rOut, const Rectangle& _rRect, BOOL
_rOut.DrawRect( aFieldRect );
}
- if (!m_bFocusOnlyCursor && (pCol->GetId() == GetCurColumnId()) && (nRow == (ULONG)GetCurRow()))
+ if (!m_bFocusOnlyCursor && (pCol->GetId() == GetCurColumnId()) && (nRow == (sal_uLong)GetCurRow()))
DrawCursor();
// draw a single field
@@ -1040,7 +1040,7 @@ void BrowseBox::ImplPaintData(OutputDevice& _rOut, const Rectangle& _rRect, BOOL
Region aClipToField(Rectangle(aPos, aFieldSize));
_rOut.SetClipRegion(aClipToField);
}
- pCol->Draw( *this, _rOut, aPos, FALSE );
+ pCol->Draw( *this, _rOut, aPos, sal_False );
if (_bForeignDevice)
_rOut.SetClipRegion();
}
@@ -1165,7 +1165,7 @@ void BrowseBox::PaintData( Window& rWin, const Rectangle& rRect )
Resize();
// MI: wer war das denn? Window::Update();
- ImplPaintData(rWin, rRect, FALSE, TRUE);
+ ImplPaintData(rWin, rRect, sal_False, sal_True);
}
//-------------------------------------------------------------------
@@ -1181,19 +1181,19 @@ void BrowseBox::UpdateScrollbars()
BrowserDataWin *pBDW = (BrowserDataWin*) pDataWin;
if ( pBDW->bInUpdateScrollbars )
{
- pBDW->bHadRecursion = TRUE;
+ pBDW->bHadRecursion = sal_True;
return;
}
- pBDW->bInUpdateScrollbars = TRUE;
+ pBDW->bInUpdateScrollbars = sal_True;
// the size of the corner window (and the width of the VSB/height of the HSB)
- ULONG nCornerSize = GetSettings().GetStyleSettings().GetScrollBarSize();
+ sal_uLong nCornerSize = GetSettings().GetStyleSettings().GetScrollBarSize();
if (IsZoom())
- nCornerSize = (ULONG)(nCornerSize * (double)GetZoom());
+ nCornerSize = (sal_uLong)(nCornerSize * (double)GetZoom());
// needs VScroll?
long nMaxRows = (pDataWin->GetSizePixel().Height()) / GetDataRowHeight();
- BOOL bNeedsVScroll = getDataWindow()->bAutoVScroll
+ sal_Bool bNeedsVScroll = getDataWindow()->bAutoVScroll
? nTopRow || ( nRowCount > nMaxRows )
: !getDataWindow()->bNoVScroll;
Size aDataWinSize = pDataWin->GetSizePixel();
@@ -1215,10 +1215,10 @@ void BrowseBox::UpdateScrollbars()
}
// needs HScroll?
- ULONG nLastCol = GetColumnAtXPosPixel( aDataWinSize.Width() - 1 );
+ sal_uLong nLastCol = GetColumnAtXPosPixel( aDataWinSize.Width() - 1 );
- USHORT nFrozenCols = FrozenColCount();
- BOOL bNeedsHScroll = getDataWindow()->bAutoHScroll
+ sal_uInt16 nFrozenCols = FrozenColCount();
+ sal_Bool bNeedsHScroll = getDataWindow()->bAutoHScroll
? ( nFirstCol > nFrozenCols ) || ( nLastCol <= pCols->size() )
: !getDataWindow()->bNoHScroll;
if ( !bNeedsHScroll )
@@ -1239,7 +1239,7 @@ void BrowseBox::UpdateScrollbars()
}
// adjust position and Width of horizontal scrollbar
- ULONG nHScrX = nControlAreaWidth == USHRT_MAX
+ sal_uLong nHScrX = nControlAreaWidth == USHRT_MAX
? 0
: nControlAreaWidth;
@@ -1290,7 +1290,7 @@ void BrowseBox::UpdateScrollbars()
// needs corner-window?
// (do that AFTER positioning BOTH scrollbars)
- ULONG nActualCorderWidth = 0;
+ sal_uLong nActualCorderWidth = 0;
if (aHScroll.IsVisible() && pVScroll && pVScroll->IsVisible() )
{
// if we have both scrollbars, the corner window fills the point of intersection of these two
@@ -1330,21 +1330,21 @@ void BrowseBox::UpdateScrollbars()
getDataWindow()->pHeaderBar->SetOffset( nWidth );
}
- pBDW->bInUpdateScrollbars = FALSE;
+ pBDW->bInUpdateScrollbars = sal_False;
if ( pBDW->bHadRecursion )
{
- pBDW->bHadRecursion = FALSE;
+ pBDW->bHadRecursion = sal_False;
UpdateScrollbars();
}
}
//-------------------------------------------------------------------
-void BrowseBox::SetUpdateMode( BOOL bUpdate )
+void BrowseBox::SetUpdateMode( sal_Bool bUpdate )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
- BOOL bWasUpdate = IsUpdateMode();
+ sal_Bool bWasUpdate = IsUpdateMode();
if ( bWasUpdate == bUpdate )
return;
@@ -1372,7 +1372,7 @@ void BrowseBox::SetUpdateMode( BOOL bUpdate )
//-------------------------------------------------------------------
-BOOL BrowseBox::GetUpdateMode() const
+sal_Bool BrowseBox::GetUpdateMode() const
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
@@ -1395,7 +1395,7 @@ long BrowseBox::GetFrozenWidth() const
//-------------------------------------------------------------------
-void BrowseBox::ColumnInserted( USHORT nPos )
+void BrowseBox::ColumnInserted( sal_uInt16 nPos )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
@@ -1406,10 +1406,10 @@ void BrowseBox::ColumnInserted( USHORT nPos )
//-------------------------------------------------------------------
-USHORT BrowseBox::FrozenColCount() const
+sal_uInt16 BrowseBox::FrozenColCount() const
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
- USHORT nCol;
+ sal_uInt16 nCol;
for ( nCol = 0;
nCol < pCols->size() && (*pCols)[ nCol ]->IsFrozen();
++nCol )
@@ -1498,7 +1498,7 @@ void BrowseBox::MouseButtonDown( const MouseEvent& rEvt )
if ( pCol->GetId() && Abs( nR - rEvtPos.X() ) < 2 )
{
// start resizing the column
- bResizing = TRUE;
+ bResizing = sal_True;
nResizeCol = nCol;
nDragX = nResizeX = rEvtPos.X();
SetPointer( Pointer( POINTER_HSPLIT ) );
@@ -1521,7 +1521,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, TRUE ) );
+ CommandEvent( Point( 1, LONG_MAX ), COMMAND_CONTEXTMENU, sal_True ) );
else
SetNoSelection();
}
@@ -1539,17 +1539,17 @@ void BrowseBox::MouseMove( const MouseEvent& rEvt )
Pointer aNewPointer;
- USHORT nX = 0;
+ sal_uInt16 nX = 0;
for ( size_t nCol = 0;
nCol < pCols->size() &&
- ( nX + (*pCols)[ nCol ]->Width() ) < USHORT(GetOutputSizePixel().Width());
+ ( nX + (*pCols)[ nCol ]->Width() ) < sal_uInt16(GetOutputSizePixel().Width());
++nCol )
// is this column visible?
if ( (*pCols)[ nCol ]->IsFrozen() || nCol >= nFirstCol )
{
// compute right end of column
BrowserColumn *pCol = (*pCols)[ nCol ];
- USHORT nR = (USHORT)(nX + pCol->Width() - 1);
+ sal_uInt16 nR = (sal_uInt16)(nX + pCol->Width() - 1);
// show resize-pointer?
if ( bResizing || ( pCol->GetId() &&
@@ -1564,8 +1564,8 @@ void BrowseBox::MouseMove( const MouseEvent& rEvt )
// erlaubte breite abholen und neues Delta
nDragX = Max( rEvt.GetPosPixel().X(), nMinResizeX );
long nDeltaX = nDragX - nResizeX;
- USHORT nId = GetColumnId(nResizeCol);
- ULONG nOldWidth = GetColumnWidth(nId);
+ sal_uInt16 nId = GetColumnId(nResizeCol);
+ sal_uLong nOldWidth = GetColumnWidth(nId);
nDragX = QueryColumnResize( GetColumnId(nResizeCol),
nOldWidth + nDeltaX )
+ nResizeX - nOldWidth;
@@ -1603,7 +1603,7 @@ void BrowseBox::MouseButtonUp( const MouseEvent & rEvt )
long nMaxX = pDataWin->GetSizePixel().Width();
nDragX = Min( nDragX, nMaxX );
long nDeltaX = nDragX - nResizeX;
- USHORT nId = GetColumnId(nResizeCol);
+ sal_uInt16 nId = GetColumnId(nResizeCol);
SetColumnWidth( GetColumnId(nResizeCol), GetColumnWidth(nId) + nDeltaX );
ColumnResized( nId );
}
@@ -1611,7 +1611,7 @@ void BrowseBox::MouseButtonUp( const MouseEvent & rEvt )
// end action
SetPointer( Pointer() );
ReleaseMouse();
- bResizing = FALSE;
+ bResizing = sal_False;
}
else
MouseButtonUp( BrowserMouseEvent( (BrowserDataWin*)pDataWin,
@@ -1623,8 +1623,8 @@ void BrowseBox::MouseButtonUp( const MouseEvent & rEvt )
//-------------------------------------------------------------------
-BOOL bExtendedMode = FALSE;
-BOOL bFieldMode = FALSE;
+sal_Bool bExtendedMode = sal_False;
+sal_Bool bFieldMode = sal_False;
void BrowseBox::MouseButtonDown( const BrowserMouseEvent& rEvt )
{
@@ -1639,14 +1639,14 @@ void BrowseBox::MouseButtonDown( const BrowserMouseEvent& rEvt )
if ( rEvt.GetRow() >= 0 )
{
GoToRow( rEvt.GetRow() );
- SelectRow( rEvt.GetRow(), TRUE, FALSE );
+ SelectRow( rEvt.GetRow(), sal_True, sal_False );
}
else
{
if ( bColumnCursor && rEvt.GetColumn() != 0 )
{
if ( rEvt.GetColumn() < pCols->size() )
- SelectColumnPos( rEvt.GetColumn(), TRUE, FALSE);
+ SelectColumnPos( rEvt.GetColumn(), sal_True, sal_False);
}
}
DoubleClick( rEvt );
@@ -1658,7 +1658,7 @@ void BrowseBox::MouseButtonDown( const BrowserMouseEvent& rEvt )
if ( rEvt.GetClicks() == 1 )
{
// initialise flags
- bHit = FALSE;
+ bHit = sal_False;
a1stPoint =
a2ndPoint = PixelToLogic( rEvt.GetPosPixel() );
@@ -1671,7 +1671,7 @@ void BrowseBox::MouseButtonDown( const BrowserMouseEvent& rEvt )
}
// while selecting, no cursor
- bSelecting = TRUE;
+ bSelecting = sal_True;
DoHideCursor( "MouseButtonDown" );
// DataRow?
@@ -1687,19 +1687,19 @@ void BrowseBox::MouseButtonDown( const BrowserMouseEvent& rEvt )
{
ToggleSelection();
if ( bMultiSelection )
- uRow.pSel->SelectAll(FALSE);
+ uRow.pSel->SelectAll(sal_False);
else
uRow.nSel = BROWSER_ENDOFSELECTION;
if ( pColSel )
- pColSel->SelectAll(FALSE);
- bSelect = TRUE;
+ pColSel->SelectAll(sal_False);
+ bSelect = sal_True;
}
// expanding mode?
if ( rEvt.GetMode() & MOUSE_RANGESELECT )
{
// select the further touched rows too
- bSelect = TRUE;
+ bSelect = sal_True;
ExpandRowSelection( rEvt );
return;
}
@@ -1708,7 +1708,7 @@ void BrowseBox::MouseButtonDown( const BrowserMouseEvent& rEvt )
else if ( IsRowSelected( rEvt.GetRow() ) )
{
// auf Drag&Drop warten
- bHit = TRUE;
+ bHit = sal_True;
bExtendedMode = MOUSE_MULTISELECT ==
( rEvt.GetMode() & MOUSE_MULTISELECT );
return;
@@ -1722,7 +1722,7 @@ void BrowseBox::MouseButtonDown( const BrowserMouseEvent& rEvt )
aSelRange = Range( rEvt.GetRow(), rEvt.GetRow() );
SelectRow( rEvt.GetRow(),
!uRow.pSel->IsSelected( rEvt.GetRow() ) );
- bSelect = TRUE;
+ bSelect = sal_True;
return;
}
}
@@ -1730,9 +1730,9 @@ void BrowseBox::MouseButtonDown( const BrowserMouseEvent& rEvt )
// select directly
SetNoSelection();
GoToRow( rEvt.GetRow() );
- SelectRow( rEvt.GetRow(), TRUE );
+ SelectRow( rEvt.GetRow(), sal_True );
aSelRange = Range( rEvt.GetRow(), rEvt.GetRow() );
- bSelect = TRUE;
+ bSelect = sal_True;
}
else // Column/Field-Selection
{
@@ -1740,14 +1740,14 @@ void BrowseBox::MouseButtonDown( const BrowserMouseEvent& rEvt )
if ( IsColumnSelected( rEvt.GetColumn() ) ||
IsRowSelected( rEvt.GetRow() ) )
{
- bHit = TRUE;
- bFieldMode = TRUE;
+ bHit = sal_True;
+ bFieldMode = sal_True;
return;
}
SetNoSelection();
GoToRowColumnId( rEvt.GetRow(), rEvt.GetColumnId() );
- bSelect = TRUE;
+ bSelect = sal_True;
}
}
else
@@ -1761,11 +1761,11 @@ void BrowseBox::MouseButtonDown( const BrowserMouseEvent& rEvt )
SelectAll();
}
else
- SelectColumnId( rEvt.GetColumnId(), TRUE, FALSE );
+ SelectColumnId( rEvt.GetColumnId(), sal_True, sal_False );
}
// ggf. Cursor wieder an
- bSelecting = FALSE;
+ bSelecting = sal_False;
DoShowCursor( "MouseButtonDown" );
if ( bSelect )
Select();
@@ -1791,7 +1791,7 @@ void BrowseBox::MouseButtonUp( const BrowserMouseEvent &rEvt )
{
aSelRange = Range( rEvt.GetRow(), rEvt.GetRow() );
if ( bExtendedMode )
- SelectRow( rEvt.GetRow(), FALSE );
+ SelectRow( rEvt.GetRow(), sal_False );
else
{
SetNoSelection();
@@ -1800,19 +1800,19 @@ void BrowseBox::MouseButtonUp( const BrowserMouseEvent &rEvt )
else
{
GoToRow( rEvt.GetRow() );
- SelectRow( rEvt.GetRow(), TRUE );
+ SelectRow( rEvt.GetRow(), sal_True );
}
}
- bSelect = TRUE;
- bExtendedMode = FALSE;
- bFieldMode = FALSE;
- bHit = FALSE;
+ bSelect = sal_True;
+ bExtendedMode = sal_False;
+ bFieldMode = sal_False;
+ bHit = sal_False;
}
// activate cursor
if ( bSelecting )
{
- bSelecting = FALSE;
+ bSelecting = sal_False;
DoShowCursor( "MouseButtonUp" );
if ( bSelect )
Select();
@@ -1829,16 +1829,16 @@ void BrowseBox::KeyInput( const KeyEvent& rEvt )
//-------------------------------------------------------------------
-BOOL BrowseBox::ProcessKey( const KeyEvent& rEvt )
+sal_Bool BrowseBox::ProcessKey( const KeyEvent& rEvt )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
- USHORT nCode = rEvt.GetKeyCode().GetCode();
- BOOL bShift = rEvt.GetKeyCode().IsShift();
- BOOL bCtrl = rEvt.GetKeyCode().IsMod1();
- BOOL bAlt = rEvt.GetKeyCode().IsMod2();
+ sal_uInt16 nCode = rEvt.GetKeyCode().GetCode();
+ sal_Bool bShift = rEvt.GetKeyCode().IsShift();
+ sal_Bool bCtrl = rEvt.GetKeyCode().IsMod1();
+ sal_Bool bAlt = rEvt.GetKeyCode().IsMod2();
- USHORT nId = BROWSER_NONE;
+ sal_uInt16 nId = BROWSER_NONE;
if ( !bAlt && !bCtrl && !bShift )
{
@@ -1900,12 +1900,12 @@ BOOL BrowseBox::ProcessKey( const KeyEvent& rEvt )
//-------------------------------------------------------------------
-void BrowseBox::Dispatch( USHORT nId )
+void BrowseBox::Dispatch( sal_uInt16 nId )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
long nRowsOnPage = pDataWin->GetSizePixel().Height() / GetDataRowHeight();
- BOOL bDone = FALSE;
+ sal_Bool bDone = sal_False;
switch ( nId )
{
@@ -1916,11 +1916,11 @@ void BrowseBox::Dispatch( USHORT nId )
case BROWSER_CURSORDOWN:
if ( ( GetCurRow() + 1 ) < nRowCount )
- bDone = GoToRow( GetCurRow() + 1, FALSE );
+ bDone = GoToRow( GetCurRow() + 1, sal_False );
break;
case BROWSER_CURSORUP:
if ( GetCurRow() > 0 )
- bDone = GoToRow( GetCurRow() - 1, FALSE );
+ bDone = GoToRow( GetCurRow() - 1, sal_False );
break;
case BROWSER_SELECTHOME:
if ( GetRowCount() )
@@ -1928,7 +1928,7 @@ void BrowseBox::Dispatch( USHORT nId )
DoHideCursor( "BROWSER_SELECTHOME" );
for ( long nRow = GetCurRow(); nRow >= 0; --nRow )
SelectRow( nRow );
- GoToRow( 0, TRUE );
+ GoToRow( 0, sal_True );
DoShowCursor( "BROWSER_SELECTHOME" );
}
break;
@@ -1939,7 +1939,7 @@ void BrowseBox::Dispatch( USHORT nId )
long nRows = GetRowCount();
for ( long nRow = GetCurRow(); nRow < nRows; ++nRow )
SelectRow( nRow );
- GoToRow( GetRowCount() - 1, TRUE );
+ GoToRow( GetRowCount() - 1, sal_True );
DoShowCursor( "BROWSER_SELECTEND" );
}
break;
@@ -1950,12 +1950,12 @@ void BrowseBox::Dispatch( USHORT nId )
// deselect the current row, if it isn't the first
// and there is no other selected row above
long nRow = GetCurRow();
- BOOL bLocalSelect = ( !IsRowSelected( nRow ) ||
+ sal_Bool bLocalSelect = ( !IsRowSelected( nRow ) ||
GetSelectRowCount() == 1 || IsRowSelected( nRow - 1 ) );
- SelectRow( nRow, bLocalSelect, TRUE );
- bDone = GoToRow( GetCurRow() + 1 , FALSE );
+ SelectRow( nRow, bLocalSelect, sal_True );
+ bDone = GoToRow( GetCurRow() + 1 , sal_False );
if ( bDone )
- SelectRow( GetCurRow(), TRUE, TRUE );
+ SelectRow( GetCurRow(), sal_True, sal_True );
}
else
bDone = ScrollRows( 1 ) != 0;
@@ -1967,40 +1967,40 @@ void BrowseBox::Dispatch( USHORT nId )
// deselect the current row, if it isn't the first
// and there is no other selected row under
long nRow = GetCurRow();
- BOOL bLocalSelect = ( !IsRowSelected( nRow ) ||
+ sal_Bool bLocalSelect = ( !IsRowSelected( nRow ) ||
GetSelectRowCount() == 1 || IsRowSelected( nRow + 1 ) );
- SelectRow( nCurRow, bLocalSelect, TRUE );
- bDone = GoToRow( nRow - 1 , FALSE );
+ SelectRow( nCurRow, bLocalSelect, sal_True );
+ bDone = GoToRow( nRow - 1 , sal_False );
if ( bDone )
- SelectRow( GetCurRow(), TRUE, TRUE );
+ SelectRow( GetCurRow(), sal_True, sal_True );
}
break;
case BROWSER_CURSORPAGEDOWN:
- bDone = (BOOL)ScrollRows( nRowsOnPage );
+ bDone = (sal_Bool)ScrollRows( nRowsOnPage );
break;
case BROWSER_CURSORPAGEUP:
- bDone = (BOOL)ScrollRows( -nRowsOnPage );
+ bDone = (sal_Bool)ScrollRows( -nRowsOnPage );
break;
case BROWSER_CURSOREND:
if ( bColumnCursor )
{
- USHORT nNewId = GetColumnId(ColCount() -1);
+ sal_uInt16 nNewId = GetColumnId(ColCount() -1);
bDone = (nNewId != 0) && GoToColumnId( nNewId );
break;
}
case BROWSER_CURSORENDOFFILE:
- bDone = GoToRow( nRowCount - 1, FALSE );
+ bDone = GoToRow( nRowCount - 1, sal_False );
break;
case BROWSER_CURSORRIGHT:
if ( bColumnCursor )
{
- USHORT nNewPos = GetColumnPos( GetCurColumnId() ) + 1;
- USHORT nNewId = GetColumnId( nNewPos );
+ sal_uInt16 nNewPos = GetColumnPos( GetCurColumnId() ) + 1;
+ sal_uInt16 nNewId = GetColumnId( nNewPos );
if (nNewId != 0) // Am Zeilenende ?
bDone = GoToColumnId( nNewId );
else
{
- USHORT nColId = ( GetColumnId(0) == 0 ) ? GetColumnId(1) : GetColumnId(0);
+ sal_uInt16 nColId = ( GetColumnId(0) == 0 ) ? GetColumnId(1) : GetColumnId(0);
if ( GetRowCount() )
bDone = ( nCurRow < GetRowCount() - 1 ) && GoToRowColumnId( nCurRow + 1, nColId );
else if ( ColCount() )
@@ -2013,18 +2013,18 @@ void BrowseBox::Dispatch( USHORT nId )
case BROWSER_CURSORHOME:
if ( bColumnCursor )
{
- USHORT nNewId = GetColumnId(1);
+ sal_uInt16 nNewId = GetColumnId(1);
bDone = (nNewId != 0) && GoToColumnId( nNewId );
break;
}
case BROWSER_CURSORTOPOFFILE:
- bDone = GoToRow( 0, FALSE );
+ bDone = GoToRow( 0, sal_False );
break;
case BROWSER_CURSORLEFT:
if ( bColumnCursor )
{
- USHORT nNewPos = GetColumnPos( GetCurColumnId() ) - 1;
- USHORT nNewId = GetColumnId( nNewPos );
+ sal_uInt16 nNewPos = GetColumnPos( GetCurColumnId() ) - 1;
+ sal_uInt16 nNewId = GetColumnId( nNewPos );
if (nNewId != 0)
bDone = GoToColumnId( nNewId );
else
@@ -2040,13 +2040,13 @@ void BrowseBox::Dispatch( USHORT nId )
break;
case BROWSER_ENHANCESELECTION:
if ( GetRowCount() )
- SelectRow( GetCurRow(), !IsRowSelected( GetCurRow() ), TRUE );
- bDone = TRUE;
+ SelectRow( GetCurRow(), !IsRowSelected( GetCurRow() ), sal_True );
+ bDone = sal_True;
break;
case BROWSER_SELECT:
if ( GetRowCount() )
- SelectRow( GetCurRow(), !IsRowSelected( GetCurRow() ), FALSE );
- bDone = TRUE;
+ SelectRow( GetCurRow(), !IsRowSelected( GetCurRow() ), sal_False );
+ bDone = sal_True;
break;
case BROWSER_MOVECOLUMNLEFT:
case BROWSER_MOVECOLUMNRIGHT:
@@ -2054,20 +2054,20 @@ void BrowseBox::Dispatch( USHORT nId )
BrowserHeader* pHeaderBar = getDataWindow()->pHeaderBar;
if ( pHeaderBar && pHeaderBar->IsDragable() )
{
- USHORT nColId = GetCurColumnId();
- BOOL bColumnSelected = IsColumnSelected(nColId);
- USHORT nNewPos = GetColumnPos(nColId);
- BOOL bMoveAllowed = FALSE;
+ sal_uInt16 nColId = GetCurColumnId();
+ sal_Bool bColumnSelected = IsColumnSelected(nColId);
+ sal_uInt16 nNewPos = GetColumnPos(nColId);
+ sal_Bool bMoveAllowed = sal_False;
if ( BROWSER_MOVECOLUMNLEFT == nId && nNewPos > 1 )
- --nNewPos,bMoveAllowed = TRUE;
+ --nNewPos,bMoveAllowed = sal_True;
else if ( BROWSER_MOVECOLUMNRIGHT == nId && nNewPos < (ColCount()-1) )
- ++nNewPos,bMoveAllowed = TRUE;
+ ++nNewPos,bMoveAllowed = sal_True;
if ( bMoveAllowed )
{
SetColumnPos( nColId, nNewPos );
ColumnMoved( nColId );
- MakeFieldVisible(GetCurRow(),nColId,TRUE);
+ MakeFieldVisible(GetCurRow(),nColId,sal_True);
if ( bColumnSelected )
SelectColumnId(nColId);
}
@@ -2098,7 +2098,7 @@ void BrowseBox::SetCursorColor(const Color& _rCol)
DoShowCursor("SetCursorColor");
}
// -----------------------------------------------------------------------------
-Rectangle BrowseBox::calcHeaderRect(sal_Bool _bIsColumnBar,BOOL _bOnScreen)
+Rectangle BrowseBox::calcHeaderRect(sal_Bool _bIsColumnBar,sal_Bool _bOnScreen)
{
Window* pParent = NULL;
if ( !_bOnScreen )
@@ -2122,14 +2122,14 @@ Rectangle BrowseBox::calcHeaderRect(sal_Bool _bIsColumnBar,BOOL _bOnScreen)
return Rectangle(aTopLeft,Size(nWidth,nHeight));
}
// -----------------------------------------------------------------------------
-Rectangle BrowseBox::calcTableRect(BOOL _bOnScreen)
+Rectangle BrowseBox::calcTableRect(sal_Bool _bOnScreen)
{
Window* pParent = NULL;
if ( !_bOnScreen )
pParent = GetAccessibleParentWindow();
Rectangle aRect( GetWindowExtentsRelative( pParent ) );
- Rectangle aRowBar = calcHeaderRect(FALSE,pParent == NULL);
+ Rectangle aRowBar = calcHeaderRect(sal_False,pParent == NULL);
long nX = aRowBar.Right() - aRect.Left();
long nY = aRowBar.Top() - aRect.Top();
@@ -2138,7 +2138,7 @@ Rectangle BrowseBox::calcTableRect(BOOL _bOnScreen)
return Rectangle(aRowBar.TopRight(), Size(aSize.A() - nX, aSize.B() - nY - aHScroll.GetSizePixel().Height()) );
}
// -----------------------------------------------------------------------------
-Rectangle BrowseBox::GetFieldRectPixelAbs( sal_Int32 _nRowId,sal_uInt16 _nColId, BOOL /*_bIsHeader*/, BOOL _bOnScreen )
+Rectangle BrowseBox::GetFieldRectPixelAbs( sal_Int32 _nRowId,sal_uInt16 _nColId, sal_Bool /*_bIsHeader*/, sal_Bool _bOnScreen )
{
Window* pParent = NULL;
if ( !_bOnScreen )
diff --git a/svtools/source/brwbox/brwbox3.cxx b/svtools/source/brwbox/brwbox3.cxx
index 50634845a55f..929aa3303a77 100644
--- a/svtools/source/brwbox/brwbox3.cxx
+++ b/svtools/source/brwbox/brwbox3.cxx
@@ -173,7 +173,7 @@ sal_Int32 BrowseBox::GetAccessibleControlCount() const
Reference< XAccessible > BrowseBox::CreateAccessibleControl( sal_Int32 )
{
- DBG_ASSERT( FALSE, "BrowseBox::CreateAccessibleControl: to be overwritten!" );
+ DBG_ASSERT( sal_False, "BrowseBox::CreateAccessibleControl: to be overwritten!" );
return NULL;
}
// -----------------------------------------------------------------------------
@@ -193,7 +193,7 @@ sal_Bool BrowseBox::ConvertPointToCellAddress(
sal_Bool BrowseBox::ConvertPointToRowHeader( sal_Int32& rnRow, const Point& rPoint )
{
rnRow = GetRowAtYPosPixel(rPoint.Y());
- // USHORT nColumnId = GetColumnAtXPosPixel(rPoint.X());
+ // sal_uInt16 nColumnId = GetColumnAtXPosPixel(rPoint.X());
return rnRow != BROWSER_INVALIDID;// && nColumnId == 0;
}
// -----------------------------------------------------------------------------
@@ -398,7 +398,7 @@ void BrowseBox::GrabTableFocus()
GrabFocus();
}
// -----------------------------------------------------------------------------
-String BrowseBox::GetCellText(long, USHORT ) const
+String BrowseBox::GetCellText(long, sal_uInt16 ) const
{
DBG_ASSERT(0,"This method has to be implemented by the derived classes! BUG!!");
return String();
@@ -460,7 +460,7 @@ sal_Bool BrowseBox::IsCellFocusable() const
return sal_True;
}
// -----------------------------------------------------------------------------
-BOOL BrowseBox::GoToCell( sal_Int32 _nRow, sal_uInt16 _nColumn )
+sal_Bool BrowseBox::GoToCell( sal_Int32 _nRow, sal_uInt16 _nColumn )
{
return GoToRowColumnId( _nRow, GetColumnId( _nColumn ) );
}
@@ -532,13 +532,13 @@ sal_Bool BrowseBox::IsCellVisible( sal_Int32 _nRow, sal_uInt16 _nColumnPos ) con
return IsFieldVisible( _nRow, GetColumnId( _nColumnPos ) );
}
// -----------------------------------------------------------------------------
-String BrowseBox::GetAccessibleCellText(long _nRow, USHORT _nColPos) const
+String BrowseBox::GetAccessibleCellText(long _nRow, sal_uInt16 _nColPos) const
{
return GetCellText( _nRow, GetColumnId( _nColPos ) );
}
// -----------------------------------------------------------------------------
-BOOL BrowseBox::GetGlyphBoundRects( const Point& rOrigin, const String& rStr, int nIndex, int nLen, int nBase, MetricVector& rVector )
+sal_Bool BrowseBox::GetGlyphBoundRects( const Point& rOrigin, const String& rStr, int nIndex, int nLen, int nBase, MetricVector& rVector )
{
return Control::GetGlyphBoundRects( rOrigin, rStr, nIndex, nLen, nBase, rVector );
}
@@ -553,7 +553,7 @@ void BrowseBox::GrabFocus()
Control::GrabFocus();
}
// -----------------------------------------------------------------------------
-Reference< XAccessible > BrowseBox::GetAccessible( BOOL bCreate )
+Reference< XAccessible > BrowseBox::GetAccessible( sal_Bool bCreate )
{
return Control::GetAccessible( bCreate );
}
diff --git a/svtools/source/brwbox/brwhead.cxx b/svtools/source/brwbox/brwhead.cxx
index d1fcaec5e9be..a0a0f01f8251 100644
--- a/svtools/source/brwbox/brwhead.cxx
+++ b/svtools/source/brwbox/brwhead.cxx
@@ -77,7 +77,7 @@ void BrowserHeader::EndDrag()
Update();
// not aborted?
- USHORT nId = GetCurItemId();
+ sal_uInt16 nId = GetCurItemId();
if ( nId )
{
// Handle-Column?
@@ -96,7 +96,7 @@ void BrowserHeader::EndDrag()
// column drag
// Hat sich die Position eigentlich veraendert
// Handlecolumn beruecksichtigen
- USHORT nOldPos = _pBrowseBox->GetColumnPos(nId),
+ sal_uInt16 nOldPos = _pBrowseBox->GetColumnPos(nId),
nNewPos = GetItemPos( nId );
if (!_pBrowseBox->GetColumnId(0)) // Handle
diff --git a/svtools/source/brwbox/datwin.cxx b/svtools/source/brwbox/datwin.cxx
index be3ae263d34f..f944908c269d 100644
--- a/svtools/source/brwbox/datwin.cxx
+++ b/svtools/source/brwbox/datwin.cxx
@@ -57,7 +57,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
{
@@ -74,10 +74,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 );
}
@@ -92,7 +92,7 @@ void ButtonFrame::Draw( OutputDevice& rDev )
// restore settings
if ( !bOldTransp )
{
- aFont.SetTransparent(FALSE);
+ aFont.SetTransparent(sal_False);
rDev.SetFont( aFont );
}
if (m_bDrawDisabled)
@@ -113,14 +113,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;
@@ -135,7 +135,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;
@@ -146,13 +146,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 ) );
@@ -206,18 +206,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 )
@@ -231,7 +231,7 @@ BrowserDataWin::BrowserDataWin( BrowseBox* pParent )
BrowserDataWin::~BrowserDataWin()
{
if( pDtorNotify )
- *pDtorNotify = TRUE;
+ *pDtorNotify = sal_True;
for ( size_t i = 0, n = aInvalidRegion.size(); i < n; ++i )
delete aInvalidRegion[ i ];
@@ -247,14 +247,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();
@@ -290,7 +290,7 @@ void BrowserDataWin::Update()
if ( !nUpdateLock )
Control::Update();
else
- bUpdateOnUnlock = TRUE;
+ bUpdateOnUnlock = sal_True;
}
//-------------------------------------------------------------------
@@ -301,9 +301,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();
}
@@ -322,9 +322,9 @@ void BrowserDataWin::Paint( const Rectangle& rRect )
aInvalidRegion.push_back( new Rectangle( rRect ) );
return;
}
- bInPaint = TRUE;
+ bInPaint = sal_True;
( (BrowseBox*) GetParent() )->PaintData( *this, rRect );
- bInPaint = FALSE;
+ bInPaint = sal_False;
DoOutstandingInvalidations();
}
else
@@ -356,7 +356,7 @@ BrowseEvent BrowserDataWin::CreateBrowseEvent( const Point& rPosPixel )
if ( nMouseX < nColX )
break;
}
- USHORT nColId = BROWSER_INVALIDID;
+ sal_uInt16 nColId = BROWSER_INVALIDID;
if ( nCol < pBox->pCols->size() )
nColId = (*pBox->pCols)[ nCol ]->GetId();
@@ -418,14 +418,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;
@@ -433,20 +433,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 );
@@ -456,7 +456,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 )
@@ -464,7 +464,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 );
@@ -564,7 +564,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 );
@@ -588,7 +588,7 @@ void BrowserDataWin::Tracking( const TrackingEvent& rTEvt )
if ( rTEvt.IsTrackingEnded() )
{
HideTracking();
- GetParent()->bRowDividerDrag = FALSE;
+ GetParent()->bRowDividerDrag = sal_False;
GetParent()->ImplEndTracking();
if ( !rTEvt.IsTrackingCanceled() )
@@ -639,7 +639,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),
@@ -660,7 +660,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 )
@@ -687,7 +687,7 @@ BrowserExecuteDropEvent::BrowserExecuteDropEvent( BrowserDataWin *pWindow, const
//-------------------------------------------------------------------
-void BrowserDataWin::SetUpdateMode( BOOL bMode )
+void BrowserDataWin::SetUpdateMode( sal_Bool bMode )
{
DBG_ASSERT( !bUpdateMode || aInvalidRegion.empty(), "invalid region not empty" );
if ( bMode == bUpdateMode )
@@ -710,7 +710,7 @@ void BrowserDataWin::DoOutstandingInvalidations()
//-------------------------------------------------------------------
-void BrowserDataWin::Invalidate( USHORT nFlags )
+void BrowserDataWin::Invalidate( sal_uInt16 nFlags )
{
if ( !GetUpdateMode() )
{
@@ -725,7 +725,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.push_back( new Rectangle( rRect ) );
@@ -737,20 +737,21 @@ void BrowserDataWin::Invalidate( const Rectangle& rRect, USHORT nFlags )
void BrowserScrollBar::Tracking( const TrackingEvent& rTEvt )
{
- ULONG nPos = GetThumbPos();
+ sal_uLong nPos = GetThumbPos();
if ( nPos != _nLastPos )
{
- if ( _nTip )
- Help::HideTip( _nTip );
-
String aTip( String::CreateFromInt32(nPos) );
aTip += '/';
if ( _pDataWin->GetRealRowCount().Len() )
aTip += _pDataWin->GetRealRowCount();
else
aTip += String::CreateFromInt32(GetRangeMax());
+
Rectangle aRect( GetPointerPosPixel(), Size( GetTextHeight(), GetTextWidth( aTip ) ) );
- _nTip = Help::ShowTip( this, aRect, aTip );
+ if ( _nTip )
+ Help::UpdateTip( _nTip, this, aRect, aTip );
+ else
+ _nTip = Help::ShowTip( this, aRect, aTip );
_nLastPos = nPos;
}
diff --git a/svtools/source/brwbox/datwin.hxx b/svtools/source/brwbox/datwin.hxx
index d32dbd69a4bf..1aeb06b6a085 100644
--- a/svtools/source/brwbox/datwin.hxx
+++ b/svtools/source/brwbox/datwin.hxx
@@ -50,18 +50,18 @@ class ButtonFrame
Rectangle aRect;
Rectangle aInnerRect;
String aText;
- BOOL bPressed;
- BOOL bCurs;
- BOOL bAbbr;
- BOOL m_bDrawDisabled;
+ sal_Bool bPressed;
+ sal_Bool bCurs;
+ sal_Bool bAbbr;
+ sal_Bool m_bDrawDisabled;
public:
ButtonFrame( const Point& rPt, const Size& rSz,
const String &rText,
- BOOL bPress = FALSE,
- BOOL bCursor = FALSE,
- BOOL bAbbreviate = TRUE,
- BOOL _bDrawDisabled = FALSE)
+ sal_Bool bPress = sal_False,
+ sal_Bool bCursor = sal_False,
+ sal_Bool bAbbreviate = sal_True,
+ sal_Bool _bDrawDisabled = sal_False)
:aRect( rPt, rSz )
,aInnerRect( Point( aRect.Left()+1, aRect.Top()+1 ),
Size( aRect.GetWidth()-2, aRect.GetHeight()-2 ) )
@@ -80,34 +80,34 @@ public:
class BrowserColumn
{
- USHORT _nId;
- ULONG _nOriginalWidth;
- ULONG _nWidth;
+ sal_uInt16 _nId;
+ sal_uLong _nOriginalWidth;
+ sal_uLong _nWidth;
Image _aImage;
String _aTitle;
- BOOL _bFrozen;
+ sal_Bool _bFrozen;
HeaderBarItemBits _nFlags;
public:
- BrowserColumn( USHORT nItemId, const Image &rImage,
- const String& rTitle, ULONG nWidthPixel, const Fraction& rCurrentZoom,
+ BrowserColumn( sal_uInt16 nItemId, const Image &rImage,
+ const String& rTitle, sal_uLong nWidthPixel, const Fraction& rCurrentZoom,
HeaderBarItemBits nFlags );
virtual ~BrowserColumn();
- USHORT GetId() const { return _nId; }
+ sal_uInt16 GetId() const { return _nId; }
- ULONG Width() { return _nWidth; }
+ sal_uLong Width() { return _nWidth; }
Image& GetImage() { return _aImage; }
String& Title() { return _aTitle; }
HeaderBarItemBits& Flags() { return _nFlags; }
- BOOL IsFrozen() const { return _bFrozen; }
- void Freeze( BOOL bFreeze = TRUE ) { _bFrozen = bFreeze; }
+ sal_Bool IsFrozen() const { return _bFrozen; }
+ void Freeze( sal_Bool bFreeze = sal_True ) { _bFrozen = bFreeze; }
virtual void Draw( BrowseBox& rBox, OutputDevice& rDev,
- const Point& rPos, BOOL bCurs );
+ const Point& rPos, sal_Bool bCurs );
- void SetWidth(ULONG nNewWidthPixel, const Fraction& rCurrentZoom);
+ void SetWidth(sal_uLong nNewWidthPixel, const Fraction& rCurrentZoom);
void ZoomChanged(const Fraction& rNewZoom);
};
@@ -122,7 +122,7 @@ public:
BrowserHeader* pHeaderBar; // only for BROWSER_HEADERBAR_NEW
Window* pEventWin; // Window of forwarded events
ScrollBarBox* pCornerWin; // Window in the corner btw the ScrollBars
- BOOL* pDtorNotify;
+ sal_Bool* pDtorNotify;
AutoTimer aMouseTimer; // recalls MouseMove on dragging out
MouseEvent aRepeatEvt; // a MouseEvent to repeat
Point aLastMousePos; // verhindert pseudo-MouseMoves
@@ -145,7 +145,7 @@ public:
bool bHadRecursion; // Rekursion war aufgetreten
bool bOwnDataChangedHdl; // dont change colors in DataChanged
bool bCallingDropCallback; // we're in a callback to AcceptDrop or ExecuteDrop curently
- USHORT nUpdateLock; // lock count, dont call Control::Update()!
+ sal_uInt16 nUpdateLock; // lock count, dont call Control::Update()!
short nCursorHidden; // new conuter for DoHide/ShowCursor
long m_nDragRowDividerLimit;
@@ -181,20 +181,20 @@ public:
{ return (BrowseBox*) Window::GetParent(); }
const String& GetRealRowCount() const { return aRealRowCount; }
- void SetUpdateMode( BOOL bMode );
+ void SetUpdateMode( sal_Bool bMode );
bool GetUpdateMode() const { return bUpdateMode; }
void EnterUpdateLock() { ++nUpdateLock; }
void LeaveUpdateLock();
void Update();
void DoOutstandingInvalidations();
- void Invalidate( USHORT nFlags = 0 );
- void Invalidate( const Rectangle& rRect, USHORT nFlags = 0 );
- void Invalidate( const Region& rRegion, USHORT nFlags = 0 )
+ void Invalidate( sal_uInt16 nFlags = 0 );
+ void Invalidate( const Rectangle& rRect, sal_uInt16 nFlags = 0 );
+ void Invalidate( const Region& rRegion, sal_uInt16 nFlags = 0 )
{ Control::Invalidate( rRegion, nFlags ); }
protected:
void StartRowDividerDrag( const Point& _rStartPos );
- BOOL ImplRowDividerHitTest( const BrowserMouseEvent& _rEvent );
+ sal_Bool ImplRowDividerHitTest( const BrowserMouseEvent& _rEvent );
};
//-------------------------------------------------------------------
@@ -210,8 +210,8 @@ inline void BrowserDataWin::Repaint()
class BrowserScrollBar: public ScrollBar
{
- ULONG _nTip;
- ULONG _nLastPos;
+ sal_uLong _nTip;
+ sal_uLong _nLastPos;
BrowserDataWin* _pDataWin;
public:
@@ -231,7 +231,7 @@ public:
//===================================================================
void InitSettings_Impl( Window *pWin,
- BOOL bFont = TRUE, BOOL bForeground = TRUE, BOOL bBackground = TRUE );
+ sal_Bool bFont = sal_True, sal_Bool bForeground = sal_True, sal_Bool bBackground = sal_True );
//===================================================================
diff --git a/svtools/source/brwbox/ebbcontrols.cxx b/svtools/source/brwbox/ebbcontrols.cxx
index 4dbf729de3ae..7b679aed53b2 100644
--- a/svtools/source/brwbox/ebbcontrols.cxx
+++ b/svtools/source/brwbox/ebbcontrols.cxx
@@ -81,7 +81,7 @@ namespace svt
nPos = 0;
if (nPos >= GetEntryCount())
nPos = GetEntryCount() - 1;
- SetText(GetEntry(sal::static_int_cast< USHORT >(nPos)));
+ SetText(GetEntry(sal::static_int_cast< sal_uInt16 >(nPos)));
return 1;
}
}
@@ -188,7 +188,7 @@ namespace svt
nPos = 0;
if (nPos >= GetEntryCount())
nPos = GetEntryCount() - 1;
- SelectEntryPos(sal::static_int_cast< USHORT >(nPos));
+ SelectEntryPos(sal::static_int_cast< sal_uInt16 >(nPos));
Select(); // for calling Modify
return 1;
}
@@ -312,7 +312,7 @@ namespace svt
}
//------------------------------------------------------------------
- void CheckBoxControl::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, ULONG nFlags )
+ void CheckBoxControl::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags )
{
pBox->Draw(pDev,rPos,rSize,nFlags);
}
@@ -400,7 +400,7 @@ namespace svt
EditCellController::EditCellController( Edit* _pEdit )
:CellController( _pEdit )
,m_pEditImplementation( new EditImplementation( *_pEdit ) )
- ,m_bOwnImplementation( TRUE )
+ ,m_bOwnImplementation( sal_True )
{
}
@@ -408,7 +408,7 @@ namespace svt
EditCellController::EditCellController( MultiLineTextCell* _pEdit )
:CellController( _pEdit )
,m_pEditImplementation( new MultiLineEditImplementation( *_pEdit ) )
- ,m_bOwnImplementation( TRUE )
+ ,m_bOwnImplementation( sal_True )
{
}
@@ -416,7 +416,7 @@ namespace svt
EditCellController::EditCellController( IEditImplementation* _pImplementation )
:CellController( &_pImplementation->GetControl() )
,m_pEditImplementation( _pImplementation )
- ,m_bOwnImplementation( FALSE )
+ ,m_bOwnImplementation( sal_False )
{
}
@@ -553,21 +553,21 @@ namespace svt
//------------------------------------------------------------------
void MultiLineTextCell::Modify()
{
- GetTextEngine()->SetModified( TRUE );
+ GetTextEngine()->SetModified( sal_True );
MultiLineEdit::Modify();
}
//------------------------------------------------------------------
- BOOL MultiLineTextCell::dispatchKeyEvent( const KeyEvent& _rEvent )
+ sal_Bool MultiLineTextCell::dispatchKeyEvent( const KeyEvent& _rEvent )
{
Selection aOldSelection( GetSelection() );
- BOOL bWasModified = IsModified();
+ sal_Bool bWasModified = IsModified();
ClearModifyFlag( );
- BOOL bHandled = GetTextView()->KeyInput( _rEvent );
+ sal_Bool bHandled = GetTextView()->KeyInput( _rEvent );
- BOOL bIsModified = IsModified();
+ sal_Bool bIsModified = IsModified();
if ( bWasModified && !bIsModified )
// not sure whether this can really happen
SetModifyFlag();
@@ -580,9 +580,9 @@ namespace svt
if ( aNewSelection != aOldSelection // selection changed
|| bIsModified // or some other modification
)
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
//------------------------------------------------------------------
@@ -600,7 +600,7 @@ namespace svt
const KeyEvent* pKeyEvent = rNEvt.GetKeyEvent();
const KeyCode& rKeyCode = pKeyEvent->GetKeyCode();
- USHORT nCode = rKeyCode.GetCode();
+ sal_uInt16 nCode = rKeyCode.GetCode();
if ( ( nCode == KEY_RETURN ) && ( rKeyCode.GetModifier() == KEY_MOD1 ) )
{
diff --git a/svtools/source/brwbox/editbrowsebox.cxx b/svtools/source/brwbox/editbrowsebox.cxx
index ab426a421e6a..dc568cfec7e9 100644
--- a/svtools/source/brwbox/editbrowsebox.cxx
+++ b/svtools/source/brwbox/editbrowsebox.cxx
@@ -610,7 +610,7 @@ namespace svt
{
while ( GetSelectColumnCount( ) )
SelectColumnPos(
- sal::static_int_cast< USHORT >(FirstSelectedColumn()),
+ sal::static_int_cast< sal_uInt16 >(FirstSelectedColumn()),
sal_False );
Select();
}
diff --git a/svtools/source/brwbox/editbrowsebox2.cxx b/svtools/source/brwbox/editbrowsebox2.cxx
index 4add5d5a9094..1e30cf6fa9fa 100644
--- a/svtools/source/brwbox/editbrowsebox2.cxx
+++ b/svtools/source/brwbox/editbrowsebox2.cxx
@@ -43,7 +43,7 @@ namespace svt
using namespace ::com::sun::star::accessibility::AccessibleEventId;
// -----------------------------------------------------------------------------
-Reference< XAccessible > EditBrowseBox::CreateAccessibleCheckBoxCell(long _nRow, USHORT _nColumnPos,const TriState& eState,sal_Bool _bEnabled)
+Reference< XAccessible > EditBrowseBox::CreateAccessibleCheckBoxCell(long _nRow, sal_uInt16 _nColumnPos,const TriState& eState,sal_Bool _bEnabled)
{
Reference< XAccessible > xAccessible( GetAccessible() );
Reference< XAccessibleContext > xAccContext;
@@ -164,7 +164,7 @@ void EditBrowseBox::DetermineFocus( const sal_uInt16 _nGetFocusFlags )
)
{
long nRows = GetRowCount();
- USHORT nCols = ColCount();
+ sal_uInt16 nCols = ColCount();
if ( ( nRows > 0 ) && ( nCols > 0 ) )
{
@@ -196,7 +196,7 @@ Rectangle EditBrowseBox::GetFieldCharacterBounds(sal_Int32 _nRow,sal_Int32 _nCol
if ( SeekRow(_nRow) )
{
CellController* pController = GetController(
- _nRow, GetColumnId( sal::static_int_cast< USHORT >(_nColumnPos) ) );
+ _nRow, GetColumnId( sal::static_int_cast< sal_uInt16 >(_nColumnPos) ) );
if ( pController )
aRect = pController->GetWindow().GetCharacterBounds(_nIndex);
}
@@ -209,7 +209,7 @@ sal_Int32 EditBrowseBox::GetFieldIndexAtPoint(sal_Int32 _nRow,sal_Int32 _nColumn
if ( SeekRow(_nRow) )
{
CellController* pController = GetController(
- _nRow, GetColumnId( sal::static_int_cast< USHORT >(_nColumnPos) ) );
+ _nRow, GetColumnId( sal::static_int_cast< sal_uInt16 >(_nColumnPos) ) );
if ( pController )
nRet = pController->GetWindow().GetIndexForPoint(_rPoint);
}
diff --git a/svtools/source/brwbox/makefile.mk b/svtools/source/brwbox/makefile.mk
deleted file mode 100644
index 724a2b530b1f..000000000000
--- a/svtools/source/brwbox/makefile.mk
+++ /dev/null
@@ -1,59 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..
-
-PRJNAME=svtools
-TARGET=browse
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/svt.pmk
-
-# --- Files --------------------------------------------------------
-
-SRS1NAME=$(TARGET)
-SRC1FILES= editbrowsebox.src
-
-EXCEPTIONSFILES =\
- $(SLO)$/brwbox1.obj \
- $(SLO)$/brwbox2.obj \
- $(SLO)$/brwbox3.obj \
- $(SLO)$/brwhead.obj \
- $(SLO)$/datwin.obj \
- $(SLO)$/ebbcontrols.obj \
- $(SLO)$/editbrowsebox.obj \
- $(SLO)$/editbrowsebox2.obj
-
-SLOFILES= \
- $(EXCEPTIONSFILES)
-
-
-# --- Targets -------------------------------------------------------
-
-.INCLUDE : target.mk