Kaydet (Commit) 785b4c2f authored tarafından Caolán McNamara's avatar Caolán McNamara

callcatcher: remove unused ifdef branch

üst ee3cb54e
...@@ -609,7 +609,6 @@ public: ...@@ -609,7 +609,6 @@ public:
GridId GetGrid( sal_uInt16 nGridX, sal_uInt16 nGridY ); GridId GetGrid( sal_uInt16 nGridX, sal_uInt16 nGridY );
GridId GetUnoccupiedGrid( sal_Bool bOccupyFound=sal_True ); GridId GetUnoccupiedGrid( sal_Bool bOccupyFound=sal_True );
void OccupyGrids( const Rectangle&, sal_Bool bOccupy = sal_True );
void OccupyGrids( const SvxIconChoiceCtrlEntry*, sal_Bool bOccupy = sal_True ); void OccupyGrids( const SvxIconChoiceCtrlEntry*, sal_Bool bOccupy = sal_True );
void OccupyGrid( GridId nId, sal_Bool bOccupy = sal_True ) void OccupyGrid( GridId nId, sal_Bool bOccupy = sal_True )
{ {
......
...@@ -728,60 +728,11 @@ GridId IcnGridMap_Impl::GetUnoccupiedGrid( sal_Bool bOccupyFound ) ...@@ -728,60 +728,11 @@ GridId IcnGridMap_Impl::GetUnoccupiedGrid( sal_Bool bOccupyFound )
// ein Eintrag belegt nur das unter seinem Zentrum liegende GridRect // ein Eintrag belegt nur das unter seinem Zentrum liegende GridRect
// diese Variante ist bedeutend schneller als die Belegung ueber das // diese Variante ist bedeutend schneller als die Belegung ueber das
// Bounding-Rect, kann aber zu kleinen Ueberlappungen fuehren // Bounding-Rect, kann aber zu kleinen Ueberlappungen fuehren
#define OCCUPY_CENTER
void IcnGridMap_Impl::OccupyGrids( const SvxIconChoiceCtrlEntry* pEntry, sal_Bool bOccupy ) void IcnGridMap_Impl::OccupyGrids( const SvxIconChoiceCtrlEntry* pEntry, sal_Bool bOccupy )
{ {
if( !_pGridMap || !_pView->IsBoundingRectValid( pEntry->aRect )) if( !_pGridMap || !_pView->IsBoundingRectValid( pEntry->aRect ))
return; return;
#ifndef OCCUPY_CENTER
OccupyGrids( pEntry->aRect, bOccupy );
#else
OccupyGrid( GetGrid( pEntry->aRect.Center()), bOccupy ); OccupyGrid( GetGrid( pEntry->aRect.Center()), bOccupy );
#endif
}
void IcnGridMap_Impl::OccupyGrids( const Rectangle& rRect, sal_Bool bUsed )
{
if( !_pGridMap )
return;
if( bUsed )
{
if( _aLastOccupiedGrid == rRect )
return;
_aLastOccupiedGrid = rRect;
}
else
_aLastOccupiedGrid.SetEmpty();
sal_Bool bTopLeftClipped, bBottomRightClipped;
GridId nIdTL = GetGrid( rRect.TopLeft(), &bTopLeftClipped );
GridId nIdBR = GetGrid( rRect.BottomRight(), &bBottomRightClipped );
if( bTopLeftClipped && bBottomRightClipped )
return;
sal_uInt16 nX1,nX2,nY1,nY2;
GetGridCoord( nIdTL, nX1, nY1 );
GetGridCoord( nIdBR, nX2, nY2 );
sal_uInt16 nTemp;
if( nX1 > nX2 )
{
nTemp = nX1;
nX1 = nX2;
nX2 = nTemp;
}
if( nY1 > nY2 )
{
nTemp = nY1;
nY1 = nY2;
nY2 = nTemp;
}
for( ; nX1 <= nX2; nX1++ )
for( ; nY1 <= nY2; nY1++ )
OccupyGrid( GetGrid( nX1, nY1 ) );
} }
void IcnGridMap_Impl::Clear() void IcnGridMap_Impl::Clear()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment