diff options
Diffstat (limited to 'svtools')
65 files changed, 630 insertions, 630 deletions
diff --git a/svtools/inc/roadmap.hxx b/svtools/inc/roadmap.hxx index 04b20f9eb5e5..ceae5b7ea9e9 100644 --- a/svtools/inc/roadmap.hxx +++ b/svtools/inc/roadmap.hxx @@ -46,7 +46,7 @@ class SVT_DLLPUBLIC ORoadmap : public Control, public RoadmapTypes protected: std::unique_ptr<RoadmapImpl> m_pImpl; // Window overridables - void Paint(vcl::RenderContext& rRenderContext, const Rectangle& _rRect) override; + void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& _rRect) override; void implInit(vcl::RenderContext& rRenderContext); public: diff --git a/svtools/inc/table/gridtablerenderer.hxx b/svtools/inc/table/gridtablerenderer.hxx index b761daca6735..67360c78fc12 100644 --- a/svtools/inc/table/gridtablerenderer.hxx +++ b/svtools/inc/table/gridtablerenderer.hxx @@ -66,28 +66,28 @@ namespace svt { namespace table public: // ITableRenderer overridables virtual void PaintHeaderArea( - OutputDevice& _rDevice, const Rectangle& _rArea, + OutputDevice& _rDevice, const tools::Rectangle& _rArea, bool _bIsColHeaderArea, bool _bIsRowHeaderArea, const StyleSettings& _rStyle ) override; virtual void PaintColumnHeader( ColPos _nCol, bool _bActive, bool _bSelected, - OutputDevice& _rDevice, const Rectangle& _rArea, + OutputDevice& _rDevice, const tools::Rectangle& _rArea, const StyleSettings& _rStyle ) override; virtual void PrepareRow( RowPos _nRow, bool i_hasControlFocus, bool _bSelected, - OutputDevice& _rDevice, const Rectangle& _rRowArea, + OutputDevice& _rDevice, const tools::Rectangle& _rRowArea, const StyleSettings& _rStyle ) override; virtual void PaintRowHeader( bool i_hasControlFocus, bool _bSelected, - OutputDevice& _rDevice, const Rectangle& _rArea, + OutputDevice& _rDevice, const tools::Rectangle& _rArea, const StyleSettings& _rStyle ) override; virtual void PaintCell( ColPos const i_col, bool i_hasControlFocus, bool _bSelected, - OutputDevice& _rDevice, const Rectangle& _rArea, + OutputDevice& _rDevice, const tools::Rectangle& _rArea, const StyleSettings& _rStyle ) override; - virtual void ShowCellCursor( vcl::Window& _rView, const Rectangle& _rCursorRect) override; - virtual void HideCellCursor( vcl::Window& _rView, const Rectangle& _rCursorRect) override; + virtual void ShowCellCursor( vcl::Window& _rView, const tools::Rectangle& _rCursorRect) override; + virtual void HideCellCursor( vcl::Window& _rView, const tools::Rectangle& _rCursorRect) override; virtual bool FitsIntoCell( css::uno::Any const & i_cellContent, - OutputDevice& i_targetDevice, Rectangle const & i_targetArea + OutputDevice& i_targetDevice, tools::Rectangle const & i_targetArea ) const override; virtual bool GetFormattedCellString( css::uno::Any const & i_cellValue, diff --git a/svtools/inc/table/tablecontrol.hxx b/svtools/inc/table/tablecontrol.hxx index 761f4948a8af..00b04baae59d 100644 --- a/svtools/inc/table/tablecontrol.hxx +++ b/svtools/inc/table/tablecontrol.hxx @@ -132,7 +132,7 @@ namespace svt { namespace table // IAccessibleTable - virtual Rectangle GetWindowExtentsRelative( vcl::Window *pRelativeWindow ) const override; + virtual tools::Rectangle GetWindowExtentsRelative( vcl::Window *pRelativeWindow ) const override; virtual void GrabFocus() override; virtual css::uno::Reference< css::accessibility::XAccessible > GetAccessible() override; virtual vcl::Window* GetAccessibleParentWindow() const override; @@ -142,11 +142,11 @@ namespace svt { namespace table virtual long GetRowCount() const override; virtual long GetColumnCount() const override; virtual bool ConvertPointToCellAddress( sal_Int32& _rnRow, sal_Int32& _rnColPos, const Point& _rPoint ) override; - virtual Rectangle calcHeaderRect( bool _bIsColumnBar ) override; - virtual Rectangle calcHeaderCellRect( bool _bIsColumnBar, sal_Int32 nPos) override; - virtual Rectangle calcTableRect() override; - virtual Rectangle calcCellRect( sal_Int32 _nRowPos, sal_Int32 _nColPos ) override; - virtual Rectangle GetFieldCharacterBounds(sal_Int32 _nRow,sal_Int32 _nColumnPos,sal_Int32 nIndex) override; + virtual tools::Rectangle calcHeaderRect( bool _bIsColumnBar ) override; + virtual tools::Rectangle calcHeaderCellRect( bool _bIsColumnBar, sal_Int32 nPos) override; + virtual tools::Rectangle calcTableRect() override; + virtual tools::Rectangle calcCellRect( sal_Int32 _nRowPos, sal_Int32 _nColPos ) override; + virtual tools::Rectangle GetFieldCharacterBounds(sal_Int32 _nRow,sal_Int32 _nColumnPos,sal_Int32 nIndex) override; virtual sal_Int32 GetFieldIndexAtPoint(sal_Int32 _nRow,sal_Int32 _nColumnPos,const Point& _rPoint) override; virtual void FillAccessibleStateSetForCell( ::utl::AccessibleStateSetHelper& _rStateSet, sal_Int32 _nRow, sal_uInt16 _nColumnPos ) const override; virtual OUString GetRowDescription( sal_Int32 _nRow ) const override; diff --git a/svtools/inc/table/tablecontrolinterface.hxx b/svtools/inc/table/tablecontrolinterface.hxx index d9f37e28f69a..ce066b6d525c 100644 --- a/svtools/inc/table/tablecontrolinterface.hxx +++ b/svtools/inc/table/tablecontrolinterface.hxx @@ -222,7 +222,7 @@ namespace svt { namespace table virtual long pixelWidthToAppFont( long const i_pixels ) const = 0; /// shows a tracking rectangle - virtual void showTracking( Rectangle const & i_location, ShowTrackFlags const i_flags ) = 0; + virtual void showTracking( tools::Rectangle const & i_location, ShowTrackFlags const i_flags ) = 0; /// hides a prviously shown tracking rectangle virtual void hideTracking() = 0; 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( diff --git a/svtools/source/contnr/iconview.cxx b/svtools/source/contnr/iconview.cxx index 9681fa95e1ab..13921219101b 100644 --- a/svtools/source/contnr/iconview.cxx +++ b/svtools/source/contnr/iconview.cxx @@ -47,7 +47,7 @@ void IconView::Resize() SvTreeListBox::Resize(); } -Rectangle IconView::GetFocusRect( SvTreeListEntry*, long nEntryPos ) +tools::Rectangle IconView::GetFocusRect( SvTreeListEntry*, long nEntryPos ) { Size aSize; aSize.Height() = nEntryHeight; @@ -57,7 +57,7 @@ Rectangle IconView::GetFocusRect( SvTreeListEntry*, long nEntryPos ) aPos.X() = 0; aPos.Y() = 0; - Rectangle aRect; + tools::Rectangle aRect; short nCols = GetColumnsCount(); @@ -85,7 +85,7 @@ void IconView::PaintEntry(SvTreeListEntry& rEntry, long nX, long nY, vcl::RenderContext& rRenderContext) { - Rectangle aRect; // multi purpose + tools::Rectangle aRect; // multi purpose PreparePaint(rRenderContext, rEntry); diff --git a/svtools/source/contnr/iconviewimpl.cxx b/svtools/source/contnr/iconviewimpl.cxx index 5328d50156cc..5b90ca87b795 100644 --- a/svtools/source/contnr/iconviewimpl.cxx +++ b/svtools/source/contnr/iconviewimpl.cxx @@ -43,7 +43,7 @@ void IconViewImpl::CursorUp() ShowCursor( false ); pView->Update(); pStartEntry = pPrevFirstToDraw; - Rectangle aArea( GetVisibleArea() ); + tools::Rectangle aArea( GetVisibleArea() ); aArea.Bottom() -= nEntryHeight; pView->Scroll( 0, nEntryHeight, aArea, ScrollFlags::NoChildren ); pView->Update(); @@ -68,7 +68,7 @@ void IconViewImpl::CursorDown() ShowCursor( false ); pView->Update(); pStartEntry = pNextFirstToDraw; - Rectangle aArea( GetVisibleArea() ); + tools::Rectangle aArea( GetVisibleArea() ); pView->Scroll( 0, -(pView->GetEntryHeight()), aArea, ScrollFlags::NoChildren ); pView->Update(); ShowCursor( true ); @@ -103,7 +103,7 @@ void IconViewImpl::PageDown( sal_uInt16 nDelta ) } else { - Rectangle aArea( GetVisibleArea() ); + tools::Rectangle aArea( GetVisibleArea() ); long nScroll = pView->GetEntryHeight() * static_cast<long>(nRealDelta); nScroll = -nScroll; pView->Update(); @@ -141,7 +141,7 @@ void IconViewImpl::PageUp( sal_uInt16 nDelta ) else { long nEntryHeight = pView->GetEntryHeight(); - Rectangle aArea( GetVisibleArea() ); + tools::Rectangle aArea( GetVisibleArea() ); pView->Update(); pView->Scroll( 0, nEntryHeight*nRealDelta, aArea, ScrollFlags::NoChildren ); pView->Update(); @@ -300,7 +300,7 @@ void IconViewImpl::AdjustScrollBars( Size& rSize ) // adapt Range, VisibleRange etc. // refresh output size, in case we have to scroll - Rectangle aRect; + tools::Rectangle aRect; aRect.SetSize( aOSize ); aSelEng.SetVisibleArea( aRect ); @@ -367,7 +367,7 @@ void IconViewImpl::UpdateAll( bool bInvalidateCompleteView ) pView->Invalidate( GetVisibleArea() ); } -void IconViewImpl::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void IconViewImpl::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { if (!pView->GetVisibleCount()) return; @@ -445,7 +445,7 @@ void IconViewImpl::InvalidateEntry( long nId ) const { if( !(nFlags & LBoxFlags::InPaint )) { - Rectangle aRect( GetVisibleArea() ); + tools::Rectangle aRect( GetVisibleArea() ); long nMaxBottom = aRect.Bottom(); aRect.Top() = nId / pView->GetColumnsCount() * pView->GetEntryHeight(); aRect.Bottom() = aRect.Top(); aRect.Bottom() += pView->GetEntryHeight(); diff --git a/svtools/source/contnr/imivctl.hxx b/svtools/source/contnr/imivctl.hxx index b9c17dd5e991..3b35978460b4 100644 --- a/svtools/source/contnr/imivctl.hxx +++ b/svtools/source/contnr/imivctl.hxx @@ -94,7 +94,7 @@ enum class IcnViewFieldType struct LocalFocus { bool bOn; - Rectangle aRect; + tools::Rectangle aRect; Color aPenColor; LocalFocus() { bOn = false; } @@ -159,8 +159,8 @@ class SvxIconChoiceCtrl_Impl VclPtr<ScrollBar> aVerSBar; VclPtr<ScrollBar> aHorSBar; VclPtr<ScrollBarBox> aScrBarBox; - Rectangle aCurSelectionRect; - std::vector<Rectangle*> aSelectedRectList; + tools::Rectangle aCurSelectionRect; + std::vector<tools::Rectangle*> aSelectedRectList; Idle aEditIdle; // for editing in place Idle aAutoArrangeIdle; Idle aDocRectChangedIdle; @@ -212,7 +212,7 @@ class SvxIconChoiceCtrl_Impl void ShowCursor( bool bShow ); void ImpArrange( bool bKeepPredecessors ); - void AdjustVirtSize( const Rectangle& ); + void AdjustVirtSize( const tools::Rectangle& ); void ResetVirtSize(); void CheckScrollBars(); @@ -251,7 +251,7 @@ class SvxIconChoiceCtrl_Impl SvxIconChoiceCtrlEntry* pEntry1, SvxIconChoiceCtrlEntry* pEntry2, bool bAdd, - std::vector<Rectangle*>* pOtherRects + std::vector<tools::Rectangle*>* pOtherRects ); void SelectRange( @@ -260,7 +260,7 @@ class SvxIconChoiceCtrl_Impl bool bAdd ); - void AddSelectedRect( const Rectangle& ); + void AddSelectedRect( const tools::Rectangle& ); void AddSelectedRect( SvxIconChoiceCtrlEntry* pEntry1, SvxIconChoiceCtrlEntry* pEntry2 @@ -268,9 +268,9 @@ class SvxIconChoiceCtrl_Impl void ClearSelectedRectList(); void ClearColumnList(); - Rectangle CalcMaxTextRect( const SvxIconChoiceCtrlEntry* pEntry ) const; + tools::Rectangle CalcMaxTextRect( const SvxIconChoiceCtrlEntry* pEntry ) const; - void ClipAtVirtOutRect( Rectangle& rRect ) const; + void ClipAtVirtOutRect( tools::Rectangle& rRect ) const; sal_uLong GetPredecessorGrid( const Point& rDocPos) const; void InitPredecessors(); @@ -297,7 +297,7 @@ class SvxIconChoiceCtrl_Impl DECL_LINK(TextEditEndedHdl, LinkParamNone*, void); - void ShowFocus ( Rectangle& rRect ); + void ShowFocus ( tools::Rectangle& rRect ); void DrawFocusRect(vcl::RenderContext& rRenderContext); bool IsMnemonicChar( sal_Unicode cChar, sal_uLong& rPos ) const; @@ -330,7 +330,7 @@ public: bool bAddToSelection = false, bool bSyncPaint = false ); - void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect); + void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect); bool MouseButtonDown( const MouseEvent& ); bool MouseButtonUp( const MouseEvent& ); bool MouseMove( const MouseEvent&); @@ -372,9 +372,9 @@ public: long nSetMaxVirtHeight ); - Rectangle CalcFocusRect( SvxIconChoiceCtrlEntry* ); - Rectangle CalcBmpRect( SvxIconChoiceCtrlEntry*, const Point* pPos = nullptr ); - Rectangle CalcTextRect( + tools::Rectangle CalcFocusRect( SvxIconChoiceCtrlEntry* ); + tools::Rectangle CalcBmpRect( SvxIconChoiceCtrlEntry*, const Point* pPos = nullptr ); + tools::Rectangle CalcTextRect( SvxIconChoiceCtrlEntry*, const Point* pPos = nullptr, bool bForInplaceEdit = false, @@ -392,18 +392,18 @@ public: ); // recalculates all invalid BoundRects void RecalcAllBoundingRectsSmart(); - const Rectangle& GetEntryBoundRect( SvxIconChoiceCtrlEntry* ); - void InvalidateBoundingRect( Rectangle& rRect ) + const tools::Rectangle& GetEntryBoundRect( SvxIconChoiceCtrlEntry* ); + void InvalidateBoundingRect( tools::Rectangle& rRect ) { rRect.Right() = LONG_MAX; bBoundRectsDirty = true; } - static bool IsBoundingRectValid( const Rectangle& rRect ) { return ( rRect.Right() != LONG_MAX ); } + static bool IsBoundingRectValid( const tools::Rectangle& rRect ) { return ( rRect.Right() != LONG_MAX ); } - void PaintEmphasis(const Rectangle& rRect1, bool bSelected, + void PaintEmphasis(const tools::Rectangle& rRect1, bool bSelected, bool bDropTarget, bool bCursored, vcl::RenderContext& rRenderContext ); - void PaintItem(const Rectangle& rRect, IcnViewFieldType eItem, SvxIconChoiceCtrlEntry* pEntry, + void PaintItem(const tools::Rectangle& rRect, IcnViewFieldType eItem, SvxIconChoiceCtrlEntry* pEntry, sal_uInt16 nPaintFlags, vcl::RenderContext& rRenderContext); // recalculates all BoundingRects if bMustRecalcBoundingRects == true @@ -420,19 +420,19 @@ public: void HideDDIcon(); static bool IsOver( - std::vector<Rectangle*>* pSelectedRectList, - const Rectangle& rEntryBoundRect + std::vector<tools::Rectangle*>* pSelectedRectList, + const tools::Rectangle& rEntryBoundRect ); void SelectRect( - const Rectangle&, + const tools::Rectangle&, bool bAdd, - std::vector<Rectangle*>* pOtherRects + std::vector<tools::Rectangle*>* pOtherRects ); bool IsTextHit( SvxIconChoiceCtrlEntry* pEntry, const Point& rDocPos ); void MakeVisible( - const Rectangle& rDocPos, + const tools::Rectangle& rDocPos, bool bInScrollBarEvent=false ); @@ -458,7 +458,7 @@ public: void SetSelectionMode( SelectionMode eMode ) { eSelectionMode=eMode; } sal_Int32 GetEntryListPos( SvxIconChoiceCtrlEntry* ) const; void InitSettings(); - Rectangle GetOutputRect() const; + tools::Rectangle GetOutputRect() const; void SetEntryPredecessor(SvxIconChoiceCtrlEntry* pEntry,SvxIconChoiceCtrlEntry* pPredecessor); // only delivers valid results when in AutoArrange mode! @@ -473,7 +473,7 @@ public: SvxIconChoiceCtrlEntry* pEntry, bool bKeepHighlightFlags ); - void DrawHighlightFrame(vcl::RenderContext& rRenderContext, const Rectangle& rBmpRect); + void DrawHighlightFrame(vcl::RenderContext& rRenderContext, const tools::Rectangle& rBmpRect); void CallEventListeners( VclEventId nEvent, void* pData ); @@ -537,7 +537,7 @@ typedef sal_uLong GridId; class IcnGridMap_Impl { - Rectangle _aLastOccupiedGrid; + tools::Rectangle _aLastOccupiedGrid; SvxIconChoiceCtrl_Impl* _pView; bool * _pGridMap; sal_uInt16 _nGridCols, _nGridRows; @@ -566,7 +566,7 @@ public: _pGridMap[ nId ] = true; } - Rectangle GetGridRect( GridId ); + tools::Rectangle GetGridRect( GridId ); void GetGridCoord( GridId, sal_uInt16& rGridX, sal_uInt16& rGridY ); static sal_uLong GetGridCount( const Size& rSizePixel, diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx index 2452e91c5431..8e728c707fd8 100644 --- a/svtools/source/contnr/imivctl1.cxx +++ b/svtools/source/contnr/imivctl1.cxx @@ -295,7 +295,7 @@ void SvxIconChoiceCtrl_Impl::InsertEntry( SvxIconChoiceCtrlEntry* pEntry, size_t if( bUpdateMode ) { FindBoundingRect( pEntry ); - Rectangle aOutputArea( GetOutputRect() ); + tools::Rectangle aOutputArea( GetOutputRect() ); pGridMap->OccupyGrids( pEntry ); if( !aOutputArea.IsOver( pEntry->aRect ) ) return; // is invisible @@ -337,11 +337,11 @@ void SvxIconChoiceCtrl_Impl::CreateAutoMnemonics( MnemonicGenerator* _pGenerator } } -Rectangle SvxIconChoiceCtrl_Impl::GetOutputRect() const +tools::Rectangle SvxIconChoiceCtrl_Impl::GetOutputRect() const { Point aOrigin( pView->GetMapMode().GetOrigin() ); aOrigin *= -1; - return Rectangle( aOrigin, aOutputSize ); + return tools::Rectangle( aOrigin, aOutputSize ); } void SvxIconChoiceCtrl_Impl::SetListPositions() @@ -471,7 +471,7 @@ void SvxIconChoiceCtrl_Impl::ResetVirtSize() VisRectChanged(); } -void SvxIconChoiceCtrl_Impl::AdjustVirtSize( const Rectangle& rRect ) +void SvxIconChoiceCtrl_Impl::AdjustVirtSize( const tools::Rectangle& rRect ) { long nHeightOffs = 0; long nWidthOffs = 0; @@ -563,7 +563,7 @@ void SvxIconChoiceCtrl_Impl::ImpArrange( bool bKeepPredecessors ) static Point aEmptyPoint; bool bOldUpdate = bUpdateMode; - Rectangle aCurOutputArea( GetOutputRect() ); + tools::Rectangle aCurOutputArea( GetOutputRect() ); if( (nWinBits & WB_SMART_ARRANGE) && aCurOutputArea.TopLeft() != aEmptyPoint ) bUpdateMode = false; aAutoArrangeIdle.Stop(); @@ -589,7 +589,7 @@ void SvxIconChoiceCtrl_Impl::ImpArrange( bool bKeepPredecessors ) ShowCursor( true ); } -void SvxIconChoiceCtrl_Impl::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void SvxIconChoiceCtrl_Impl::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { bEndScrollInvalidate = false; @@ -667,7 +667,7 @@ void SvxIconChoiceCtrl_Impl::Paint(vcl::RenderContext& rRenderContext, const Rec while(nCount) { SvxIconChoiceCtrlEntry* pEntry = (*pZOrderList)[nPos]; - const Rectangle& rBoundRect = GetEntryBoundRect(pEntry); + const tools::Rectangle& rBoundRect = GetEntryBoundRect(pEntry); if (rRect.IsOver(rBoundRect)) { PaintEntry(pEntry, rBoundRect.TopLeft(), rRenderContext); @@ -699,13 +699,13 @@ void SvxIconChoiceCtrl_Impl::RepaintSelectedEntries() if (!nCount) return; - Rectangle aOutRect(GetOutputRect()); + tools::Rectangle aOutRect(GetOutputRect()); for (size_t nCur = 0; nCur < nCount; nCur++) { SvxIconChoiceCtrlEntry* pEntry = (*pZOrderList)[nCur]; if (pEntry->GetFlags() & SvxIconViewFlags::SELECTED) { - const Rectangle& rBoundRect = GetEntryBoundRect(pEntry); + const tools::Rectangle& rBoundRect = GetEntryBoundRect(pEntry); if (aOutRect.IsOver(rBoundRect)) pView->Invalidate(rBoundRect); } @@ -751,12 +751,12 @@ bool SvxIconChoiceCtrl_Impl::MouseButtonDown( const MouseEvent& rMEvt) if( rMEvt.IsShift() ) { - Rectangle aRect( GetEntryBoundRect( pAnchor )); + tools::Rectangle aRect( GetEntryBoundRect( pAnchor )); if( pEntry ) aRect.Union( GetEntryBoundRect( pEntry ) ); else { - Rectangle aTempRect( aDocPos, Size(1,1)); + tools::Rectangle aTempRect( aDocPos, Size(1,1)); aRect.Union( aTempRect ); } aCurSelectionRect = aRect; @@ -1039,7 +1039,7 @@ bool SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& rKEvt ) SetCursor_Impl( pOldCursor, pNewCursor, bMod1, bShift, true ); if( !pNewCursor ) { - Rectangle aRect( GetEntryBoundRect( pCursor ) ); + tools::Rectangle aRect( GetEntryBoundRect( pCursor ) ); if( aRect.Top()) { aRect.Bottom() -= aRect.Top(); @@ -1094,7 +1094,7 @@ bool SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& rKEvt ) SetCursor_Impl( pOldCursor, pNewCursor, bMod1, bShift, true ); if( !pNewCursor ) { - Rectangle aRect( GetEntryBoundRect(pCursor)); + tools::Rectangle aRect( GetEntryBoundRect(pCursor)); if( aRect.Left() ) { aRect.Right() -= aRect.Left(); @@ -1508,7 +1508,7 @@ void SvxIconChoiceCtrl_Impl::SetUpdateMode( bool bUpdate ) } // priorities of the emphasis: bDropTarget => bCursored => bSelected -void SvxIconChoiceCtrl_Impl::PaintEmphasis(const Rectangle& rTextRect, bool bSelected, +void SvxIconChoiceCtrl_Impl::PaintEmphasis(const tools::Rectangle& rTextRect, bool bSelected, bool bDropTarget, bool bCursored, vcl::RenderContext& rRenderContext) { static Color aTransparent(COL_TRANSPARENT); @@ -1552,7 +1552,7 @@ void SvxIconChoiceCtrl_Impl::PaintEmphasis(const Rectangle& rTextRect, bool bSel } -void SvxIconChoiceCtrl_Impl::PaintItem(const Rectangle& rRect, +void SvxIconChoiceCtrl_Impl::PaintItem(const tools::Rectangle& rRect, IcnViewFieldType eItem, SvxIconChoiceCtrlEntry* pEntry, sal_uInt16 nPaintFlags, vcl::RenderContext& rRenderContext ) { @@ -1564,7 +1564,7 @@ void SvxIconChoiceCtrl_Impl::PaintItem(const Rectangle& rRect, if (pEntry->IsFocused()) { - Rectangle aRect (CalcFocusRect(pEntry)); + tools::Rectangle aRect (CalcFocusRect(pEntry)); ShowFocus(aRect); DrawFocusRect(rRenderContext); } @@ -1594,8 +1594,8 @@ void SvxIconChoiceCtrl_Impl::PaintEntry(SvxIconChoiceCtrlEntry* pEntry, const Po rRenderContext.Push(PushFlags::FONT | PushFlags::TEXTCOLOR); OUString aEntryText(SvtIconChoiceCtrl::GetEntryText(pEntry, false)); - Rectangle aTextRect(CalcTextRect(pEntry, &rPos, false, &aEntryText)); - Rectangle aBmpRect(CalcBmpRect(pEntry, &rPos)); + tools::Rectangle aTextRect(CalcTextRect(pEntry, &rPos, false, &aEntryText)); + tools::Rectangle aBmpRect(CalcBmpRect(pEntry, &rPos)); bool bShowSelection = ((bSelected && !bCursored) && !bNoEmphasis && (eSelectionMode != SelectionMode::NONE)); @@ -1629,7 +1629,7 @@ void SvxIconChoiceCtrl_Impl::PaintEntry(SvxIconChoiceCtrlEntry* pEntry, const Po bool bResetClipRegion = false; if (!rRenderContext.IsClipRegion() && (aVerSBar->IsVisible() || aHorSBar->IsVisible())) { - Rectangle aOutputArea(GetOutputRect()); + tools::Rectangle aOutputArea(GetOutputRect()); if (aOutputArea.IsOver(aTextRect) || aOutputArea.IsOver(aBmpRect)) { rRenderContext.SetClipRegion(vcl::Region(aOutputArea)); @@ -1667,7 +1667,7 @@ void SvxIconChoiceCtrl_Impl::PaintEntry(SvxIconChoiceCtrlEntry* pEntry, const Po void SvxIconChoiceCtrl_Impl::SetEntryPos( SvxIconChoiceCtrlEntry* pEntry, const Point& rPos ) { ShowCursor( false ); - Rectangle aBoundRect( GetEntryBoundRect( pEntry )); + tools::Rectangle aBoundRect( GetEntryBoundRect( pEntry )); pView->Invalidate( aBoundRect ); ToTop( pEntry ); if( !IsAutoArrange() ) @@ -1723,7 +1723,7 @@ SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::GetEntry( const Point& rDocPos, { if( bHit ) { - Rectangle aRect = CalcBmpRect( pEntry ); + tools::Rectangle aRect = CalcBmpRect( pEntry ); aRect.Top() -= 3; aRect.Bottom() += 3; aRect.Left() -= 3; @@ -1745,12 +1745,12 @@ void SvxIconChoiceCtrl_Impl::MakeEntryVisible( SvxIconChoiceCtrlEntry* pEntry, b { if ( bBound ) { - const Rectangle& rRect = GetEntryBoundRect( pEntry ); + const tools::Rectangle& rRect = GetEntryBoundRect( pEntry ); MakeVisible( rRect ); } else { - Rectangle aRect = CalcBmpRect( pEntry ); + tools::Rectangle aRect = CalcBmpRect( pEntry ); aRect.Union( CalcTextRect( pEntry ) ); aRect.Top() += TBOFFS_BOUND; aRect.Bottom() += TBOFFS_BOUND; @@ -1760,16 +1760,16 @@ void SvxIconChoiceCtrl_Impl::MakeEntryVisible( SvxIconChoiceCtrlEntry* pEntry, b } } -const Rectangle& SvxIconChoiceCtrl_Impl::GetEntryBoundRect( SvxIconChoiceCtrlEntry* pEntry ) +const tools::Rectangle& SvxIconChoiceCtrl_Impl::GetEntryBoundRect( SvxIconChoiceCtrlEntry* pEntry ) { if( !IsBoundingRectValid( pEntry->aRect )) FindBoundingRect( pEntry ); return pEntry->aRect; } -Rectangle SvxIconChoiceCtrl_Impl::CalcBmpRect( SvxIconChoiceCtrlEntry* pEntry, const Point* pPos ) +tools::Rectangle SvxIconChoiceCtrl_Impl::CalcBmpRect( SvxIconChoiceCtrlEntry* pEntry, const Point* pPos ) { - Rectangle aBound = GetEntryBoundRect( pEntry ); + tools::Rectangle aBound = GetEntryBoundRect( pEntry ); if( pPos ) aBound.SetPos( *pPos ); Point aPos( aBound.TopLeft() ); @@ -1779,14 +1779,14 @@ Rectangle SvxIconChoiceCtrl_Impl::CalcBmpRect( SvxIconChoiceCtrlEntry* pEntry, c case WB_ICON: { aPos.X() += ( aBound.GetWidth() - aImageSize.Width() ) / 2; - return Rectangle( aPos, aImageSize ); + return tools::Rectangle( aPos, aImageSize ); } case WB_SMALLICON: case WB_DETAILS: aPos.Y() += ( aBound.GetHeight() - aImageSize.Height() ) / 2; //TODO: determine horizontal distance to bounding rectangle - return Rectangle( aPos, aImageSize ); + return tools::Rectangle( aPos, aImageSize ); default: OSL_FAIL("IconView: Viewmode not set"); @@ -1794,7 +1794,7 @@ Rectangle SvxIconChoiceCtrl_Impl::CalcBmpRect( SvxIconChoiceCtrlEntry* pEntry, c } } -Rectangle SvxIconChoiceCtrl_Impl::CalcTextRect( SvxIconChoiceCtrlEntry* pEntry, +tools::Rectangle SvxIconChoiceCtrl_Impl::CalcTextRect( SvxIconChoiceCtrlEntry* pEntry, const Point* pEntryPos, bool bEdit, const OUString* pStr ) { OUString aEntryText; @@ -1803,12 +1803,12 @@ Rectangle SvxIconChoiceCtrl_Impl::CalcTextRect( SvxIconChoiceCtrlEntry* pEntry, else aEntryText = *pStr; - const Rectangle aMaxTextRect( CalcMaxTextRect( pEntry ) ); - Rectangle aBound( GetEntryBoundRect( pEntry ) ); + const tools::Rectangle aMaxTextRect( CalcMaxTextRect( pEntry ) ); + tools::Rectangle aBound( GetEntryBoundRect( pEntry ) ); if( pEntryPos ) aBound.SetPos( *pEntryPos ); - Rectangle aTextRect( aMaxTextRect ); + tools::Rectangle aTextRect( aMaxTextRect ); if( !bEdit ) aTextRect = pView->GetTextRect( aTextRect, aEntryText, nCurTextDrawFlags ); @@ -1850,7 +1850,7 @@ Rectangle SvxIconChoiceCtrl_Impl::CalcTextRect( SvxIconChoiceCtrlEntry* pEntry, aPos.Y() += (nBoundHeight - aTextSize.Height()) / 2; break; } - return Rectangle( aPos, aTextSize ); + return tools::Rectangle( aPos, aTextSize ); } @@ -1972,7 +1972,7 @@ void SvxIconChoiceCtrl_Impl::FindBoundingRect( SvxIconChoiceCtrlEntry* pEntry ) void SvxIconChoiceCtrl_Impl::SetBoundingRect_Impl( SvxIconChoiceCtrlEntry* pEntry, const Point& rPos, const Size& /*rBoundingSize*/ ) { - Rectangle aGridRect( rPos, Size(nGridDX, nGridDY) ); + tools::Rectangle aGridRect( rPos, Size(nGridDX, nGridDY) ); pEntry->aGridRect = aGridRect; Center( pEntry ); AdjustVirtSize( pEntry->aRect ); @@ -2016,7 +2016,7 @@ void SvxIconChoiceCtrl_Impl::ShowCursor( bool bShow ) pView->HideFocus(); return; } - Rectangle aRect ( CalcFocusRect( pCursor ) ); + tools::Rectangle aRect ( CalcFocusRect( pCursor ) ); /*pView->*/ShowFocus( aRect ); } @@ -2036,8 +2036,8 @@ void SvxIconChoiceCtrl_Impl::HideDDIcon() bool SvxIconChoiceCtrl_Impl::HandleScrollCommand( const CommandEvent& rCmd ) { - Rectangle aDocRect( Point(), aVirtOutputSize ); - Rectangle aVisRect( GetOutputRect() ); + tools::Rectangle aDocRect( Point(), aVirtOutputSize ); + tools::Rectangle aVisRect( GetOutputRect() ); if( aVisRect.IsInside( aDocRect )) return false; Size aDocSize( aDocRect.GetSize() ); @@ -2145,7 +2145,7 @@ void SvxIconChoiceCtrl_Impl::ToTop( SvxIconChoiceCtrlEntry* pEntry ) } } -void SvxIconChoiceCtrl_Impl::ClipAtVirtOutRect( Rectangle& rRect ) const +void SvxIconChoiceCtrl_Impl::ClipAtVirtOutRect( tools::Rectangle& rRect ) const { if( rRect.Bottom() >= aVirtOutputSize.Height() ) rRect.Bottom() = aVirtOutputSize.Height() - 1; @@ -2161,14 +2161,14 @@ void SvxIconChoiceCtrl_Impl::ClipAtVirtOutRect( Rectangle& rRect ) const // visible // bScrBar == true: rectangle was calculated because of a scrollbar event -void SvxIconChoiceCtrl_Impl::MakeVisible( const Rectangle& rRect, bool bScrBar ) +void SvxIconChoiceCtrl_Impl::MakeVisible( const tools::Rectangle& rRect, bool bScrBar ) { - Rectangle aVirtRect( rRect ); + tools::Rectangle aVirtRect( rRect ); ClipAtVirtOutRect( aVirtRect ); Point aOrigin( pView->GetMapMode().GetOrigin() ); // convert to document coordinate aOrigin *= -1; - Rectangle aOutputArea( GetOutputRect() ); + tools::Rectangle aOutputArea( GetOutputRect() ); if( aOutputArea.IsInside( aVirtRect ) ) return; // is already visible @@ -2334,16 +2334,16 @@ void SvxIconChoiceCtrl_Impl::SetGrid( const Size& rSize ) // bounding rectangle. In WB_ICON mode with SvxIconChoiceCtrlTextMode::Full, Bottom is set to // LONG_MAX. -Rectangle SvxIconChoiceCtrl_Impl::CalcMaxTextRect( const SvxIconChoiceCtrlEntry* pEntry ) const +tools::Rectangle SvxIconChoiceCtrl_Impl::CalcMaxTextRect( const SvxIconChoiceCtrlEntry* pEntry ) const { - Rectangle aBoundRect; + tools::Rectangle aBoundRect; // avoid infinite recursion: don't calculate the bounding rectangle here if( IsBoundingRectValid( pEntry->aRect ) ) aBoundRect = pEntry->aRect; else aBoundRect = pEntry->aGridRect; - Rectangle aBmpRect( const_cast<SvxIconChoiceCtrl_Impl*>(this)->CalcBmpRect( + tools::Rectangle aBmpRect( const_cast<SvxIconChoiceCtrl_Impl*>(this)->CalcBmpRect( const_cast<SvxIconChoiceCtrlEntry*>(pEntry) ) ); if( nWinBits & WB_ICON ) { @@ -2429,7 +2429,7 @@ void SvxIconChoiceCtrl_Impl::Scroll( long nDeltaX, long nDeltaY ) aOrigin *= -1; aOrigin.Y() += nDeltaY; aOrigin.X() += nDeltaX; - Rectangle aRect( aOrigin, aOutputSize ); + tools::Rectangle aRect( aOrigin, aOutputSize ); MakeVisible( aRect, true/*bScrollBar*/ ); } @@ -2442,19 +2442,19 @@ const Size& SvxIconChoiceCtrl_Impl::GetItemSize( SvxIconChoiceCtrlEntry*, return aImageSize; // IcnViewFieldType::Image } -Rectangle SvxIconChoiceCtrl_Impl::CalcFocusRect( SvxIconChoiceCtrlEntry* pEntry ) +tools::Rectangle SvxIconChoiceCtrl_Impl::CalcFocusRect( SvxIconChoiceCtrlEntry* pEntry ) { - Rectangle aTextRect( CalcTextRect( pEntry ) ); - Rectangle aBoundRect( GetEntryBoundRect( pEntry ) ); - return Rectangle( + tools::Rectangle aTextRect( CalcTextRect( pEntry ) ); + tools::Rectangle aBoundRect( GetEntryBoundRect( pEntry ) ); + return tools::Rectangle( aBoundRect.Left(), aBoundRect.Top() - 1, aBoundRect.Right() - 1, aTextRect.Bottom() + 1); } // the hot spot is the inner 50% of the rectangle -static Rectangle GetHotSpot( const Rectangle& rRect ) +static tools::Rectangle GetHotSpot( const tools::Rectangle& rRect ) { - Rectangle aResult( rRect ); + tools::Rectangle aResult( rRect ); aResult.Justify(); Size aSize( rRect.GetSize() ); long nDelta = aSize.Width() / 4; @@ -2467,16 +2467,16 @@ static Rectangle GetHotSpot( const Rectangle& rRect ) } void SvxIconChoiceCtrl_Impl::SelectRect( SvxIconChoiceCtrlEntry* pEntry1, SvxIconChoiceCtrlEntry* pEntry2, - bool bAdd, std::vector<Rectangle*>* pOtherRects ) + bool bAdd, std::vector<tools::Rectangle*>* pOtherRects ) { DBG_ASSERT(pEntry1 && pEntry2,"SelectEntry: Invalid Entry-Ptr"); - Rectangle aRect( GetEntryBoundRect( pEntry1 ) ); + tools::Rectangle aRect( GetEntryBoundRect( pEntry1 ) ); aRect.Union( GetEntryBoundRect( pEntry2 ) ); SelectRect( aRect, bAdd, pOtherRects ); } -void SvxIconChoiceCtrl_Impl::SelectRect( const Rectangle& rRect, bool bAdd, - std::vector<Rectangle*>* pOtherRects ) +void SvxIconChoiceCtrl_Impl::SelectRect( const tools::Rectangle& rRect, bool bAdd, + std::vector<tools::Rectangle*>* pOtherRects ) { aCurSelectionRect = rRect; if( !pZOrderList || !pZOrderList->size() ) @@ -2490,7 +2490,7 @@ void SvxIconChoiceCtrl_Impl::SelectRect( const Rectangle& rRect, bool bAdd, pView->Update(); const size_t nCount = pZOrderList->size(); - Rectangle aRect( rRect ); + tools::Rectangle aRect( rRect ); aRect.Justify(); bool bCalcOverlap = (bAdd && pOtherRects && !pOtherRects->empty()); @@ -2507,7 +2507,7 @@ void SvxIconChoiceCtrl_Impl::SelectRect( const Rectangle& rRect, bool bAdd, if( !IsBoundingRectValid( pEntry->aRect )) FindBoundingRect( pEntry ); - Rectangle aBoundRect( GetHotSpot( pEntry->aRect ) ); + tools::Rectangle aBoundRect( GetHotSpot( pEntry->aRect ) ); bool bSelected = pEntry->IsSelected(); bool bOverlaps; @@ -2618,12 +2618,12 @@ void SvxIconChoiceCtrl_Impl::SelectRange( } } -bool SvxIconChoiceCtrl_Impl::IsOver( std::vector<Rectangle*>* pRectList, const Rectangle& rBoundRect ) +bool SvxIconChoiceCtrl_Impl::IsOver( std::vector<tools::Rectangle*>* pRectList, const tools::Rectangle& rBoundRect ) { const sal_uInt16 nCount = pRectList->size(); for( sal_uInt16 nCur = 0; nCur < nCount; nCur++ ) { - Rectangle* pRect = (*pRectList)[ nCur ]; + tools::Rectangle* pRect = (*pRectList)[ nCur ]; if( rBoundRect.IsOver( *pRect )) return true; } @@ -2634,14 +2634,14 @@ void SvxIconChoiceCtrl_Impl::AddSelectedRect( SvxIconChoiceCtrlEntry* pEntry1, SvxIconChoiceCtrlEntry* pEntry2 ) { DBG_ASSERT(pEntry1 && pEntry2,"SelectEntry: Invalid Entry-Ptr"); - Rectangle aRect( GetEntryBoundRect( pEntry1 ) ); + tools::Rectangle aRect( GetEntryBoundRect( pEntry1 ) ); aRect.Union( GetEntryBoundRect( pEntry2 ) ); AddSelectedRect( aRect ); } -void SvxIconChoiceCtrl_Impl::AddSelectedRect( const Rectangle& rRect ) +void SvxIconChoiceCtrl_Impl::AddSelectedRect( const tools::Rectangle& rRect ) { - Rectangle* pRect = new Rectangle( rRect ); + tools::Rectangle* pRect = new tools::Rectangle( rRect ); pRect->Justify(); aSelectedRectList.push_back( pRect ); } @@ -2651,7 +2651,7 @@ void SvxIconChoiceCtrl_Impl::ClearSelectedRectList() const sal_uInt16 nCount = aSelectedRectList.size(); for( sal_uInt16 nCur = 0; nCur < nCount; nCur++ ) { - Rectangle* pRect = aSelectedRectList[ nCur ]; + tools::Rectangle* pRect = aSelectedRectList[ nCur ]; delete pRect; } aSelectedRectList.clear(); @@ -2675,7 +2675,7 @@ IMPL_LINK_NOARG(SvxIconChoiceCtrl_Impl, DocRectChangedHdl, Timer *, void) bool SvxIconChoiceCtrl_Impl::IsTextHit( SvxIconChoiceCtrlEntry* pEntry, const Point& rDocPos ) { - Rectangle aRect( CalcTextRect( pEntry )); + tools::Rectangle aRect( CalcTextRect( pEntry )); if( aRect.IsInside( rDocPos ) ) return true; return false; @@ -2719,7 +2719,7 @@ void SvxIconChoiceCtrl_Impl::SetEntryTextMode( SvxIconChoiceCtrlTextMode eMode, // of the background. But what will we see, if the backgroundcolor is gray ? - We will see // a gray focusrect on a gray background !!! -void SvxIconChoiceCtrl_Impl::ShowFocus ( Rectangle& rRect ) +void SvxIconChoiceCtrl_Impl::ShowFocus ( tools::Rectangle& rRect ) { Color aBkgColor(pView->GetBackground().GetColor()); Color aPenColor; @@ -2820,7 +2820,7 @@ void SvxIconChoiceCtrl_Impl::EditEntry( SvxIconChoiceCtrlEntry* pEntry ) pCurEditedEntry = pEntry; OUString aEntryText( SvtIconChoiceCtrl::GetEntryText( pEntry, true ) ); - Rectangle aRect( CalcTextRect( pEntry, nullptr, true, &aEntryText ) ); + tools::Rectangle aRect( CalcTextRect( pEntry, nullptr, true, &aEntryText ) ); MakeVisible( aRect ); Point aPos( aRect.TopLeft() ); aPos = pView->GetPixelPos( aPos ); @@ -3219,7 +3219,7 @@ SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::FindEntryPredecessor( SvxIconCho const Point& rPosTopLeft ) { Point aPos( rPosTopLeft ); //TopLeft - Rectangle aCenterRect( CalcBmpRect( pEntry, &aPos )); + tools::Rectangle aCenterRect( CalcBmpRect( pEntry, &aPos )); Point aNewPos( aCenterRect.Center() ); sal_uLong nGrid = GetPredecessorGrid( aNewPos ); size_t nCount = aEntries.size(); @@ -3277,11 +3277,11 @@ bool SvxIconChoiceCtrl_Impl::RequestHelp( const HelpEvent& rHEvt ) OUString sQuickHelpText = pEntry->GetQuickHelpText(); OUString aEntryText( SvtIconChoiceCtrl::GetEntryText( pEntry, false ) ); - Rectangle aTextRect( CalcTextRect( pEntry, nullptr, false, &aEntryText ) ); + tools::Rectangle aTextRect( CalcTextRect( pEntry, nullptr, false, &aEntryText ) ); if ( ( !aTextRect.IsInside( aPos ) || aEntryText.isEmpty() ) && sQuickHelpText.isEmpty() ) return false; - Rectangle aOptTextRect( aTextRect ); + tools::Rectangle aOptTextRect( aTextRect ); aOptTextRect.Bottom() = LONG_MAX; DrawTextFlags nNewFlags = nCurTextDrawFlags; nNewFlags &= ~DrawTextFlags( DrawTextFlags::Clip | DrawTextFlags::EndEllipsis ); @@ -3343,9 +3343,9 @@ const SvxIconChoiceCtrlColumnInfo* SvxIconChoiceCtrl_Impl::GetColumn( sal_uInt16 return it->second.get(); } -void SvxIconChoiceCtrl_Impl::DrawHighlightFrame(vcl::RenderContext& rRenderContext, const Rectangle& rBmpRect) +void SvxIconChoiceCtrl_Impl::DrawHighlightFrame(vcl::RenderContext& rRenderContext, const tools::Rectangle& rBmpRect) { - Rectangle aBmpRect(rBmpRect); + tools::Rectangle aBmpRect(rBmpRect); long nBorder = 2; if (aImageSize.Width() < 32) nBorder = 1; @@ -3374,7 +3374,7 @@ void SvxIconChoiceCtrl_Impl::SetEntryHighlightFrame( SvxIconChoiceCtrlEntry* pEn if (pCurHighlightFrame) { - Rectangle aInvalidationRect(GetEntryBoundRect(pCurHighlightFrame)); + tools::Rectangle aInvalidationRect(GetEntryBoundRect(pCurHighlightFrame)); aInvalidationRect.expand(5); pCurHighlightFrame = nullptr; pView->Invalidate(aInvalidationRect); @@ -3383,7 +3383,7 @@ void SvxIconChoiceCtrl_Impl::SetEntryHighlightFrame( SvxIconChoiceCtrlEntry* pEn pCurHighlightFrame = pEntry; if (pEntry) { - Rectangle aInvalidationRect(GetEntryBoundRect(pEntry)); + tools::Rectangle aInvalidationRect(GetEntryBoundRect(pEntry)); aInvalidationRect.expand(5); pView->Invalidate(aInvalidationRect); } diff --git a/svtools/source/contnr/imivctl2.cxx b/svtools/source/contnr/imivctl2.cxx index 6506974e1e79..8fc65811fe35 100644 --- a/svtools/source/contnr/imivctl2.cxx +++ b/svtools/source/contnr/imivctl2.cxx @@ -44,7 +44,7 @@ sal_uInt16 IcnCursor_Impl::GetSortListPos( SvxIconChoiceCtrlEntryPtrVec& rList, long nPrevValue = LONG_MIN; while( nCount ) { - const Rectangle& rRect = pView->GetEntryBoundRect( rList[nCurPos] ); + const tools::Rectangle& rRect = pView->GetEntryBoundRect( rList[nCurPos] ); long nCurValue; if( bVertical ) nCurValue = rRect.Top(); @@ -74,7 +74,7 @@ void IcnCursor_Impl::ImplCreate() { SvxIconChoiceCtrlEntry* pEntry = pView->aEntries[ nCur ]; // const Rectangle& rRect = pView->GetEntryBoundRect( pEntry ); - Rectangle rRect( pView->CalcBmpRect( pEntry ) ); + tools::Rectangle rRect( pView->CalcBmpRect( pEntry ) ); short nY = (short)( ((rRect.Top()+rRect.Bottom())/2) / nDeltaHeight ); short nX = (short)( ((rRect.Left()+rRect.Right())/2) / nDeltaWidth ); @@ -122,7 +122,7 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchCol(sal_uInt16 nCol, sal_uInt16 nT if( !nCount ) return nullptr; - const Rectangle& rRefRect = pView->GetEntryBoundRect(pCurEntry); + const tools::Rectangle& rRefRect = pView->GetEntryBoundRect(pCurEntry); if( bSimple ) { @@ -137,7 +137,7 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchCol(sal_uInt16 nCol, sal_uInt16 nT while( ++it != rList.end() ) { SvxIconChoiceCtrlEntry* pEntry = *it; - const Rectangle& rRect = pView->GetEntryBoundRect( pEntry ); + const tools::Rectangle& rRect = pView->GetEntryBoundRect( pEntry ); if( rRect.Top() > rRefRect.Top() ) return pEntry; } @@ -149,7 +149,7 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchCol(sal_uInt16 nCol, sal_uInt16 nT while (it2 != rList.rend()) { SvxIconChoiceCtrlEntry* pEntry = *it2; - const Rectangle& rRect = pView->GetEntryBoundRect( pEntry ); + const tools::Rectangle& rRect = pView->GetEntryBoundRect( pEntry ); if( rRect.Top() < rRefRect.Top() ) return pEntry; ++it2; @@ -171,7 +171,7 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchCol(sal_uInt16 nCol, sal_uInt16 nT sal_uInt16 nY = pEntry->nY; if( nY >= nTop && nY <= nBottom ) { - const Rectangle& rRect = pView->GetEntryBoundRect( pEntry ); + const tools::Rectangle& rRect = pView->GetEntryBoundRect( pEntry ); long nDistance = rRect.Top() - rRefRect.Top(); if( nDistance < 0 ) nDistance *= -1; @@ -198,7 +198,7 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchRow(sal_uInt16 nRow, sal_uInt16 nL if( !nCount ) return nullptr; - const Rectangle& rRefRect = pView->GetEntryBoundRect(pCurEntry); + const tools::Rectangle& rRefRect = pView->GetEntryBoundRect(pCurEntry); if( bSimple ) { @@ -213,7 +213,7 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchRow(sal_uInt16 nRow, sal_uInt16 nL while( ++it != rList.end() ) { SvxIconChoiceCtrlEntry* pEntry = *it; - const Rectangle& rRect = pView->GetEntryBoundRect( pEntry ); + const tools::Rectangle& rRect = pView->GetEntryBoundRect( pEntry ); if( rRect.Left() > rRefRect.Left() ) return pEntry; } @@ -225,7 +225,7 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchRow(sal_uInt16 nRow, sal_uInt16 nL while (it2 != rList.rend()) { SvxIconChoiceCtrlEntry* pEntry = *it2; - const Rectangle& rRect = pView->GetEntryBoundRect( pEntry ); + const tools::Rectangle& rRect = pView->GetEntryBoundRect( pEntry ); if( rRect.Left() < rRefRect.Left() ) return pEntry; ++it2; @@ -247,7 +247,7 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchRow(sal_uInt16 nRow, sal_uInt16 nL sal_uInt16 nX = pEntry->nX; if( nX >= nLeft && nX <= nRight ) { - const Rectangle& rRect = pView->GetEntryBoundRect( pEntry ); + const tools::Rectangle& rRect = pView->GetEntryBoundRect( pEntry ); long nDistance = rRect.Left() - rRefRect.Left(); if( nDistance < 0 ) nDistance *= -1; @@ -606,14 +606,14 @@ GridId IcnGridMap_Impl::GetGrid( const Point& rDocPos ) return nId; } -Rectangle IcnGridMap_Impl::GetGridRect( GridId nId ) +tools::Rectangle IcnGridMap_Impl::GetGridRect( GridId nId ) { Create(); sal_uInt16 nGridX, nGridY; GetGridCoord( nId, nGridX, nGridY ); const long nLeft = nGridX * _pView->nGridDX+ LROFFS_WINBORDER; const long nTop = nGridY * _pView->nGridDY + TBOFFS_WINBORDER; - return Rectangle( + return tools::Rectangle( nLeft, nTop, nLeft + _pView->nGridDX, nTop + _pView->nGridDY ); diff --git a/svtools/source/contnr/ivctrl.cxx b/svtools/source/contnr/ivctrl.cxx index 4d41497c8cd2..41c113867ffd 100644 --- a/svtools/source/contnr/ivctrl.cxx +++ b/svtools/source/contnr/ivctrl.cxx @@ -112,7 +112,7 @@ OUString SvtIconChoiceCtrl::GetEntryText( SvxIconChoiceCtrlEntry* pEntry, bool ) return pEntry->GetText(); } -void SvtIconChoiceCtrl::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void SvtIconChoiceCtrl::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { _pImpl->Paint(rRenderContext, rRect); } @@ -139,7 +139,7 @@ void SvtIconChoiceCtrl::ArrangeIcons() if ( GetStyle() & WB_ALIGN_TOP ) { Size aFullSize; - Rectangle aEntryRect; + tools::Rectangle aEntryRect; for ( sal_Int32 i = 0; i < GetEntryCount(); i++ ) { @@ -154,7 +154,7 @@ void SvtIconChoiceCtrl::ArrangeIcons() else if ( GetStyle() & WB_ALIGN_LEFT ) { Size aFullSize; - Rectangle aEntryRect; + tools::Rectangle aEntryRect; for ( sal_Int32 i = 0; i < GetEntryCount(); i++ ) { @@ -363,13 +363,13 @@ void SvtIconChoiceCtrl::SetBackground( const Wallpaper& rPaper ) } if( aBackground.IsScrollable() ) { - Rectangle aRect; + tools::Rectangle aRect; aRect.SetSize( Size(32765, 32765) ); aBackground.SetRect( aRect ); } else { - Rectangle aRect( _pImpl->GetOutputRect() ); + tools::Rectangle aRect( _pImpl->GetOutputRect() ); aBackground.SetRect( aRect ); } Control::SetBackground( aBackground ); @@ -396,7 +396,7 @@ void SvtIconChoiceCtrl::SetSelectionMode( SelectionMode eMode ) _pImpl->SetSelectionMode( eMode ); } -Rectangle SvtIconChoiceCtrl::GetBoundingBox( SvxIconChoiceCtrlEntry* pEntry ) const +tools::Rectangle SvtIconChoiceCtrl::GetBoundingBox( SvxIconChoiceCtrlEntry* pEntry ) const { return _pImpl->GetEntryBoundRect( pEntry ); } @@ -407,9 +407,9 @@ void SvtIconChoiceCtrl::FillLayoutData() const const_cast<SvtIconChoiceCtrl*>(this)->Invalidate(); } -Rectangle SvtIconChoiceCtrl::GetEntryCharacterBounds( const sal_Int32 _nEntryPos, const sal_Int32 _nCharacterIndex ) const +tools::Rectangle SvtIconChoiceCtrl::GetEntryCharacterBounds( const sal_Int32 _nEntryPos, const sal_Int32 _nCharacterIndex ) const { - Rectangle aRect; + tools::Rectangle aRect; Pair aEntryCharacterRange = GetLineStartEnd( _nEntryPos ); if ( aEntryCharacterRange.A() + _nCharacterIndex < aEntryCharacterRange.B() ) diff --git a/svtools/source/contnr/simptabl.cxx b/svtools/source/contnr/simptabl.cxx index aa1c614a231d..0d910049248f 100644 --- a/svtools/source/contnr/simptabl.cxx +++ b/svtools/source/contnr/simptabl.cxx @@ -192,7 +192,7 @@ void SvSimpleTable::SetTabs() } } -void SvSimpleTable::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void SvSimpleTable::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { SvHeaderTabListBox::Paint(rRenderContext, rRect); @@ -344,7 +344,7 @@ void SvSimpleTable::HBarDrag() HideTracking(); if(!aHeaderBar->IsItemMode()) { - Rectangle aSizeRect(Point(0,0), + tools::Rectangle aSizeRect(Point(0,0), SvHeaderTabListBox::GetOutputSizePixel()); aSizeRect.Left()=-GetXOffset()+aHeaderBar->GetDragPos(); aSizeRect.Right()=-GetXOffset()+aHeaderBar->GetDragPos(); @@ -389,7 +389,7 @@ IMPL_LINK( SvSimpleTable, StartDragHdl, HeaderBar*, pCtr, void) { if(!aHeaderBar->IsItemMode()) { - Rectangle aSizeRect(Point(0,0), + tools::Rectangle aSizeRect(Point(0,0), SvHeaderTabListBox::GetOutputSizePixel()); aSizeRect.Left()=-GetXOffset()+aHeaderBar->GetDragPos(); aSizeRect.Right()=-GetXOffset()+aHeaderBar->GetDragPos(); diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx index fb3c17827bee..b47fd58440bb 100644 --- a/svtools/source/contnr/svimpbox.cxx +++ b/svtools/source/contnr/svimpbox.cxx @@ -218,7 +218,7 @@ void SvImpLBox::UpdateContextBmpWidthMax( SvTreeListEntry* pEntry ) } } -void SvImpLBox::CalcCellFocusRect( SvTreeListEntry* pEntry, Rectangle& rRect ) +void SvImpLBox::CalcCellFocusRect( SvTreeListEntry* pEntry, tools::Rectangle& rRect ) { if ( pEntry && bIsCellFocusEnabled ) { @@ -359,7 +359,7 @@ void SvImpLBox::CursorDown() ShowCursor( false ); pView->Update(); pStartEntry = pNextFirstToDraw; - Rectangle aArea( GetVisibleArea() ); + tools::Rectangle aArea( GetVisibleArea() ); pView->Scroll( 0, -(pView->GetEntryHeight()), aArea, ScrollFlags::NoChildren ); pView->Update(); ShowCursor( true ); @@ -380,7 +380,7 @@ void SvImpLBox::CursorUp() ShowCursor( false ); pView->Update(); pStartEntry = pPrevFirstToDraw; - Rectangle aArea( GetVisibleArea() ); + tools::Rectangle aArea( GetVisibleArea() ); aArea.Bottom() -= nEntryHeight; pView->Scroll( 0, nEntryHeight, aArea, ScrollFlags::NoChildren ); pView->Update(); @@ -416,7 +416,7 @@ void SvImpLBox::PageDown( sal_uInt16 nDelta ) } else { - Rectangle aArea( GetVisibleArea() ); + tools::Rectangle aArea( GetVisibleArea() ); long nScroll = pView->GetEntryHeight() * static_cast<long>(nRealDelta); nScroll = -nScroll; pView->Update(); @@ -454,7 +454,7 @@ void SvImpLBox::PageUp( sal_uInt16 nDelta ) else { long nEntryHeight = pView->GetEntryHeight(); - Rectangle aArea( GetVisibleArea() ); + tools::Rectangle aArea( GetVisibleArea() ); pView->Update(); pView->Scroll( 0, nEntryHeight*nRealDelta, aArea, ScrollFlags::NoChildren ); pView->Update(); @@ -535,7 +535,7 @@ void SvImpLBox::InvalidateEntriesFrom( long nY ) const { if( !(nFlags & LBoxFlags::InPaint )) { - Rectangle aRect( GetVisibleArea() ); + tools::Rectangle aRect( GetVisibleArea() ); aRect.Top() = nY; pView->Invalidate( aRect ); } @@ -545,7 +545,7 @@ void SvImpLBox::InvalidateEntry( long nY ) const { if( !(nFlags & LBoxFlags::InPaint )) { - Rectangle aRect( GetVisibleArea() ); + tools::Rectangle aRect( GetVisibleArea() ); long nMaxBottom = aRect.Bottom(); aRect.Top() = nY; aRect.Bottom() = nY; aRect.Bottom() += pView->GetEntryHeight(); @@ -587,7 +587,7 @@ void SvImpLBox::RecalcFocusRect() { pView->HideFocus(); long nY = GetEntryLine( pCursor ); - Rectangle aRect = pView->GetFocusRect( pCursor, nY ); + tools::Rectangle aRect = pView->GetFocusRect( pCursor, nY ); CalcCellFocusRect( pCursor, aRect ); vcl::Region aOldClip( pView->GetClipRegion()); vcl::Region aClipRegion( GetClipRegionRect() ); @@ -683,7 +683,7 @@ void SvImpLBox::ShowCursor( bool bShow ) else { long nY = GetEntryLine( pCursor ); - Rectangle aRect = pView->GetFocusRect( pCursor, nY ); + tools::Rectangle aRect = pView->GetFocusRect( pCursor, nY ); CalcCellFocusRect( pCursor, aRect ); vcl::Region aOldClip( pView->GetClipRegion()); vcl::Region aClipRegion( GetClipRegionRect() ); @@ -743,7 +743,7 @@ void SvImpLBox::KeyLeftRight( long nDelta ) if( !(nFlags & LBoxFlags::InResize) ) { - Rectangle aRect( GetVisibleArea() ); + tools::Rectangle aRect( GetVisibleArea() ); pView->Scroll( -nDelta, 0, aRect, ScrollFlags::NoChildren ); } else @@ -785,7 +785,7 @@ bool SvImpLBox::EntryReallyHit(SvTreeListEntry* pEntry, const Point& rPosPixel, if( pEntry->ItemCount() >= 3 ) return true; - Rectangle aRect( pView->GetFocusRect( pEntry, nLine )); + tools::Rectangle aRect( pView->GetFocusRect( pEntry, nLine )); aRect.Right() = GetOutputSize().Width() - pView->GetMapMode().GetOrigin().X(); SvLBoxContextBmp* pBmp = static_cast<SvLBoxContextBmp*>(pEntry->GetFirstItem(SvLBoxItemType::ContextBmp)); @@ -861,17 +861,17 @@ SvTreeListEntry* SvImpLBox::MakePointVisible(const Point& rPoint) return pEntry; } -Rectangle SvImpLBox::GetClipRegionRect() const +tools::Rectangle SvImpLBox::GetClipRegionRect() const { Point aOrigin( pView->GetMapMode().GetOrigin() ); aOrigin.X() *= -1; // conversion document coordinates - Rectangle aClipRect( aOrigin, aOutputSize ); + tools::Rectangle aClipRect( aOrigin, aOutputSize ); aClipRect.Bottom()++; return aClipRect; } -void SvImpLBox::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void SvImpLBox::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { if (!pView->GetVisibleCount()) return; @@ -1031,7 +1031,7 @@ void SvImpLBox::DrawNet(vcl::RenderContext& rRenderContext) ImplControlValue aControlValue; ControlState nState = ControlState::ENABLED; if (rRenderContext.DrawNativeControl(ControlType::ListNet, ControlPart::Entire, - Rectangle(), nState, aControlValue, OUString())) + tools::Rectangle(), nState, aControlValue, OUString())) { return; } @@ -1230,7 +1230,7 @@ void SvImpLBox::AdjustScrollBars( Size& rSize ) // adapt Range, VisibleRange etc. // refresh output size, in case we have to scroll - Rectangle aRect; + tools::Rectangle aRect; aRect.SetSize( aOSize ); aSelEng.SetVisibleArea( aRect ); @@ -3059,11 +3059,11 @@ void SvImpLBox::EndScroll() } -Rectangle SvImpLBox::GetVisibleArea() const +tools::Rectangle SvImpLBox::GetVisibleArea() const { Point aPos( pView->GetMapMode().GetOrigin() ); aPos.X() *= -1; - Rectangle aRect( aPos, aOutputSize ); + tools::Rectangle aRect( aPos, aOutputSize ); return aRect; } @@ -3139,9 +3139,9 @@ bool SvImpLBox::RequestHelp( const HelpEvent& rHEvt ) aSize.Width() = pNextTab->GetPos() - pTab->GetPos(); bItemClipped = true; } - Rectangle aItemRect( aPos, aSize ); + tools::Rectangle aItemRect( aPos, aSize ); - Rectangle aViewRect( GetVisibleArea() ); + tools::Rectangle aViewRect( GetVisibleArea() ); if( bItemClipped || !aViewRect.IsInside( aItemRect ) ) { @@ -3322,7 +3322,7 @@ void SvImpLBox::ShowFocusRect( const SvTreeListEntry* pEntry ) if( pEntry ) { long nY = GetEntryLine( const_cast<SvTreeListEntry*>(pEntry) ); - Rectangle aRect = pView->GetFocusRect( const_cast<SvTreeListEntry*>(pEntry), nY ); + tools::Rectangle aRect = pView->GetFocusRect( const_cast<SvTreeListEntry*>(pEntry), nY ); vcl::Region aOldClip( pView->GetClipRegion()); vcl::Region aClipRegion( GetClipRegionRect() ); pView->SetClipRegion( aClipRegion ); diff --git a/svtools/source/contnr/svlbitm.cxx b/svtools/source/contnr/svlbitm.cxx index 52c0da1fbacc..6b7d4e4b96df 100644 --- a/svtools/source/contnr/svlbitm.cxx +++ b/svtools/source/contnr/svlbitm.cxx @@ -198,7 +198,7 @@ void SvLBoxString::Paint( nStyle |= DrawTextFlags::PathEllipsis | DrawTextFlags::Center; aSize.Width() = rDev.GetEntryWidth(); } - rRenderContext.DrawText(Rectangle(rPos, aSize), maText, nStyle); + rRenderContext.DrawText(tools::Rectangle(rPos, aSize), maText, nStyle); } SvLBoxItem* SvLBoxString::Create() const @@ -301,7 +301,7 @@ void SvLBoxButton::Paint( Size aSize(pData->Width(), pData->Height()); ImplAdjustBoxSize(aSize, eCtrlType, rRenderContext); ImplControlValue aControlValue; - Rectangle aCtrlRegion( rPos, aSize ); + tools::Rectangle aCtrlRegion( rPos, aSize ); ControlState nState = ControlState::NONE; //states ControlState::DEFAULT, ControlState::PRESSED and ControlState::ROLLOVER are not implemented @@ -340,12 +340,12 @@ void SvLBoxButton::ImplAdjustBoxSize(Size& io_rSize, ControlType i_eType, vcl::R if (rRenderContext.IsNativeControlSupported( i_eType, ControlPart::Entire) ) { ImplControlValue aControlValue; - Rectangle aCtrlRegion( Point( 0, 0 ), io_rSize ); + tools::Rectangle aCtrlRegion( Point( 0, 0 ), io_rSize ); ControlState nState = ControlState::ENABLED; aControlValue.setTristateVal( ButtonValue::On ); - Rectangle aNativeBounds, aNativeContent; + tools::Rectangle aNativeBounds, aNativeContent; bool bNativeOK = rRenderContext.GetNativeControlRegion( i_eType, ControlPart::Entire, aCtrlRegion, diff --git a/svtools/source/contnr/svtabbx.cxx b/svtools/source/contnr/svtabbx.cxx index 965fd15c3397..5e3e5e641081 100644 --- a/svtools/source/contnr/svtabbx.cxx +++ b/svtools/source/contnr/svtabbx.cxx @@ -510,7 +510,7 @@ void SvHeaderTabListBox::dispose() SvTabListBox::dispose(); } -void SvHeaderTabListBox::Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) +void SvHeaderTabListBox::Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) { if (m_bFirstPaint) { @@ -776,9 +776,9 @@ OUString SvHeaderTabListBox::GetAccessibleCellText( long _nRow, sal_uInt16 _nCol return GetTabEntryText(_nRow, _nColumnPos); } -Rectangle SvHeaderTabListBox::calcHeaderRect( bool _bIsColumnBar, bool _bOnScreen ) +tools::Rectangle SvHeaderTabListBox::calcHeaderRect( bool _bIsColumnBar, bool _bOnScreen ) { - Rectangle aRect; + tools::Rectangle aRect; if ( _bIsColumnBar ) { vcl::Window* pParent = nullptr; @@ -790,36 +790,36 @@ Rectangle SvHeaderTabListBox::calcHeaderRect( bool _bIsColumnBar, bool _bOnScree return aRect; } -Rectangle SvHeaderTabListBox::calcTableRect( bool _bOnScreen ) +tools::Rectangle SvHeaderTabListBox::calcTableRect( bool _bOnScreen ) { vcl::Window* pParent = nullptr; if ( !_bOnScreen ) pParent = GetAccessibleParentWindow(); - Rectangle aRect( GetWindowExtentsRelative( pParent ) ); + tools::Rectangle aRect( GetWindowExtentsRelative( pParent ) ); return aRect; } -Rectangle SvHeaderTabListBox::GetFieldRectPixelAbs( sal_Int32 _nRow, sal_uInt16 _nColumn, bool _bIsHeader, bool _bOnScreen ) +tools::Rectangle SvHeaderTabListBox::GetFieldRectPixelAbs( sal_Int32 _nRow, sal_uInt16 _nColumn, bool _bIsHeader, bool _bOnScreen ) { DBG_ASSERT( !_bIsHeader || 0 == _nRow, "invalid parameters" ); - Rectangle aRect; + tools::Rectangle aRect; SvTreeListEntry* pEntry = GetEntry( _nRow ); if ( pEntry ) { aRect = _bIsHeader ? calcHeaderRect( true, false ) : GetBoundingRect( pEntry ); Point aTopLeft = aRect.TopLeft(); DBG_ASSERT( m_pImpl->m_pHeaderBar->GetItemCount() > _nColumn, "invalid column" ); - Rectangle aItemRect = m_pImpl->m_pHeaderBar->GetItemRect( m_pImpl->m_pHeaderBar->GetItemId( _nColumn ) ); + tools::Rectangle aItemRect = m_pImpl->m_pHeaderBar->GetItemRect( m_pImpl->m_pHeaderBar->GetItemId( _nColumn ) ); aTopLeft.X() = aItemRect.Left(); Size aSize = aItemRect.GetSize(); - aRect = Rectangle( aTopLeft, aSize ); + aRect = tools::Rectangle( aTopLeft, aSize ); vcl::Window* pParent = nullptr; if ( !_bOnScreen ) pParent = GetAccessibleParentWindow(); aTopLeft = aRect.TopLeft(); aTopLeft += GetWindowExtentsRelative( pParent ).TopLeft(); - aRect = Rectangle( aTopLeft, aRect.GetSize() ); + aRect = tools::Rectangle( aTopLeft, aRect.GetSize() ); } return aRect; @@ -1095,7 +1095,7 @@ bool SvHeaderTabListBox::GetGlyphBoundRects( const Point& rOrigin, const OUStrin return Control::GetGlyphBoundRects( rOrigin, rStr, nIndex, nLen, rVector ); } -Rectangle SvHeaderTabListBox::GetWindowExtentsRelative( vcl::Window *pRelativeWindow ) const +tools::Rectangle SvHeaderTabListBox::GetWindowExtentsRelative( vcl::Window *pRelativeWindow ) const { return Control::GetWindowExtentsRelative( pRelativeWindow ); } @@ -1141,9 +1141,9 @@ Reference< XAccessible > SvHeaderTabListBox::CreateAccessible() return xAccessible; } -Rectangle SvHeaderTabListBox::GetFieldCharacterBounds(sal_Int32,sal_Int32,sal_Int32) +tools::Rectangle SvHeaderTabListBox::GetFieldCharacterBounds(sal_Int32,sal_Int32,sal_Int32) { - Rectangle aRect; + tools::Rectangle aRect; return aRect; } diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx index 2adf1912ae79..564bbcb5733b 100644 --- a/svtools/source/contnr/treelistbox.cxx +++ b/svtools/source/contnr/treelistbox.cxx @@ -883,7 +883,7 @@ void SvTreeListBox::EnableSelectionAsDropTarget( bool bEnable ) // InplaceEditing // ****************************************************************** -void SvTreeListBox::EditText( const OUString& rStr, const Rectangle& rRect, +void SvTreeListBox::EditText( const OUString& rStr, const tools::Rectangle& rRect, const Selection& rSel ) { delete pEdCtrl; @@ -2397,7 +2397,7 @@ void SvTreeListBox::AdjustEntryHeightAndRecalc() RecalcViewData(); } -void SvTreeListBox::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void SvTreeListBox::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { Control::Paint(rRenderContext, rRect); if (nTreeFlags & SvTreeFlags::RECALCTABS) @@ -2410,7 +2410,7 @@ void SvTreeListBox::Paint(vcl::RenderContext& rRenderContext, const Rectangle& r if (HasFocus()) { long nHeight = rRenderContext.GetTextHeight(); - Rectangle aRect(Point(0, 0), Size(GetSizePixel().Width(), nHeight)); + tools::Rectangle aRect(Point(0, 0), Size(GetSizePixel().Width(), nHeight)); ShowFocus(aRect); } else @@ -2538,7 +2538,7 @@ void SvTreeListBox::EditItemText(SvTreeListEntry* pEntry, SvLBoxString* pItem, c Point aOrigin( GetMapMode().GetOrigin() ); aPos += aOrigin; // convert to win coordinates aSize.Width() -= aOrigin.X(); - Rectangle aRect( aPos, aSize ); + tools::Rectangle aRect( aPos, aSize ); EditText( pItem->GetText(), aRect, rSelection ); } @@ -2704,7 +2704,7 @@ void SvTreeListBox::InvalidateEntry(SvTreeListEntry* pEntry) void SvTreeListBox::PaintEntry1(SvTreeListEntry& rEntry, long nLine, vcl::RenderContext& rRenderContext) { - Rectangle aRect; // multi purpose + tools::Rectangle aRect; // multi purpose bool bHorSBar = pImpl->HasHorScrollBar(); PreparePaint(rRenderContext, rEntry); @@ -2959,7 +2959,7 @@ void SvTreeListBox::PaintEntry1(SvTreeListEntry& rEntry, long nLine, vcl::Render if (rRenderContext.IsNativeControlSupported(ControlType::ListNode, ControlPart::Entire)) { ImplControlValue aControlValue; - Rectangle aCtrlRegion(aPos, pImg->GetSizePixel()); + tools::Rectangle aCtrlRegion(aPos, pImg->GetSizePixel()); ControlState nState = ControlState::NONE; if (IsEnabled()) @@ -3000,10 +3000,10 @@ void SvTreeListBox::PreparePaint(vcl::RenderContext& /*rRenderContext*/, SvTreeL { } -Rectangle SvTreeListBox::GetFocusRect( SvTreeListEntry* pEntry, long nLine ) +tools::Rectangle SvTreeListBox::GetFocusRect( SvTreeListEntry* pEntry, long nLine ) { Size aSize; - Rectangle aRect; + tools::Rectangle aRect; aRect.Top() = nLine; aSize.Height() = GetEntryHeight(); @@ -3343,7 +3343,7 @@ void SvTreeListBox::Invalidate( InvalidateFlags nInvalidateFlags ) pImpl->Invalidate(); } -void SvTreeListBox::Invalidate( const Rectangle& rRect, InvalidateFlags nInvalidateFlags ) +void SvTreeListBox::Invalidate( const tools::Rectangle& rRect, InvalidateFlags nInvalidateFlags ) { if( nFocusWidth == -1 ) // to make sure that the control doesn't show the wrong focus rectangle @@ -3668,7 +3668,7 @@ void SvTreeListBox::EnableList( bool _bEnable ) // call base class method Window::Enable(_bEnable); // then invalidate - Invalidate(Rectangle(Point(), GetSizePixel())); + Invalidate(tools::Rectangle(Point(), GetSizePixel())); } css::uno::Reference< XAccessible > SvTreeListBox::CreateAccessible() @@ -3718,10 +3718,10 @@ void SvTreeListBox::FillAccessibleEntryStateSet( SvTreeListEntry* pEntry, ::utl: } } -Rectangle SvTreeListBox::GetBoundingRect( SvTreeListEntry* pEntry ) +tools::Rectangle SvTreeListBox::GetBoundingRect( SvTreeListEntry* pEntry ) { Point aPos = GetEntryPosition( pEntry ); - Rectangle aRect = GetFocusRect( pEntry, aPos.Y() ); + tools::Rectangle aRect = GetFocusRect( pEntry, aPos.Y() ); return aRect; } diff --git a/svtools/source/contnr/viewdataentry.cxx b/svtools/source/contnr/viewdataentry.cxx index 353d891b38d0..53795b414db2 100644 --- a/svtools/source/contnr/viewdataentry.cxx +++ b/svtools/source/contnr/viewdataentry.cxx @@ -89,12 +89,12 @@ SvViewDataItem& SvViewDataEntry::GetItem(size_t nPos) return maItems[nPos]; } -void SvViewDataEntry::SetPaintRectangle(Rectangle aRectangle) +void SvViewDataEntry::SetPaintRectangle(tools::Rectangle aRectangle) { maPaintRectangle = aRectangle; } -const Rectangle& SvViewDataEntry::GetPaintRectangle() const +const tools::Rectangle& SvViewDataEntry::GetPaintRectangle() const { return maPaintRectangle; } diff --git a/svtools/source/control/accessibleruler.cxx b/svtools/source/control/accessibleruler.cxx index e3fd1b0b2041..d41128d48fdb 100644 --- a/svtools/source/control/accessibleruler.cxx +++ b/svtools/source/control/accessibleruler.cxx @@ -78,7 +78,7 @@ sal_Bool SAL_CALL SvtRulerAccessible::containsPoint( const awt::Point& rPoint ) { // no guard -> done in getBounds() // return GetBoundingBox().IsInside( VCLPoint( rPoint ) ); - return Rectangle( Point( 0, 0 ), GetBoundingBox().GetSize() ).IsInside( VCLPoint( rPoint ) ); + return tools::Rectangle( Point( 0, 0 ), GetBoundingBox().GetSize() ).IsInside( VCLPoint( rPoint ) ); } uno::Reference< XAccessible > SAL_CALL SvtRulerAccessible::getAccessibleAtPoint( const awt::Point& ) @@ -340,23 +340,23 @@ void SAL_CALL SvtRulerAccessible::disposing() } } -Rectangle SvtRulerAccessible::GetBoundingBoxOnScreen() +tools::Rectangle SvtRulerAccessible::GetBoundingBoxOnScreen() { SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_aMutex ); ThrowExceptionIfNotAlive(); - return Rectangle( mpRepr->GetParent()->OutputToAbsoluteScreenPixel( mpRepr->GetPosPixel() ), mpRepr->GetSizePixel() ); + return tools::Rectangle( mpRepr->GetParent()->OutputToAbsoluteScreenPixel( mpRepr->GetPosPixel() ), mpRepr->GetSizePixel() ); } -Rectangle SvtRulerAccessible::GetBoundingBox() +tools::Rectangle SvtRulerAccessible::GetBoundingBox() { SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_aMutex ); ThrowExceptionIfNotAlive(); - return Rectangle( mpRepr->GetPosPixel(), mpRepr->GetSizePixel() ); + return tools::Rectangle( mpRepr->GetPosPixel(), mpRepr->GetSizePixel() ); } void SvtRulerAccessible::ThrowExceptionIfNotAlive() diff --git a/svtools/source/control/calendar.cxx b/svtools/source/control/calendar.cxx index edb5663a6e64..0c2528207a2c 100644 --- a/svtools/source/control/calendar.cxx +++ b/svtools/source/control/calendar.cxx @@ -605,7 +605,7 @@ sal_uInt16 Calendar::ImplHitTest( const Point& rPos, Date& rDate ) const namespace { -void ImplDrawSpinArrow(vcl::RenderContext& rRenderContext, const Rectangle& rRect, bool bPrev) +void ImplDrawSpinArrow(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect, bool bPrev) { long i; long n; @@ -620,7 +620,7 @@ void ImplDrawSpinArrow(vcl::RenderContext& rRenderContext, const Rectangle& rRec n--; nLines = n/2; - Rectangle aRect(Point( rRect.Left() + (nWidth / 2) - (nLines / 2), + tools::Rectangle aRect(Point( rRect.Left() + (nWidth / 2) - (nLines / 2), rRect.Top() + (nHeight / 2) ), Size(1, 1)); if (!bPrev) @@ -654,7 +654,7 @@ void Calendar::ImplDrawSpin(vcl::RenderContext& rRenderContext ) { rRenderContext.SetLineColor(); rRenderContext.SetFillColor(rRenderContext.GetSettings().GetStyleSettings().GetButtonTextColor()); - Rectangle aOutRect = maPrevRect; + tools::Rectangle aOutRect = maPrevRect; aOutRect.Left() += 3; aOutRect.Top() += 3; aOutRect.Right() -= 3; @@ -676,7 +676,7 @@ void Calendar::ImplDrawDate(vcl::RenderContext& rRenderContext, { Color* pTextColor = nullptr; const OUString& rDay = maDayTexts[nDay - 1]; - Rectangle aDateRect(nX, nY, nX + mnDayWidth - 1, nY + mnDayHeight - 1); + tools::Rectangle aDateRect(nX, nY, nX + mnDayWidth - 1, nY + mnDayHeight - 1); bool bSel = false; bool bFocus = false; @@ -784,7 +784,7 @@ void Calendar::ImplDraw(vcl::RenderContext& rRenderContext) // display title bar rRenderContext.SetLineColor(); rRenderContext.SetFillColor(rStyleSettings.GetFaceColor()); - Rectangle aTitleRect(0, nY, aOutSize.Width() - 1, nY + mnDayHeight - DAY_OFFY + TITLE_BORDERY * 2); + tools::Rectangle aTitleRect(0, nY, aOutSize.Width() - 1, nY + mnDayHeight - DAY_OFFY + TITLE_BORDERY * 2); rRenderContext.DrawRect(aTitleRect); Point aTopLeft1(aTitleRect.Left(), aTitleRect.Top()); Point aTopLeft2(aTitleRect.Left(), aTitleRect.Top() + 1); @@ -970,7 +970,7 @@ void Calendar::ImplUpdateDate( const Date& rDate ) { if (IsReallyVisible() && IsUpdateMode()) { - Rectangle aDateRect(GetDateRect(rDate)); + tools::Rectangle aDateRect(GetDateRect(rDate)); if (!aDateRect.IsEmpty()) { Invalidate(aDateRect); @@ -1128,7 +1128,7 @@ void Calendar::ImplUpdate( bool bCalcNew ) void Calendar::ImplInvertDropPos() { - Rectangle aRect = GetDateRect( maDropDate );//this is one Pixel to width and one to heigh + tools::Rectangle aRect = GetDateRect( maDropDate );//this is one Pixel to width and one to heigh aRect.Bottom() = aRect.Top()+mnDayHeight-1; aRect.Right() = aRect.Left()+mnDayWidth-1; Invert( aRect ); @@ -1496,7 +1496,7 @@ void Calendar::KeyInput( const KeyEvent& rKEvt ) } } -void Calendar::Paint( vcl::RenderContext& rRenderContext, const Rectangle& ) +void Calendar::Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& ) { ImplDraw(rRenderContext); } @@ -1526,7 +1526,7 @@ void Calendar::RequestHelp( const HelpEvent& rHEvt ) Date aDate = maCurDate; if ( GetDate( ScreenToOutputPixel( rHEvt.GetMousePosPixel() ), aDate ) ) { - Rectangle aDateRect = GetDateRect( aDate ); + tools::Rectangle aDateRect = GetDateRect( aDate ); Point aPt = OutputToScreenPixel( aDateRect.TopLeft() ); aDateRect.Left() = aPt.X(); aDateRect.Top() = aPt.Y(); @@ -1789,9 +1789,9 @@ bool Calendar::GetDate( const Point& rPos, Date& rDate ) const return false; } -Rectangle Calendar::GetDateRect( const Date& rDate ) const +tools::Rectangle Calendar::GetDateRect( const Date& rDate ) const { - Rectangle aRect; + tools::Rectangle aRect; if ( mbFormat || (rDate < maFirstDate) || (rDate > (maFirstDate+mnDayCount)) ) return aRect; @@ -2237,7 +2237,7 @@ bool CalendarField::ShowDropDown( bool bShow ) } pCalendar->SetCurDate( aDate ); Point aPos( GetParent()->OutputToScreenPixel( GetPosPixel() ) ); - Rectangle aRect( aPos, GetSizePixel() ); + tools::Rectangle aRect( aPos, GetSizePixel() ); aRect.Bottom() -= 1; mpCalendar->SetOutputSizePixel( mpCalendar->CalcWindowSizePixel() ); mpFloatWin->SetOutputSizePixel( mpCalendar->GetSizePixel() ); diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx index d13af25aee57..5a230f550bf0 100644 --- a/svtools/source/control/ctrlbox.cxx +++ b/svtools/source/control/ctrlbox.cxx @@ -462,7 +462,7 @@ void LineListBox::ImpGetLine( long nLine1, long nLine2, long nDistance, if ( aVirDev->GetOutputSizePixel() != aVirSize ) aVirDev->SetOutputSizePixel( aVirSize ); aVirDev->SetFillColor( aColorDist ); - aVirDev->DrawRect( Rectangle( Point(), aSize ) ); + aVirDev->DrawRect( tools::Rectangle( Point(), aSize ) ); aVirDev->SetFillColor( aColor1 ); @@ -858,7 +858,7 @@ void FontNameBox::ImplCalcUserItemSize() namespace { - long shrinkFontToFit(OUString &rSampleText, long nH, vcl::Font &rFont, OutputDevice &rDevice, Rectangle &rTextRect) + long shrinkFontToFit(OUString &rSampleText, long nH, vcl::Font &rFont, OutputDevice &rDevice, tools::Rectangle &rTextRect) { long nWidth = 0; @@ -910,7 +910,7 @@ void FontNameBox::UserDraw( const UserDrawEvent& rUDEvt ) pRenderContext->SetTextColor(aTextColor); bool bUsingCorrectFont = true; - Rectangle aTextRect; + tools::Rectangle aTextRect; // Preview the font name OUString sFontName = rFontMetric.GetFamilyName(); diff --git a/svtools/source/control/headbar.cxx b/svtools/source/control/headbar.cxx index 3907c9735db5..9f863884de6b 100644 --- a/svtools/source/control/headbar.cxx +++ b/svtools/source/control/headbar.cxx @@ -158,9 +158,9 @@ long HeaderBar::ImplGetItemPos( sal_uInt16 nPos ) const return nX; } -Rectangle HeaderBar::ImplGetItemRect( sal_uInt16 nPos ) const +tools::Rectangle HeaderBar::ImplGetItemRect( sal_uInt16 nPos ) const { - Rectangle aRect( ImplGetItemPos( nPos ), 0, 0, mnDY-1 ); + tools::Rectangle aRect( ImplGetItemPos( nPos ), 0, 0, mnDY-1 ); aRect.Right() = aRect.Left() + (*mpItemList)[ nPos ]->mnSize - 1; // check for overflow on various systems if ( aRect.Right() > 16000 ) @@ -233,11 +233,11 @@ sal_uInt16 HeaderBar::ImplHitTest( const Point& rPos, void HeaderBar::ImplInvertDrag( sal_uInt16 nStartPos, sal_uInt16 nEndPos ) { - Rectangle aRect1 = ImplGetItemRect( nStartPos ); - Rectangle aRect2 = ImplGetItemRect( nEndPos ); + tools::Rectangle aRect1 = ImplGetItemRect( nStartPos ); + tools::Rectangle aRect2 = ImplGetItemRect( nEndPos ); Point aStartPos = aRect1.Center(); Point aEndPos = aStartPos; - Rectangle aStartRect( aStartPos.X()-2, aStartPos.Y()-2, + tools::Rectangle aStartRect( aStartPos.X()-2, aStartPos.Y()-2, aStartPos.X()+2, aStartPos.Y()+2 ); if ( nEndPos > nStartPos ) @@ -278,13 +278,13 @@ void HeaderBar::ImplInvertDrag( sal_uInt16 nStartPos, sal_uInt16 nEndPos ) } void HeaderBar::ImplDrawItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos, bool bHigh, - const Rectangle& rItemRect, const Rectangle* pRect, DrawFlags ) + const tools::Rectangle& rItemRect, const tools::Rectangle* pRect, DrawFlags ) { ImplControlValue aControlValue(0); - Rectangle aCtrlRegion; + tools::Rectangle aCtrlRegion; ControlState nState(ControlState::NONE); - Rectangle aRect = rItemRect; + tools::Rectangle aRect = rItemRect; // do not display if there is no space if (aRect.GetWidth() <= 1) @@ -555,7 +555,7 @@ void HeaderBar::ImplDrawItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos { if (rRenderContext.IsNativeControlSupported(ControlType::ListHeader, ControlPart::Arrow)) { - aCtrlRegion = Rectangle(Point(nArrowX, aRect.Top()), Size(nArrowWidth, aRect.GetHeight())); + aCtrlRegion = tools::Rectangle(Point(nArrowX, aRect.Top()), Size(nArrowWidth, aRect.GetHeight())); // control value passes 1 if arrow points down, 0 otherwise aControlValue.setNumericVal((nBits & HeaderBarItemBits::DOWNARROW) ? 1 : 0); nState |= ControlState::ENABLED; @@ -609,9 +609,9 @@ void HeaderBar::ImplDrawItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos } void HeaderBar::ImplDrawItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos, - bool bHigh, const Rectangle* pRect ) + bool bHigh, const tools::Rectangle* pRect ) { - Rectangle aRect = ImplGetItemRect(nPos); + tools::Rectangle aRect = ImplGetItemRect(nPos); ImplDrawItem(rRenderContext, nPos, bHigh, aRect, pRect, DrawFlags::NONE ); } @@ -619,7 +619,7 @@ void HeaderBar::ImplUpdate(sal_uInt16 nPos, bool bEnd) { if (IsVisible() && IsUpdateMode()) { - Rectangle aRect; + tools::Rectangle aRect; size_t nItemCount = mpItemList->size(); if (nPos < nItemCount) aRect = ImplGetItemRect(nPos); @@ -689,7 +689,7 @@ void HeaderBar::ImplStartDrag( const Point& rMousePos, bool bCommand ) Invalidate(); else { - Rectangle aSizeRect( mnDragPos, 0, mnDragPos, mnDragSize+mnDY ); + tools::Rectangle aSizeRect( mnDragPos, 0, mnDragPos, mnDragSize+mnDY ); ShowTracking( aSizeRect, ShowTrackFlags::Split ); } } @@ -707,7 +707,7 @@ void HeaderBar::ImplDrag( const Point& rMousePos ) { bool bNewOutDrag; - Rectangle aItemRect = ImplGetItemRect( nPos ); + tools::Rectangle aItemRect = ImplGetItemRect( nPos ); if ( aItemRect.IsInside( rMousePos ) ) bNewOutDrag = false; else @@ -789,14 +789,14 @@ void HeaderBar::ImplDrag( const Point& rMousePos ) } else { - Rectangle aItemRect = ImplGetItemRect( nPos ); + tools::Rectangle aItemRect = ImplGetItemRect( nPos ); if ( mnDragPos < aItemRect.Left() ) mnDragPos = aItemRect.Left(); if ( (mnDragPos < 0) || (mnDragPos > mnDX-1) ) HideTracking(); else { - Rectangle aSizeRect( mnDragPos, 0, mnDragPos, mnDragSize+mnDY ); + tools::Rectangle aSizeRect( mnDragPos, 0, mnDragPos, mnDragSize+mnDY ); ShowTracking( aSizeRect, ShowTrackFlags::Split ); } } @@ -912,7 +912,7 @@ void HeaderBar::Tracking( const TrackingEvent& rTEvt ) ImplDrag( aMousePos ); } -void HeaderBar::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void HeaderBar::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { if (mnBorderOff1 || mnBorderOff2) { @@ -944,7 +944,7 @@ void HeaderBar::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, { Point aPos = pDev->LogicToPixel( rPos ); Size aSize = pDev->LogicToPixel( rSize ); - Rectangle aRect( aPos, aSize ); + tools::Rectangle aRect( aPos, aSize ); vcl::Font aFont = GetDrawPixelFont( pDev ); pDev->Push(); @@ -975,7 +975,7 @@ void HeaderBar::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, } } - Rectangle aItemRect( aRect ); + tools::Rectangle aItemRect( aRect ); size_t nItemCount = mpItemList->size(); for ( size_t i = 0; i < nItemCount; i++ ) { @@ -1020,7 +1020,7 @@ void HeaderBar::RequestHelp( const HelpEvent& rHEvt ) { if ( rHEvt.GetMode() & (HelpEventMode::QUICK | HelpEventMode::BALLOON) ) { - Rectangle aItemRect = GetItemRect( nItemId ); + tools::Rectangle aItemRect = GetItemRect( nItemId ); Point aPt = OutputToScreenPixel( aItemRect.TopLeft() ); aItemRect.Left() = aPt.X(); aItemRect.Top() = aPt.Y(); @@ -1193,7 +1193,7 @@ void HeaderBar::Clear() void HeaderBar::SetOffset( long nNewOffset ) { // move area - Rectangle aRect( 0, mnBorderOff1, mnDX-1, mnDY-mnBorderOff1-mnBorderOff2-1 ); + tools::Rectangle aRect( 0, mnBorderOff1, mnDX-1, mnDY-mnBorderOff1-mnBorderOff2-1 ); long nDelta = mnOffset-nNewOffset; mnOffset = nNewOffset; Scroll( nDelta, 0, aRect ); @@ -1233,9 +1233,9 @@ sal_uInt16 HeaderBar::GetItemId( const Point& rPos ) const return 0; } -Rectangle HeaderBar::GetItemRect( sal_uInt16 nItemId ) const +tools::Rectangle HeaderBar::GetItemRect( sal_uInt16 nItemId ) const { - Rectangle aRect; + tools::Rectangle aRect; sal_uInt16 nPos = GetItemPos( nItemId ); if ( nPos != HEADERBAR_ITEM_NOTFOUND ) aRect = ImplGetItemRect( nPos ); diff --git a/svtools/source/control/hyperlabel.cxx b/svtools/source/control/hyperlabel.cxx index 9fb08798d6bc..ecf89817a862 100644 --- a/svtools/source/control/hyperlabel.cxx +++ b/svtools/source/control/hyperlabel.cxx @@ -142,7 +142,7 @@ namespace svt if ( IsEnabled() && m_pImpl->bInteractive ) { Point aPoint(0,0); - Rectangle rRect(aPoint, Size( m_pImpl->m_aMinSize.Width(), GetSizePixel().Height() ) ); + tools::Rectangle rRect(aPoint, Size( m_pImpl->m_aMinSize.Width(), GetSizePixel().Height() ) ); ShowFocus( rRect ); } } diff --git a/svtools/source/control/roadmap.cxx b/svtools/source/control/roadmap.cxx index 2d5fcbf7bdd0..fcc03d131fb4 100644 --- a/svtools/source/control/roadmap.cxx +++ b/svtools/source/control/roadmap.cxx @@ -546,7 +546,7 @@ bool ORoadmap::SelectRoadmapItemByID( ItemId _nNewID ) return false; } -void ORoadmap::Paint(vcl::RenderContext& rRenderContext, const Rectangle& _rRect) +void ORoadmap::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& _rRect) { if (!m_pImpl->m_bPaintInitialized) implInit(rRenderContext); @@ -575,7 +575,7 @@ void ORoadmap::DrawHeadline(vcl::RenderContext& rRenderContext) Size aOutputSize(GetOutputSizePixel()); // draw it - rRenderContext.DrawText(Rectangle(aTextPos, aOutputSize), GetText(), + rRenderContext.DrawText(tools::Rectangle(aTextPos, aOutputSize), GetText(), DrawTextFlags::Left | DrawTextFlags::Top | DrawTextFlags::MultiLine | DrawTextFlags::WordBreak); rRenderContext.DrawTextLine(aTextPos, aOutputSize.Width(), STRIKEOUT_NONE, LINESTYLE_SINGLE, LINESTYLE_NONE); const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings(); diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx index 81e0bf46863f..ce1e4329ac11 100644 --- a/svtools/source/control/ruler.cxx +++ b/svtools/source/control/ruler.cxx @@ -268,7 +268,7 @@ void Ruler::ImplInit( WinBits nWinBits ) ImplInitSettings( true, true, true ); // Setup the default size - Rectangle aRect; + tools::Rectangle aRect; GetTextBoundRect( aRect, "0123456789" ); long nDefHeight = aRect.GetHeight() + RULER_OFF * 2 + ruler_tab.textoff * 2 + mnBorderWidth; @@ -372,14 +372,14 @@ void Ruler::ImplVDrawRect(vcl::RenderContext& rRenderContext, long nX1, long nY1 } if ( mnWinStyle & WB_HORZ ) - rRenderContext.DrawRect(Rectangle(nX1, nY1, nX2, nY2)); + rRenderContext.DrawRect(tools::Rectangle(nX1, nY1, nX2, nY2)); else - rRenderContext.DrawRect(Rectangle(nY1, nX1, nY2, nX2)); + rRenderContext.DrawRect(tools::Rectangle(nY1, nX1, nY2, nX2)); } void Ruler::ImplVDrawText(vcl::RenderContext& rRenderContext, long nX, long nY, const OUString& rText, long nMin, long nMax) { - Rectangle aRect; + tools::Rectangle aRect; rRenderContext.GetTextBoundRect(aRect, rText); long nShiftX = ( aRect.GetWidth() / 2 ) + aRect.Left(); @@ -405,7 +405,7 @@ void Ruler::ImplInvertLines(vcl::RenderContext& rRenderContext) long nY = (RULER_OFF * 2) + mnVirHeight - 1; // Calculate rectangle - Rectangle aRect; + tools::Rectangle aRect; if (mnWinStyle & WB_HORZ) aRect.Bottom() = nY; else @@ -427,7 +427,7 @@ void Ruler::ImplInvertLines(vcl::RenderContext& rRenderContext) aRect.Top() = n; aRect.Bottom() = n; } - Rectangle aTempRect = aRect; + tools::Rectangle aTempRect = aRect; if (mnWinStyle & WB_HORZ) aTempRect.Bottom() = RULER_OFF - 1; @@ -868,11 +868,11 @@ static void ImplCenterTabPos(Point& rPos, sal_uInt16 nTabStyle) } } -static void lcl_RotateRect_Impl(Rectangle& rRect, const long nReference, bool bRightAligned) +static void lcl_RotateRect_Impl(tools::Rectangle& rRect, const long nReference, bool bRightAligned) { if (!rRect.IsEmpty()) { - Rectangle aTmp(rRect); + tools::Rectangle aTmp(rRect); rRect.Top() = aTmp.Left(); rRect.Bottom() = aTmp.Right(); rRect.Left() = aTmp.Top(); @@ -901,9 +901,9 @@ static void ImplDrawRulerTab(vcl::RenderContext& rRenderContext, const Point& rP // drawn become asymmetric due to the +1 offsets sal_uInt16 DPIOffset = rRenderContext.GetDPIScaleFactor() - 1; - Rectangle aRect1; - Rectangle aRect2; - Rectangle aRect3; + tools::Rectangle aRect1; + tools::Rectangle aRect2; + tools::Rectangle aRect3; aRect3.SetEmpty(); @@ -1377,7 +1377,7 @@ void Ruler::ImplDraw(vcl::RenderContext& rRenderContext) void Ruler::ImplDrawExtra(vcl::RenderContext& rRenderContext) { const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings(); - Rectangle aRect = maExtraRect; + tools::Rectangle aRect = maExtraRect; bool bEraseRect = false; aRect.Left() += 2; @@ -1510,7 +1510,7 @@ bool Ruler::ImplHitTest( const Point& rPos, RulerSelection* pHitTest, pHitTest->eType = RulerType::DontKnow; // first test the tabs - Rectangle aRect; + tools::Rectangle aRect; if ( !mpData->pTabs.empty() ) { aRect.Bottom() = nHitBottom; @@ -2096,7 +2096,7 @@ void Ruler::Tracking( const TrackingEvent& rTEvt ) ImplDrag( rTEvt.GetMouseEvent().GetPosPixel() ); } -void Ruler::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void Ruler::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) { ImplDraw(rRenderContext); @@ -2159,7 +2159,7 @@ void Ruler::Resize() else if ( mpData->bAutoPageWidth ) { // only at AutoPageWidth muss we redraw - Rectangle aRect; + tools::Rectangle aRect; if ( mnWinStyle & WB_HORZ ) { diff --git a/svtools/source/control/scrwin.cxx b/svtools/source/control/scrwin.cxx index 84ad86e9ff77..7f875a0784cc 100644 --- a/svtools/source/control/scrwin.cxx +++ b/svtools/source/control/scrwin.cxx @@ -350,7 +350,7 @@ void ScrollableWindow::Scroll( long nDeltaX, long nDeltaY, ScrollFlags ) // never scroll the scrollbars itself! Window::Scroll(-nDeltaX, -nDeltaY, - PixelToLogic( Rectangle( Point(0, 0), aOutPixSz ) ) ); + PixelToLogic( tools::Rectangle( Point(0, 0), aOutPixSz ) ) ); } else { diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx index 3a40a07c1e48..259036550741 100644 --- a/svtools/source/control/tabbar.cxx +++ b/svtools/source/control/tabbar.cxx @@ -53,7 +53,7 @@ private: vcl::RenderContext& mrRenderContext; const StyleSettings& mrStyleSettings; - Rectangle maRect; + tools::Rectangle maRect; Color maSelectedColor; Color maCustomColor; @@ -82,7 +82,7 @@ public: if ((nWinStyle & WB_BORDER) || (nWinStyle & WB_TOPBORDER)) { Size aOutputSize(mrParent.GetOutputSizePixel()); - Rectangle aOutRect = mrParent.GetPageArea(); + tools::Rectangle aOutRect = mrParent.GetPageArea(); // also draw border in 3D for 3D-tabs if (nWinStyle & WB_3DTAB) @@ -121,7 +121,7 @@ public: void drawText(const OUString& aText) { - Rectangle aRect = maRect; + tools::Rectangle aRect = maRect; long nTextWidth = mrRenderContext.GetTextWidth(aText); long nTextHeight = mrRenderContext.GetTextHeight(); Point aPos = aRect.TopLeft(); @@ -139,7 +139,7 @@ public: Point aTopLeft = maRect.TopLeft() + Point(1, 0); Point aTopRight = maRect.TopRight() + Point(-1, 0); - Rectangle aDelRect(aTopLeft, aTopRight); + tools::Rectangle aDelRect(aTopLeft, aTopRight); mrRenderContext.DrawRect(aDelRect); } @@ -148,7 +148,7 @@ public: mrRenderContext.SetFillColor(maCustomColor); mrRenderContext.SetLineColor(maCustomColor); - Rectangle aLineRect(maRect.BottomLeft(), maRect.BottomRight()); + tools::Rectangle aLineRect(maRect.BottomLeft(), maRect.BottomRight()); aLineRect.Top() -= 3; mrRenderContext.DrawRect(aLineRect); @@ -164,7 +164,7 @@ public: } } - void setRect(const Rectangle& rRect) + void setRect(const tools::Rectangle& rRect) { maRect = rRect; } @@ -208,7 +208,7 @@ struct ImplTabBarItem TabBarPageBits mnBits; OUString maText; OUString maHelpText; - Rectangle maRect; + tools::Rectangle maRect; long mnWidth; OString maHelpId; bool mbShort : 1; @@ -313,7 +313,7 @@ private: virtual void MouseButtonDown( const MouseEvent& rMEvt ) override; virtual void Tracking( const TrackingEvent& rTEvt ) override; - virtual void Paint( vcl::RenderContext& /*rRenderContext*/, const Rectangle& rRect ) override; + virtual void Paint( vcl::RenderContext& /*rRenderContext*/, const tools::Rectangle& rRect ) override; Point maStartPos; long mnStartWidth; @@ -366,10 +366,10 @@ void ImplTabSizer::Tracking( const TrackingEvent& rTEvt ) ImplTrack( OutputToScreenPixel( rTEvt.GetMouseEvent().GetPosPixel() ) ); } -void ImplTabSizer::Paint( vcl::RenderContext& rRenderContext, const Rectangle& ) +void ImplTabSizer::Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& ) { DecorationView aDecoView(&rRenderContext); - Rectangle aOutputRect(Point(0, 0), GetOutputSizePixel()); + tools::Rectangle aOutputRect(Point(0, 0), GetOutputSizePixel()); aDecoView.DrawHandle(aOutputRect); } @@ -1143,7 +1143,7 @@ void TabBar::MouseButtonUp(const MouseEvent& rMEvt) Window::MouseButtonUp(rMEvt); } -void TabBar::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rect) +void TabBar::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rect) { if (rRenderContext.IsNativeControlSupported(ControlType::WindowBackground,ControlPart::Entire)) { @@ -1196,7 +1196,7 @@ void TabBar::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rect) if (!pItem->maRect.IsEmpty()) { - Rectangle aRect = pItem->maRect; + tools::Rectangle aRect = pItem->maRect; bool bSelected = pItem->IsSelected(pCurItem); // We disable custom background color in high contrast mode. bool bCustomBgColor = !pItem->IsDefaultTabBgColor() && !rStyleSettings.GetHighContrastMode(); @@ -1384,7 +1384,7 @@ void TabBar::RequestHelp(const HelpEvent& rHEvt) OUString aStr = GetHelpText(nItemId); if (!aStr.isEmpty()) { - Rectangle aItemRect = GetPageRect(nItemId); + tools::Rectangle aItemRect = GetPageRect(nItemId); Point aPt = OutputToScreenPixel(aItemRect.TopLeft()); aItemRect.Left() = aPt.X(); aItemRect.Top() = aPt.Y(); @@ -1416,7 +1416,7 @@ void TabBar::RequestHelp(const HelpEvent& rHEvt) ImplTabBarItem* pItem = mpImpl->mpItemList[nPos]; if (pItem->mbShort || (pItem->maRect.Right() - 5 > mnLastOffX)) { - Rectangle aItemRect = GetPageRect(nItemId); + tools::Rectangle aItemRect = GetPageRect(nItemId); Point aPt = OutputToScreenPixel(aItemRect.TopLeft()); aItemRect.Left() = aPt.X(); aItemRect.Top() = aPt.Y(); @@ -1845,14 +1845,14 @@ sal_uInt16 TabBar::GetPageId(const Point& rPos) const return 0; } -Rectangle TabBar::GetPageRect(sal_uInt16 nPageId) const +tools::Rectangle TabBar::GetPageRect(sal_uInt16 nPageId) const { sal_uInt16 nPos = GetPagePos(nPageId); if (nPos != PAGE_NOT_FOUND) return mpImpl->mpItemList[nPos]->maRect; else - return Rectangle(); + return tools::Rectangle(); } void TabBar::SetCurPageId(sal_uInt16 nPageId) @@ -2069,7 +2069,7 @@ bool TabBar::StartEditMode(sal_uInt16 nPageId) Update(); mpImpl->mpEdit.disposeAndReset(VclPtr<TabBarEdit>::Create(this, WB_CENTER)); - Rectangle aRect = GetPageRect( mnEditId ); + tools::Rectangle aRect = GetPageRect( mnEditId ); long nX = aRect.Left(); long nWidth = aRect.GetWidth(); if (mnEditId != GetCurPageId()) @@ -2361,7 +2361,7 @@ sal_uInt16 TabBar::ShowDropPos(const Point& rPos) // draw immediately, as Paint not possible during Drag and Drop if (nOldFirstPos != mnFirstPos) { - Rectangle aRect(mnOffX, 0, mnLastOffX, maWinSize.Height()); + tools::Rectangle aRect(mnOffX, 0, mnLastOffX, maWinSize.Height()); SetFillColor(GetBackground().GetColor()); DrawRect(aRect); Invalidate(aRect); @@ -2439,7 +2439,7 @@ void TabBar::HideDropPos() pItem = mpImpl->mpItemList[mnDropPos]; nX = pItem->maRect.Left(); // immediately call Paint, as it is not possible during drag and drop - Rectangle aRect( nX-1, nY1, nX+3, nY2 ); + tools::Rectangle aRect( nX-1, nY1, nX+3, nY2 ); vcl::Region aRegion( aRect ); SetClipRegion( aRegion ); Invalidate(aRect); @@ -2450,7 +2450,7 @@ void TabBar::HideDropPos() pItem = mpImpl->mpItemList[mnDropPos - 1]; nX = pItem->maRect.Right(); // immediately call Paint, as it is not possible during drag and drop - Rectangle aRect(nX - 2, nY1, nX + 1, nY2); + tools::Rectangle aRect(nX - 2, nY1, nX + 1, nY2); vcl::Region aRegion(aRect); SetClipRegion(aRegion); Invalidate(aRect); @@ -2527,9 +2527,9 @@ Size TabBar::CalcWindowSizePixel() const return Size(nWidth, GetSettings().GetStyleSettings().GetScrollBarSize()); } -Rectangle TabBar::GetPageArea() const +tools::Rectangle TabBar::GetPageArea() const { - return Rectangle(Point(mnOffX, mnOffY), + return tools::Rectangle(Point(mnOffX, mnOffY), Size(mnLastOffX - mnOffX + 1, GetSizePixel().Height() - mnOffY)); } diff --git a/svtools/source/control/toolbarmenu.cxx b/svtools/source/control/toolbarmenu.cxx index 44d68b3497bd..160df55c8251 100644 --- a/svtools/source/control/toolbarmenu.cxx +++ b/svtools/source/control/toolbarmenu.cxx @@ -517,10 +517,10 @@ static long ImplGetNativeCheckAndRadioSize(vcl::RenderContext& rRenderContext, l rMaxWidth = rCheckHeight = rRadioHeight = 0; ImplControlValue aVal; - Rectangle aNativeBounds; - Rectangle aNativeContent; + tools::Rectangle aNativeBounds; + tools::Rectangle aNativeContent; Point tmp( 0, 0 ); - Rectangle aCtrlRegion( tmp, Size( 100, 15 ) ); + tools::Rectangle aCtrlRegion( tmp, Size( 100, 15 ) ); if (rRenderContext.IsNativeControlSupported(ControlType::MenuPopup, ControlPart::MenuItemCheckMark)) { if (rRenderContext.GetNativeControlRegion(ControlType::MenuPopup, ControlPart::MenuItemCheckMark, @@ -648,11 +648,11 @@ Size ToolbarMenu::implCalcSize() pEntry->mpControl->SetPosPixel( aControlPos ); - pEntry->maRect = Rectangle( aControlPos, aControlSize ); + pEntry->maRect = tools::Rectangle( aControlPos, aControlSize ); } else { - pEntry->maRect = Rectangle( Point( 0, nY ), pEntry->maSize ); + pEntry->maRect = tools::Rectangle( Point( 0, nY ), pEntry->maSize ); } nY += pEntry->maSize.Height(); @@ -774,7 +774,7 @@ void ToolbarMenu::implHighlightEntry(vcl::RenderContext& rRenderContext, int nHi Color oldLineColor; bool bDrawItemRect = true; - Rectangle aItemRect(Point(nX, nY), Size(aSz.Width(), pEntry->maSize.Height())); + tools::Rectangle aItemRect(Point(nX, nY), Size(aSz.Width(), pEntry->maSize.Height())); if (pEntry->mnBits & MenuItemBits::POPUPSELECT) { long nFontHeight = GetTextHeight(); @@ -785,8 +785,8 @@ void ToolbarMenu::implHighlightEntry(vcl::RenderContext& rRenderContext, int nHi { Size aPxSize(GetOutputSizePixel()); rRenderContext.Push(PushFlags::CLIPREGION); - rRenderContext.IntersectClipRegion(Rectangle(Point(nX, nY), Size(aSz.Width(), pEntry->maSize.Height()))); - Rectangle aCtrlRect(Point(nX, 0), Size(aPxSize.Width() - nX, aPxSize.Height())); + rRenderContext.IntersectClipRegion(tools::Rectangle(Point(nX, nY), Size(aSz.Width(), pEntry->maSize.Height()))); + tools::Rectangle aCtrlRect(Point(nX, 0), Size(aPxSize.Width() - nX, aPxSize.Height())); rRenderContext.DrawNativeControl(ControlType::MenuPopup, ControlPart::Entire, aCtrlRect, ControlState::ENABLED, ImplControlValue(), OUString()); if (rRenderContext.IsNativeControlSupported(ControlType::MenuPopup, ControlPart::MenuItem)) @@ -1135,7 +1135,7 @@ void ToolbarMenu::KeyInput( const KeyEvent& rKEvent ) } -static void ImplPaintCheckBackground(vcl::RenderContext& rRenderContext, vcl::Window& rWindow, const Rectangle& i_rRect, bool i_bHighlight ) +static void ImplPaintCheckBackground(vcl::RenderContext& rRenderContext, vcl::Window& rWindow, const tools::Rectangle& i_rRect, bool i_bHighlight ) { bool bNativeOk = false; if (rRenderContext.IsNativeControlSupported(ControlType::Toolbar, ControlPart::Button)) @@ -1214,7 +1214,7 @@ void ToolbarMenu::implPaint(vcl::RenderContext& rRenderContext, ToolbarMenuEntry nImageStyle |= DrawImageFlags::Disable; } - Rectangle aOuterCheckRect(Point(aPos.X() + mpImpl->mnCheckPos, aPos.Y()), + tools::Rectangle aOuterCheckRect(Point(aPos.X() + mpImpl->mnCheckPos, aPos.Y()), Size(pEntry->maSize.Height(), pEntry->maSize.Height())); aOuterCheckRect.Left() += 1; aOuterCheckRect.Right() -= 1; @@ -1224,7 +1224,7 @@ void ToolbarMenu::implPaint(vcl::RenderContext& rRenderContext, ToolbarMenuEntry if (bTitle) { // fill the background - Rectangle aRect(aTopLeft, Size(aOutSz.Width(), pEntry->maSize.Height())); + tools::Rectangle aRect(aTopLeft, Size(aOutSz.Width(), pEntry->maSize.Height())); rRenderContext.SetFillColor(rSettings.GetDialogColor()); rRenderContext.SetLineColor(); rRenderContext.DrawRect(aRect); @@ -1269,7 +1269,7 @@ void ToolbarMenu::implPaint(vcl::RenderContext& rRenderContext, ToolbarMenuEntry aTmpPos.X() = aOuterCheckRect.Left() + (aOuterCheckRect.GetWidth() - nCtrlHeight) / 2; aTmpPos.Y() = aOuterCheckRect.Top() + (aOuterCheckRect.GetHeight() - nCtrlHeight) / 2; - Rectangle aCheckRect(aTmpPos, Size(nCtrlHeight, nCtrlHeight)); + tools::Rectangle aCheckRect(aTmpPos, Size(nCtrlHeight, nCtrlHeight)); rRenderContext.DrawNativeControl(ControlType::MenuPopup, nPart, aCheckRect, nState, ImplControlValue(), OUString()); aPos.setX(aPos.getX() + nCtrlHeight + gfxExtra); @@ -1292,7 +1292,7 @@ void ToolbarMenu::implPaint(vcl::RenderContext& rRenderContext, ToolbarMenuEntry } aTmpPos.X() = aOuterCheckRect.Left() + (aOuterCheckRect.GetWidth() - aSymbolSize.Width())/2; aTmpPos.Y() = aOuterCheckRect.Top() + (aOuterCheckRect.GetHeight() - aSymbolSize.Height())/2; - Rectangle aRect( aTmpPos, aSymbolSize ); + tools::Rectangle aRect( aTmpPos, aSymbolSize ); aDecoView.DrawSymbol(aRect, eSymbol, GetTextColor(), nSymbolStyle); aPos.setX(aPos.getX() + aSymbolSize.getWidth( ) + gfxExtra); } @@ -1334,7 +1334,7 @@ void ToolbarMenu::implPaint(vcl::RenderContext& rRenderContext, ToolbarMenuEntry } } -void ToolbarMenu::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void ToolbarMenu::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) { rRenderContext.SetFillColor(rRenderContext.GetSettings().GetStyleSettings().GetMenuColor()); diff --git a/svtools/source/control/toolbarmenuacc.cxx b/svtools/source/control/toolbarmenuacc.cxx index 410b67e373bb..233ffddff37f 100644 --- a/svtools/source/control/toolbarmenuacc.cxx +++ b/svtools/source/control/toolbarmenuacc.cxx @@ -313,7 +313,7 @@ sal_Bool SAL_CALL ToolbarMenuAcc::containsPoint( const awt::Point& aPoint ) const Point aSize( aRect.Width, aRect.Height ); const Point aNullPoint, aTestPoint( aPoint.X, aPoint.Y ); - return Rectangle( aNullPoint, aSize ).IsInside( aTestPoint ); + return tools::Rectangle( aNullPoint, aSize ).IsInside( aTestPoint ); } @@ -756,7 +756,7 @@ sal_Bool SAL_CALL ToolbarMenuEntryAcc::containsPoint( const awt::Point& aPoint ) const Point aSize( aRect.Width, aRect.Height ); const Point aNullPoint, aTestPoint( aPoint.X, aPoint.Y ); - return Rectangle( aNullPoint, aSize ).IsInside( aTestPoint ); + return tools::Rectangle( aNullPoint, aSize ).IsInside( aTestPoint ); } @@ -774,9 +774,9 @@ awt::Rectangle SAL_CALL ToolbarMenuEntryAcc::getBounds() if( mpParent ) { - Rectangle aRect( mpParent->maRect ); + tools::Rectangle aRect( mpParent->maRect ); Point aOrigin; - Rectangle aParentRect( aOrigin, mpParent->mrMenu.GetOutputSizePixel() ); + tools::Rectangle aParentRect( aOrigin, mpParent->mrMenu.GetOutputSizePixel() ); aRect.Intersection( aParentRect ); diff --git a/svtools/source/control/toolbarmenuimp.hxx b/svtools/source/control/toolbarmenuimp.hxx index 776dd5548886..0d7bd9f7272e 100644 --- a/svtools/source/control/toolbarmenuimp.hxx +++ b/svtools/source/control/toolbarmenuimp.hxx @@ -72,7 +72,7 @@ public: OUString maText; Image maImage; VclPtr<Control> mpControl; - Rectangle maRect; + tools::Rectangle maRect; css::uno::Reference< css::accessibility::XAccessibleContext > mxAccContext; diff --git a/svtools/source/control/valueacc.cxx b/svtools/source/control/valueacc.cxx index 24991ab1c3c9..8610c3b7f641 100644 --- a/svtools/source/control/valueacc.cxx +++ b/svtools/source/control/valueacc.cxx @@ -383,7 +383,7 @@ sal_Bool SAL_CALL ValueSetAcc::containsPoint( const awt::Point& aPoint ) const Point aSize( aRect.Width, aRect.Height ); const Point aNullPoint, aTestPoint( aPoint.X, aPoint.Y ); - return Rectangle( aNullPoint, aSize ).IsInside( aTestPoint ); + return tools::Rectangle( aNullPoint, aSize ).IsInside( aTestPoint ); } @@ -954,7 +954,7 @@ sal_Bool SAL_CALL ValueItemAcc::containsPoint( const awt::Point& aPoint ) const Point aSize( aRect.Width, aRect.Height ); const Point aNullPoint, aTestPoint( aPoint.X, aPoint.Y ); - return Rectangle( aNullPoint, aSize ).IsInside( aTestPoint ); + return tools::Rectangle( aNullPoint, aSize ).IsInside( aTestPoint ); } uno::Reference< accessibility::XAccessible > SAL_CALL ValueItemAcc::getAccessibleAtPoint( const awt::Point& ) @@ -970,9 +970,9 @@ awt::Rectangle SAL_CALL ValueItemAcc::getBounds() if( mpParent ) { - Rectangle aRect( mpParent->mrParent.GetItemRect(mpParent->mnId) ); + tools::Rectangle aRect( mpParent->mrParent.GetItemRect(mpParent->mnId) ); Point aOrigin; - Rectangle aParentRect( aOrigin, mpParent->mrParent.GetOutputSizePixel() ); + tools::Rectangle aParentRect( aOrigin, mpParent->mrParent.GetOutputSizePixel() ); aRect.Intersection( aParentRect ); diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx index 7db07e38d959..ee1ddad8ffd5 100644 --- a/svtools/source/control/valueset.cxx +++ b/svtools/source/control/valueset.cxx @@ -202,7 +202,7 @@ void ValueSet::ImplInitScrollBar() } } -void ValueSet::ImplFormatItem(vcl::RenderContext& rRenderContext, ValueSetItem* pItem, Rectangle aRect) +void ValueSet::ImplFormatItem(vcl::RenderContext& rRenderContext, ValueSetItem* pItem, tools::Rectangle aRect) { WinBits nStyle = GetStyle(); if (nStyle & WB_ITEMBORDER) @@ -635,7 +635,7 @@ void ValueSet::Format(vcl::RenderContext& rRenderContext) } pItem->mbVisible = true; - ImplFormatItem(rRenderContext, pItem, Rectangle(Point(x, y), Size(mnItemWidth, mnItemHeight))); + ImplFormatItem(rRenderContext, pItem, tools::Rectangle(Point(x, y), Size(mnItemWidth, mnItemHeight))); if (!((i + 1) % mnCols)) { @@ -704,13 +704,13 @@ void ValueSet::ImplDrawItemText(vcl::RenderContext& rRenderContext, const OUStri const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings(); rRenderContext.SetLineColor(); rRenderContext.SetFillColor(rStyleSettings.GetFaceColor()); - rRenderContext.DrawRect(Rectangle(Point(0, nTxtOffset), Point(aWinSize.Width(), aWinSize.Height()))); + rRenderContext.DrawRect(tools::Rectangle(Point(0, nTxtOffset), Point(aWinSize.Width(), aWinSize.Height()))); rRenderContext.SetTextColor(rStyleSettings.GetButtonTextColor()); } else { nTxtOffset += NAME_LINE_HEIGHT+NAME_LINE_OFF_Y; - rRenderContext.Erase(Rectangle(Point(0, nTxtOffset), Point(aWinSize.Width(), aWinSize.Height()))); + rRenderContext.Erase(tools::Rectangle(Point(0, nTxtOffset), Point(aWinSize.Width(), aWinSize.Height()))); } rRenderContext.DrawText(Point((aWinSize.Width() - nTxtWidth) / 2, nTxtOffset + (NAME_OFFSET / 2)), rText); } @@ -739,7 +739,7 @@ void ValueSet::ImplDrawSelect(vcl::RenderContext& rRenderContext) void ValueSet::ImplDrawSelect(vcl::RenderContext& rRenderContext, sal_uInt16 nItemId, const bool bFocus, const bool bDrawSel ) { ValueSetItem* pItem; - Rectangle aRect; + tools::Rectangle aRect; if (nItemId) { const size_t nPos = GetItemPos( nItemId ); @@ -860,7 +860,7 @@ void ValueSet::ImplDrawSelect(vcl::RenderContext& rRenderContext, sal_uInt16 nIt aRect.Top()++; aRect.Right()--; aRect.Bottom()--; - Rectangle aRect2 = aRect; + tools::Rectangle aRect2 = aRect; aRect.Left()++; aRect.Top()++; aRect.Right()--; @@ -897,7 +897,7 @@ void ValueSet::ImplDrawSelect(vcl::RenderContext& rRenderContext, sal_uInt16 nIt void ValueSet::ImplHideSelect( sal_uInt16 nItemId ) { - Rectangle aRect; + tools::Rectangle aRect; const size_t nItemPos = GetItemPos( nItemId ); if ( nItemPos != VALUESET_ITEM_NOTFOUND ) @@ -1419,7 +1419,7 @@ void ValueSet::Command( const CommandEvent& rCommandEvent ) Control::Command( rCommandEvent ); } -void ValueSet::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void ValueSet::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) { if (GetStyle() & WB_FLATVALUESET) { @@ -1428,7 +1428,7 @@ void ValueSet::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) rRenderContext.SetFillColor(rStyleSettings.GetFaceColor()); long nOffY = maVirDev->GetOutputSizePixel().Height(); Size aWinSize(GetOutputSizePixel()); - rRenderContext.DrawRect(Rectangle(Point(0, nOffY ), Point( aWinSize.Width(), aWinSize.Height()))); + rRenderContext.DrawRect(tools::Rectangle(Point(0, nOffY ), Point( aWinSize.Width(), aWinSize.Height()))); } ImplDraw(rRenderContext); @@ -1477,7 +1477,7 @@ void ValueSet::RequestHelp( const HelpEvent& rHelpEvent ) size_t nItemPos = ImplGetItem( aPos ); if ( nItemPos != VALUESET_ITEM_NOTFOUND ) { - Rectangle aItemRect = ImplGetItemRect( nItemPos ); + tools::Rectangle aItemRect = ImplGetItemRect( nItemPos ); Point aPt = OutputToScreenPixel( aItemRect.TopLeft() ); aItemRect.Left() = aPt.X(); aItemRect.Top() = aPt.Y(); @@ -1623,7 +1623,7 @@ void ValueSet::ImplInsertItem( ValueSetItem *const pItem, const size_t nPos ) Invalidate(); } -Rectangle ValueSet::ImplGetItemRect( size_t nPos ) const +tools::Rectangle ValueSet::ImplGetItemRect( size_t nPos ) const { const size_t nVisibleBegin = static_cast<size_t>(mnFirstLine)*mnCols; const size_t nVisibleEnd = nVisibleBegin + static_cast<size_t>(mnVisLines)*mnCols; @@ -1631,7 +1631,7 @@ Rectangle ValueSet::ImplGetItemRect( size_t nPos ) const // Check if the item is inside the range of the displayed ones, // taking into account that last row could be incomplete if ( nPos<nVisibleBegin || nPos>=nVisibleEnd || nPos>=mItemList.size() ) - return Rectangle(); + return tools::Rectangle(); nPos -= nVisibleBegin; @@ -1640,7 +1640,7 @@ Rectangle ValueSet::ImplGetItemRect( size_t nPos ) const const long x = maItemListRect.Left()+col*(mnItemWidth+mnSpacing); const long y = maItemListRect.Top()+row*(mnItemHeight+mnSpacing); - return Rectangle( Point(x, y), Size(mnItemWidth, mnItemHeight) ); + return tools::Rectangle( Point(x, y), Size(mnItemWidth, mnItemHeight) ); } void ValueSet::RemoveItem( sal_uInt16 nItemId ) @@ -1718,14 +1718,14 @@ sal_uInt16 ValueSet::GetItemId( const Point& rPos ) const return 0; } -Rectangle ValueSet::GetItemRect( sal_uInt16 nItemId ) const +tools::Rectangle ValueSet::GetItemRect( sal_uInt16 nItemId ) const { const size_t nPos = GetItemPos( nItemId ); if ( nPos!=VALUESET_ITEM_NOTFOUND && mItemList[nPos]->mbVisible ) return ImplGetItemRect( nPos ); - return Rectangle(); + return tools::Rectangle(); } void ValueSet::EnableFullItemMode( bool bFullMode ) @@ -1942,7 +1942,7 @@ void ValueSet::SetItemImage( sal_uInt16 nItemId, const Image& rImage ) if ( !mbFormat && IsReallyVisible() && IsUpdateMode() ) { - const Rectangle aRect = ImplGetItemRect(nPos); + const tools::Rectangle aRect = ImplGetItemRect(nPos); Invalidate(aRect); } else @@ -1972,7 +1972,7 @@ void ValueSet::SetItemColor( sal_uInt16 nItemId, const Color& rColor ) if ( !mbFormat && IsReallyVisible() && IsUpdateMode() ) { - const Rectangle aRect = ImplGetItemRect(nPos); + const tools::Rectangle aRect = ImplGetItemRect(nPos); Invalidate( aRect ); } else @@ -2003,7 +2003,7 @@ void ValueSet::SetItemData( sal_uInt16 nItemId, void* pData ) { if ( !mbFormat && IsReallyVisible() && IsUpdateMode() ) { - const Rectangle aRect = ImplGetItemRect(nPos); + const tools::Rectangle aRect = ImplGetItemRect(nPos); Invalidate(aRect); } else diff --git a/svtools/source/graphic/grfcache.cxx b/svtools/source/graphic/grfcache.cxx index 2b158698548b..c018a533dc4e 100644 --- a/svtools/source/graphic/grfcache.cxx +++ b/svtools/source/graphic/grfcache.cxx @@ -811,10 +811,10 @@ void GraphicDisplayCacheEntry::Draw( OutputDevice* pOut, const Point& rPt, const { if( maAttr.IsRotated() ) { - tools::Polygon aPoly( Rectangle( rPt, rSz ) ); + tools::Polygon aPoly( tools::Rectangle( rPt, rSz ) ); aPoly.Rotate( rPt, maAttr.GetRotation() % 3600 ); - const Rectangle aRotBoundRect( aPoly.GetBoundRect() ); + const tools::Rectangle aRotBoundRect( aPoly.GetBoundRect() ); pOut->DrawBitmapEx( aRotBoundRect.TopLeft(), aRotBoundRect.GetSize(), *mpBmpEx ); } else diff --git a/svtools/source/graphic/grfmgr.cxx b/svtools/source/graphic/grfmgr.cxx index 3225cdb186fd..07ec46fc0b5d 100644 --- a/svtools/source/graphic/grfmgr.cxx +++ b/svtools/source/graphic/grfmgr.cxx @@ -241,7 +241,7 @@ bool GraphicObject::ImplGetCropParams( OutputDevice* pOut, Point& rPt, Size& rSz if( GetType() != GraphicType::NONE ) { - tools::Polygon aClipPoly( Rectangle( rPt, rSz ) ); + tools::Polygon aClipPoly( tools::Rectangle( rPt, rSz ) ); const sal_uInt16 nRot10 = pAttr->GetRotation() % 3600; const Point aOldOrigin( rPt ); const MapMode aMap100( MapUnit::Map100thMM ); @@ -458,7 +458,7 @@ bool GraphicObject::Draw( OutputDevice* pOut, const Point& rPt, const Size& rSz, bool bRet; // #i29534# Provide output rects for PDF writer - Rectangle aCropRect; + tools::Rectangle aCropRect; if( !( GraphicManagerDrawFlags::USE_DRAWMODE_SETTINGS & nFlags ) ) pOut->SetDrawMode( nOldDrawMode & ~DrawModeFlags( DrawModeFlags::SettingsLine | DrawModeFlags::SettingsFill | DrawModeFlags::SettingsText | DrawModeFlags::SettingsGradient ) ); @@ -523,7 +523,7 @@ bool GraphicObject::Draw( OutputDevice* pOut, const Point& rPt, const Size& rSz, return bRet; } -void GraphicObject::DrawTiled( OutputDevice* pOut, const Rectangle& rArea, const Size& rSize, +void GraphicObject::DrawTiled( OutputDevice* pOut, const tools::Rectangle& rArea, const Size& rSize, const Size& rOffset, GraphicManagerDrawFlags nFlags, int nTileCacheSize1D ) { if( pOut == nullptr || rSize.Width() == 0 || rSize.Height() == 0 ) @@ -703,7 +703,7 @@ Graphic GraphicObject::GetTransformedGraphic( const Size& rDestSize, const MapMo { const MapMode aMtfMapMode( aMtf.GetPrefMapMode() ); - Rectangle aClipRect( aMtfMapMode.GetOrigin().X() + aCropLeftTop.Width(), + tools::Rectangle aClipRect( aMtfMapMode.GetOrigin().X() + aCropLeftTop.Width(), aMtfMapMode.GetOrigin().Y() + aCropLeftTop.Height(), aMtfMapMode.GetOrigin().X() + aSrcSize.Width() - aCropRightBottom.Width(), aMtfMapMode.GetOrigin().Y() + aSrcSize.Height() - aCropRightBottom.Height() ); @@ -740,7 +740,7 @@ Graphic GraphicObject::GetTransformedGraphic( const Size& rDestSize, const MapMo else if( GraphicType::Bitmap == eType ) { BitmapEx aBitmapEx( aTransGraphic.GetBitmapEx() ); - Rectangle aCropRect; + tools::Rectangle aCropRect; // convert crops to pixel if(rAttr.IsCropped()) @@ -797,7 +797,7 @@ Graphic GraphicObject::GetTransformedGraphic( const Size& rDestSize, const MapMo } // setup crop rectangle in pixel - aCropRect = Rectangle( aCropLeftTop.Width(), aCropLeftTop.Height(), + aCropRect = tools::Rectangle( aCropLeftTop.Width(), aCropLeftTop.Height(), aSrcSizePixel.Width() - aCropRightBottom.Width(), aSrcSizePixel.Height() - aCropRightBottom.Height() ); } @@ -811,10 +811,10 @@ Graphic GraphicObject::GetTransformedGraphic( const Size& rDestSize, const MapMo { AnimationBitmap aAnimBmp( aAnim.Get( nFrame ) ); - if( !aCropRect.IsInside( Rectangle(aAnimBmp.aPosPix, aAnimBmp.aSizePix) ) ) + if( !aCropRect.IsInside( tools::Rectangle(aAnimBmp.aPosPix, aAnimBmp.aSizePix) ) ) { // setup actual cropping (relative to frame position) - Rectangle aCropRectRel( aCropRect ); + tools::Rectangle aCropRectRel( aCropRect ); aCropRectRel.Move( -aAnimBmp.aPosPix.X(), -aAnimBmp.aPosPix.Y() ); diff --git a/svtools/source/graphic/grfmgr2.cxx b/svtools/source/graphic/grfmgr2.cxx index 78319de971c5..15ca2242f68f 100644 --- a/svtools/source/graphic/grfmgr2.cxx +++ b/svtools/source/graphic/grfmgr2.cxx @@ -109,10 +109,10 @@ bool GraphicManager::DrawObj( OutputDevice* pOut, const Point& rPt, const Size& if( nRot10 ) { - tools::Polygon aPoly( Rectangle( aPt, aSz ) ); + tools::Polygon aPoly( tools::Rectangle( aPt, aSz ) ); aPoly.Rotate( aPt, nRot10 ); - const Rectangle aRotBoundRect( aPoly.GetBoundRect() ); + const tools::Rectangle aRotBoundRect( aPoly.GetBoundRect() ); aPt = aRotBoundRect.TopLeft(); aSz = aRotBoundRect.GetSize(); } @@ -429,9 +429,9 @@ bool ImplCreateRotatedScaled( const BitmapEx& rBmpEx, const GraphicAttr& rAttrib sal_uInt8 cR0, cG0, cB0, cR1, cG1, cB1; bool bRet = false; - tools::Polygon aPoly( Rectangle( Point(), rUnrotatedSzPix ) ); + tools::Polygon aPoly( tools::Rectangle( Point(), rUnrotatedSzPix ) ); aPoly.Rotate( Point(), nRot10 ); - Rectangle aNewBound( aPoly.GetBoundRect() ); + tools::Rectangle aNewBound( aPoly.GetBoundRect() ); // create horizontal mapping table long x; @@ -885,9 +885,9 @@ bool GraphicManager::ImplCreateOutput( OutputDevice* pOutputDevice, if( nRot10 ) { - tools::Polygon aPoly( Rectangle( rPoint, rSize ) ); + tools::Polygon aPoly( tools::Rectangle( rPoint, rSize ) ); aPoly.Rotate( rPoint, nRot10 ); - const Rectangle aRotBoundRect( aPoly.GetBoundRect() ); + const tools::Rectangle aRotBoundRect( aPoly.GetBoundRect() ); aOutputPointPix = pOutputDevice->LogicToPixel( aRotBoundRect.TopLeft() ); aOutputSizePix = pOutputDevice->LogicToPixel( aRotBoundRect.GetSize() ); } @@ -913,8 +913,8 @@ bool GraphicManager::ImplCreateOutput( OutputDevice* pOutputDevice, if( !pBmpEx ) { Point aPt; - Rectangle aOutRect( aPt, pOutputDevice->GetOutputSizePixel() ); - Rectangle aBmpRect( aOutputPointPix, aOutputSizePix ); + tools::Rectangle aOutRect( aPt, pOutputDevice->GetOutputSizePixel() ); + tools::Rectangle aBmpRect( aOutputPointPix, aOutputSizePix ); if( pOutputDevice->GetOutDevType() == OUTDEV_WINDOW ) { @@ -1078,7 +1078,7 @@ static BitmapEx checkMetadataBitmap( const BitmapEx& rBmpEx, { // crop bitmap to given source rectangle (no // need to copy and convert the whole bitmap) - const Rectangle aCropRect( rSrcPoint, + const tools::Rectangle aCropRect( rSrcPoint, rSrcSize ); aBmpEx.Crop( aCropRect ); } @@ -1612,16 +1612,16 @@ void GraphicManager::ImplDraw( OutputDevice* pOut, const Point& rPt, const Size& if( nRot10 ) { - tools::Polygon aPoly( Rectangle( aOutPt, aOutSz ) ); + tools::Polygon aPoly( tools::Rectangle( aOutPt, aOutSz ) ); aPoly.Rotate( aOutPt, nRot10 ); - const Rectangle aRotBoundRect( aPoly.GetBoundRect() ); + const tools::Rectangle aRotBoundRect( aPoly.GetBoundRect() ); aOutPt = aRotBoundRect.TopLeft(); aOutSz = aRotBoundRect.GetSize(); } pOut->Push( PushFlags::CLIPREGION ); - pOut->IntersectClipRegion( Rectangle( aOutPt, aOutSz ) ); + pOut->IntersectClipRegion( tools::Rectangle( aOutPt, aOutSz ) ); const_cast<GDIMetaFile&>(rMtf).WindStart(); const_cast<GDIMetaFile&>(rMtf).Play( pOut, aOutPt, aOutSz ); @@ -1874,7 +1874,7 @@ bool GraphicObject::ImplRenderTileRecursive( VirtualDevice& rVDev, int nExponent return true; } -bool GraphicObject::ImplDrawTiled( OutputDevice* pOut, const Rectangle& rArea, const Size& rSizePixel, +bool GraphicObject::ImplDrawTiled( OutputDevice* pOut, const tools::Rectangle& rArea, const Size& rSizePixel, const Size& rOffset, const GraphicAttr* pAttr, GraphicManagerDrawFlags nFlags, int nTileCacheSize1D ) { const MapMode aOutMapMode( pOut->GetMapMode() ); @@ -1937,7 +1937,7 @@ bool GraphicObject::ImplDrawTiled( OutputDevice* pOut, const Rectangle& rArea, c else { const Size aOutOffset( pOut->LogicToPixel( rOffset, aOutMapMode ) ); - const Rectangle aOutArea( pOut->LogicToPixel( rArea, aOutMapMode ) ); + const tools::Rectangle aOutArea( pOut->LogicToPixel( rArea, aOutMapMode ) ); // number of invisible (because out-of-area) tiles int nInvisibleTilesX; @@ -2031,7 +2031,7 @@ void GraphicObject::ImplTransformBitmap( BitmapEx& rBmpEx, const GraphicAttr& rAttr, const Size& rCropLeftTop, const Size& rCropRightBottom, - const Rectangle& rCropRect, + const tools::Rectangle& rCropRect, const Size& rDstSize, bool bEnlarge ) const { @@ -2079,7 +2079,7 @@ void GraphicObject::ImplTransformBitmap( BitmapEx& rBmpEx, aBmpEx2.SetSizePixel( Size(nPadTotalWidth, nPadTotalHeight) ); aBmpEx2.Erase( Color(0xFF,0,0,0) ); - aBmpEx2.CopyPixel( Rectangle( Point(nPadLeft, nPadTop), aBmpSize ), Rectangle( Point(0, 0), aBmpSize ), &rBmpEx ); + aBmpEx2.CopyPixel( tools::Rectangle( Point(nPadLeft, nPadTop), aBmpSize ), tools::Rectangle( Point(0, 0), aBmpSize ), &rBmpEx ); rBmpEx = aBmpEx2; } } diff --git a/svtools/source/graphic/provider.cxx b/svtools/source/graphic/provider.cxx index 7b4293631970..542cdb251857 100644 --- a/svtools/source/graphic/provider.cxx +++ b/svtools/source/graphic/provider.cxx @@ -485,7 +485,7 @@ uno::Reference< ::graphic::XGraphic > SAL_CALL GraphicProvider::queryGraphic( co return xRet; } -void ImplCalculateCropRect( ::Graphic& rGraphic, const text::GraphicCrop& rGraphicCropLogic, Rectangle& rGraphicCropPixel ) +void ImplCalculateCropRect( ::Graphic& rGraphic, const text::GraphicCrop& rGraphicCropLogic, tools::Rectangle& rGraphicCropPixel ) { if ( rGraphicCropLogic.Left || rGraphicCropLogic.Top || rGraphicCropLogic.Right || rGraphicCropLogic.Bottom ) { @@ -604,7 +604,7 @@ void ImplApplyFilterData( ::Graphic& rGraphic, uno::Sequence< beans::PropertyVal } else { - Rectangle aCropPixel( Point( 0, 0 ), rGraphic.GetSizePixel() ); + tools::Rectangle aCropPixel( Point( 0, 0 ), rGraphic.GetSizePixel() ); ImplCalculateCropRect( rGraphic, aCropLogic, aCropPixel ); if ( bRemoveCropArea ) { diff --git a/svtools/source/graphic/renderer.cxx b/svtools/source/graphic/renderer.cxx index ee9444c92bc7..1db2117506df 100644 --- a/svtools/source/graphic/renderer.cxx +++ b/svtools/source/graphic/renderer.cxx @@ -86,7 +86,7 @@ private: css::uno::Reference< css::awt::XDevice > mxDevice; VclPtr<OutputDevice> mpOutDev; - Rectangle maDestRect; + tools::Rectangle maDestRect; css::uno::Any maRenderData; }; @@ -230,7 +230,7 @@ void GraphicRendererVCL::_setPropertyValues( const comphelper::PropertyMapEntry* if( *pValues >>= aAWTRect ) { - maDestRect = Rectangle( Point( aAWTRect.X, aAWTRect.Y ), + maDestRect = tools::Rectangle( Point( aAWTRect.X, aAWTRect.Y ), Size( aAWTRect.Width, aAWTRect.Height ) ); } } diff --git a/svtools/source/hatchwindow/hatchwindow.cxx b/svtools/source/hatchwindow/hatchwindow.cxx index 569556443e31..26093b92bdb4 100644 --- a/svtools/source/hatchwindow/hatchwindow.cxx +++ b/svtools/source/hatchwindow/hatchwindow.cxx @@ -67,7 +67,7 @@ void VCLXHatchWindow::initializeWindow( const uno::Reference< awt::XWindowPeer > //pHatchWindow->Show(); } -void VCLXHatchWindow::QueryObjAreaPixel( Rectangle & aRect ) +void VCLXHatchWindow::QueryObjAreaPixel( tools::Rectangle & aRect ) { if ( m_xController.is() ) { @@ -84,7 +84,7 @@ void VCLXHatchWindow::QueryObjAreaPixel( Rectangle & aRect ) } } -void VCLXHatchWindow::RequestObjAreaPixel( const Rectangle & aRect ) +void VCLXHatchWindow::RequestObjAreaPixel( const tools::Rectangle & aRect ) { if ( m_xController.is() ) { diff --git a/svtools/source/hatchwindow/ipwin.cxx b/svtools/source/hatchwindow/ipwin.cxx index 8ec5c97fa338..d714dd3b981e 100644 --- a/svtools/source/hatchwindow/ipwin.cxx +++ b/svtools/source/hatchwindow/ipwin.cxx @@ -42,39 +42,39 @@ SvResizeHelper::SvResizeHelper() |* |* Description: the eight handles to magnify *************************************************************************/ -void SvResizeHelper::FillHandleRectsPixel( Rectangle aRects[ 8 ] ) const +void SvResizeHelper::FillHandleRectsPixel( tools::Rectangle aRects[ 8 ] ) const { // only because of EMPTY_RECT Point aBottomRight = aOuter.BottomRight(); // upper left - aRects[ 0 ] = Rectangle( aOuter.TopLeft(), aBorder ); + aRects[ 0 ] = tools::Rectangle( aOuter.TopLeft(), aBorder ); // upper middle - aRects[ 1 ] = Rectangle( Point( aOuter.Center().X() - aBorder.Width() / 2, + aRects[ 1 ] = tools::Rectangle( Point( aOuter.Center().X() - aBorder.Width() / 2, aOuter.Top() ), aBorder ); // upper right - aRects[ 2 ] = Rectangle( Point( aBottomRight.X() - aBorder.Width() +1, + aRects[ 2 ] = tools::Rectangle( Point( aBottomRight.X() - aBorder.Width() +1, aOuter.Top() ), aBorder ); // middle right - aRects[ 3 ] = Rectangle( Point( aBottomRight.X() - aBorder.Width() +1, + aRects[ 3 ] = tools::Rectangle( Point( aBottomRight.X() - aBorder.Width() +1, aOuter.Center().Y() - aBorder.Height() / 2 ), aBorder ); // lower right - aRects[ 4 ] = Rectangle( Point( aBottomRight.X() - aBorder.Width() +1, + aRects[ 4 ] = tools::Rectangle( Point( aBottomRight.X() - aBorder.Width() +1, aBottomRight.Y() - aBorder.Height() +1 ), aBorder ); // lower middle - aRects[ 5 ] = Rectangle( Point( aOuter.Center().X() - aBorder.Width() / 2, + aRects[ 5 ] = tools::Rectangle( Point( aOuter.Center().X() - aBorder.Width() / 2, aBottomRight.Y() - aBorder.Height() +1), aBorder ); // lower left - aRects[ 6 ] = Rectangle( Point( aOuter.Left(), + aRects[ 6 ] = tools::Rectangle( Point( aOuter.Left(), aBottomRight.Y() - aBorder.Height() +1), aBorder ); // middle left - aRects[ 7 ] = Rectangle( Point( aOuter.Left(), + aRects[ 7 ] = tools::Rectangle( Point( aOuter.Left(), aOuter.Center().Y() - aBorder.Height() / 2 ), aBorder ); } @@ -84,7 +84,7 @@ void SvResizeHelper::FillHandleRectsPixel( Rectangle aRects[ 8 ] ) const |* |* Description: the four edges are calculated *************************************************************************/ -void SvResizeHelper::FillMoveRectsPixel( Rectangle aRects[ 4 ] ) const +void SvResizeHelper::FillMoveRectsPixel( tools::Rectangle aRects[ 4 ] ) const { // upper aRects[ 0 ] = aOuter; @@ -115,14 +115,14 @@ void SvResizeHelper::Draw(vcl::RenderContext& rRenderContext) rRenderContext.SetFillColor( aFillColor ); rRenderContext.SetLineColor(); - Rectangle aMoveRects[ 4 ]; + tools::Rectangle aMoveRects[ 4 ]; FillMoveRectsPixel( aMoveRects ); sal_uInt16 i; for (i = 0; i < 4; i++) rRenderContext.DrawRect(aMoveRects[i]); // draw handles rRenderContext.SetFillColor(aColBlack); - Rectangle aRects[ 8 ]; + tools::Rectangle aRects[ 8 ]; FillHandleRectsPixel(aRects); for (i = 0; i < 8; i++) rRenderContext.DrawRect( aRects[ i ] ); @@ -136,7 +136,7 @@ void SvResizeHelper::Draw(vcl::RenderContext& rRenderContext) *************************************************************************/ void SvResizeHelper::InvalidateBorder( vcl::Window * pWin ) { - Rectangle aMoveRects[ 4 ]; + tools::Rectangle aMoveRects[ 4 ]; FillMoveRectsPixel( aMoveRects ); for(const auto & rMoveRect : aMoveRects) pWin->Invalidate( rMoveRect ); @@ -171,13 +171,13 @@ short SvResizeHelper::SelectMove( vcl::Window * pWin, const Point & rPos ) { if( -1 == nGrab ) { - Rectangle aRects[ 8 ]; + tools::Rectangle aRects[ 8 ]; FillHandleRectsPixel( aRects ); for( sal_uInt16 i = 0; i < 8; i++ ) if( aRects[ i ].IsInside( rPos ) ) return i; // Move-Rect overlaps Handles - Rectangle aMoveRects[ 4 ]; + tools::Rectangle aMoveRects[ 4 ]; FillMoveRectsPixel( aMoveRects ); for(const auto & rMoveRect : aMoveRects) if( rMoveRect.IsInside( rPos ) ) @@ -185,7 +185,7 @@ short SvResizeHelper::SelectMove( vcl::Window * pWin, const Point & rPos ) } else { - Rectangle aRect( GetTrackRectPixel( rPos ) ); + tools::Rectangle aRect( GetTrackRectPixel( rPos ) ); aRect.SetSize( pWin->PixelToLogic( aRect.GetSize() ) ); aRect.SetPos( pWin->PixelToLogic( aRect.TopLeft() ) ); pWin->ShowTracking( aRect ); @@ -193,12 +193,12 @@ short SvResizeHelper::SelectMove( vcl::Window * pWin, const Point & rPos ) return nGrab; } -Point SvResizeHelper::GetTrackPosPixel( const Rectangle & rRect ) const +Point SvResizeHelper::GetTrackPosPixel( const tools::Rectangle & rRect ) const { // not important how the rectangle is returned, it is important // which handle has been touched Point aPos; - Rectangle aRect( rRect ); + tools::Rectangle aRect( rRect ); aRect.Justify(); // only because of EMPTY_RECT Point aBR = aOuter.BottomRight(); @@ -261,9 +261,9 @@ Point SvResizeHelper::GetTrackPosPixel( const Rectangle & rRect ) const |* |* Description *************************************************************************/ -Rectangle SvResizeHelper::GetTrackRectPixel( const Point & rTrackPos ) const +tools::Rectangle SvResizeHelper::GetTrackRectPixel( const Point & rTrackPos ) const { - Rectangle aTrackRect; + tools::Rectangle aTrackRect; if( -1 != nGrab ) { Point aDiff = rTrackPos - aSelPos; @@ -334,7 +334,7 @@ Rectangle SvResizeHelper::GetTrackRectPixel( const Point & rTrackPos ) const return aTrackRect; } -void SvResizeHelper::ValidateRect( Rectangle & rValidate ) const +void SvResizeHelper::ValidateRect( tools::Rectangle & rValidate ) const { switch( nGrab ) { @@ -393,7 +393,7 @@ void SvResizeHelper::ValidateRect( Rectangle & rValidate ) const |* Description *************************************************************************/ bool SvResizeHelper::SelectRelease( vcl::Window * pWin, const Point & rPos, - Rectangle & rOutPosSize ) + tools::Rectangle & rOutPosSize ) { if( -1 != nGrab ) { @@ -440,7 +440,7 @@ SvResizeWindow::SvResizeWindow OSL_ENSURE( pParent != nullptr && pWrapper != nullptr, "Wrong initialization of hatch window!\n" ); SetBackground(); SetAccessibleRole( css::accessibility::AccessibleRole::EMBEDDED_OBJECT ); - m_aResizer.SetOuterRectPixel( Rectangle( Point(), GetOutputSizePixel() ) ); + m_aResizer.SetOuterRectPixel( tools::Rectangle( Point(), GetOutputSizePixel() ) ); } /************************************************************************* @@ -512,7 +512,7 @@ void SvResizeWindow::MouseMove( const MouseEvent & rEvt ) SelectMouse( rEvt.GetPosPixel() ); else { - Rectangle aRect( m_aResizer.GetTrackRectPixel( rEvt.GetPosPixel() ) ); + tools::Rectangle aRect( m_aResizer.GetTrackRectPixel( rEvt.GetPosPixel() ) ); Point aDiff = GetPosPixel(); aRect.SetPos( aRect.TopLeft() + aDiff ); m_aResizer.ValidateRect( aRect ); @@ -534,7 +534,7 @@ void SvResizeWindow::MouseButtonUp( const MouseEvent & rEvt ) { if( m_aResizer.GetGrab() != -1 ) { - Rectangle aRect( m_aResizer.GetTrackRectPixel( rEvt.GetPosPixel() ) ); + tools::Rectangle aRect( m_aResizer.GetTrackRectPixel( rEvt.GetPosPixel() ) ); Point aDiff = GetPosPixel(); aRect.SetPos( aRect.TopLeft() + aDiff ); // aRect -= GetAllBorderPixel(); @@ -542,7 +542,7 @@ void SvResizeWindow::MouseButtonUp( const MouseEvent & rEvt ) m_pWrapper->QueryObjAreaPixel( aRect ); - Rectangle aOutRect; + tools::Rectangle aOutRect; if( m_aResizer.SelectRelease( this, rEvt.GetPosPixel(), aOutRect ) ) { m_nMoveGrab = -1; @@ -574,7 +574,7 @@ void SvResizeWindow::KeyInput( const KeyEvent & rEvt ) void SvResizeWindow::Resize() { m_aResizer.InvalidateBorder( this ); // old area - m_aResizer.SetOuterRectPixel( Rectangle( Point(), GetOutputSizePixel() ) ); + m_aResizer.SetOuterRectPixel( tools::Rectangle( Point(), GetOutputSizePixel() ) ); m_aResizer.InvalidateBorder( this ); // new area } @@ -583,7 +583,7 @@ void SvResizeWindow::Resize() |* |* Description *************************************************************************/ -void SvResizeWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle & /*rRect*/ ) +void SvResizeWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle & /*rRect*/ ) { m_aResizer.Draw(rRenderContext); } diff --git a/svtools/source/hatchwindow/ipwin.hxx b/svtools/source/hatchwindow/ipwin.hxx index 07da60607b2c..d7637869cd70 100644 --- a/svtools/source/hatchwindow/ipwin.hxx +++ b/svtools/source/hatchwindow/ipwin.hxx @@ -28,7 +28,7 @@ class SvResizeHelper { Size aBorder; - Rectangle aOuter; + tools::Rectangle aOuter; short nGrab; // -1 no Grab, 0 - 7, 8 = Move, see FillHandle... Point aSelPos; public: @@ -42,22 +42,22 @@ public: { aBorder = rBorderP; } - void SetOuterRectPixel(const Rectangle& rRect) + void SetOuterRectPixel(const tools::Rectangle& rRect) { aOuter = rRect; } // Clockwise, start at upper left - void FillHandleRectsPixel( Rectangle aRects[ 8 ] ) const; - void FillMoveRectsPixel( Rectangle aRects[ 4 ] ) const; + void FillHandleRectsPixel( tools::Rectangle aRects[ 8 ] ) const; + void FillMoveRectsPixel( tools::Rectangle aRects[ 4 ] ) const; void Draw(vcl::RenderContext& rRenderContext); void InvalidateBorder( vcl::Window * ); bool SelectBegin( vcl::Window *, const Point & rPos ); short SelectMove( vcl::Window * pWin, const Point & rPos ); - Point GetTrackPosPixel( const Rectangle & rRect ) const; - Rectangle GetTrackRectPixel( const Point & rTrackPos ) const; - void ValidateRect( Rectangle & rValidate ) const; - bool SelectRelease( vcl::Window *, const Point & rPos, Rectangle & rOutPosSize ); + Point GetTrackPosPixel( const tools::Rectangle & rRect ) const; + tools::Rectangle GetTrackRectPixel( const Point & rTrackPos ) const; + void ValidateRect( tools::Rectangle & rValidate ) const; + bool SelectRelease( vcl::Window *, const Point & rPos, tools::Rectangle & rOutPosSize ); void Release( vcl::Window * pWin ); }; @@ -83,7 +83,7 @@ public: virtual void MouseButtonDown( const MouseEvent & rEvt ) override; virtual void KeyInput( const KeyEvent & rEvt ) override; virtual void Resize() override; - virtual void Paint( vcl::RenderContext& /*rRenderContext*/, const Rectangle & ) override; + virtual void Paint( vcl::RenderContext& /*rRenderContext*/, const tools::Rectangle & ) override; virtual bool EventNotify( NotifyEvent& rNEvt ) override; virtual bool PreNotify( NotifyEvent& rNEvt ) override; }; diff --git a/svtools/source/inc/hatchwindow.hxx b/svtools/source/inc/hatchwindow.hxx index e60fac6ccf0b..691f3fc8edb0 100644 --- a/svtools/source/inc/hatchwindow.hxx +++ b/svtools/source/inc/hatchwindow.hxx @@ -41,8 +41,8 @@ public: const css::awt::Rectangle& aBounds, const css::awt::Size& aSize ); - void QueryObjAreaPixel( Rectangle & ); - void RequestObjAreaPixel( const Rectangle & ); + void QueryObjAreaPixel( tools::Rectangle & ); + void RequestObjAreaPixel( const tools::Rectangle & ); void InplaceDeactivate(); void Activated(); void Deactivated(); diff --git a/svtools/source/inc/iconviewimpl.hxx b/svtools/source/inc/iconviewimpl.hxx index 5b6a782cf20e..ca29b20f85b1 100644 --- a/svtools/source/inc/iconviewimpl.hxx +++ b/svtools/source/inc/iconviewimpl.hxx @@ -40,7 +40,7 @@ public: bool IsEntryInView( SvTreeListEntry* pEntry ) const SAL_OVERRIDE; - void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) SAL_OVERRIDE; + void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) SAL_OVERRIDE; // returns 0 if position is just past the last entry SvTreeListEntry* GetEntry( const Point& rPoint ) const SAL_OVERRIDE; diff --git a/svtools/source/inc/svimpbox.hxx b/svtools/source/inc/svimpbox.hxx index 2503926bcb4f..84a6e5d3a54d 100644 --- a/svtools/source/inc/svimpbox.hxx +++ b/svtools/source/inc/svimpbox.hxx @@ -197,7 +197,7 @@ private: void UpdateContextBmpWidthMax( SvTreeListEntry* pEntry ); void UpdateContextBmpWidthVectorFromMovedEntry( SvTreeListEntry* pEntry ); - void CalcCellFocusRect( SvTreeListEntry* pEntry, Rectangle& rRect ); + void CalcCellFocusRect( SvTreeListEntry* pEntry, tools::Rectangle& rRect ); bool AreChildrenTransient() const { return bAreChildrenTransient; } void SetChildrenNotTransient() { bAreChildrenTransient = false; } @@ -229,7 +229,7 @@ protected: virtual void AdjustScrollBars( Size& rSize ); virtual void InvalidateEntry( long nY ) const; - Rectangle GetVisibleArea() const; + tools::Rectangle GetVisibleArea() const; void SetCursor( SvTreeListEntry* pEntry, bool bForceNoSelect = false ); void BeginScroll(); void EndScroll(); @@ -262,7 +262,7 @@ public: void CollapsingEntry( SvTreeListEntry* pEntry ); void EntrySelected( SvTreeListEntry* pEntry, bool bSelect ); - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect); + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect); void MouseButtonDown( const MouseEvent& ); void MouseButtonUp( const MouseEvent& ); void MouseMove( const MouseEvent&); @@ -326,7 +326,7 @@ public: void EnableAsyncDrag( bool b ) { bAsyncBeginDrag = b; } void SetUpdateMode( bool bMode ); bool GetUpdateMode() const { return bUpdateMode; } - Rectangle GetClipRegionRect() const; + tools::Rectangle GetClipRegionRect() const; bool HasHorScrollBar() const { return aHorSBar->IsVisible(); } void ShowFocusRect( const SvTreeListEntry* pEntry ); void CallEventListeners( VclEventId nEvent, void* pData = nullptr ); diff --git a/svtools/source/misc/embedhlp.cxx b/svtools/source/misc/embedhlp.cxx index 02514dff2abd..dbbea93fc011 100644 --- a/svtools/source/misc/embedhlp.cxx +++ b/svtools/source/misc/embedhlp.cxx @@ -623,7 +623,7 @@ SvStream* EmbeddedObjectRef::GetGraphicStream( bool bUpdate ) const return nullptr; } -void EmbeddedObjectRef::DrawPaintReplacement( const Rectangle &rRect, const OUString &rText, OutputDevice *pOut ) +void EmbeddedObjectRef::DrawPaintReplacement( const tools::Rectangle &rRect, const OUString &rText, OutputDevice *pOut ) { MapMode aMM( MapUnit::MapAppFont ); Size aAppFontSz = pOut->LogicToLogic( Size( 0, 8 ), &aMM, nullptr ); @@ -705,7 +705,7 @@ void EmbeddedObjectRef::DrawPaintReplacement( const Rectangle &rRect, const OUSt pOut->Pop(); } -void EmbeddedObjectRef::DrawShading( const Rectangle &rRect, OutputDevice *pOut ) +void EmbeddedObjectRef::DrawShading( const tools::Rectangle &rRect, OutputDevice *pOut ) { GDIMetaFile * pMtf = pOut->GetConnectMetaFile(); if( pMtf && pMtf->IsRecord() ) diff --git a/svtools/source/misc/imap.cxx b/svtools/source/misc/imap.cxx index 3a0b1533bbf2..7888c8ee5099 100644 --- a/svtools/source/misc/imap.cxx +++ b/svtools/source/misc/imap.cxx @@ -135,7 +135,7 @@ bool IMapObject::IsEqual( const IMapObject& rEqObj ) ( bActive == rEqObj.bActive ) ); } -IMapRectangleObject::IMapRectangleObject( const Rectangle& rRect, +IMapRectangleObject::IMapRectangleObject( const tools::Rectangle& rRect, const OUString& rURL, const OUString& rAltText, const OUString& rDesc, @@ -148,7 +148,7 @@ IMapRectangleObject::IMapRectangleObject( const Rectangle& rRect, ImpConstruct( rRect, bPixelCoords ); } -void IMapRectangleObject::ImpConstruct( const Rectangle& rRect, bool bPixel ) +void IMapRectangleObject::ImpConstruct( const tools::Rectangle& rRect, bool bPixel ) { if ( bPixel ) aRect = Application::GetDefaultDevice()->PixelToLogic( rRect, MapMode( MapUnit::Map100thMM ) ); @@ -204,9 +204,9 @@ bool IMapRectangleObject::IsHit( const Point& rPoint ) const return aRect.IsInside( rPoint ); } -Rectangle IMapRectangleObject::GetRectangle( bool bPixelCoords ) const +tools::Rectangle IMapRectangleObject::GetRectangle( bool bPixelCoords ) const { - Rectangle aNewRect; + tools::Rectangle aNewRect; if ( bPixelCoords ) aNewRect = Application::GetDefaultDevice()->LogicToPixel( aRect, MapMode( MapUnit::Map100thMM ) ); @@ -227,7 +227,7 @@ void IMapRectangleObject::Scale( const Fraction& rFracX, const Fraction& rFracY SCALEPOINT( aBR, rFracX, rFracY ); } - aRect = Rectangle( aTL, aBR ); + aRect = tools::Rectangle( aTL, aBR ); } bool IMapRectangleObject::IsEqual( const IMapRectangleObject& rEqObj ) @@ -469,7 +469,7 @@ tools::Polygon IMapPolygonObject::GetPolygon( bool bPixelCoords ) const return aNewPoly; } -void IMapPolygonObject::SetExtraEllipse( const Rectangle& rEllipse ) +void IMapPolygonObject::SetExtraEllipse( const tools::Rectangle& rEllipse ) { if ( aPoly.GetSize() ) { @@ -505,7 +505,7 @@ void IMapPolygonObject::Scale( const Fraction& rFracX, const Fraction& rFracY ) SCALEPOINT( aBR, rFracX, rFracY ); } - aEllipse = Rectangle( aTL, aBR ); + aEllipse = tools::Rectangle( aTL, aBR ); } } diff --git a/svtools/source/misc/imap2.cxx b/svtools/source/misc/imap2.cxx index 8ca4349421fd..1c86d6d4bd85 100644 --- a/svtools/source/misc/imap2.cxx +++ b/svtools/source/misc/imap2.cxx @@ -270,7 +270,7 @@ void ImageMap::ImpReadCERNLine( const OString& rLine, const OUString& rBaseURL const Point aTopLeft( ImpReadCERNCoords( &pStr ) ); const Point aBottomRight( ImpReadCERNCoords( &pStr ) ); const OUString aURL( ImpReadCERNURL( &pStr, rBaseURL ) ); - const Rectangle aRect( aTopLeft, aBottomRight ); + const tools::Rectangle aRect( aTopLeft, aBottomRight ); IMapRectangleObject* pObj = new IMapRectangleObject( aRect, aURL, OUString(), OUString(), OUString(), OUString() ); maList.push_back( pObj ); @@ -411,7 +411,7 @@ void ImageMap::ImpReadNCSALine( const OString& rLine, const OUString& rBaseURL ) const OUString aURL( ImpReadNCSAURL( &pStr, rBaseURL ) ); const Point aTopLeft( ImpReadNCSACoords( &pStr ) ); const Point aBottomRight( ImpReadNCSACoords( &pStr ) ); - const Rectangle aRect( aTopLeft, aBottomRight ); + const tools::Rectangle aRect( aTopLeft, aBottomRight ); IMapRectangleObject* pObj = new IMapRectangleObject( aRect, aURL, OUString(), OUString(), OUString(), OUString() ); maList.push_back( pObj ); diff --git a/svtools/source/svhtml/htmlout.cxx b/svtools/source/svhtml/htmlout.cxx index baf8cc6dae2c..5199ecec5d22 100644 --- a/svtools/source/svhtml/htmlout.cxx +++ b/svtools/source/svhtml/htmlout.cxx @@ -646,7 +646,7 @@ SvStream& HTMLOutFuncs::Out_ImageMap( SvStream& rStream, const IMapRectangleObject* pRectObj = static_cast<const IMapRectangleObject *>(pObj); pShape = OOO_STRING_SVTOOLS_HTML_SH_rect; - Rectangle aRect( pRectObj->GetRectangle() ); + tools::Rectangle aRect( pRectObj->GetRectangle() ); aCoords = OStringBuffer() .append(static_cast<sal_Int32>(aRect.Left())) diff --git a/svtools/source/table/gridtablerenderer.cxx b/svtools/source/table/gridtablerenderer.cxx index 157cdec4b344..8a486187a8ea 100644 --- a/svtools/source/table/gridtablerenderer.cxx +++ b/svtools/source/table/gridtablerenderer.cxx @@ -87,7 +87,7 @@ namespace svt { namespace table aDevice->SetOutputSizePixel( aBitmapSize ); DecorationView aDecoView(aDevice.get()); - aDecoView.DrawSymbol(Rectangle(aBitmapPos, aBitmapSize), + aDecoView.DrawSymbol(tools::Rectangle(aBitmapPos, aBitmapSize), i_sortAscending ? SymbolType::SPIN_UP : SymbolType::SPIN_DOWN, i_style.GetActiveColor()); @@ -124,9 +124,9 @@ namespace svt { namespace table namespace { - Rectangle lcl_getContentArea( GridTableRenderer_Impl const & i_impl, Rectangle const & i_cellArea ) + tools::Rectangle lcl_getContentArea( GridTableRenderer_Impl const & i_impl, tools::Rectangle const & i_cellArea ) { - Rectangle aContentArea( i_cellArea ); + tools::Rectangle aContentArea( i_cellArea ); if ( i_impl.bUseGridLines ) { --aContentArea.Right(); @@ -134,9 +134,9 @@ namespace svt { namespace table } return aContentArea; } - Rectangle lcl_getTextRenderingArea( Rectangle const & i_contentArea ) + tools::Rectangle lcl_getTextRenderingArea( tools::Rectangle const & i_contentArea ) { - Rectangle aTextArea( i_contentArea ); + tools::Rectangle aTextArea( i_contentArea ); aTextArea.Left() += 2; aTextArea.Right() -= 2; ++aTextArea.Top(); --aTextArea.Bottom(); return aTextArea; @@ -211,7 +211,7 @@ namespace svt { namespace table } - void GridTableRenderer::PaintHeaderArea(vcl::RenderContext& rRenderContext, const Rectangle& _rArea, + void GridTableRenderer::PaintHeaderArea(vcl::RenderContext& rRenderContext, const tools::Rectangle& _rArea, bool _bIsColHeaderArea, bool _bIsRowHeaderArea, const StyleSettings& _rStyle) { OSL_PRECOND(_bIsColHeaderArea || _bIsRowHeaderArea, "GridTableRenderer::PaintHeaderArea: invalid area flags!"); @@ -239,7 +239,7 @@ namespace svt { namespace table void GridTableRenderer::PaintColumnHeader(ColPos _nCol, bool _bActive, bool _bSelected, vcl::RenderContext& rRenderContext, - const Rectangle& _rArea, const StyleSettings& _rStyle) + const tools::Rectangle& _rArea, const StyleSettings& _rStyle) { rRenderContext.Push(PushFlags::LINECOLOR); @@ -252,7 +252,7 @@ namespace svt { namespace table Color const textColor = lcl_getEffectiveColor( m_pImpl->rModel.getTextColor(), _rStyle, &StyleSettings::GetFieldTextColor ); rRenderContext.SetTextColor(textColor); - Rectangle const aTextRect( lcl_getTextRenderingArea( lcl_getContentArea( *m_pImpl, _rArea ) ) ); + tools::Rectangle const aTextRect( lcl_getTextRenderingArea( lcl_getContentArea( *m_pImpl, _rArea ) ) ); DrawTextFlags nDrawTextFlags = lcl_getAlignmentTextDrawFlags( *m_pImpl, _nCol ) | DrawTextFlags::Clip; if (!m_pImpl->rModel.isEnabled()) nDrawTextFlags |= DrawTextFlags::Disable; @@ -303,7 +303,7 @@ namespace svt { namespace table void GridTableRenderer::PrepareRow(RowPos _nRow, bool i_hasControlFocus, bool _bSelected, vcl::RenderContext& rRenderContext, - const Rectangle& _rRowArea, const StyleSettings& _rStyle) + const tools::Rectangle& _rRowArea, const StyleSettings& _rStyle) { // remember the row for subsequent calls to the other ->ITableRenderer methods m_pImpl->nCurrentRow = _nRow; @@ -369,7 +369,7 @@ namespace svt { namespace table void GridTableRenderer::PaintRowHeader(bool /*i_hasControlFocus*/, bool /*_bSelected*/, vcl::RenderContext& rRenderContext, - const Rectangle& _rArea, const StyleSettings& _rStyle) + const tools::Rectangle& _rArea, const StyleSettings& _rStyle) { rRenderContext.Push( PushFlags::LINECOLOR | PushFlags::TEXTCOLOR ); @@ -386,7 +386,7 @@ namespace svt { namespace table _rStyle, &StyleSettings::GetFieldTextColor); rRenderContext.SetTextColor(textColor); - Rectangle const aTextRect(lcl_getTextRenderingArea(lcl_getContentArea(*m_pImpl, _rArea))); + tools::Rectangle const aTextRect(lcl_getTextRenderingArea(lcl_getContentArea(*m_pImpl, _rArea))); DrawTextFlags nDrawTextFlags = lcl_getAlignmentTextDrawFlags(*m_pImpl, 0) | DrawTextFlags::Clip; if (!m_pImpl->rModel.isEnabled()) nDrawTextFlags |= DrawTextFlags::Disable; @@ -401,13 +401,13 @@ namespace svt { namespace table struct GridTableRenderer::CellRenderContext { OutputDevice& rDevice; - Rectangle const aContentArea; + tools::Rectangle const aContentArea; StyleSettings const & rStyle; ColPos const nColumn; bool const bSelected; bool const bHasControlFocus; - CellRenderContext( OutputDevice& i_device, Rectangle const & i_contentArea, + CellRenderContext( OutputDevice& i_device, tools::Rectangle const & i_contentArea, StyleSettings const & i_style, ColPos const i_column, bool const i_selected, bool const i_hasControlFocus ) :rDevice( i_device ) ,aContentArea( i_contentArea ) @@ -421,11 +421,11 @@ namespace svt { namespace table void GridTableRenderer::PaintCell(ColPos const i_column, bool _bSelected, bool i_hasControlFocus, - vcl::RenderContext& rRenderContext, const Rectangle& _rArea, const StyleSettings& _rStyle) + vcl::RenderContext& rRenderContext, const tools::Rectangle& _rArea, const StyleSettings& _rStyle) { rRenderContext.Push(PushFlags::LINECOLOR | PushFlags::FILLCOLOR); - Rectangle const aContentArea(lcl_getContentArea(*m_pImpl, _rArea)); + tools::Rectangle const aContentArea(lcl_getContentArea(*m_pImpl, _rArea)); CellRenderContext const aCellRenderContext(rRenderContext, aContentArea, _rStyle, i_column, _bSelected, i_hasControlFocus); impl_paintCellContent(aCellRenderContext); @@ -536,7 +536,7 @@ namespace svt { namespace table i_context.rDevice.SetTextColor( textColor ); } - Rectangle const textRect( lcl_getTextRenderingArea( i_context.aContentArea ) ); + tools::Rectangle const textRect( lcl_getTextRenderingArea( i_context.aContentArea ) ); DrawTextFlags nDrawTextFlags = lcl_getAlignmentTextDrawFlags( *m_pImpl, i_context.nColumn ) | DrawTextFlags::Clip; if ( !m_pImpl->rModel.isEnabled() ) nDrawTextFlags |= DrawTextFlags::Disable; @@ -544,13 +544,13 @@ namespace svt { namespace table } - void GridTableRenderer::ShowCellCursor( vcl::Window& _rView, const Rectangle& _rCursorRect) + void GridTableRenderer::ShowCellCursor( vcl::Window& _rView, const tools::Rectangle& _rCursorRect) { _rView.ShowFocus( _rCursorRect ); } - void GridTableRenderer::HideCellCursor( vcl::Window& _rView, const Rectangle& _rCursorRect) + void GridTableRenderer::HideCellCursor( vcl::Window& _rView, const tools::Rectangle& _rCursorRect) { (void)_rCursorRect; _rView.HideFocus(); @@ -558,7 +558,7 @@ namespace svt { namespace table bool GridTableRenderer::FitsIntoCell( Any const & i_cellContent, - OutputDevice& i_targetDevice, Rectangle const & i_targetArea ) const + OutputDevice& i_targetDevice, tools::Rectangle const & i_targetArea ) const { if ( !i_cellContent.hasValue() ) return true; @@ -582,7 +582,7 @@ namespace svt { namespace table if ( sText.isEmpty() ) return true; - Rectangle const aTargetArea( lcl_getTextRenderingArea( lcl_getContentArea( *m_pImpl, i_targetArea ) ) ); + tools::Rectangle const aTargetArea( lcl_getTextRenderingArea( lcl_getContentArea( *m_pImpl, i_targetArea ) ) ); long const nTextHeight = i_targetDevice.GetTextHeight(); if ( nTextHeight > aTargetArea.GetHeight() ) diff --git a/svtools/source/table/mousefunction.cxx b/svtools/source/table/mousefunction.cxx index 1cf7f22d829b..0b947b9f5bfb 100644 --- a/svtools/source/table/mousefunction.cxx +++ b/svtools/source/table/mousefunction.cxx @@ -70,7 +70,7 @@ namespace svt { namespace table // show tracking line i_tableControl.hideTracking(); i_tableControl.showTracking( - Rectangle( + tools::Rectangle( Point( aPoint.X(), 0 ), Size( 1, tableSize.Height() ) ), diff --git a/svtools/source/table/tablecontrol.cxx b/svtools/source/table/tablecontrol.cxx index a9604b058464..bd18666c6bd6 100644 --- a/svtools/source/table/tablecontrol.cxx +++ b/svtools/source/table/tablecontrol.cxx @@ -498,7 +498,7 @@ namespace svt { namespace table } - Rectangle TableControl::GetWindowExtentsRelative( vcl::Window *pRelativeWindow ) const + tools::Rectangle TableControl::GetWindowExtentsRelative( vcl::Window *pRelativeWindow ) const { return Control::GetWindowExtentsRelative( pRelativeWindow ); } @@ -600,7 +600,7 @@ namespace svt { namespace table } - Rectangle TableControl::GetFieldCharacterBounds(sal_Int32 _nRow,sal_Int32 _nColumnPos,sal_Int32 nIndex) + tools::Rectangle TableControl::GetFieldCharacterBounds(sal_Int32 _nRow,sal_Int32 _nColumnPos,sal_Int32 nIndex) { (void)_nRow; (void)_nColumnPos; @@ -616,25 +616,25 @@ namespace svt { namespace table } - Rectangle TableControl::calcHeaderRect(bool _bIsColumnBar ) + tools::Rectangle TableControl::calcHeaderRect(bool _bIsColumnBar ) { return m_pImpl->calcHeaderRect( !_bIsColumnBar ); } - Rectangle TableControl::calcHeaderCellRect( bool _bIsColumnBar, sal_Int32 nPos ) + tools::Rectangle TableControl::calcHeaderCellRect( bool _bIsColumnBar, sal_Int32 nPos ) { return m_pImpl->calcHeaderCellRect( _bIsColumnBar, nPos ); } - Rectangle TableControl::calcTableRect() + tools::Rectangle TableControl::calcTableRect() { return m_pImpl->calcTableRect(); } - Rectangle TableControl::calcCellRect( sal_Int32 _nRowPos, sal_Int32 _nColPos ) + tools::Rectangle TableControl::calcCellRect( sal_Int32 _nRowPos, sal_Int32 _nColPos ) { return m_pImpl->calcCellRect( _nRowPos, _nColPos ); } diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx index fef8a6e09066..6ac56256baee 100644 --- a/svtools/source/table/tablecontrol_impl.cxx +++ b/svtools/source/table/tablecontrol_impl.cxx @@ -478,7 +478,7 @@ namespace svt { namespace table void TableControl_Impl::impl_invalidateColumn( ColPos const i_column ) { - Rectangle const aAllCellsArea( impl_getAllVisibleCellsArea() ); + tools::Rectangle const aAllCellsArea( impl_getAllVisibleCellsArea() ); const TableColumnGeometry aColumn( *this, aAllCellsArea, i_column ); if ( aColumn.isValid() ) @@ -511,9 +511,9 @@ namespace svt { namespace table } - Rectangle TableControl_Impl::impl_getAllVisibleCellsArea() const + tools::Rectangle TableControl_Impl::impl_getAllVisibleCellsArea() const { - Rectangle aArea( Point( 0, 0 ), Size( 0, 0 ) ); + tools::Rectangle aArea( Point( 0, 0 ), Size( 0, 0 ) ); // determine the right-most border of the last column which is // at least partially visible @@ -547,9 +547,9 @@ namespace svt { namespace table } - Rectangle TableControl_Impl::impl_getAllVisibleDataCellArea() const + tools::Rectangle TableControl_Impl::impl_getAllVisibleDataCellArea() const { - Rectangle aArea( impl_getAllVisibleCellsArea() ); + tools::Rectangle aArea( impl_getAllVisibleCellsArea() ); aArea.Left() = m_nRowHeaderWidthPixel; aArea.Top() = m_nColHeaderHeightPixel; return aArea; @@ -676,7 +676,7 @@ namespace svt { namespace table with the first visible column as given. Partially fitting columns are counted, too, if the respective parameter says so. */ - TableSize lcl_getColumnsVisibleWithin( const Rectangle& _rArea, ColPos _nFirstVisibleColumn, + TableSize lcl_getColumnsVisibleWithin( const tools::Rectangle& _rArea, ColPos _nFirstVisibleColumn, const TableControl_Impl& _rControl, bool _bAcceptPartialRow ) { TableSize visibleColumns = 0; @@ -982,7 +982,7 @@ namespace svt { namespace table // determine the playground for the data cells (excluding headers) // TODO: what if the control is smaller than needed for the headers/scrollbars? - Rectangle aDataCellPlayground( Point( 0, 0 ), m_rAntiImpl.GetOutputSizePixel() ); + tools::Rectangle aDataCellPlayground( Point( 0, 0 ), m_rAntiImpl.GetOutputSizePixel() ); aDataCellPlayground.Left() = m_nRowHeaderWidthPixel; aDataCellPlayground.Top() = m_nColHeaderHeightPixel; @@ -1084,7 +1084,7 @@ namespace svt { namespace table } - void TableControl_Impl::impl_ni_positionChildWindows( Rectangle const & i_dataCellPlayground, + void TableControl_Impl::impl_ni_positionChildWindows( tools::Rectangle const & i_dataCellPlayground, bool const i_verticalScrollbar, bool const i_horizontalScrollbar ) { long const nScrollbarMetrics = m_rAntiImpl.GetSettings().GetStyleSettings().GetScrollBarSize(); @@ -1106,7 +1106,7 @@ namespace svt { namespace table // position it if ( m_pVScroll ) { - Rectangle aScrollbarArea( + tools::Rectangle aScrollbarArea( Point( i_dataCellPlayground.Right() + 1, 0 ), Size( nScrollbarMetrics, i_dataCellPlayground.Bottom() + 1 ) ); @@ -1141,7 +1141,7 @@ namespace svt { namespace table m_pHScroll->SetPageSize( nVisibleUnits - 1 ); } } - Rectangle aScrollbarArea( + tools::Rectangle aScrollbarArea( Point( 0, i_dataCellPlayground.Bottom() + 1 ), Size( i_dataCellPlayground.Right() + 1, nScrollbarMetrics ) ); @@ -1184,7 +1184,7 @@ namespace svt { namespace table } - void TableControl_Impl::doPaintContent(vcl::RenderContext& rRenderContext, const Rectangle& _rUpdateRect) + void TableControl_Impl::doPaintContent(vcl::RenderContext& rRenderContext, const tools::Rectangle& _rUpdateRect) { if (!getModel()) return; @@ -1198,13 +1198,13 @@ namespace svt { namespace table m_nRowCount = m_pModel->getRowCount(); // the area occupied by all (at least partially) visible cells, including // headers - Rectangle const aAllCellsWithHeaders( impl_getAllVisibleCellsArea() ); + tools::Rectangle const aAllCellsWithHeaders( impl_getAllVisibleCellsArea() ); // draw the header column area if (m_pModel->hasColumnHeaders()) { - TableRowGeometry const aHeaderRow(*this, Rectangle(Point(0, 0), aAllCellsWithHeaders.BottomRight()), ROW_COL_HEADERS); - Rectangle const aColRect(aHeaderRow.getRect()); + TableRowGeometry const aHeaderRow(*this, tools::Rectangle(Point(0, 0), aAllCellsWithHeaders.BottomRight()), ROW_COL_HEADERS); + tools::Rectangle const aColRect(aHeaderRow.getRect()); pRenderer->PaintHeaderArea(rRenderContext, aColRect, true, false, rStyle); // Note that strictly, aHeaderRow.getRect() also contains the intersection between column // and row header area. However, below we go to paint this intersection, again, @@ -1221,7 +1221,7 @@ namespace svt { namespace table } } // the area occupied by the row header, if any - Rectangle aRowHeaderArea; + tools::Rectangle aRowHeaderArea; if (m_pModel->hasRowHeaders()) { aRowHeaderArea = aAllCellsWithHeaders; @@ -1240,9 +1240,9 @@ namespace svt { namespace table if (m_pModel->hasColumnHeaders()) { - TableCellGeometry const aIntersection(*this, Rectangle(Point(0, 0), aAllCellsWithHeaders.BottomRight()), + TableCellGeometry const aIntersection(*this, tools::Rectangle(Point(0, 0), aAllCellsWithHeaders.BottomRight()), COL_ROW_HEADERS, ROW_COL_HEADERS); - Rectangle const aInters(aIntersection.getRect()); + tools::Rectangle const aInters(aIntersection.getRect()); pRenderer->PaintHeaderArea(rRenderContext, aInters, true, true, rStyle); } } @@ -1251,7 +1251,7 @@ namespace svt { namespace table TableSize colCount = getModel()->getColumnCount(); // paint all rows - Rectangle const aAllDataCellsArea(impl_getAllVisibleDataCellArea()); + tools::Rectangle const aAllDataCellsArea(impl_getAllVisibleDataCellArea()); for (TableRowGeometry aRowIterator(*this, aAllCellsWithHeaders, getTopRow()); aRowIterator.isValid(); aRowIterator.moveDown()) { if (_rUpdateRect.GetIntersection(aRowIterator.getRect() ).IsEmpty()) @@ -1260,7 +1260,7 @@ namespace svt { namespace table bool const isControlFocused = m_rAntiImpl.HasControlFocus(); bool const isSelectedRow = isRowSelected(aRowIterator.getRow()); - Rectangle const aRect = aRowIterator.getRect().GetIntersection(aAllDataCellsArea); + tools::Rectangle const aRect = aRowIterator.getRect().GetIntersection(aAllDataCellsArea); // give the renderer a chance to prepare the row pRenderer->PrepareRow(aRowIterator.getRow(), isControlFocused, isSelectedRow, rRenderContext, aRect, rStyle); @@ -1268,7 +1268,7 @@ namespace svt { namespace table // paint the row header if (m_pModel->hasRowHeaders()) { - const Rectangle aCurrentRowHeader(aRowHeaderArea.GetIntersection(aRowIterator.getRect())); + const tools::Rectangle aCurrentRowHeader(aRowHeaderArea.GetIntersection(aRowIterator.getRect())); pRenderer->PaintRowHeader(isControlFocused, isSelectedRow, rRenderContext, aCurrentRowHeader, rStyle); } @@ -1677,7 +1677,7 @@ namespace svt { namespace table PTableRenderer pRenderer = !!m_pModel ? m_pModel->getRenderer() : PTableRenderer(); if ( !!pRenderer ) { - Rectangle aCellRect; + tools::Rectangle aCellRect; impl_getCellRect( m_nCurColumn, m_nCurRow, aCellRect ); if ( _bShow ) pRenderer->ShowCellCursor( *m_pDataWindow, aCellRect ); @@ -1687,7 +1687,7 @@ namespace svt { namespace table } - void TableControl_Impl::impl_getCellRect( ColPos _nColumn, RowPos _nRow, Rectangle& _rCellRect ) const + void TableControl_Impl::impl_getCellRect( ColPos _nColumn, RowPos _nRow, tools::Rectangle& _rCellRect ) const { if ( !m_pModel || ( COL_INVALID == _nColumn ) @@ -1822,7 +1822,7 @@ namespace svt { namespace table } - void TableControl_Impl::showTracking( Rectangle const & i_location, ShowTrackFlags const i_flags ) + void TableControl_Impl::showTracking( tools::Rectangle const & i_location, ShowTrackFlags const i_flags ) { m_pDataWindow->ShowTracking( i_location, i_flags ); } @@ -1837,15 +1837,15 @@ namespace svt { namespace table void TableControl_Impl::invalidateSelectedRegion( RowPos _nPrevRow, RowPos _nCurRow ) { // get the visible area of the table control and set the Left and right border of the region to be repainted - Rectangle const aAllCells( impl_getAllVisibleCellsArea() ); + tools::Rectangle const aAllCells( impl_getAllVisibleCellsArea() ); - Rectangle aInvalidateRect; + tools::Rectangle aInvalidateRect; aInvalidateRect.Left() = aAllCells.Left(); aInvalidateRect.Right() = aAllCells.Right(); // if only one row is selected if ( _nPrevRow == _nCurRow ) { - Rectangle aCellRect; + tools::Rectangle aCellRect; impl_getCellRect( m_nCurColumn, _nCurRow, aCellRect ); aInvalidateRect.Top() = aCellRect.Top(); aInvalidateRect.Bottom() = aCellRect.Bottom(); @@ -1853,7 +1853,7 @@ namespace svt { namespace table //if the region is above the current row else if(_nPrevRow < _nCurRow ) { - Rectangle aCellRect; + tools::Rectangle aCellRect; impl_getCellRect( m_nCurColumn, _nPrevRow, aCellRect ); aInvalidateRect.Top() = aCellRect.Top(); impl_getCellRect( m_nCurColumn, _nCurRow, aCellRect ); @@ -1862,7 +1862,7 @@ namespace svt { namespace table //if the region is beneath the current row else { - Rectangle aCellRect; + tools::Rectangle aCellRect; impl_getCellRect( m_nCurColumn, _nCurRow, aCellRect ); aInvalidateRect.Top() = aCellRect.Top(); impl_getCellRect( m_nCurColumn, _nPrevRow, aCellRect ); @@ -1872,7 +1872,7 @@ namespace svt { namespace table invalidateRect(aInvalidateRect); } - void TableControl_Impl::invalidateRect(const Rectangle &rInvalidateRect) + void TableControl_Impl::invalidateRect(const tools::Rectangle &rInvalidateRect) { m_pDataWindow->Invalidate( rInvalidateRect, m_pDataWindow->GetControlBackground().GetTransparency() ? InvalidateFlags::Transparent : InvalidateFlags::NONE ); @@ -1897,9 +1897,9 @@ namespace svt { namespace table RowPos const lastVisibleRow = m_nTopRow + impl_getVisibleRows( true ) - 1; RowPos const lastRow = ( ( i_lastRow == ROW_INVALID ) || ( i_lastRow > lastVisibleRow ) ) ? lastVisibleRow : i_lastRow; - Rectangle aInvalidateRect; + tools::Rectangle aInvalidateRect; - Rectangle const aVisibleCellsArea( impl_getAllVisibleCellsArea() ); + tools::Rectangle const aVisibleCellsArea( impl_getAllVisibleCellsArea() ); TableRowGeometry aRow( *this, aVisibleCellsArea, firstRow, true ); while ( aRow.isValid() && ( aRow.getRow() <= lastRow ) ) { @@ -1962,7 +1962,7 @@ namespace svt { namespace table DBG_ASSERT( m_pDataWindow, "TableControl_Impl::impl_getVisibleColumns: no data window!" ); return lcl_getColumnsVisibleWithin( - Rectangle( Point( 0, 0 ), m_pDataWindow->GetOutputSizePixel() ), + tools::Rectangle( Point( 0, 0 ), m_pDataWindow->GetOutputSizePixel() ), m_nLeftColumn, *this, _bAcceptPartialCol @@ -2059,7 +2059,7 @@ namespace svt { namespace table // scroll the view port, if possible long nPixelDelta = m_nRowHeightPixel * ( m_nTopRow - nOldTopRow ); - Rectangle aDataArea( Point( 0, m_nColHeaderHeightPixel ), m_pDataWindow->GetOutputSizePixel() ); + tools::Rectangle aDataArea( Point( 0, m_nColHeaderHeightPixel ), m_pDataWindow->GetOutputSizePixel() ); if ( m_pDataWindow->GetBackground().IsScrollable() && std::abs( nPixelDelta ) < aDataArea.GetHeight() @@ -2121,7 +2121,7 @@ namespace svt { namespace table // Same for onEndScroll // scroll the view port, if possible - const Rectangle aDataArea( Point( m_nRowHeaderWidthPixel, 0 ), m_pDataWindow->GetOutputSizePixel() ); + const tools::Rectangle aDataArea( Point( m_nRowHeaderWidthPixel, 0 ), m_pDataWindow->GetOutputSizePixel() ); long nPixelDelta = m_aColumnWidths[ nOldLeftColumn ].getStart() @@ -2338,20 +2338,20 @@ namespace svt { namespace table } - Rectangle TableControl_Impl::calcHeaderRect(bool bColHeader) + tools::Rectangle TableControl_Impl::calcHeaderRect(bool bColHeader) { - Rectangle const aRectTableWithHeaders( impl_getAllVisibleCellsArea() ); + tools::Rectangle const aRectTableWithHeaders( impl_getAllVisibleCellsArea() ); Size const aSizeTableWithHeaders( aRectTableWithHeaders.GetSize() ); if ( bColHeader ) - return Rectangle( aRectTableWithHeaders.TopLeft(), Size( aSizeTableWithHeaders.Width(), m_nColHeaderHeightPixel ) ); + return tools::Rectangle( aRectTableWithHeaders.TopLeft(), Size( aSizeTableWithHeaders.Width(), m_nColHeaderHeightPixel ) ); else - return Rectangle( aRectTableWithHeaders.TopLeft(), Size( m_nRowHeaderWidthPixel, aSizeTableWithHeaders.Height() ) ); + return tools::Rectangle( aRectTableWithHeaders.TopLeft(), Size( m_nRowHeaderWidthPixel, aSizeTableWithHeaders.Height() ) ); } - Rectangle TableControl_Impl::calcHeaderCellRect( bool bColHeader, sal_Int32 nPos ) + tools::Rectangle TableControl_Impl::calcHeaderCellRect( bool bColHeader, sal_Int32 nPos ) { - Rectangle const aHeaderRect = calcHeaderRect( bColHeader ); + tools::Rectangle const aHeaderRect = calcHeaderRect( bColHeader ); TableCellGeometry const aGeometry( *this, aHeaderRect, bColHeader ? nPos : COL_ROW_HEADERS, @@ -2361,15 +2361,15 @@ namespace svt { namespace table } - Rectangle TableControl_Impl::calcTableRect() + tools::Rectangle TableControl_Impl::calcTableRect() { return impl_getAllVisibleDataCellArea(); } - Rectangle TableControl_Impl::calcCellRect( sal_Int32 nRow, sal_Int32 nCol ) + tools::Rectangle TableControl_Impl::calcCellRect( sal_Int32 nRow, sal_Int32 nCol ) { - Rectangle aCellRect; + tools::Rectangle aCellRect; impl_getCellRect( nRow, nCol, aCellRect ); return aCellRect; } diff --git a/svtools/source/table/tablecontrol_impl.hxx b/svtools/source/table/tablecontrol_impl.hxx index 9fdd30d180c9..e03942aec4f8 100644 --- a/svtools/source/table/tablecontrol_impl.hxx +++ b/svtools/source/table/tablecontrol_impl.hxx @@ -159,7 +159,7 @@ namespace svt { namespace table /** paints the table control content which intersects with the given rectangle */ - void doPaintContent(vcl::RenderContext& rRenderContext, const Rectangle& _rUpdateRect); + void doPaintContent(vcl::RenderContext& rRenderContext, const tools::Rectangle& _rUpdateRect); /** moves the cursor to the cell with the given coordinates @@ -185,7 +185,7 @@ namespace svt { namespace table /** returns the position of the current row in the selection vector */ static int getRowSelectedNumber(const ::std::vector<RowPos>& selectedRows, RowPos current); - void invalidateRect(const Rectangle &rInvalidateRect); + void invalidateRect(const tools::Rectangle &rInvalidateRect); /** ??? */ void invalidateSelectedRegion( RowPos _nPrevRow, RowPos _nCurRow ); @@ -258,7 +258,7 @@ namespace svt { namespace table virtual void invalidate( TableArea const i_what ) override; virtual long pixelWidthToAppFont( long const i_pixels ) const override; virtual void hideTracking() override; - virtual void showTracking( Rectangle const & i_location, ShowTrackFlags const i_flags ) override; + virtual void showTracking( tools::Rectangle const & i_location, ShowTrackFlags const i_flags ) override; RowPos getRowAtPoint( const Point& rPoint ) const; ColPos getColAtPoint( const Point& rPoint ) const; virtual TableCell hitTest( const Point& rPoint ) const override; @@ -273,10 +273,10 @@ namespace svt { namespace table ScrollBar* getHorzScrollbar() { return m_pHScroll; } ScrollBar* getVertScrollbar() { return m_pVScroll; } - Rectangle calcHeaderRect( bool bColHeader ); - Rectangle calcHeaderCellRect( bool bColHeader, sal_Int32 nPos ); - Rectangle calcTableRect(); - Rectangle calcCellRect( sal_Int32 nRow, sal_Int32 nCol ); + tools::Rectangle calcHeaderRect( bool bColHeader ); + tools::Rectangle calcHeaderCellRect( bool bColHeader, sal_Int32 nPos ); + tools::Rectangle calcTableRect(); + tools::Rectangle calcCellRect( sal_Int32 nRow, sal_Int32 nCol ); // A11Y css::uno::Reference< css::accessibility::XAccessible > @@ -334,7 +334,7 @@ namespace svt { namespace table /** determines the rectangle occupied by the given cell */ - void impl_getCellRect( ColPos _nColumn, RowPos _nRow, Rectangle& _rCellRect ) const; + void impl_getCellRect( ColPos _nColumn, RowPos _nRow, tools::Rectangle& _rCellRect ) const; /** updates all cached model values @@ -382,7 +382,7 @@ namespace svt { namespace table /** positions all child windows, e.g. the both scrollbars, the corner window, and the data window */ void impl_ni_positionChildWindows( - Rectangle const & i_dataCellPlayground, + tools::Rectangle const & i_dataCellPlayground, bool const i_verticalScrollbar, bool const i_horizontalScrollbar ); @@ -428,14 +428,14 @@ namespace svt { namespace table As a result of respecting the partial visibility of rows and columns, the returned area might be larger than the data window's output size. */ - Rectangle impl_getAllVisibleCellsArea() const; + tools::Rectangle impl_getAllVisibleCellsArea() const; /** retrieves the area occupied by all (at least partially) visible data cells. Effectively, the returned area is the same as returned by ->impl_getAllVisibleCellsArea, minus the row and column header areas. */ - Rectangle impl_getAllVisibleDataCellArea() const; + tools::Rectangle impl_getAllVisibleDataCellArea() const; /** retrieves the column which covers the given ordinate */ diff --git a/svtools/source/table/tabledatawindow.cxx b/svtools/source/table/tabledatawindow.cxx index a295b2e3241b..2c3cb1e8ddaa 100644 --- a/svtools/source/table/tabledatawindow.cxx +++ b/svtools/source/table/tabledatawindow.cxx @@ -51,7 +51,7 @@ namespace svt { namespace table Window::dispose(); } - void TableDataWindow::Paint( vcl::RenderContext& rRenderContext, const Rectangle& rUpdateRect ) + void TableDataWindow::Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rUpdateRect ) { m_rTableControl.doPaintContent(rRenderContext, rUpdateRect); } @@ -91,9 +91,9 @@ namespace svt { namespace table pTableModel->getCellContent( hitCol, hitRow, aCellToolTip ); // use the cell content as tool tip only if it doesn't fit into the cell. - Rectangle const aWindowRect( Point( 0, 0 ), GetOutputSizePixel() ); + tools::Rectangle const aWindowRect( Point( 0, 0 ), GetOutputSizePixel() ); TableCellGeometry const aCell( m_rTableControl, aWindowRect, hitCol, hitRow ); - Rectangle const aCellRect( aCell.getRect() ); + tools::Rectangle const aCellRect( aCell.getRect() ); PTableRenderer const pRenderer = pTableModel->getRenderer(); if ( pRenderer->FitsIntoCell( aCellToolTip, *this, aCellRect ) ) @@ -112,7 +112,7 @@ namespace svt { namespace table // hide the standard (singleton) help window, so we do not have two help windows open at the same time Help::HideBalloonAndQuickHelp(); - Rectangle const aControlScreenRect( + tools::Rectangle const aControlScreenRect( OutputToScreenPixel( Point( 0, 0 ) ), GetOutputSizePixel() ); diff --git a/svtools/source/table/tabledatawindow.hxx b/svtools/source/table/tabledatawindow.hxx index d7786fcdea42..f38ce108ce2c 100644 --- a/svtools/source/table/tabledatawindow.hxx +++ b/svtools/source/table/tabledatawindow.hxx @@ -50,7 +50,7 @@ namespace svt { namespace table } // Window overridables - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) override; + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override; virtual void MouseMove( const MouseEvent& rMEvt) override; virtual void MouseButtonDown( const MouseEvent& rMEvt) override; virtual void MouseButtonUp( const MouseEvent& rMEvt) override; diff --git a/svtools/source/table/tablegeometry.cxx b/svtools/source/table/tablegeometry.cxx index feeb5b9aec8d..1c07ef4411aa 100644 --- a/svtools/source/table/tablegeometry.cxx +++ b/svtools/source/table/tablegeometry.cxx @@ -29,7 +29,7 @@ namespace svt { namespace table //= TableRowGeometry - TableRowGeometry::TableRowGeometry( TableControl_Impl const & _rControl, Rectangle const & _rBoundaries, + TableRowGeometry::TableRowGeometry( TableControl_Impl const & _rControl, tools::Rectangle const & _rBoundaries, RowPos const _nRow, bool const i_allowVirtualRows ) :TableGeometry( _rControl, _rBoundaries ) ,m_nRowPos( _nRow ) @@ -86,7 +86,7 @@ namespace svt { namespace table //= TableColumnGeometry - TableColumnGeometry::TableColumnGeometry( TableControl_Impl const & _rControl, Rectangle const & _rBoundaries, + TableColumnGeometry::TableColumnGeometry( TableControl_Impl const & _rControl, tools::Rectangle const & _rBoundaries, ColPos const _nCol ) :TableGeometry( _rControl, _rBoundaries ) ,m_nColPos( _nCol ) diff --git a/svtools/source/table/tablegeometry.hxx b/svtools/source/table/tablegeometry.hxx index c6ffba2ce972..f4ac0ca0e6a6 100644 --- a/svtools/source/table/tablegeometry.hxx +++ b/svtools/source/table/tablegeometry.hxx @@ -38,13 +38,13 @@ namespace svt { namespace table { protected: const TableControl_Impl& m_rControl; - const Rectangle& m_rBoundaries; - Rectangle m_aRect; + const tools::Rectangle& m_rBoundaries; + tools::Rectangle m_aRect; protected: TableGeometry( const TableControl_Impl& _rControl, - const Rectangle& _rBoundaries + const tools::Rectangle& _rBoundaries ) :m_rControl( _rControl ) ,m_rBoundaries( _rBoundaries ) @@ -57,7 +57,7 @@ namespace svt { namespace table const TableControl_Impl& getControl() const { return m_rControl; } // status - const Rectangle& getRect() const { return m_aRect; } + const tools::Rectangle& getRect() const { return m_aRect; } bool isValid() const { return !m_aRect.GetIntersection( m_rBoundaries ).IsEmpty(); } }; @@ -73,7 +73,7 @@ namespace svt { namespace table public: TableRowGeometry( TableControl_Impl const & _rControl, - Rectangle const & _rBoundaries, + tools::Rectangle const & _rBoundaries, RowPos const _nRow, bool const i_allowVirtualRows = false // allow rows >= getRowCount()? @@ -100,7 +100,7 @@ namespace svt { namespace table public: TableColumnGeometry( TableControl_Impl const & _rControl, - Rectangle const & _rBoundaries, + tools::Rectangle const & _rBoundaries, ColPos const _nCol ); @@ -128,7 +128,7 @@ namespace svt { namespace table public: TableCellGeometry( TableControl_Impl const & _rControl, - Rectangle const & _rBoundaries, + tools::Rectangle const & _rBoundaries, ColPos const _nCol, RowPos const _nRow ) @@ -146,7 +146,7 @@ namespace svt { namespace table { } - Rectangle getRect() const { return m_aRow.getRect().GetIntersection( m_aCol.getRect() ); } + tools::Rectangle getRect() const { return m_aRow.getRect().GetIntersection( m_aCol.getRect() ); } ColPos getColumn() const { return m_aCol.getCol(); } bool isValid() const { return !getRect().IsEmpty(); } diff --git a/svtools/source/uno/statusbarcontroller.cxx b/svtools/source/uno/statusbarcontroller.cxx index b44e1771ca43..792612a61ca3 100644 --- a/svtools/source/uno/statusbarcontroller.cxx +++ b/svtools/source/uno/statusbarcontroller.cxx @@ -490,9 +490,9 @@ void StatusbarController::bindListener() } } -::Rectangle StatusbarController::getControlRect() const +::tools::Rectangle StatusbarController::getControlRect() const { - ::Rectangle aRect; + ::tools::Rectangle aRect; { SolarMutexGuard aSolarMutexGuard; diff --git a/svtools/source/uno/treecontrolpeer.cxx b/svtools/source/uno/treecontrolpeer.cxx index 36a0c862f7b5..c807b2a2e2c9 100644 --- a/svtools/source/uno/treecontrolpeer.cxx +++ b/svtools/source/uno/treecontrolpeer.cxx @@ -834,7 +834,7 @@ awt::Rectangle SAL_CALL TreeControlPeer::getNodeRect( const Reference< XTreeNode UnoTreeListBoxImpl& rTree = getTreeListBoxOrThrow(); UnoTreeListEntry* pEntry = getEntry( i_Node ); - ::Rectangle aEntryRect( rTree.GetFocusRect( pEntry, rTree.GetEntryPosition( pEntry ).Y() ) ); + ::tools::Rectangle aEntryRect( rTree.GetFocusRect( pEntry, rTree.GetEntryPosition( pEntry ).Y() ) ); return VCLUnoHelper::ConvertToAWTRect( aEntryRect ); } @@ -1507,7 +1507,7 @@ void UnoTreeListItem::Paint( aPos.X() += nWidth; aSize.Width() -= nWidth; } - rRenderContext.DrawText(Rectangle(aPos,aSize),maText, rDev.IsEnabled() ? DrawTextFlags::NONE : DrawTextFlags::Disable); + rRenderContext.DrawText(tools::Rectangle(aPos,aSize),maText, rDev.IsEnabled() ? DrawTextFlags::NONE : DrawTextFlags::Disable); } diff --git a/svtools/source/uno/unoimap.cxx b/svtools/source/uno/unoimap.cxx index 225881757402..c2bf4a7145da 100644 --- a/svtools/source/uno/unoimap.cxx +++ b/svtools/source/uno/unoimap.cxx @@ -207,7 +207,7 @@ SvUnoImageMapObject::SvUnoImageMapObject( const IMapObject& rMapObject, const Sv { case IMAP_OBJ_RECTANGLE: { - const Rectangle aRect( static_cast<const IMapRectangleObject*>(&rMapObject)->GetRectangle(false) ); + const tools::Rectangle aRect( static_cast<const IMapRectangleObject*>(&rMapObject)->GetRectangle(false) ); maBoundary.X = aRect.Left(); maBoundary.Y = aRect.Top(); maBoundary.Width = aRect.GetWidth(); @@ -260,7 +260,7 @@ IMapObject* SvUnoImageMapObject::createIMapObject() const { case IMAP_OBJ_RECTANGLE: { - const Rectangle aRect( maBoundary.X, maBoundary.Y, maBoundary.X + maBoundary.Width - 1, maBoundary.Y + maBoundary.Height - 1 ); + const tools::Rectangle aRect( maBoundary.X, maBoundary.Y, maBoundary.X + maBoundary.Width - 1, maBoundary.Y + maBoundary.Height - 1 ); pNewIMapObject = new IMapRectangleObject( aRect, aURL, aAltText, aDesc, aTarget, aName, mbIsActive, false ); } break; |