summaryrefslogtreecommitdiff
path: root/svtools/source/brwbox
diff options
context:
space:
mode:
Diffstat (limited to 'svtools/source/brwbox')
-rw-r--r--svtools/source/brwbox/brwbox1.cxx84
-rw-r--r--svtools/source/brwbox/brwbox2.cxx62
-rw-r--r--svtools/source/brwbox/brwbox3.cxx2
-rw-r--r--svtools/source/brwbox/datwin.cxx36
-rw-r--r--svtools/source/brwbox/datwin.hxx10
-rw-r--r--svtools/source/brwbox/ebbcontrols.cxx2
-rw-r--r--svtools/source/brwbox/editbrowsebox.cxx28
-rw-r--r--svtools/source/brwbox/editbrowsebox2.cxx4
8 files changed, 114 insertions, 114 deletions
diff --git a/svtools/source/brwbox/brwbox1.cxx b/svtools/source/brwbox/brwbox1.cxx
index 35ff2825d1be..c76a815ed040 100644
--- a/svtools/source/brwbox/brwbox1.cxx
+++ b/svtools/source/brwbox/brwbox1.cxx
@@ -382,7 +382,7 @@ void BrowseBox::SetColumnPos( sal_uInt16 nColumnId, sal_uInt16 nPos )
if ( pDataWin->pHeaderBar )
aDataWinSize.Height() += pDataWin->pHeaderBar->GetSizePixel().Height();
- Rectangle aFromRect( GetFieldRect( nColumnId) );
+ tools::Rectangle aFromRect( GetFieldRect( nColumnId) );
aFromRect.Right() += 2*MIN_COLUMNWIDTH;
sal_uInt16 nNextPos = nOldPos + 1;
@@ -390,7 +390,7 @@ void BrowseBox::SetColumnPos( sal_uInt16 nColumnId, sal_uInt16 nPos )
nNextPos = nOldPos - 1;
BrowserColumn *pNextCol = pCols[ nNextPos ];
- Rectangle aNextRect(GetFieldRect( pNextCol->GetId() ));
+ tools::Rectangle aNextRect(GetFieldRect( pNextCol->GetId() ));
// move column internally
{
@@ -404,25 +404,25 @@ void BrowseBox::SetColumnPos( sal_uInt16 nColumnId, sal_uInt16 nPos )
}
// determine new column area
- Rectangle aToRect( GetFieldRect( nColumnId ) );
+ tools::Rectangle aToRect( GetFieldRect( nColumnId ) );
aToRect.Right() += 2*MIN_COLUMNWIDTH;
// do scroll, let redraw
if( pDataWin->GetBackground().IsScrollable() )
{
long nScroll = -aFromRect.GetWidth();
- Rectangle aScrollArea;
+ tools::Rectangle aScrollArea;
if ( nOldPos > nPos )
{
long nFrozenWidth = GetFrozenWidth();
if ( aToRect.Left() < nFrozenWidth )
aToRect.Left() = nFrozenWidth;
- aScrollArea = Rectangle(Point(aToRect.Left(),0),
+ aScrollArea = tools::Rectangle(Point(aToRect.Left(),0),
Point(aNextRect.Right(),aDataWinSize.Height()));
nScroll *= -1; // reverse direction
}
else
- aScrollArea = Rectangle(Point(aNextRect.Left(),0),
+ aScrollArea = tools::Rectangle(Point(aNextRect.Left(),0),
Point(aToRect.Right(),aDataWinSize.Height()));
pDataWin->Scroll( nScroll, 0, aScrollArea );
@@ -505,7 +505,7 @@ void BrowseBox::SetColumnTitle( sal_uInt16 nItemId, const OUString& rTitle )
{
// redraw visible columns
if ( GetUpdateMode() && ( pCol->IsFrozen() || nItemPos > nFirstCol ) )
- Invalidate( Rectangle( Point(0,0),
+ Invalidate( tools::Rectangle( Point(0,0),
Size( GetOutputSizePixel().Width(), GetTitleHeight() ) ) );
}
@@ -589,13 +589,13 @@ void BrowseBox::SetColumnWidth( sal_uInt16 nItemId, sal_uLong nWidth )
if( GetBackground().IsScrollable() )
{
- Rectangle aScrRect( nX + std::min( (sal_uLong)nOldWidth, nWidth ), 0,
+ tools::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();
pDataWin->Scroll( nWidth-nOldWidth, 0, aScrRect, SCROLL_FLAGS );
- Rectangle aInvRect( nX, 0, nX + std::max( nWidth, (sal_uLong)nOldWidth ), USHRT_MAX );
+ tools::Rectangle aInvRect( nX, 0, nX + std::max( nWidth, (sal_uLong)nOldWidth ), USHRT_MAX );
Control::Invalidate( aInvRect, InvalidateFlags::NoChildren );
pDataWin->Invalidate( aInvRect );
}
@@ -869,7 +869,7 @@ long BrowseBox::ScrollColumns( long nCols )
long nDelta = pCols[ nFirstCol-1 ]->Width();
long nFrozenWidth = GetFrozenWidth();
- Rectangle aScrollRect( Point( nFrozenWidth + nDelta, 0 ),
+ tools::Rectangle aScrollRect( Point( nFrozenWidth + nDelta, 0 ),
Size ( GetOutputSizePixel().Width() - nFrozenWidth - nDelta,
GetTitleHeight() - 1
) );
@@ -881,7 +881,7 @@ long BrowseBox::ScrollColumns( long nCols )
Scroll( -nDelta, 0, aScrollRect, SCROLL_FLAGS );
// invalidate the area of the column which was scrolled out to the left hand side
- Rectangle aInvalidateRect( aScrollRect );
+ tools::Rectangle aInvalidateRect( aScrollRect );
aInvalidateRect.Left() = nFrozenWidth;
aInvalidateRect.Right() = nFrozenWidth + nDelta - 1;
Invalidate( aInvalidateRect );
@@ -915,7 +915,7 @@ long BrowseBox::ScrollColumns( long nCols )
long nDelta = pCols[ nFirstCol ]->Width();
long nFrozenWidth = GetFrozenWidth();
- Rectangle aScrollRect( Point( nFrozenWidth, 0 ),
+ tools::Rectangle aScrollRect( Point( nFrozenWidth, 0 ),
Size ( GetOutputSizePixel().Width() - nFrozenWidth,
GetTitleHeight() - 1
) );
@@ -935,10 +935,10 @@ long BrowseBox::ScrollColumns( long nCols )
{
if ( GetUpdateMode() )
{
- Invalidate( Rectangle(
+ Invalidate( tools::Rectangle(
Point( GetFrozenWidth(), 0 ),
Size( GetOutputSizePixel().Width(), GetTitleHeight() ) ) );
- pDataWin->Invalidate( Rectangle(
+ pDataWin->Invalidate( tools::Rectangle(
Point( GetFrozenWidth(), 0 ),
pDataWin->GetSizePixel() ) );
}
@@ -1044,10 +1044,10 @@ void BrowseBox::RowModified( long nRow, sal_uInt16 nColId )
if ( !GetUpdateMode() )
return;
- Rectangle aRect;
+ tools::Rectangle aRect;
if ( nColId == BROWSER_INVALIDID )
// invalidate the whole row
- aRect = Rectangle( Point( 0, (nRow-nTopRow) * GetDataRowHeight() ),
+ aRect = tools::Rectangle( Point( 0, (nRow-nTopRow) * GetDataRowHeight() ),
Size( pDataWin->GetSizePixel().Width(), GetDataRowHeight() ) );
else
{
@@ -1153,7 +1153,7 @@ void BrowseBox::RowInserted( long nRow, long nNumRows, bool bDoPaint, bool bKeep
if( pDataWin->GetBackground().IsScrollable() )
{
pDataWin->Scroll( 0, GetDataRowHeight() * nNumRows,
- Rectangle( Point( 0, nY ),
+ tools::Rectangle( Point( 0, nY ),
Size( aSz.Width(), aSz.Height() - nY ) ),
SCROLL_FLAGS );
}
@@ -1162,7 +1162,7 @@ void BrowseBox::RowInserted( long nRow, long nNumRows, bool bDoPaint, bool bKeep
}
else
// scroll would cause a repaint, so we must explicitly invalidate
- pDataWin->Invalidate( Rectangle( Point( 0, nY ),
+ pDataWin->Invalidate( tools::Rectangle( Point( 0, nY ),
Size( aSz.Width(), nNumRows * GetDataRowHeight() ) ) );
}
@@ -1296,7 +1296,7 @@ void BrowseBox::RowRemoved( long nRow, long nNumRows, bool bDoPaint )
if( pDataWin->GetBackground().IsScrollable() )
{
pDataWin->Scroll( 0, - (short) GetDataRowHeight() * nNumRows,
- Rectangle( Point( 0, nY ), Size( aSz.Width(),
+ tools::Rectangle( Point( 0, nY ), Size( aSz.Width(),
aSz.Height() - nY + nNumRows*GetDataRowHeight() ) ),
SCROLL_FLAGS );
}
@@ -1306,7 +1306,7 @@ void BrowseBox::RowRemoved( long nRow, long nNumRows, bool bDoPaint )
else
{
// Repaint the Rect of the deleted row
- Rectangle aRect(
+ tools::Rectangle aRect(
Point( 0, (nRow-nTopRow)*GetDataRowHeight() ),
Size( pDataWin->GetSizePixel().Width(),
nNumRows * GetDataRowHeight() ) );
@@ -1644,13 +1644,13 @@ void BrowseBox::SelectAll()
// highlight the row selection
if ( !bHideSelect )
{
- Rectangle aHighlightRect;
+ tools::Rectangle aHighlightRect;
sal_uInt16 nVisibleRows =
(sal_uInt16)(pDataWin->GetOutputSizePixel().Height() / GetDataRowHeight() + 1);
for ( long nRow = std::max( nTopRow, uRow.pSel->FirstSelected() );
nRow != BROWSER_ENDOFSELECTION && nRow < nTopRow + nVisibleRows;
nRow = uRow.pSel->NextSelected() )
- aHighlightRect.Union( Rectangle(
+ aHighlightRect.Union( tools::Rectangle(
Point( nOfsX, (nRow-nTopRow)*GetDataRowHeight() ),
Size( pDataWin->GetSizePixel().Width(), GetDataRowHeight() ) ) );
pDataWin->Invalidate( aHighlightRect );
@@ -1729,7 +1729,7 @@ void BrowseBox::SelectRow( long nRow, bool _bSelect, bool bExpand )
long nOfsX = pFirstCol->GetId() ? 0 : pFirstCol->Width();
// highlight only newly selected part
- Rectangle aRect(
+ tools::Rectangle aRect(
Point( nOfsX, (nRow-nTopRow)*GetDataRowHeight() ),
Size( pDataWin->GetSizePixel().Width(), GetDataRowHeight() ) );
pDataWin->Invalidate( aRect );
@@ -1800,8 +1800,8 @@ void BrowseBox::SelectColumnPos( sal_uInt16 nNewColPos, bool _bSelect, bool bMak
// only highlight painted areas
pDataWin->Update();
- Rectangle aFieldRectPix( GetFieldRectPixel( nCurRow, nCurColId, false ) );
- Rectangle aRect(
+ tools::Rectangle aFieldRectPix( GetFieldRectPixel( nCurRow, nCurColId, false ) );
+ tools::Rectangle aRect(
Point( aFieldRectPix.Left() - MIN_COLUMNWIDTH, 0 ),
Size( pCols[ nNewColPos ]->Width(),
pDataWin->GetOutputSizePixel().Height() ) );
@@ -1910,8 +1910,8 @@ void BrowseBox::MakeFieldVisible
// calculate column position, field rectangle and painting area
sal_uInt16 nColPos = GetColumnPos( nColId );
- Rectangle aFieldRect = GetFieldRectPixel( nRow, nColId, false );
- Rectangle aDataRect = Rectangle( Point(0, 0), pDataWin->GetSizePixel() );
+ tools::Rectangle aFieldRect = GetFieldRectPixel( nRow, nColId, false );
+ tools::Rectangle aDataRect = tools::Rectangle( Point(0, 0), pDataWin->GetSizePixel() );
// positioned outside on the left?
if ( nColPos >= FrozenColCount() && nColPos < nFirstCol )
@@ -1956,12 +1956,12 @@ bool BrowseBox::IsFieldVisible( long nRow, sal_uInt16 nColumnId,
if ( nColPos >= FrozenColCount() && nColPos < nFirstCol )
return false;
- Rectangle aRect( ImplFieldRectPixel( nRow, nColumnId ) );
+ tools::Rectangle aRect( ImplFieldRectPixel( nRow, nColumnId ) );
if ( aRect.IsEmpty() )
return false;
// get the visible area
- Rectangle aOutRect( Point(0, 0), pDataWin->GetOutputSizePixel() );
+ tools::Rectangle aOutRect( Point(0, 0), pDataWin->GetOutputSizePixel() );
if ( bCompletely )
// test if the field is completely visible
@@ -1972,12 +1972,12 @@ bool BrowseBox::IsFieldVisible( long nRow, sal_uInt16 nColumnId,
}
-Rectangle BrowseBox::GetFieldRectPixel( long nRow, sal_uInt16 nColumnId,
+tools::Rectangle BrowseBox::GetFieldRectPixel( long nRow, sal_uInt16 nColumnId,
bool bRelToBrowser) const
{
// get the rectangle relative to DataWin
- Rectangle aRect( ImplFieldRectPixel( nRow, nColumnId ) );
+ tools::Rectangle aRect( ImplFieldRectPixel( nRow, nColumnId ) );
if ( aRect.IsEmpty() )
return aRect;
@@ -1989,19 +1989,19 @@ Rectangle BrowseBox::GetFieldRectPixel( long nRow, sal_uInt16 nColumnId,
aTopLeft = ScreenToOutputPixel( aTopLeft );
}
- return Rectangle( aTopLeft, aRect.GetSize() );
+ return tools::Rectangle( aTopLeft, aRect.GetSize() );
}
-Rectangle BrowseBox::GetRowRectPixel( long nRow ) const
+tools::Rectangle BrowseBox::GetRowRectPixel( long nRow ) const
{
// get the rectangle relative to DataWin
- Rectangle aRect;
+ tools::Rectangle aRect;
if ( nTopRow > nRow )
// row is above visible area
return aRect;
- aRect = Rectangle(
+ aRect = tools::Rectangle(
Point( 0, GetDataRowHeight() * (nRow-nTopRow) ),
Size( pDataWin->GetOutputSizePixel().Width(), GetDataRowHeight() ) );
if ( aRect.TopLeft().Y() > pDataWin->GetOutputSizePixel().Height() )
@@ -2013,11 +2013,11 @@ Rectangle BrowseBox::GetRowRectPixel( long nRow ) const
aTopLeft = pDataWin->OutputToScreenPixel( aTopLeft );
aTopLeft = ScreenToOutputPixel( aTopLeft );
- return Rectangle( aTopLeft, aRect.GetSize() );
+ return tools::Rectangle( aTopLeft, aRect.GetSize() );
}
-Rectangle BrowseBox::ImplFieldRectPixel( long nRow, sal_uInt16 nColumnId ) const
+tools::Rectangle BrowseBox::ImplFieldRectPixel( long nRow, sal_uInt16 nColumnId ) const
{
// compute the X-coordinate relative to DataWin by accumulation
@@ -2031,7 +2031,7 @@ Rectangle BrowseBox::ImplFieldRectPixel( long nRow, sal_uInt16 nColumnId ) const
nColX += pCols[ nCol ]->Width();
if ( nCol >= pCols.size() || ( nCol >= nFrozenCols && nCol < nFirstCol ) )
- return Rectangle();
+ return tools::Rectangle();
// compute the Y-coordinate relative to DataWin
long nRowY = GetDataRowHeight();
@@ -2039,7 +2039,7 @@ Rectangle BrowseBox::ImplFieldRectPixel( long nRow, sal_uInt16 nColumnId ) const
nRowY = ( nRow - nTopRow ) * GetDataRowHeight();
// assemble the Rectangle relative to DataWin
- return Rectangle(
+ return tools::Rectangle(
Point( nColX + MIN_COLUMNWIDTH, nRowY ),
Size( pCols[ nCol ]->Width() - 2*MIN_COLUMNWIDTH,
GetDataRowHeight() - 1 ) );
@@ -2065,7 +2065,7 @@ long BrowseBox::GetRowAtYPosPixel( long nY, bool bRelToBrowser ) const
}
-Rectangle BrowseBox::GetFieldRect( sal_uInt16 nColumnId ) const
+tools::Rectangle BrowseBox::GetFieldRect( sal_uInt16 nColumnId ) const
{
return GetFieldRectPixel( nCurRow, nColumnId );
@@ -2102,10 +2102,10 @@ bool BrowseBox::ReserveControlArea(sal_uInt16 nWidth)
return false;
}
-Rectangle BrowseBox::GetControlArea() const
+tools::Rectangle BrowseBox::GetControlArea() const
{
- return Rectangle(
+ return tools::Rectangle(
Point( 0, GetOutputSizePixel().Height() - aHScroll->GetSizePixel().Height() ),
Size( GetOutputSizePixel().Width() - aHScroll->GetSizePixel().Width(),
aHScroll->GetSizePixel().Height() ) );
diff --git a/svtools/source/brwbox/brwbox2.cxx b/svtools/source/brwbox/brwbox2.cxx
index 5902077176c4..af6c7a036236 100644
--- a/svtools/source/brwbox/brwbox2.cxx
+++ b/svtools/source/brwbox/brwbox2.cxx
@@ -161,7 +161,7 @@ void BrowseBox::StateChanged( StateChangedType nStateChange )
)
// we draw the text in our header bar in a color dependent on the enabled state. So if this state changed
// -> redraw
- Invalidate(Rectangle(Point(0, 0), Size(GetOutputSizePixel().Width(), GetTitleHeight() - 1)));
+ Invalidate(tools::Rectangle(Point(0, 0), Size(GetOutputSizePixel().Width(), GetTitleHeight() - 1)));
}
}
@@ -261,20 +261,20 @@ void BrowseBox::ToggleSelection()
if ( nRow < nTopRow )
continue;
- Rectangle aAddRect(
+ tools::Rectangle aAddRect(
Point( nOfsX, (nRow-nTopRow)*GetDataRowHeight() ),
Size( pDataWin->GetSizePixel().Width(), GetDataRowHeight() ) );
if ( aHighlightList.size() && nLastRowInRect == ( nRow - 1 ) )
aHighlightList[ 0 ]->Union( aAddRect );
else
- aHighlightList.insert( aHighlightList.begin(), new Rectangle( aAddRect ) );
+ aHighlightList.insert( aHighlightList.begin(), new tools::Rectangle( aAddRect ) );
nLastRowInRect = nRow;
}
// unhighlight the old selection (if any)
for ( size_t i = aHighlightList.size(); i > 0; )
{
- Rectangle *pRect = aHighlightList[ --i ];
+ tools::Rectangle *pRect = aHighlightList[ --i ];
pDataWin->Invalidate( *pRect );
delete pRect;
}
@@ -285,7 +285,7 @@ void BrowseBox::ToggleSelection()
nColId != BROWSER_ENDOFSELECTION;
nColId = pColSel->NextSelected() )
{
- Rectangle aRect( GetFieldRectPixel(nCurRow,
+ tools::Rectangle aRect( GetFieldRectPixel(nCurRow,
pCols[ nColId ]->GetId(),
false ) );
aRect.Left() -= MIN_COLUMNWIDTH;
@@ -324,7 +324,7 @@ void BrowseBox::DrawCursor()
nCurColId = GetColumnId(1);
// calculate cursor rectangle
- Rectangle aCursor;
+ tools::Rectangle aCursor;
if ( bColumnCursor )
{
aCursor = GetFieldRectPixel( nCurRow, nCurColId, false );
@@ -333,7 +333,7 @@ void BrowseBox::DrawCursor()
aCursor.Bottom() += 1;
}
else
- aCursor = Rectangle(
+ aCursor = tools::Rectangle(
Point( ( !pCols.empty() && pCols[ 0 ]->GetId() == 0 ) ?
pCols[ 0 ]->Width() : 0,
(nCurRow - nTopRow) * GetDataRowHeight() + 1 ),
@@ -528,7 +528,7 @@ void BrowseBox::Resize()
UpdateScrollbars();
// Control-Area
- Rectangle aInvalidArea( GetControlArea() );
+ tools::Rectangle aInvalidArea( GetControlArea() );
aInvalidArea.Right() = GetOutputSizePixel().Width();
aInvalidArea.Left() = 0;
Invalidate( aInvalidArea );
@@ -548,7 +548,7 @@ void BrowseBox::Resize()
}
-void BrowseBox::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect)
+void BrowseBox::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect)
{
// initializations
@@ -615,7 +615,7 @@ void BrowseBox::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect
{
rRenderContext.Push(PushFlags::FILLCOLOR);
rRenderContext.SetFillColor(Color(COL_BLACK));
- rRenderContext.DrawRect(Rectangle(Point(nX, 0), Size(pCol->Width(), GetTitleHeight() - 1)));
+ rRenderContext.DrawRect(tools::Rectangle(Point(nX, 0), Size(pCol->Width(), GetTitleHeight() - 1)));
rRenderContext.Pop();
}
@@ -631,7 +631,7 @@ void BrowseBox::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect
rRenderContext.Push(PushFlags::FILLCOLOR | PushFlags::LINECOLOR);
rRenderContext.SetFillColor(aColFace);
rRenderContext.SetLineColor(aColFace);
- rRenderContext.DrawRect(Rectangle(Point(nX, 0),
+ rRenderContext.DrawRect(tools::Rectangle(Point(nX, 0),
Point(rRect.Right(), GetTitleHeight() - 2 )));
rRenderContext.Pop();
}
@@ -749,19 +749,19 @@ void BrowseBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
}
// draw our own content (with clipping)
- vcl::Region aRegion(Rectangle(aRealPos, aRealSize));
+ vcl::Region aRegion(tools::Rectangle(aRealPos, aRealSize));
pDev->SetClipRegion( pDev->PixelToLogic( aRegion ) );
// do we have to paint the background
bool bBackground = !(nFlags & DrawFlags::NoBackground) && pDataWin->IsControlBackground();
if ( bBackground )
{
- Rectangle aRect( aRealPos, aRealSize );
+ tools::Rectangle aRect( aRealPos, aRealSize );
pDev->SetFillColor( pDataWin->GetControlBackground() );
pDev->DrawRect( aRect );
}
- ImplPaintData( *pDev, Rectangle( aRealPos, aRealSize ), true, bDrawSelection );
+ ImplPaintData( *pDev, tools::Rectangle( aRealPos, aRealSize ), true, bDrawSelection );
// restore the column widths/data row height
nDataRowHeight = nOriginalHeight;
@@ -781,7 +781,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 tools::Rectangle& _rRect, bool _bForeignDevice, bool _bDrawSelections)
{
Point aOverallAreaPos = _bForeignDevice ? _rRect.TopLeft() : Point(0,0);
Size aOverallAreaSize = _bForeignDevice ? _rRect.GetSize() : pDataWin->GetOutputSizePixel();
@@ -835,7 +835,7 @@ void BrowseBox::ImplPaintData(OutputDevice& _rOut, const Rectangle& _rRect, bool
// #73325# don't paint the row outside the painting rectangle (DG)
// prepare auto-highlight
- Rectangle aRowRect( Point( _rRect.TopLeft().X(), aPos.Y() ),
+ tools::Rectangle aRowRect( Point( _rRect.TopLeft().X(), aPos.Y() ),
Size( _rRect.GetSize().Width(), nDataRowHeigt ) );
bool bRowSelected = _bDrawSelections
@@ -884,7 +884,7 @@ void BrowseBox::ImplPaintData(OutputDevice& _rOut, const Rectangle& _rRect, bool
_rOut.SetTextColor( rHighlightTextColor );
_rOut.SetFillColor( rHighlightFillColor );
_rOut.SetLineColor();
- Rectangle aFieldRect( aPos,
+ tools::Rectangle aFieldRect( aPos,
Size( pCol->Width(), nDataRowHeigt ) );
_rOut.DrawRect( aFieldRect );
}
@@ -912,7 +912,7 @@ void BrowseBox::ImplPaintData(OutputDevice& _rOut, const Rectangle& _rRect, bool
aFieldSize.Height() = aOverallAreaBRPos.Y() + 1 - aPos.Y();
}
- vcl::Region aClipToField(Rectangle(aPos, aFieldSize));
+ vcl::Region aClipToField(tools::Rectangle(aPos, aFieldSize));
_rOut.SetClipRegion(aClipToField);
}
pCol->Draw( *this, _rOut, aPos );
@@ -971,7 +971,7 @@ void BrowseBox::ImplPaintData(OutputDevice& _rOut, const Rectangle& _rRect, bool
// fill rectangle gray below handle column
// DG: fill it only until the end of the drawing rect and not to the end, as this may overpaint handle columns
_rOut.SetLineColor( Color( COL_BLACK ) );
- _rOut.DrawRect( Rectangle(
+ _rOut.DrawRect( tools::Rectangle(
Point( aOverallAreaPos.X() - 1, aPos.Y() - 1 ),
Point( aOverallAreaPos.X() + pCols[ 0 ]->Width() - 1,
_rRect.Bottom() + 1) ) );
@@ -1025,7 +1025,7 @@ void BrowseBox::ImplPaintData(OutputDevice& _rOut, const Rectangle& _rRect, bool
_rOut.SetLineColor( aOldLineColor );
}
-void BrowseBox::PaintData( vcl::Window& rWin, vcl::RenderContext& rRenderContext, const Rectangle& rRect )
+void BrowseBox::PaintData( vcl::Window& rWin, vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect )
{
if (!bBootstrapped && IsReallyVisible())
BrowseBox::StateChanged(StateChangedType::InitShow);
@@ -1356,7 +1356,7 @@ void BrowseBox::MouseButtonDown( const MouseEvent& rEvt )
else if ( nX < rEvtPos.X() && nR > rEvtPos.X() )
{
MouseButtonDown( BrowserMouseEvent(
- this, rEvt, -1, nCol, pCol->GetId(), Rectangle() ) );
+ this, rEvt, -1, nCol, pCol->GetId(), tools::Rectangle() ) );
return;
}
nX = nR + 1;
@@ -1410,7 +1410,7 @@ void BrowseBox::MouseMove( const MouseEvent& rEvt )
+ nResizeX - nOldWidth;
// draw new auxiliary line
- pDataWin->ShowTracking( Rectangle( Point( nDragX, 0 ),
+ pDataWin->ShowTracking( tools::Rectangle( Point( nDragX, 0 ),
Size( 1, pDataWin->GetSizePixel().Height() ) ),
ShowTrackFlags::Split|ShowTrackFlags::TrackWindow );
}
@@ -1936,7 +1936,7 @@ void BrowseBox::SetCursorColor(const Color& _rCol)
DoShowCursor("SetCursorColor");
}
-Rectangle BrowseBox::calcHeaderRect(bool _bIsColumnBar, bool _bOnScreen)
+tools::Rectangle BrowseBox::calcHeaderRect(bool _bIsColumnBar, bool _bOnScreen)
{
vcl::Window* pParent = nullptr;
if ( !_bOnScreen )
@@ -1957,37 +1957,37 @@ Rectangle BrowseBox::calcHeaderRect(bool _bIsColumnBar, bool _bOnScreen)
nHeight = GetWindowExtentsRelative( pParent ).GetHeight() - aTopLeft.Y() - GetControlArea().GetSize().Height();
}
aTopLeft += GetWindowExtentsRelative( pParent ).TopLeft();
- return Rectangle(aTopLeft,Size(nWidth,nHeight));
+ return tools::Rectangle(aTopLeft,Size(nWidth,nHeight));
}
-Rectangle BrowseBox::calcTableRect(bool _bOnScreen)
+tools::Rectangle BrowseBox::calcTableRect(bool _bOnScreen)
{
vcl::Window* pParent = nullptr;
if ( !_bOnScreen )
pParent = GetAccessibleParentWindow();
- Rectangle aRect( GetWindowExtentsRelative( pParent ) );
- Rectangle aRowBar = calcHeaderRect(false, pParent == nullptr);
+ tools::Rectangle aRect( GetWindowExtentsRelative( pParent ) );
+ tools::Rectangle aRowBar = calcHeaderRect(false, pParent == nullptr);
long nX = aRowBar.Right() - aRect.Left();
long nY = aRowBar.Top() - aRect.Top();
Size aSize(aRect.GetSize());
- return Rectangle(aRowBar.TopRight(), Size(aSize.Width() - nX, aSize.Height() - nY - aHScroll->GetSizePixel().Height()) );
+ return tools::Rectangle(aRowBar.TopRight(), Size(aSize.Width() - nX, aSize.Height() - nY - aHScroll->GetSizePixel().Height()) );
}
-Rectangle BrowseBox::GetFieldRectPixelAbs( sal_Int32 _nRowId, sal_uInt16 _nColId, bool /*_bIsHeader*/, bool _bOnScreen )
+tools::Rectangle BrowseBox::GetFieldRectPixelAbs( sal_Int32 _nRowId, sal_uInt16 _nColId, bool /*_bIsHeader*/, bool _bOnScreen )
{
vcl::Window* pParent = nullptr;
if ( !_bOnScreen )
pParent = GetAccessibleParentWindow();
- Rectangle aRect = GetFieldRectPixel(_nRowId,_nColId,_bOnScreen);
+ tools::Rectangle aRect = GetFieldRectPixel(_nRowId,_nColId,_bOnScreen);
Point aTopLeft = aRect.TopLeft();
aTopLeft += GetWindowExtentsRelative( pParent ).TopLeft();
- return Rectangle(aTopLeft,aRect.GetSize());
+ return tools::Rectangle(aTopLeft,aRect.GetSize());
}
// ------------------------------------------------------------------------- EOF
diff --git a/svtools/source/brwbox/brwbox3.cxx b/svtools/source/brwbox/brwbox3.cxx
index e4f7409139d5..153f192e5bad 100644
--- a/svtools/source/brwbox/brwbox3.cxx
+++ b/svtools/source/brwbox/brwbox3.cxx
@@ -534,7 +534,7 @@ bool BrowseBox::GetGlyphBoundRects( const Point& rOrigin, const OUString& rStr,
return Control::GetGlyphBoundRects( rOrigin, rStr, nIndex, nLen, rVector );
}
-Rectangle BrowseBox::GetWindowExtentsRelative( vcl::Window *pRelativeWindow ) const
+tools::Rectangle BrowseBox::GetWindowExtentsRelative( vcl::Window *pRelativeWindow ) const
{
return Control::GetWindowExtentsRelative( pRelativeWindow );
}
diff --git a/svtools/source/brwbox/datwin.cxx b/svtools/source/brwbox/datwin.cxx
index 48aeacd97513..29a4f2a3d6ae 100644
--- a/svtools/source/brwbox/datwin.cxx
+++ b/svtools/source/brwbox/datwin.cxx
@@ -144,7 +144,7 @@ void BrowserColumn::Draw( BrowseBox& rBox, OutputDevice& rDev, const Point& rPos
rDev.SetLineColor( aOldLineColor );
rBox.DoPaintField( rDev,
- Rectangle(
+ tools::Rectangle(
Point( rPos.X() + 2, rPos.Y() + 2 ),
Size( Width()-1, rBox.GetDataRowHeight()-1 ) ),
GetId(),
@@ -156,7 +156,7 @@ void BrowserColumn::Draw( BrowseBox& rBox, OutputDevice& rDev, const Point& rPos
long nWidth = Width() == LONG_MAX ? rBox.GetDataWindow().GetSizePixel().Width() : Width();
rBox.DoPaintField( rDev,
- Rectangle(
+ tools::Rectangle(
Point( rPos.X() + MIN_COLUMNWIDTH, rPos.Y() ),
Size( nWidth-2*MIN_COLUMNWIDTH, rBox.GetDataRowHeight()-1 ) ),
GetId(),
@@ -217,7 +217,7 @@ void BrowserDataWin::dispose()
{
bInDtor = true;
- for (Rectangle* i : aInvalidRegion)
+ for (tools::Rectangle* i : aInvalidRegion)
delete i;
aInvalidRegion.clear();
pHeaderBar.clear();
@@ -284,13 +284,13 @@ void BrowserDataWin::DataChanged( const DataChangedEvent& rDCEvt )
}
-void BrowserDataWin::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect)
+void BrowserDataWin::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect)
{
if (!nUpdateLock && GetUpdateMode())
{
if (bInPaint)
{
- aInvalidRegion.push_back(new Rectangle(rRect));
+ aInvalidRegion.push_back(new tools::Rectangle(rRect));
return;
}
bInPaint = true;
@@ -300,7 +300,7 @@ void BrowserDataWin::Paint(vcl::RenderContext& rRenderContext, const Rectangle&
}
else
{
- aInvalidRegion.push_back(new Rectangle(rRect));
+ aInvalidRegion.push_back(new tools::Rectangle(rRect));
}
}
@@ -333,11 +333,11 @@ BrowseEvent BrowserDataWin::CreateBrowseEvent( const Point& rPosPixel )
nColId = pBox->pCols[ nCol ]->GetId();
// compute the field rectangle and field relative MouseEvent
- Rectangle aFieldRect;
+ tools::Rectangle aFieldRect;
if ( nCol < pBox->pCols.size() )
{
nColX -= pBox->pCols[ nCol ]->Width();
- aFieldRect = Rectangle(
+ aFieldRect = tools::Rectangle(
Point( nColX, nRelRow * pBox->GetDataRowHeight() ),
Size( pBox->pCols[ nCol ]->Width(),
pBox->GetDataRowHeight() ) );
@@ -522,7 +522,7 @@ void BrowserDataWin::StartRowDividerDrag( const Point& _rStartPos )
GetParent()->bRowDividerDrag = true;
GetParent()->ImplStartTracking();
- Rectangle aDragSplitRect( 0, m_nDragRowDividerLimit, GetOutputSizePixel().Width(), nDragRowDividerCurrentPos );
+ tools::Rectangle aDragSplitRect( 0, m_nDragRowDividerLimit, GetOutputSizePixel().Width(), nDragRowDividerCurrentPos );
ShowTracking( aDragSplitRect );
StartTracking();
@@ -565,7 +565,7 @@ void BrowserDataWin::Tracking( const TrackingEvent& rTEvt )
if ( nDragRowDividerCurrentPos < m_nDragRowDividerLimit + GetParent()->QueryMinimumRowHeight() )
nDragRowDividerCurrentPos = m_nDragRowDividerLimit + GetParent()->QueryMinimumRowHeight();
- Rectangle aDragSplitRect( 0, m_nDragRowDividerLimit, GetOutputSizePixel().Width(), nDragRowDividerCurrentPos );
+ tools::Rectangle aDragSplitRect( 0, m_nDragRowDividerLimit, GetOutputSizePixel().Width(), nDragRowDividerCurrentPos );
ShowTracking( aDragSplitRect );
}
}
@@ -589,7 +589,7 @@ void BrowserDataWin::RequestHelp( const HelpEvent& rHEvt )
BrowseEvent::BrowseEvent( vcl::Window* pWindow,
long nAbsRow, sal_uInt16 nColumn, sal_uInt16 nColumnId,
- const Rectangle& rRect ):
+ const tools::Rectangle& rRect ):
pWin(pWindow),
nRow(nAbsRow),
aRect(rRect),
@@ -609,7 +609,7 @@ BrowserMouseEvent::BrowserMouseEvent( BrowserDataWin *pWindow,
BrowserMouseEvent::BrowserMouseEvent( vcl::Window *pWindow, const MouseEvent& rEvt,
long nAbsRow, sal_uInt16 nColumn, sal_uInt16 nColumnId,
- const Rectangle& rRect ):
+ const tools::Rectangle& rRect ):
MouseEvent(rEvt),
BrowseEvent( pWindow, nAbsRow, nColumn, nColumnId, rRect )
{
@@ -644,7 +644,7 @@ void BrowserDataWin::SetUpdateMode( bool bMode )
void BrowserDataWin::DoOutstandingInvalidations()
{
- for (Rectangle* i : aInvalidRegion) {
+ for (tools::Rectangle* i : aInvalidRegion) {
Control::Invalidate( *i );
delete i;
}
@@ -656,20 +656,20 @@ void BrowserDataWin::Invalidate( InvalidateFlags nFlags )
{
if ( !GetUpdateMode() )
{
- for (Rectangle* i : aInvalidRegion)
+ for (tools::Rectangle* i : aInvalidRegion)
delete i;
aInvalidRegion.clear();
- aInvalidRegion.push_back( new Rectangle( Point( 0, 0 ), GetOutputSizePixel() ) );
+ aInvalidRegion.push_back( new tools::Rectangle( Point( 0, 0 ), GetOutputSizePixel() ) );
}
else
Window::Invalidate( nFlags );
}
-void BrowserDataWin::Invalidate( const Rectangle& rRect, InvalidateFlags nFlags )
+void BrowserDataWin::Invalidate( const tools::Rectangle& rRect, InvalidateFlags nFlags )
{
if ( !GetUpdateMode() )
- aInvalidRegion.push_back( new Rectangle( rRect ) );
+ aInvalidRegion.push_back( new tools::Rectangle( rRect ) );
else
Window::Invalidate( rRect, nFlags );
}
@@ -697,7 +697,7 @@ void BrowserScrollBar::Tracking( const TrackingEvent& rTEvt )
else
aTip += OUString::number(GetRangeMax());
- Rectangle aRect(GetPointerPosPixel(), Size(GetTextWidth(aTip), GetTextHeight()));
+ tools::Rectangle aRect(GetPointerPosPixel(), Size(GetTextWidth(aTip), GetTextHeight()));
Help::ShowQuickHelp(this, aRect, aTip);
_nLastPos = nPos;
}
diff --git a/svtools/source/brwbox/datwin.hxx b/svtools/source/brwbox/datwin.hxx
index bc9299ca9445..f9cc4ce3f5f8 100644
--- a/svtools/source/brwbox/datwin.hxx
+++ b/svtools/source/brwbox/datwin.hxx
@@ -30,13 +30,13 @@
#define MIN_COLUMNWIDTH 2
-typedef ::std::vector< Rectangle* > RectangleList;
+typedef ::std::vector< tools::Rectangle* > RectangleList;
class ButtonFrame
{
- Rectangle aRect;
- Rectangle aInnerRect;
+ tools::Rectangle aRect;
+ tools::Rectangle aInnerRect;
OUString aText;
bool m_bDrawDisabled;
@@ -129,7 +129,7 @@ public:
virtual void dispose() override;
virtual void DataChanged( const DataChangedEvent& rDCEvt ) override;
- virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) override;
+ virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override;
virtual void RequestHelp( const HelpEvent& rHEvt ) override;
virtual void Command( const CommandEvent& rEvt ) override;
virtual void MouseButtonDown( const MouseEvent& rEvt ) override;
@@ -160,7 +160,7 @@ public:
void Update();
void DoOutstandingInvalidations();
void Invalidate( InvalidateFlags nFlags = InvalidateFlags::NONE ) override;
- void Invalidate( const Rectangle& rRect, InvalidateFlags nFlags = InvalidateFlags::NONE ) override;
+ void Invalidate( const tools::Rectangle& rRect, InvalidateFlags nFlags = InvalidateFlags::NONE ) override;
using Control::Invalidate;
protected:
diff --git a/svtools/source/brwbox/ebbcontrols.cxx b/svtools/source/brwbox/ebbcontrols.cxx
index 0e6248212166..41d5d0896145 100644
--- a/svtools/source/brwbox/ebbcontrols.cxx
+++ b/svtools/source/brwbox/ebbcontrols.cxx
@@ -294,7 +294,7 @@ namespace svt
}
- void CheckBoxControl::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rClientRect)
+ void CheckBoxControl::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rClientRect)
{
Control::Paint(rRenderContext, rClientRect);
if (HasFocus())
diff --git a/svtools/source/brwbox/editbrowsebox.cxx b/svtools/source/brwbox/editbrowsebox.cxx
index 61bcb5ea612f..691aefe7da10 100644
--- a/svtools/source/brwbox/editbrowsebox.cxx
+++ b/svtools/source/brwbox/editbrowsebox.cxx
@@ -228,7 +228,7 @@ namespace svt
}
}
- void EditBrowseBox::PaintField( OutputDevice& rDev, const Rectangle& rRect,
+ void EditBrowseBox::PaintField( OutputDevice& rDev, const tools::Rectangle& rRect,
sal_uInt16 nColumnId ) const
{
if (nColumnId == HandleColumnId)
@@ -294,7 +294,7 @@ namespace svt
return Image(aBitmap);
}
- void EditBrowseBox::PaintStatusCell(OutputDevice& rDev, const Rectangle& rRect) const
+ void EditBrowseBox::PaintStatusCell(OutputDevice& rDev, const tools::Rectangle& rRect) const
{
if (nPaintRow < 0)
return;
@@ -368,7 +368,7 @@ namespace svt
{
if ( IsEditing() )
{
- Rectangle aRect( GetCellRect( nEditRow, nEditCol, false ) );
+ tools::Rectangle aRect( GetCellRect( nEditRow, nEditCol, false ) );
CellControllerRef aCellController( Controller() );
ResizeController( aCellController, aRect );
aCellController->GetWindow().GrabFocus();
@@ -845,7 +845,7 @@ namespace svt
vcl::Window& rWindow = GetDataWindow();
if ((nEditRow >= 0) && !(GetBrowserFlags() & EditBrowseBoxFlags::NO_HANDLE_COLUMN_CONTENT))
{
- Rectangle aRect = GetFieldRectPixel(nEditRow, 0, false );
+ tools::Rectangle aRect = GetFieldRectPixel(nEditRow, 0, false );
// status cell should be painted if and only if text is displayed
// note: bPaintStatus is mutable, but Solaris has problems with assigning
// probably because it is part of a bitfield
@@ -880,7 +880,7 @@ namespace svt
BrowseBox::ColumnMoved(nId);
if (IsEditing())
{
- Rectangle aRect( GetCellRect(nEditRow, nEditCol, false));
+ tools::Rectangle aRect( GetCellRect(nEditRow, nEditCol, false));
CellControllerRef aControllerRef = Controller();
ResizeController(aControllerRef, aRect);
Controller()->GetWindow().GrabFocus();
@@ -921,7 +921,7 @@ namespace svt
{
if (IsEditing())
{
- Rectangle aRect = GetCellRect(nEditRow, nEditCol, false);
+ tools::Rectangle aRect = GetCellRect(nEditRow, nEditCol, false);
ResizeController(aController,aRect);
AsynchGetFocus();
}
@@ -947,7 +947,7 @@ namespace svt
aController = GetController(nRow, nCol);
if (aController.is())
{
- Rectangle aRect( GetCellRect(nEditRow, nEditCol, false));
+ tools::Rectangle aRect( GetCellRect(nEditRow, nEditCol, false));
ResizeController(aController, aRect);
InitController(aController, nEditRow, nEditCol);
@@ -1015,9 +1015,9 @@ namespace svt
}
- Rectangle EditBrowseBox::GetCellRect(long nRow, sal_uInt16 nColId, bool bRel) const
+ tools::Rectangle EditBrowseBox::GetCellRect(long nRow, sal_uInt16 nColId, bool bRel) const
{
- Rectangle aRect( GetFieldRectPixel(nRow, nColId, bRel));
+ tools::Rectangle aRect( GetFieldRectPixel(nRow, nColId, bRel));
if ((GetMode() & BrowserMode::CURSOR_WO_FOCUS) == BrowserMode::CURSOR_WO_FOCUS)
{
aRect.Top() += 1;
@@ -1056,7 +1056,7 @@ namespace svt
{
if (IsEditing())
{
- Rectangle aRect( GetCellRect(nEditRow, nEditCol, false));
+ tools::Rectangle aRect( GetCellRect(nEditRow, nEditCol, false));
CellControllerRef aControllerRef = Controller();
ResizeController(aControllerRef, aRect);
Controller()->GetWindow().GrabFocus();
@@ -1131,7 +1131,7 @@ namespace svt
}
- void EditBrowseBox::ResizeController(CellControllerRef& rController, const Rectangle& rRect)
+ void EditBrowseBox::ResizeController(CellControllerRef& rController, const tools::Rectangle& rRect)
{
rController->GetWindow().SetPosSizePixel(rRect.TopLeft(), rRect.GetSize());
}
@@ -1192,14 +1192,14 @@ namespace svt
void EditBrowseBox::InvalidateHandleColumn()
{
- Rectangle aHdlFieldRect( GetFieldRectPixel( 0, 0 ));
- Rectangle aInvalidRect( Point(0,0), GetOutputSizePixel() );
+ tools::Rectangle aHdlFieldRect( GetFieldRectPixel( 0, 0 ));
+ tools::Rectangle aInvalidRect( Point(0,0), GetOutputSizePixel() );
aInvalidRect.Right() = aHdlFieldRect.Right();
Invalidate( aInvalidRect );
}
- void EditBrowseBox::PaintTristate(OutputDevice&, const Rectangle& rRect, const TriState& eState, bool _bEnabled) const
+ void EditBrowseBox::PaintTristate(OutputDevice&, const tools::Rectangle& rRect, const TriState& eState, bool _bEnabled) const
{
pCheckBoxPaint->GetBox().SetState(eState);
pCheckBoxPaint->SetPosSizePixel(rRect.TopLeft(), rRect.GetSize());
diff --git a/svtools/source/brwbox/editbrowsebox2.cxx b/svtools/source/brwbox/editbrowsebox2.cxx
index efccd3322f7c..d645eb2d7d00 100644
--- a/svtools/source/brwbox/editbrowsebox2.cxx
+++ b/svtools/source/brwbox/editbrowsebox2.cxx
@@ -164,9 +164,9 @@ void EditBrowseBox::DetermineFocus( const GetFocusFlags _nGetFocusFlags )
}
}
-Rectangle EditBrowseBox::GetFieldCharacterBounds(sal_Int32 _nRow,sal_Int32 _nColumnPos,sal_Int32 _nIndex)
+tools::Rectangle EditBrowseBox::GetFieldCharacterBounds(sal_Int32 _nRow,sal_Int32 _nColumnPos,sal_Int32 _nIndex)
{
- Rectangle aRect;
+ tools::Rectangle aRect;
if ( SeekRow(_nRow) )
{
CellController* pController = GetController(