diff options
author | Xiaofei Zhang <Zhangxiaofei@openoffice.org> | 2010-11-05 10:31:15 +0800 |
---|---|---|
committer | Xiaofei Zhang <Zhangxiaofei@openoffice.org> | 2010-11-05 10:31:15 +0800 |
commit | cef41c30dd562e129b864b87c85f59bf038423a2 (patch) | |
tree | b698f3898ac3600263df76a36933ca27ec7606b0 /svtools/source/contnr/imivctl2.cxx | |
parent | 1fa45c8a636ff3e4732cfdf5dd0dc8e833707bc5 (diff) |
removetooltypes01: #i112600# remove tooltypes from toolkit, svtools and framework
Diffstat (limited to 'svtools/source/contnr/imivctl2.cxx')
-rw-r--r-- | svtools/source/contnr/imivctl2.cxx | 182 |
1 files changed, 91 insertions, 91 deletions
diff --git a/svtools/source/contnr/imivctl2.cxx b/svtools/source/contnr/imivctl2.cxx index 7cb92e8cef07..8b69940a428b 100644 --- a/svtools/source/contnr/imivctl2.cxx +++ b/svtools/source/contnr/imivctl2.cxx @@ -47,14 +47,14 @@ IcnCursor_Impl::~IcnCursor_Impl() delete[] pRows; } -USHORT IcnCursor_Impl::GetSortListPos( SvPtrarr* pList, long nValue, +sal_uInt16 IcnCursor_Impl::GetSortListPos( SvPtrarr* pList, long nValue, int bVertical ) { - USHORT nCount = (USHORT)pList->Count(); + sal_uInt16 nCount = (sal_uInt16)pList->Count(); if( !nCount ) return 0; - USHORT nCurPos = 0; + sal_uInt16 nCurPos = 0; long nPrevValue = LONG_MIN; while( nCount ) { @@ -66,7 +66,7 @@ USHORT IcnCursor_Impl::GetSortListPos( SvPtrarr* pList, long nValue, else nCurValue = rRect.Left(); if( nValue >= nPrevValue && nValue <= nCurValue ) - return (USHORT)nCurPos; + return (sal_uInt16)nCurPos; nPrevValue = nCurValue; nCount--; nCurPos++; @@ -84,8 +84,8 @@ void IcnCursor_Impl::ImplCreate() pColumns = new SvPtrarr[ nCols ]; pRows = new SvPtrarr[ nRows ]; - ULONG nCount = pView->aEntries.Count(); - for( ULONG nCur = 0; nCur < nCount; nCur++ ) + sal_uIntPtr nCount = pView->aEntries.Count(); + for( sal_uIntPtr nCur = 0; nCur < nCount; nCur++ ) { SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)pView->aEntries.GetObject( nCur ); // const Rectangle& rRect = pView->GetEntryBoundRect( pEntry ); @@ -99,10 +99,10 @@ void IcnCursor_Impl::ImplCreate() if( nX >= nCols ) nX = sal::static_int_cast< short >(nCols - 1); - USHORT nIns = GetSortListPos( &pColumns[nX], rRect.Top(), TRUE ); + sal_uInt16 nIns = GetSortListPos( &pColumns[nX], rRect.Top(), sal_True ); pColumns[ nX ].Insert( pEntry, nIns ); - nIns = GetSortListPos( &pRows[nY], rRect.Left(), FALSE ); + nIns = GetSortListPos( &pRows[nY], rRect.Left(), sal_False ); pRows[ nY ].Insert( pEntry, nIns ); pEntry->nX = nX; @@ -127,12 +127,12 @@ void IcnCursor_Impl::Clear() } } -SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchCol(USHORT nCol,USHORT nTop,USHORT nBottom, - USHORT, BOOL bDown, BOOL bSimple ) +SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchCol(sal_uInt16 nCol,sal_uInt16 nTop,sal_uInt16 nBottom, + sal_uInt16, sal_Bool bDown, sal_Bool bSimple ) { DBG_ASSERT(pCurEntry,"SearchCol: No reference entry"); SvPtrarr* pList = &(pColumns[ nCol ]); - const USHORT nCount = pList->Count(); + const sal_uInt16 nCount = pList->Count(); if( !nCount ) return 0; @@ -140,7 +140,7 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchCol(USHORT nCol,USHORT nTop,USHORT if( bSimple ) { - USHORT nListPos = pList->GetPos( pCurEntry ); + sal_uInt16 nListPos = pList->GetPos( pCurEntry ); DBG_ASSERT(nListPos!=0xffff,"Entry not in Col-List"); if( bDown ) { @@ -173,18 +173,18 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchCol(USHORT nCol,USHORT nTop,USHORT if( nTop > nBottom ) { - USHORT nTemp = nTop; + sal_uInt16 nTemp = nTop; nTop = nBottom; nBottom = nTemp; } long nMinDistance = LONG_MAX; SvxIconChoiceCtrlEntry* pResult = 0; - for( USHORT nCur = 0; nCur < nCount; nCur++ ) + for( sal_uInt16 nCur = 0; nCur < nCount; nCur++ ) { SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)(pList->GetObject( nCur )); if( pEntry != pCurEntry ) { - USHORT nY = pEntry->nY; + sal_uInt16 nY = pEntry->nY; if( nY >= nTop && nY <= nBottom ) { const Rectangle& rRect = pView->GetEntryBoundRect( pEntry ); @@ -202,12 +202,12 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchCol(USHORT nCol,USHORT nTop,USHORT return pResult; } -SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchRow(USHORT nRow,USHORT nLeft,USHORT nRight, - USHORT, BOOL bRight, BOOL bSimple ) +SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchRow(sal_uInt16 nRow,sal_uInt16 nLeft,sal_uInt16 nRight, + sal_uInt16, sal_Bool bRight, sal_Bool bSimple ) { DBG_ASSERT(pCurEntry,"SearchRow: No reference entry"); SvPtrarr* pList = &(pRows[ nRow ]); - const USHORT nCount = pList->Count(); + const sal_uInt16 nCount = pList->Count(); if( !nCount ) return 0; @@ -215,7 +215,7 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchRow(USHORT nRow,USHORT nLeft,USHOR if( bSimple ) { - USHORT nListPos = pList->GetPos( pCurEntry ); + sal_uInt16 nListPos = pList->GetPos( pCurEntry ); DBG_ASSERT(nListPos!=0xffff,"Entry not in Row-List"); if( bRight ) { @@ -248,18 +248,18 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchRow(USHORT nRow,USHORT nLeft,USHOR } if( nRight < nLeft ) { - USHORT nTemp = nRight; + sal_uInt16 nTemp = nRight; nRight = nLeft; nLeft = nTemp; } long nMinDistance = LONG_MAX; SvxIconChoiceCtrlEntry* pResult = 0; - for( USHORT nCur = 0; nCur < nCount; nCur++ ) + for( sal_uInt16 nCur = 0; nCur < nCount; nCur++ ) { SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)(pList->GetObject( nCur )); if( pEntry != pCurEntry ) { - USHORT nX = pEntry->nX; + sal_uInt16 nX = pEntry->nX; if( nX >= nLeft && nX <= nRight ) { const Rectangle& rRect = pView->GetEntryBoundRect( pEntry ); @@ -281,7 +281,7 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchRow(USHORT nRow,USHORT nLeft,USHOR /* Sucht ab dem uebergebenen Eintrag den naechsten rechts- bzw. - linksstehenden. Suchverfahren am Beispiel bRight = TRUE: + linksstehenden. Suchverfahren am Beispiel bRight = sal_True: c b c @@ -296,21 +296,21 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchRow(USHORT nRow,USHORT nLeft,USHOR a,b,c : 2., 3., 4. Suchrechteck */ -SvxIconChoiceCtrlEntry* IcnCursor_Impl::GoLeftRight( SvxIconChoiceCtrlEntry* pCtrlEntry, BOOL bRight ) +SvxIconChoiceCtrlEntry* IcnCursor_Impl::GoLeftRight( SvxIconChoiceCtrlEntry* pCtrlEntry, sal_Bool bRight ) { SvxIconChoiceCtrlEntry* pResult; pCurEntry = pCtrlEntry; Create(); - USHORT nY = pCtrlEntry->nY; - USHORT nX = pCtrlEntry->nX; + sal_uInt16 nY = pCtrlEntry->nY; + sal_uInt16 nX = pCtrlEntry->nX; DBG_ASSERT(nY< nRows,"GoLeftRight:Bad column"); DBG_ASSERT(nX< nCols,"GoLeftRight:Bad row"); // Nachbar auf gleicher Zeile ? if( bRight ) pResult = SearchRow( - nY, nX, sal::static_int_cast< USHORT >(nCols-1), nX, TRUE, TRUE ); + nY, nX, sal::static_int_cast< sal_uInt16 >(nCols-1), nX, sal_True, sal_True ); else - pResult = SearchRow( nY, nX ,0, nX, FALSE, TRUE ); + pResult = SearchRow( nY, nX ,0, nX, sal_False, sal_True ); if( pResult ) return pResult; @@ -328,11 +328,11 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::GoLeftRight( SvxIconChoiceCtrlEntry* pCt nLastCol = -1; // 0-1 } - USHORT nRowMin = nY; - USHORT nRowMax = nY; + sal_uInt16 nRowMin = nY; + sal_uInt16 nRowMax = nY; do { - SvxIconChoiceCtrlEntry* pEntry = SearchCol((USHORT)nCurCol,nRowMin,nRowMax,nY,TRUE, FALSE); + SvxIconChoiceCtrlEntry* pEntry = SearchCol((sal_uInt16)nCurCol,nRowMin,nRowMax,nY,sal_True, sal_False); if( pEntry ) return pEntry; if( nRowMin ) @@ -344,7 +344,7 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::GoLeftRight( SvxIconChoiceCtrlEntry* pCt return 0; } -SvxIconChoiceCtrlEntry* IcnCursor_Impl::GoPageUpDown( SvxIconChoiceCtrlEntry* pStart, BOOL bDown) +SvxIconChoiceCtrlEntry* IcnCursor_Impl::GoPageUpDown( SvxIconChoiceCtrlEntry* pStart, sal_Bool bDown) { if( pView->IsAutoArrange() && !(pView->nWinBits & WB_ALIGN_TOP) ) { @@ -366,7 +366,7 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::GoPageUpDown( SvxIconChoiceCtrlEntry* pS nNewPos = 0; } if( nPos != nNewPos ) - return (SvxIconChoiceCtrlEntry*)pView->aEntries.GetObject( (ULONG)nNewPos ); + return (SvxIconChoiceCtrlEntry*)pView->aEntries.GetObject( (sal_uIntPtr)nNewPos ); return 0; } long nOpt = pView->GetEntryBoundRect( pStart ).Top(); @@ -404,11 +404,11 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::GoPageUpDown( SvxIconChoiceCtrlEntry* pS return 0; } -SvxIconChoiceCtrlEntry* IcnCursor_Impl::GoUpDown( SvxIconChoiceCtrlEntry* pCtrlEntry, BOOL bDown) +SvxIconChoiceCtrlEntry* IcnCursor_Impl::GoUpDown( SvxIconChoiceCtrlEntry* pCtrlEntry, sal_Bool bDown) { if( pView->IsAutoArrange() && !(pView->nWinBits & WB_ALIGN_TOP) ) { - ULONG nPos = pView->GetEntryListPos( pCtrlEntry ); + sal_uIntPtr nPos = pView->GetEntryListPos( pCtrlEntry ); if( bDown && nPos < (pView->aEntries.Count() - 1) ) return (SvxIconChoiceCtrlEntry*)pView->aEntries.GetObject( nPos + 1 ); else if( !bDown && nPos > 0 ) @@ -419,17 +419,17 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::GoUpDown( SvxIconChoiceCtrlEntry* pCtrlE SvxIconChoiceCtrlEntry* pResult; pCurEntry = pCtrlEntry; Create(); - USHORT nY = pCtrlEntry->nY; - USHORT nX = pCtrlEntry->nX; + sal_uInt16 nY = pCtrlEntry->nY; + sal_uInt16 nX = pCtrlEntry->nX; DBG_ASSERT(nY<nRows,"GoUpDown:Bad column"); DBG_ASSERT(nX<nCols,"GoUpDown:Bad row"); // Nachbar in gleicher Spalte ? if( bDown ) pResult = SearchCol( - nX, nY, sal::static_int_cast< USHORT >(nRows-1), nY, TRUE, TRUE ); + nX, nY, sal::static_int_cast< sal_uInt16 >(nRows-1), nY, sal_True, sal_True ); else - pResult = SearchCol( nX, nY ,0, nY, FALSE, TRUE ); + pResult = SearchCol( nX, nY ,0, nY, sal_False, sal_True ); if( pResult ) return pResult; @@ -447,11 +447,11 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::GoUpDown( SvxIconChoiceCtrlEntry* pCtrlE nLastRow = -1; // 0-1 } - USHORT nColMin = nX; - USHORT nColMax = nX; + sal_uInt16 nColMin = nX; + sal_uInt16 nColMax = nX; do { - SvxIconChoiceCtrlEntry* pEntry = SearchRow((USHORT)nCurRow,nColMin,nColMax,nX,TRUE, FALSE); + SvxIconChoiceCtrlEntry* pEntry = SearchRow((sal_uInt16)nCurRow,nColMin,nColMax,nX,sal_True, sal_False); if( pEntry ) return pEntry; if( nColMin ) @@ -493,23 +493,23 @@ void IcnCursor_Impl::CreateGridAjustData( SvPtrarr& rLists, SvxIconChoiceCtrlEnt { if( !pRefEntry ) { - USHORT nGridRows = (USHORT)(pView->aVirtOutputSize.Height() / pView->nGridDY); + sal_uInt16 nGridRows = (sal_uInt16)(pView->aVirtOutputSize.Height() / pView->nGridDY); nGridRows++; // wg. Abrundung! if( !nGridRows ) return; - for( USHORT nCurList = 0; nCurList < nGridRows; nCurList++ ) + for( sal_uInt16 nCurList = 0; nCurList < nGridRows; nCurList++ ) { SvPtrarr* pRow = new SvPtrarr; rLists.Insert( (void*)pRow, nCurList ); } - const ULONG nCount = pView->aEntries.Count(); - for( ULONG nCur = 0; nCur < nCount; nCur++ ) + const sal_uIntPtr nCount = pView->aEntries.Count(); + for( sal_uIntPtr nCur = 0; nCur < nCount; nCur++ ) { SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)pView->aEntries.GetObject( nCur ); const Rectangle& rRect = pView->GetEntryBoundRect( pEntry ); short nY = (short)( ((rRect.Top()+rRect.Bottom())/2) / pView->nGridDY ); - USHORT nIns = GetSortListPos((SvPtrarr*)rLists[nY],rRect.Left(),FALSE); + sal_uInt16 nIns = GetSortListPos((SvPtrarr*)rLists[nY],rRect.Left(),sal_False); ((SvPtrarr*)rLists[ nY ])->Insert( pEntry, nIns ); } } @@ -522,8 +522,8 @@ void IcnCursor_Impl::CreateGridAjustData( SvPtrarr& rLists, SvxIconChoiceCtrlEnt short nRefRow = (short)( ((rRefRect.Top()+rRefRect.Bottom())/2) / pView->nGridDY ); SvPtrarr* pRow = new SvPtrarr; rLists.Insert( (void*)pRow, 0 ); - ULONG nCount = pView->aEntries.Count(); - for( ULONG nCur = 0; nCur < nCount; nCur++ ) + sal_uIntPtr nCount = pView->aEntries.Count(); + for( sal_uIntPtr nCur = 0; nCur < nCount; nCur++ ) { SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)pView->aEntries.GetObject( nCur ); Rectangle rRect( pView->CalcBmpRect(pEntry) ); @@ -531,7 +531,7 @@ void IcnCursor_Impl::CreateGridAjustData( SvPtrarr& rLists, SvxIconChoiceCtrlEnt short nY = (short)( ((rRect.Top()+rRect.Bottom())/2) / pView->nGridDY ); if( nY == nRefRow ) { - USHORT nIns = GetSortListPos( pRow, rRect.Left(), FALSE ); + sal_uInt16 nIns = GetSortListPos( pRow, rRect.Left(), sal_False ); pRow->Insert( pEntry, nIns ); } } @@ -541,8 +541,8 @@ void IcnCursor_Impl::CreateGridAjustData( SvPtrarr& rLists, SvxIconChoiceCtrlEnt //static void IcnCursor_Impl::DestroyGridAdjustData( SvPtrarr& rLists ) { - const USHORT nCount = rLists.Count(); - for( USHORT nCur = 0; nCur < nCount; nCur++ ) + const sal_uInt16 nCount = rLists.Count(); + for( sal_uInt16 nCur = 0; nCur < nCount; nCur++ ) { SvPtrarr* pArr = (SvPtrarr*)rLists[ nCur ]; delete pArr; @@ -569,16 +569,16 @@ void IcnGridMap_Impl::Expand() Create_Impl(); else { - USHORT nNewGridRows = _nGridRows; - USHORT nNewGridCols = _nGridCols; + sal_uInt16 nNewGridRows = _nGridRows; + sal_uInt16 nNewGridCols = _nGridCols; if( _pView->nWinBits & WB_ALIGN_TOP ) nNewGridRows += 50; else nNewGridCols += 50; - BOOL* pNewGridMap = new BOOL[nNewGridRows*nNewGridCols]; - memset( pNewGridMap, 0, nNewGridRows * nNewGridCols * sizeof(BOOL) ); - memcpy( pNewGridMap, _pGridMap, _nGridRows * _nGridCols * sizeof(BOOL) ); + sal_Bool* pNewGridMap = new sal_Bool[nNewGridRows*nNewGridCols]; + memset( pNewGridMap, 0, nNewGridRows * nNewGridCols * sizeof(sal_Bool) ); + memcpy( pNewGridMap, _pGridMap, _nGridRows * _nGridCols * sizeof(sal_Bool) ); delete[] _pGridMap; _pGridMap = pNewGridMap; _nGridRows = nNewGridRows; @@ -597,15 +597,15 @@ void IcnGridMap_Impl::Create_Impl() else _nGridCols += 50; - _pGridMap = new BOOL[ _nGridRows * _nGridCols]; + _pGridMap = new sal_Bool[ _nGridRows * _nGridCols]; memset( (void*)_pGridMap, 0, _nGridRows * _nGridCols ); - const ULONG nCount = _pView->aEntries.Count(); - for( ULONG nCur=0; nCur < nCount; nCur++ ) + const sal_uIntPtr nCount = _pView->aEntries.Count(); + for( sal_uIntPtr nCur=0; nCur < nCount; nCur++ ) OccupyGrids( (SvxIconChoiceCtrlEntry*)_pView->aEntries.GetObject( nCur )); } -void IcnGridMap_Impl::GetMinMapSize( USHORT& rDX, USHORT& rDY ) const +void IcnGridMap_Impl::GetMinMapSize( sal_uInt16& rDX, sal_uInt16& rDY ) const { long nX, nY; if( _pView->nWinBits & WB_ALIGN_TOP ) @@ -643,11 +643,11 @@ void IcnGridMap_Impl::GetMinMapSize( USHORT& rDX, USHORT& rDY ) const if( !nDY ) nDY++; - rDX = (USHORT)nDX; - rDY = (USHORT)nDY; + rDX = (sal_uInt16)nDX; + rDY = (sal_uInt16)nDY; } -GridId IcnGridMap_Impl::GetGrid( USHORT nGridX, USHORT nGridY ) +GridId IcnGridMap_Impl::GetGrid( sal_uInt16 nGridX, sal_uInt16 nGridY ) { Create(); if( _pView->nWinBits & WB_ALIGN_TOP ) @@ -656,7 +656,7 @@ GridId IcnGridMap_Impl::GetGrid( USHORT nGridX, USHORT nGridY ) return nGridY + ( nGridX * _nGridRows ); } -GridId IcnGridMap_Impl::GetGrid( const Point& rDocPos, BOOL* pbClipped ) +GridId IcnGridMap_Impl::GetGrid( const Point& rDocPos, sal_Bool* pbClipped ) { Create(); @@ -666,28 +666,28 @@ GridId IcnGridMap_Impl::GetGrid( const Point& rDocPos, BOOL* pbClipped ) nY -= TBOFFS_WINBORDER; nX /= _pView->nGridDX; nY /= _pView->nGridDY; - BOOL bClipped = FALSE; + sal_Bool bClipped = sal_False; if( nX >= _nGridCols ) { nX = _nGridCols - 1; - bClipped = TRUE; + bClipped = sal_True; } if( nY >= _nGridRows ) { nY = _nGridRows - 1; - bClipped = TRUE; + bClipped = sal_True; } - GridId nId = GetGrid( (USHORT)nX, (USHORT)nY ); + GridId nId = GetGrid( (sal_uInt16)nX, (sal_uInt16)nY ); if( pbClipped ) *pbClipped = bClipped; - DBG_ASSERT(nId <(ULONG)(_nGridCols*_nGridRows),"GetGrid failed"); + DBG_ASSERT(nId <(sal_uIntPtr)(_nGridCols*_nGridRows),"GetGrid failed"); return nId; } Rectangle IcnGridMap_Impl::GetGridRect( GridId nId ) { Create(); - USHORT nGridX, nGridY; + sal_uInt16 nGridX, nGridY; GetGridCoord( nId, nGridX, nGridY ); const long nLeft = nGridX * _pView->nGridDX+ LROFFS_WINBORDER; const long nTop = nGridY * _pView->nGridDY + TBOFFS_WINBORDER; @@ -697,28 +697,28 @@ Rectangle IcnGridMap_Impl::GetGridRect( GridId nId ) nTop + _pView->nGridDY ); } -GridId IcnGridMap_Impl::GetUnoccupiedGrid( BOOL bOccupyFound ) +GridId IcnGridMap_Impl::GetUnoccupiedGrid( sal_Bool bOccupyFound ) { Create(); - ULONG nStart = 0; - BOOL bExpanded = FALSE; + sal_uIntPtr nStart = 0; + sal_Bool bExpanded = sal_False; while( 1 ) { - const ULONG nCount = (USHORT)(_nGridCols * _nGridRows); - for( ULONG nCur = nStart; nCur < nCount; nCur++ ) + const sal_uIntPtr nCount = (sal_uInt16)(_nGridCols * _nGridRows); + for( sal_uIntPtr nCur = nStart; nCur < nCount; nCur++ ) { if( !_pGridMap[ nCur ] ) { if( bOccupyFound ) - _pGridMap[ nCur ] = TRUE; + _pGridMap[ nCur ] = sal_True; return (GridId)nCur; } } DBG_ASSERT(!bExpanded,"ExpandGrid failed"); if( bExpanded ) return 0; // prevent never ending loop - bExpanded = TRUE; + bExpanded = sal_True; Expand(); nStart = nCount; } @@ -729,7 +729,7 @@ GridId IcnGridMap_Impl::GetUnoccupiedGrid( BOOL bOccupyFound ) // Bounding-Rect, kann aber zu kleinen Ueberlappungen fuehren #define OCCUPY_CENTER -void IcnGridMap_Impl::OccupyGrids( const SvxIconChoiceCtrlEntry* pEntry, BOOL bOccupy ) +void IcnGridMap_Impl::OccupyGrids( const SvxIconChoiceCtrlEntry* pEntry, sal_Bool bOccupy ) { if( !_pGridMap || !_pView->IsBoundingRectValid( pEntry->aRect )) return; @@ -741,7 +741,7 @@ void IcnGridMap_Impl::OccupyGrids( const SvxIconChoiceCtrlEntry* pEntry, BOOL bO } -void IcnGridMap_Impl::OccupyGrids( const Rectangle& rRect, BOOL bUsed ) +void IcnGridMap_Impl::OccupyGrids( const Rectangle& rRect, sal_Bool bUsed ) { if( !_pGridMap ) return; @@ -755,17 +755,17 @@ void IcnGridMap_Impl::OccupyGrids( const Rectangle& rRect, BOOL bUsed ) else _aLastOccupiedGrid.SetEmpty(); - BOOL bTopLeftClipped, bBottomRightClipped; + sal_Bool bTopLeftClipped, bBottomRightClipped; GridId nIdTL = GetGrid( rRect.TopLeft(), &bTopLeftClipped ); GridId nIdBR = GetGrid( rRect.BottomRight(), &bBottomRightClipped ); if( bTopLeftClipped && bBottomRightClipped ) return; - USHORT nX1,nX2,nY1,nY2; + sal_uInt16 nX1,nX2,nY1,nY2; GetGridCoord( nIdTL, nX1, nY1 ); GetGridCoord( nIdBR, nX2, nY2 ); - USHORT nTemp; + sal_uInt16 nTemp; if( nX1 > nX2 ) { nTemp = nX1; @@ -794,20 +794,20 @@ void IcnGridMap_Impl::Clear() } } -ULONG IcnGridMap_Impl::GetGridCount( const Size& rSizePixel, USHORT nDX, USHORT nDY) +sal_uIntPtr IcnGridMap_Impl::GetGridCount( const Size& rSizePixel, sal_uInt16 nDX, sal_uInt16 nDY) { long ndx = (rSizePixel.Width() - LROFFS_WINBORDER) / nDX; if( ndx < 0 ) ndx *= -1; long ndy = (rSizePixel.Height() - TBOFFS_WINBORDER) / nDY; if( ndy < 0 ) ndy *= -1; - return (ULONG)(ndx * ndy); + return (sal_uIntPtr)(ndx * ndy); } void IcnGridMap_Impl::OutputSizeChanged() { if( _pGridMap ) { - USHORT nCols, nRows; + sal_uInt16 nCols, nRows; GetMinMapSize( nCols, nRows ); if( _pView->nWinBits & WB_ALIGN_TOP ) { @@ -829,18 +829,18 @@ void IcnGridMap_Impl::OutputSizeChanged() // Independendly of the views alignment (TOP or LEFT) the gridmap // should contain the data in a continues region, to make it possible // to copy the whole block if the gridmap needs to be expanded. -void IcnGridMap_Impl::GetGridCoord( GridId nId, USHORT& rGridX, USHORT& rGridY ) +void IcnGridMap_Impl::GetGridCoord( GridId nId, sal_uInt16& rGridX, sal_uInt16& rGridY ) { Create(); if( _pView->nWinBits & WB_ALIGN_TOP ) { - rGridX = (USHORT)(nId % _nGridCols); - rGridY = (USHORT)(nId / _nGridCols); + rGridX = (sal_uInt16)(nId % _nGridCols); + rGridY = (sal_uInt16)(nId / _nGridCols); } else { - rGridX = (USHORT)(nId / _nGridRows); - rGridY = (USHORT)(nId % _nGridRows); + rGridX = (sal_uInt16)(nId / _nGridRows); + rGridY = (sal_uInt16)(nId % _nGridRows); } } |