summaryrefslogtreecommitdiff
path: root/vcl/source/window
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/window')
-rw-r--r--vcl/source/window/brdwin.cxx88
-rw-r--r--vcl/source/window/clipping.cxx22
-rw-r--r--vcl/source/window/cursor.cxx4
-rw-r--r--vcl/source/window/decoview.cxx84
-rw-r--r--vcl/source/window/dialog.cxx4
-rw-r--r--vcl/source/window/dockingarea.cxx10
-rw-r--r--vcl/source/window/dockmgr.cxx50
-rw-r--r--vcl/source/window/dockwin.cxx20
-rw-r--r--vcl/source/window/floatwin.cxx30
-rw-r--r--vcl/source/window/layout.cxx6
-rw-r--r--vcl/source/window/menu.cxx88
-rw-r--r--vcl/source/window/menubarwindow.cxx32
-rw-r--r--vcl/source/window/menubarwindow.hxx6
-rw-r--r--vcl/source/window/menufloatingwindow.cxx32
-rw-r--r--vcl/source/window/menufloatingwindow.hxx4
-rw-r--r--vcl/source/window/menuwindow.cxx6
-rw-r--r--vcl/source/window/menuwindow.hxx4
-rw-r--r--vcl/source/window/mouse.cxx6
-rw-r--r--vcl/source/window/msgbox.cxx4
-rw-r--r--vcl/source/window/openglwin.cxx2
-rw-r--r--vcl/source/window/paint.cxx66
-rw-r--r--vcl/source/window/printdlg.cxx10
-rw-r--r--vcl/source/window/scrwnd.cxx4
-rw-r--r--vcl/source/window/split.cxx6
-rw-r--r--vcl/source/window/splitwin.cxx46
-rw-r--r--vcl/source/window/stacking.cxx8
-rw-r--r--vcl/source/window/status.cxx56
-rw-r--r--vcl/source/window/syswin.cxx4
-rw-r--r--vcl/source/window/tabpage.cxx6
-rw-r--r--vcl/source/window/toolbox.cxx132
-rw-r--r--vcl/source/window/toolbox2.cxx32
-rw-r--r--vcl/source/window/window.cxx70
-rw-r--r--vcl/source/window/window2.cxx16
-rw-r--r--vcl/source/window/winproc.cxx18
34 files changed, 488 insertions, 488 deletions
diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx
index 6a174b89521f..bd466a7004a8 100644
--- a/vcl/source/window/brdwin.cxx
+++ b/vcl/source/window/brdwin.cxx
@@ -44,7 +44,7 @@ using namespace ::com::sun::star::uno;
namespace vcl {
-void Window::ImplCalcSymbolRect( Rectangle& rRect )
+void Window::ImplCalcSymbolRect( tools::Rectangle& rRect )
{
// Add border, not shown in the non-default representation,
// as we want to use it for small buttons
@@ -65,24 +65,24 @@ void Window::ImplCalcSymbolRect( Rectangle& rRect )
} /* namespace vcl */
static void ImplDrawBrdWinSymbol( vcl::RenderContext* pDev,
- const Rectangle& rRect, SymbolType eSymbol )
+ const tools::Rectangle& rRect, SymbolType eSymbol )
{
// we leave 5% room between the symbol and the button border
DecorationView aDecoView( pDev );
- Rectangle aTempRect = rRect;
+ tools::Rectangle aTempRect = rRect;
vcl::Window::ImplCalcSymbolRect( aTempRect );
aDecoView.DrawSymbol( aTempRect, eSymbol,
pDev->GetSettings().GetStyleSettings().GetButtonTextColor() );
}
static void ImplDrawBrdWinSymbolButton( vcl::RenderContext* pDev,
- const Rectangle& rRect,
+ const tools::Rectangle& rRect,
SymbolType eSymbol, DrawButtonFlags nState )
{
bool bMouseOver(nState & DrawButtonFlags::Highlight);
nState &= ~DrawButtonFlags::Highlight;
- Rectangle aTempRect;
+ tools::Rectangle aTempRect;
vcl::Window *pWin = dynamic_cast< vcl::Window* >(pDev);
if( pWin )
{
@@ -129,14 +129,14 @@ bool ImplBorderWindowView::Tracking( const TrackingEvent& )
return false;
}
-OUString ImplBorderWindowView::RequestHelp( const Point&, Rectangle& )
+OUString ImplBorderWindowView::RequestHelp( const Point&, tools::Rectangle& )
{
return OUString();
}
-Rectangle ImplBorderWindowView::GetMenuRect() const
+tools::Rectangle ImplBorderWindowView::GetMenuRect() const
{
- return Rectangle();
+ return tools::Rectangle();
}
void ImplBorderWindowView::ImplInitTitle(ImplBorderFrameData* pData)
@@ -291,7 +291,7 @@ bool ImplBorderWindowView::ImplMouseMove( ImplBorderFrameData* pData, const Mous
OUString ImplBorderWindowView::ImplRequestHelp( ImplBorderFrameData* pData,
const Point& rPos,
- Rectangle& rHelpRect )
+ tools::Rectangle& rHelpRect )
{
sal_uInt16 nHelpId = 0;
OUString aHelpStr;
@@ -489,8 +489,8 @@ void ImplSmallBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHei
Size aMinSize( mnWidth - mnLeftBorder - mnRightBorder, mnHeight - mnTopBorder - mnBottomBorder );
if( aMinSize.Width() < 10 ) aMinSize.setWidth( 10 );
if( aMinSize.Height() < 10 ) aMinSize.setHeight( 10 );
- Rectangle aCtrlRegion( Point(mnLeftBorder, mnTopBorder), aMinSize );
- Rectangle aBounds, aContent;
+ tools::Rectangle aCtrlRegion( Point(mnLeftBorder, mnTopBorder), aMinSize );
+ tools::Rectangle aBounds, aContent;
if( pWin->GetNativeControlRegion( aCtrlType, ControlPart::Entire, aCtrlRegion,
ControlState::ENABLED, aControlValue, OUString(),
aBounds, aContent ) )
@@ -547,8 +547,8 @@ void ImplSmallBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHei
nFlags |= DrawFrameFlags::Mono;
DecorationView aDecoView( mpOutDev );
- Rectangle aRect( 0, 0, 10, 10 );
- Rectangle aCalcRect = aDecoView.DrawFrame( aRect, nStyle, nFlags );
+ tools::Rectangle aRect( 0, 0, 10, 10 );
+ tools::Rectangle aCalcRect = aDecoView.DrawFrame( aRect, nStyle, nFlags );
mnLeftBorder = aCalcRect.Left();
mnTopBorder = aCalcRect.Top();
mnRightBorder = aRect.Right()-aCalcRect.Right();
@@ -690,10 +690,10 @@ void ImplSmallBorderWindowView::DrawWindow(vcl::RenderContext& rRenderContext, c
nState |= ControlState::ROLLOVER;
Point aPoint;
- Rectangle aCtrlRegion(aPoint, Size(mnWidth, mnHeight));
+ tools::Rectangle aCtrlRegion(aPoint, Size(mnWidth, mnHeight));
- Rectangle aBoundingRgn(aPoint, Size(mnWidth, mnHeight));
- Rectangle aContentRgn(aCtrlRegion);
+ tools::Rectangle aBoundingRgn(aPoint, Size(mnWidth, mnHeight));
+ tools::Rectangle aContentRgn(aCtrlRegion);
if (!ImplGetSVData()->maNWFData.mbCanDrawWidgetAnySize &&
rRenderContext.GetNativeControlRegion(aCtrlType, aCtrlPart, aCtrlRegion,
nState, aControlValue, OUString(),
@@ -710,7 +710,7 @@ void ImplSmallBorderWindowView::DrawWindow(vcl::RenderContext& rRenderContext, c
{
Edit* pEdit = static_cast<Edit*>(pCtrl)->GetSubEdit();
if (pEdit && !pEdit->SupportsDoubleBuffering())
- pCtrl->Paint(*pCtrl, Rectangle()); // make sure the buttons are also drawn as they might overwrite the border
+ pCtrl->Paint(*pCtrl, tools::Rectangle()); // make sure the buttons are also drawn as they might overwrite the border
}
}
@@ -736,7 +736,7 @@ void ImplSmallBorderWindowView::DrawWindow(vcl::RenderContext& rRenderContext, c
DecorationView aDecoView(&rRenderContext);
Point aTmpPoint;
- Rectangle aInRect(aTmpPoint, Size(mnWidth, mnHeight));
+ tools::Rectangle aInRect(aTmpPoint, Size(mnWidth, mnHeight));
aDecoView.DrawFrame(aInRect, nStyle, nFlags);
}
@@ -1150,14 +1150,14 @@ bool ImplStdBorderWindowView::Tracking( const TrackingEvent& rTEvt )
{
maFrameData.mnTrackX = aPos.X();
maFrameData.mnTrackY = aPos.Y();
- pBorderWindow->ShowTracking( Rectangle( pBorderWindow->ScreenToOutputPixel( aPos ), pBorderWindow->GetOutputSizePixel() ), ShowTrackFlags::Big );
+ pBorderWindow->ShowTracking( tools::Rectangle( pBorderWindow->ScreenToOutputPixel( aPos ), pBorderWindow->GetOutputSizePixel() ), ShowTrackFlags::Big );
}
}
else
{
Point aOldPos = pBorderWindow->GetPosPixel();
Size aSize = pBorderWindow->GetSizePixel();
- Rectangle aNewRect( aOldPos, aSize );
+ tools::Rectangle aNewRect( aOldPos, aSize );
long nOldWidth = aSize.Width();
long nOldHeight = aSize.Height();
long nBorderWidth = maFrameData.mnLeftBorder+maFrameData.mnRightBorder;
@@ -1261,7 +1261,7 @@ bool ImplStdBorderWindowView::Tracking( const TrackingEvent& rTEvt )
maFrameData.mnTrackY = aNewRect.Top();
maFrameData.mnTrackWidth = aNewRect.GetWidth();
maFrameData.mnTrackHeight = aNewRect.GetHeight();
- pBorderWindow->ShowTracking( Rectangle( pBorderWindow->ScreenToOutputPixel( aNewRect.TopLeft() ), aNewRect.GetSize() ), ShowTrackFlags::Big );
+ pBorderWindow->ShowTracking( tools::Rectangle( pBorderWindow->ScreenToOutputPixel( aNewRect.TopLeft() ), aNewRect.GetSize() ), ShowTrackFlags::Big );
}
}
}
@@ -1270,12 +1270,12 @@ bool ImplStdBorderWindowView::Tracking( const TrackingEvent& rTEvt )
return true;
}
-OUString ImplStdBorderWindowView::RequestHelp( const Point& rPos, Rectangle& rHelpRect )
+OUString ImplStdBorderWindowView::RequestHelp( const Point& rPos, tools::Rectangle& rHelpRect )
{
return ImplRequestHelp( &maFrameData, rPos, rHelpRect );
}
-Rectangle ImplStdBorderWindowView::GetMenuRect() const
+tools::Rectangle ImplStdBorderWindowView::GetMenuRect() const
{
return maFrameData.maMenuRect;
}
@@ -1286,8 +1286,8 @@ void ImplStdBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHeigh
ImplBorderWindow* pBorderWindow = maFrameData.mpBorderWindow;
const StyleSettings& rStyleSettings = pDev->GetSettings().GetStyleSettings();
DecorationView aDecoView( pDev );
- Rectangle aRect( 0, 0, 10, 10 );
- Rectangle aCalcRect = aDecoView.DrawFrame( aRect, DrawFrameStyle::DoubleOut, DrawFrameFlags::NoDraw );
+ tools::Rectangle aRect( 0, 0, 10, 10 );
+ tools::Rectangle aCalcRect = aDecoView.DrawFrame( aRect, DrawFrameStyle::DoubleOut, DrawFrameFlags::NoDraw );
pData->mpOutDev = pDev;
pData->mnWidth = nWidth;
@@ -1335,7 +1335,7 @@ void ImplStdBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHeigh
long const nItemBottom = pData->maTitleRect.Bottom() - 2;
auto addSquareOnRight = [&nRight, nItemTop, nItemBottom](
- Rectangle & rect, long gap)
+ tools::Rectangle & rect, long gap)
{
rect.Top() = nItemTop;
rect.Bottom() = nItemBottom;
@@ -1412,7 +1412,7 @@ void ImplStdBorderWindowView::DrawWindow(vcl::RenderContext& rRenderContext, con
ImplBorderFrameData* pData = &maFrameData;
ImplBorderWindow* pBorderWindow = pData->mpBorderWindow;
Point aTmpPoint = pOffset ? Point(*pOffset) : Point();
- Rectangle aInRect( aTmpPoint, Size( pData->mnWidth, pData->mnHeight ) );
+ tools::Rectangle aInRect( aTmpPoint, Size( pData->mnWidth, pData->mnHeight ) );
const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings();
DecorationView aDecoView(&rRenderContext);
Color aFaceColor(rStyleSettings.GetFaceColor());
@@ -1430,7 +1430,7 @@ void ImplStdBorderWindowView::DrawWindow(vcl::RenderContext& rRenderContext, con
if (pWin)
{
vcl::Region aClipRgn(aInRect);
- Rectangle aItemClipRect(pWin->ImplGetItemEdgeClipRect());
+ tools::Rectangle aItemClipRect(pWin->ImplGetItemEdgeClipRect());
if (!aItemClipRect.IsEmpty())
{
aItemClipRect.SetPos(pData->mpBorderWindow->AbsoluteScreenToOutputPixel(aItemClipRect.TopLeft()));
@@ -1459,13 +1459,13 @@ void ImplStdBorderWindowView::DrawWindow(vcl::RenderContext& rRenderContext, con
if (nBorderSize)
{
rRenderContext.SetFillColor(rStyleSettings.GetFaceColor());
- rRenderContext.DrawRect(Rectangle(Point(aInRect.Left(), aInRect.Top()),
+ rRenderContext.DrawRect(tools::Rectangle(Point(aInRect.Left(), aInRect.Top()),
Size(aInRect.GetWidth(), nBorderSize)));
- rRenderContext.DrawRect(Rectangle(Point(aInRect.Left(), aInRect.Top() + nBorderSize),
+ rRenderContext.DrawRect(tools::Rectangle(Point(aInRect.Left(), aInRect.Top() + nBorderSize),
Size(nBorderSize, aInRect.GetHeight() - nBorderSize)));
- rRenderContext.DrawRect(Rectangle(Point(aInRect.Left(), aInRect.Bottom() - nBorderSize + 1),
+ rRenderContext.DrawRect(tools::Rectangle(Point(aInRect.Left(), aInRect.Bottom() - nBorderSize + 1),
Size(aInRect.GetWidth(), nBorderSize)));
- rRenderContext.DrawRect(Rectangle(Point(aInRect.Right()-nBorderSize + 1, aInRect.Top() + nBorderSize),
+ rRenderContext.DrawRect(tools::Rectangle(Point(aInRect.Right()-nBorderSize + 1, aInRect.Top() + nBorderSize),
Size(nBorderSize, aInRect.GetHeight() - nBorderSize)));
}
@@ -1481,7 +1481,7 @@ void ImplStdBorderWindowView::DrawWindow(vcl::RenderContext& rRenderContext, con
rRenderContext.SetFillColor(aFaceColor);
rRenderContext.SetTextColor(rStyleSettings.GetButtonTextColor());
- Rectangle aTitleRect(pData->maTitleRect);
+ tools::Rectangle aTitleRect(pData->maTitleRect);
if(pOffset)
aTitleRect.Move(pOffset->X(), pOffset->Y());
rRenderContext.DrawRect(aTitleRect);
@@ -1520,28 +1520,28 @@ void ImplStdBorderWindowView::DrawWindow(vcl::RenderContext& rRenderContext, con
if (!pData->maCloseRect.IsEmpty())
{
- Rectangle aSymbolRect(pData->maCloseRect);
+ tools::Rectangle aSymbolRect(pData->maCloseRect);
if (pOffset)
aSymbolRect.Move(pOffset->X(), pOffset->Y());
ImplDrawBrdWinSymbolButton(&rRenderContext, aSymbolRect, SymbolType::CLOSE, pData->mnCloseState);
}
if (!pData->maDockRect.IsEmpty())
{
- Rectangle aSymbolRect(pData->maDockRect);
+ tools::Rectangle aSymbolRect(pData->maDockRect);
if (pOffset)
aSymbolRect.Move(pOffset->X(), pOffset->Y());
ImplDrawBrdWinSymbolButton(&rRenderContext, aSymbolRect, SymbolType::DOCK, pData->mnDockState);
}
if (!pData->maMenuRect.IsEmpty())
{
- Rectangle aSymbolRect(pData->maMenuRect);
+ tools::Rectangle aSymbolRect(pData->maMenuRect);
if (pOffset)
aSymbolRect.Move(pOffset->X(), pOffset->Y());
ImplDrawBrdWinSymbolButton(&rRenderContext, aSymbolRect, SymbolType::MENU, pData->mnMenuState);
}
if (!pData->maHideRect.IsEmpty())
{
- Rectangle aSymbolRect(pData->maHideRect);
+ tools::Rectangle aSymbolRect(pData->maHideRect);
if (pOffset)
aSymbolRect.Move(pOffset->X(), pOffset->Y());
ImplDrawBrdWinSymbolButton(&rRenderContext, aSymbolRect, SymbolType::HIDE, pData->mnHideState);
@@ -1553,7 +1553,7 @@ void ImplStdBorderWindowView::DrawWindow(vcl::RenderContext& rRenderContext, con
eType = SymbolType::ROLLDOWN;
else
eType = SymbolType::ROLLUP;
- Rectangle aSymbolRect(pData->maRollRect);
+ tools::Rectangle aSymbolRect(pData->maRollRect);
if (pOffset)
aSymbolRect.Move(pOffset->X(), pOffset->Y());
ImplDrawBrdWinSymbolButton(&rRenderContext, aSymbolRect, eType, pData->mnRollState);
@@ -1561,7 +1561,7 @@ void ImplStdBorderWindowView::DrawWindow(vcl::RenderContext& rRenderContext, con
if (!pData->maHelpRect.IsEmpty())
{
- Rectangle aSymbolRect(pData->maHelpRect);
+ tools::Rectangle aSymbolRect(pData->maHelpRect);
if (pOffset)
aSymbolRect.Move(pOffset->X(), pOffset->Y());
ImplDrawBrdWinSymbolButton(&rRenderContext, aSymbolRect, SymbolType::HELP, pData->mnHelpState);
@@ -1692,13 +1692,13 @@ void ImplBorderWindow::Tracking( const TrackingEvent& rTEvt )
mpBorderView->Tracking( rTEvt );
}
-void ImplBorderWindow::Paint( vcl::RenderContext& rRenderContext, const Rectangle& )
+void ImplBorderWindow::Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& )
{
if (mpBorderView)
mpBorderView->DrawWindow(rRenderContext);
}
-void ImplBorderWindow::Draw( const Rectangle&, OutputDevice* pOutDev, const Point& rPos )
+void ImplBorderWindow::Draw( const tools::Rectangle&, OutputDevice* pOutDev, const Point& rPos )
{
if (mpBorderView)
mpBorderView->DrawWindow(*pOutDev, &rPos);
@@ -1725,7 +1725,7 @@ void ImplBorderWindow::RequestHelp( const HelpEvent& rHEvt )
if ( rHEvt.GetMode() & (HelpEventMode::BALLOON | HelpEventMode::QUICK) && !rHEvt.KeyboardActivated() )
{
Point aMousePosPixel = ScreenToOutputPixel( rHEvt.GetMousePosPixel() );
- Rectangle aHelpRect;
+ tools::Rectangle aHelpRect;
OUString aHelpStr( mpBorderView->RequestHelp( aMousePosPixel, aHelpRect ) );
// retrieve rectangle
@@ -1904,7 +1904,7 @@ void ImplBorderWindow::InvalidateBorder()
mpBorderView->GetBorder( nLeftBorder, nTopBorder, nRightBorder, nBottomBorder );
if ( nLeftBorder || nTopBorder || nRightBorder || nBottomBorder )
{
- Rectangle aWinRect( Point( 0, 0 ), GetOutputSizePixel() );
+ tools::Rectangle aWinRect( Point( 0, 0 ), GetOutputSizePixel() );
vcl::Region aRegion( aWinRect );
aWinRect.Left() += nLeftBorder;
aWinRect.Top() += nTopBorder;
@@ -2039,7 +2039,7 @@ long ImplBorderWindow::CalcTitleWidth() const
return mpBorderView->CalcTitleWidth();
}
-Rectangle ImplBorderWindow::GetMenuRect() const
+tools::Rectangle ImplBorderWindow::GetMenuRect() const
{
return mpBorderView->GetMenuRect();
}
diff --git a/vcl/source/window/clipping.cxx b/vcl/source/window/clipping.cxx
index 13989cd09b49..d87bafd74de3 100644
--- a/vcl/source/window/clipping.cxx
+++ b/vcl/source/window/clipping.cxx
@@ -112,7 +112,7 @@ vcl::Region Window::GetWindowClipRegionPixel() const
const_cast<vcl::Window*>(this)->ImplInitWinClipRegion();
aWinClipRegion = mpWindowImpl->maWinClipRegion;
- Rectangle aWinRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) );
+ tools::Rectangle aWinRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) );
vcl::Region aWinRegion( aWinRect );
if ( aWinRegion == aWinClipRegion )
@@ -140,7 +140,7 @@ vcl::Region Window::GetActiveClipRegion() const
return PixelToLogic( aRegion );
}
-void Window::ClipToPaintRegion(Rectangle& rDstRect)
+void Window::ClipToPaintRegion(tools::Rectangle& rDstRect)
{
const vcl::Region aPaintRgn(GetPaintRegion());
@@ -165,7 +165,7 @@ void Window::ImplClipBoundaries( vcl::Region& rRegion, bool bThis, bool bOverlap
{
// clip to frame if required
if ( !mpWindowImpl->mbFrame )
- rRegion.Intersect( Rectangle( Point( 0, 0 ), Size( mpWindowImpl->mpFrameWindow->mnOutWidth, mpWindowImpl->mpFrameWindow->mnOutHeight ) ) );
+ rRegion.Intersect( tools::Rectangle( Point( 0, 0 ), Size( mpWindowImpl->mpFrameWindow->mnOutWidth, mpWindowImpl->mpFrameWindow->mnOutHeight ) ) );
if ( bOverlaps && !rRegion.IsEmpty() )
{
@@ -242,7 +242,7 @@ void Window::ImplClipSiblings( vcl::Region& rRegion )
void Window::ImplInitWinClipRegion()
{
// Build Window Region
- mpWindowImpl->maWinClipRegion = Rectangle( Point( mnOutOffX, mnOutOffY ),
+ mpWindowImpl->maWinClipRegion = tools::Rectangle( Point( mnOutOffX, mnOutOffY ),
Size( mnOutWidth, mnOutHeight ) );
if ( mpWindowImpl->mbWinRegion )
mpWindowImpl->maWinClipRegion.Intersect( ImplPixelToDevicePixel( mpWindowImpl->maWinRegion ) );
@@ -319,7 +319,7 @@ bool Window::ImplSysObjClip( const vcl::Region* pOldRegion )
}
vcl::Region aRegion = *pWinChildClipRegion;
- Rectangle aWinRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) );
+ tools::Rectangle aWinRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) );
vcl::Region aWinRectRegion( aWinRect );
if ( aRegion == aWinRectRegion )
@@ -504,7 +504,7 @@ void Window::ImplIntersectWindowClipRegion( vcl::Region& rRegion )
void Window::ImplIntersectWindowRegion( vcl::Region& rRegion )
{
- rRegion.Intersect( Rectangle( Point( mnOutOffX, mnOutOffY ),
+ rRegion.Intersect( tools::Rectangle( Point( mnOutOffX, mnOutOffY ),
Size( mnOutWidth, mnOutHeight ) ) );
if ( mpWindowImpl->mbWinRegion )
rRegion.Intersect( ImplPixelToDevicePixel( mpWindowImpl->maWinRegion ) );
@@ -515,7 +515,7 @@ void Window::ImplExcludeWindowRegion( vcl::Region& rRegion )
if ( mpWindowImpl->mbWinRegion )
{
Point aPoint( mnOutOffX, mnOutOffY );
- vcl::Region aRegion( Rectangle( aPoint,
+ vcl::Region aRegion( tools::Rectangle( aPoint,
Size( mnOutWidth, mnOutHeight ) ) );
aRegion.Intersect( ImplPixelToDevicePixel( mpWindowImpl->maWinRegion ) );
rRegion.Exclude( aRegion );
@@ -523,7 +523,7 @@ void Window::ImplExcludeWindowRegion( vcl::Region& rRegion )
else
{
Point aPoint( mnOutOffX, mnOutOffY );
- rRegion.Exclude( Rectangle( aPoint,
+ rRegion.Exclude( tools::Rectangle( aPoint,
Size( mnOutWidth, mnOutHeight ) ) );
}
}
@@ -606,7 +606,7 @@ void Window::ImplCalcOverlapRegionOverlaps( const vcl::Region& rInterRegion, vcl
ImplIntersectAndUnionOverlapWindows( rInterRegion, rRegion );
}
-void Window::ImplCalcOverlapRegion( const Rectangle& rSourceRect, vcl::Region& rRegion,
+void Window::ImplCalcOverlapRegion( const tools::Rectangle& rSourceRect, vcl::Region& rRegion,
bool bChildren, bool bSiblings )
{
vcl::Region aRegion( rSourceRect );
@@ -636,7 +636,7 @@ void Window::ImplCalcOverlapRegion( const Rectangle& rSourceRect, vcl::Region& r
if ( pWindow && !pWindow->mpWindowImpl->mbFrame )
{
aTempRegion = aRegion;
- aTempRegion.Exclude( Rectangle( Point( 0, 0 ), Size( mpWindowImpl->mpFrameWindow->mnOutWidth, mpWindowImpl->mpFrameWindow->mnOutHeight ) ) );
+ aTempRegion.Exclude( tools::Rectangle( Point( 0, 0 ), Size( mpWindowImpl->mpFrameWindow->mnOutWidth, mpWindowImpl->mpFrameWindow->mnOutHeight ) ) );
rRegion.Union( aTempRegion );
}
@@ -682,7 +682,7 @@ void Window::SaveBackground( const Point& rPos, const Size& rSize,
const Point aPixPos( LogicToPixel( rPos ) );
aClip.Move( -mnOutOffX, -mnOutOffY );
- aClip.Intersect( Rectangle( aPixPos, LogicToPixel( rSize ) ) );
+ aClip.Intersect( tools::Rectangle( aPixPos, LogicToPixel( rSize ) ) );
if ( !aClip.IsEmpty() )
{
diff --git a/vcl/source/window/cursor.cxx b/vcl/source/window/cursor.cxx
index 163c6b6289a4..819db146bc5e 100644
--- a/vcl/source/window/cursor.cxx
+++ b/vcl/source/window/cursor.cxx
@@ -49,7 +49,7 @@ static void ImplCursorInvert( ImplCursorData* pData )
if (bDoubleBuffering)
pGuard.reset(new PaintBufferGuard(pWindow->ImplGetWindowImpl()->mpFrameData, pWindow));
vcl::RenderContext* pRenderContext = bDoubleBuffering ? pGuard->GetRenderContext() : pWindow;
- Rectangle aPaintRect;
+ tools::Rectangle aPaintRect;
bool bMapMode = pRenderContext->IsMapModeEnabled();
pRenderContext->EnableMapMode( false );
InvertFlags nInvertStyle;
@@ -58,7 +58,7 @@ static void ImplCursorInvert( ImplCursorData* pData )
else
nInvertStyle = InvertFlags::NONE;
- Rectangle aRect( pData->maPixPos, pData->maPixSize );
+ tools::Rectangle aRect( pData->maPixPos, pData->maPixSize );
if ( pData->mnDirection != CursorDirection::NONE || pData->mnOrientation || pData->mnPixSlant )
{
tools::Polygon aPoly( aRect );
diff --git a/vcl/source/window/decoview.cxx b/vcl/source/window/decoview.cxx
index 70589e9f05dc..4a84622b7ea6 100644
--- a/vcl/source/window/decoview.cxx
+++ b/vcl/source/window/decoview.cxx
@@ -32,7 +32,7 @@ using namespace std;
namespace {
-long AdjustRectToSquare( Rectangle &rRect )
+long AdjustRectToSquare( tools::Rectangle &rRect )
{
const long nWidth = rRect.GetWidth();
const long nHeight = rRect.GetHeight();
@@ -53,7 +53,7 @@ long AdjustRectToSquare( Rectangle &rRect )
return nSide;
}
-void ImplDrawSymbol( OutputDevice* pDev, Rectangle nRect, const SymbolType eType )
+void ImplDrawSymbol( OutputDevice* pDev, tools::Rectangle nRect, const SymbolType eType )
{
const long nSide = AdjustRectToSquare( nRect );
@@ -80,7 +80,7 @@ void ImplDrawSymbol( OutputDevice* pDev, Rectangle nRect, const SymbolType eType
pDev->DrawLine( Point( aCenter.X()-i, nRect.Top() ),
Point( aCenter.X()+i, nRect.Top() ) );
}
- pDev->DrawRect( Rectangle( aCenter.X()-n8, nRect.Top()+1,
+ pDev->DrawRect( tools::Rectangle( aCenter.X()-n8, nRect.Top()+1,
aCenter.X()+n8, nRect.Bottom() ) );
break;
@@ -92,7 +92,7 @@ void ImplDrawSymbol( OutputDevice* pDev, Rectangle nRect, const SymbolType eType
pDev->DrawLine( Point( aCenter.X()-i, nRect.Bottom() ),
Point( aCenter.X()+i, nRect.Bottom() ) );
}
- pDev->DrawRect( Rectangle( aCenter.X()-n8, nRect.Top(),
+ pDev->DrawRect( tools::Rectangle( aCenter.X()-n8, nRect.Top(),
aCenter.X()+n8, nRect.Bottom()-1 ) );
break;
@@ -104,7 +104,7 @@ void ImplDrawSymbol( OutputDevice* pDev, Rectangle nRect, const SymbolType eType
pDev->DrawLine( Point( nRect.Left(), aCenter.Y()-i ),
Point( nRect.Left(), aCenter.Y()+i ) );
}
- pDev->DrawRect( Rectangle( nRect.Left()+1, aCenter.Y()-n8,
+ pDev->DrawRect( tools::Rectangle( nRect.Left()+1, aCenter.Y()-n8,
nRect.Right(), aCenter.Y()+n8 ) );
break;
@@ -116,7 +116,7 @@ void ImplDrawSymbol( OutputDevice* pDev, Rectangle nRect, const SymbolType eType
pDev->DrawLine( Point( nRect.Right(), aCenter.Y()-i ),
Point( nRect.Right(), aCenter.Y()+i ) );
}
- pDev->DrawRect( Rectangle( nRect.Left(), aCenter.Y()-n8,
+ pDev->DrawRect( tools::Rectangle( nRect.Left(), aCenter.Y()-n8,
nRect.Right()-1, aCenter.Y()+n8 ) );
break;
@@ -270,7 +270,7 @@ void ImplDrawSymbol( OutputDevice* pDev, Rectangle nRect, const SymbolType eType
Point( nRect.Right(), nRect.Bottom() ) );
SAL_FALLTHROUGH;
case SymbolType::ROLLUP:
- pDev->DrawRect( Rectangle( nRect.Left(), nRect.Top(),
+ pDev->DrawRect( tools::Rectangle( nRect.Left(), nRect.Top(),
nRect.Right(), nRect.Top()+n8 ) );
break;
@@ -314,7 +314,7 @@ void ImplDrawSymbol( OutputDevice* pDev, Rectangle nRect, const SymbolType eType
case SymbolType::FLOAT:
nRect.Right() -= n4;
nRect.Top() += n4+1;
- pDev->DrawRect( Rectangle( nRect.Left(), nRect.Top(),
+ pDev->DrawRect( tools::Rectangle( nRect.Left(), nRect.Top(),
nRect.Right(), nRect.Top()+n8 ) );
pDev->DrawLine( Point( nRect.Left(), nRect.Top()+n8 ),
Point( nRect.Left(), nRect.Bottom() ) );
@@ -326,7 +326,7 @@ void ImplDrawSymbol( OutputDevice* pDev, Rectangle nRect, const SymbolType eType
nRect.Top() -= n4+1;
nRect.Left() += n4;
nRect.Bottom() -= n4+1;
- pDev->DrawRect( Rectangle( nRect.Left(), nRect.Top(),
+ pDev->DrawRect( tools::Rectangle( nRect.Left(), nRect.Top(),
nRect.Right(), nRect.Top()+n8 ) );
pDev->DrawLine( Point( nRect.Left(), nRect.Top()+n8 ),
Point( nRect.Left(), nRect.Bottom() ) );
@@ -348,14 +348,14 @@ void ImplDrawSymbol( OutputDevice* pDev, Rectangle nRect, const SymbolType eType
break;
case SymbolType::HIDE:
- pDev->DrawRect( Rectangle( nRect.Left()+n8, nRect.Bottom()-n8,
+ pDev->DrawRect( tools::Rectangle( nRect.Left()+n8, nRect.Bottom()-n8,
nRect.Right()-n8, nRect.Bottom() ) );
break;
case SymbolType::PLUS:
- pDev->DrawRect( Rectangle( nRect.Left(), aCenter.Y()-n8/2,
+ pDev->DrawRect( tools::Rectangle( nRect.Left(), aCenter.Y()-n8/2,
nRect.Right()+1, aCenter.Y()+n8/2+1 ) );
- pDev->DrawRect( Rectangle( aCenter.X()-n8/2, nRect.Top(),
+ pDev->DrawRect( tools::Rectangle( aCenter.X()-n8/2, nRect.Top(),
aCenter.X()+n8/2+1, nRect.Bottom()+1 ) );
break;
case SymbolType::DONTKNOW:
@@ -364,7 +364,7 @@ void ImplDrawSymbol( OutputDevice* pDev, Rectangle nRect, const SymbolType eType
}
}
-void ImplDrawDPILineRect( OutputDevice *const pDev, Rectangle& rRect,
+void ImplDrawDPILineRect( OutputDevice *const pDev, tools::Rectangle& rRect,
const Color *const pColor, const bool bRound = false )
{
long nLineWidth = pDev->GetDPIX()/300;
@@ -398,11 +398,11 @@ void ImplDrawDPILineRect( OutputDevice *const pDev, Rectangle& rRect,
const long nHeight = rRect.GetHeight();
pDev->SetLineColor();
pDev->SetFillColor( *pColor );
- pDev->DrawRect( Rectangle( rRect.TopLeft(), Size( nWidth, nLineHeight ) ) );
- pDev->DrawRect( Rectangle( rRect.TopLeft(), Size( nLineWidth, nHeight ) ) );
- pDev->DrawRect( Rectangle( Point( rRect.Left(), rRect.Bottom()-nLineHeight ),
+ pDev->DrawRect( tools::Rectangle( rRect.TopLeft(), Size( nWidth, nLineHeight ) ) );
+ pDev->DrawRect( tools::Rectangle( rRect.TopLeft(), Size( nLineWidth, nHeight ) ) );
+ pDev->DrawRect( tools::Rectangle( Point( rRect.Left(), rRect.Bottom()-nLineHeight ),
Size( nWidth, nLineHeight ) ) );
- pDev->DrawRect( Rectangle( Point( rRect.Right()-nLineWidth, rRect.Top() ),
+ pDev->DrawRect( tools::Rectangle( Point( rRect.Right()-nLineWidth, rRect.Top() ),
Size( nLineWidth, nHeight ) ) );
}
}
@@ -413,7 +413,7 @@ void ImplDrawDPILineRect( OutputDevice *const pDev, Rectangle& rRect,
rRect.Bottom() -= nLineHeight;
}
-void ImplDraw2ColorFrame( OutputDevice *const pDev, Rectangle& rRect,
+void ImplDraw2ColorFrame( OutputDevice *const pDev, tools::Rectangle& rRect,
const Color& rLeftTopColor, const Color& rRightBottomColor )
{
pDev->SetLineColor( rLeftTopColor );
@@ -430,7 +430,7 @@ void ImplDraw2ColorFrame( OutputDevice *const pDev, Rectangle& rRect,
--rRect.Bottom();
}
-void ImplDrawButton( OutputDevice *const pDev, Rectangle aFillRect,
+void ImplDrawButton( OutputDevice *const pDev, tools::Rectangle aFillRect,
const DrawButtonFlags nStyle )
{
const StyleSettings& rStyleSettings = pDev->GetSettings().GetStyleSettings();
@@ -460,16 +460,16 @@ void ImplDrawButton( OutputDevice *const pDev, Rectangle aFillRect,
pDev->SetLineColor();
pDev->SetFillColor( aBlackColor );
- const Rectangle aOrigFillRect(aFillRect);
+ const tools::Rectangle aOrigFillRect(aFillRect);
if ( nStyle & (DrawButtonFlags::Pressed | DrawButtonFlags::Checked) )
{
// shrink fill rect
aFillRect.Left() += aBrdSize.Width();
aFillRect.Top() += aBrdSize.Height();
// draw top and left borders (aOrigFillRect-aFillRect)
- pDev->DrawRect( Rectangle( aOrigFillRect.Left(), aOrigFillRect.Top(),
+ pDev->DrawRect( tools::Rectangle( aOrigFillRect.Left(), aOrigFillRect.Top(),
aOrigFillRect.Right(), aFillRect.Top()-1 ) );
- pDev->DrawRect( Rectangle( aOrigFillRect.Left(), aOrigFillRect.Top(),
+ pDev->DrawRect( tools::Rectangle( aOrigFillRect.Left(), aOrigFillRect.Top(),
aFillRect.Left()-1, aOrigFillRect.Bottom() ) );
}
else
@@ -478,9 +478,9 @@ void ImplDrawButton( OutputDevice *const pDev, Rectangle aFillRect,
aFillRect.Right() -= aBrdSize.Width();
aFillRect.Bottom() -= aBrdSize.Height();
// draw bottom and right borders (aOrigFillRect-aFillRect)
- pDev->DrawRect( Rectangle( aOrigFillRect.Left(), aFillRect.Bottom()+1,
+ pDev->DrawRect( tools::Rectangle( aOrigFillRect.Left(), aFillRect.Bottom()+1,
aOrigFillRect.Right(), aOrigFillRect.Bottom() ) );
- pDev->DrawRect( Rectangle( aFillRect.Right()+1, aOrigFillRect.Top(),
+ pDev->DrawRect( tools::Rectangle( aFillRect.Right()+1, aOrigFillRect.Top(),
aOrigFillRect.Right(), aOrigFillRect.Bottom() ) );
}
@@ -561,7 +561,7 @@ void ImplDrawButton( OutputDevice *const pDev, Rectangle aFillRect,
}
}
-void ImplDrawFrame( OutputDevice *const pDev, Rectangle& rRect,
+void ImplDrawFrame( OutputDevice *const pDev, tools::Rectangle& rRect,
const StyleSettings& rStyleSettings, DrawFrameStyle nStyle, DrawFrameFlags nFlags )
{
vcl::Window *const pWin = (pDev->GetOutDevType()==OUTDEV_WINDOW) ? static_cast<vcl::Window*>(pDev) : nullptr;
@@ -600,8 +600,8 @@ void ImplDrawFrame( OutputDevice *const pDev, Rectangle& rRect,
DrawFrameFlags::BorderWindowBorder : DrawFrameFlags::NONE);
ImplControlValue aControlValue( nControlFlags );
- Rectangle aBound, aContent;
- Rectangle aNatRgn( rRect );
+ tools::Rectangle aBound, aContent;
+ tools::Rectangle aNatRgn( rRect );
if( pWin->GetNativeControlRegion(ControlType::Frame, ControlPart::Border,
aNatRgn, ControlState::NONE, aControlValue, OUString(), aBound, aContent) )
{
@@ -684,10 +684,10 @@ void ImplDrawFrame( OutputDevice *const pDev, Rectangle& rRect,
case DrawFrameStyle::Group:
pDev->SetFillColor();
pDev->SetLineColor( rStyleSettings.GetLightColor() );
- pDev->DrawRect( Rectangle( rRect.Left()+1, rRect.Top()+1,
+ pDev->DrawRect( tools::Rectangle( rRect.Left()+1, rRect.Top()+1,
rRect.Right(), rRect.Bottom() ) );
pDev->SetLineColor( rStyleSettings.GetShadowColor() );
- pDev->DrawRect( Rectangle( rRect.Left(), rRect.Top(),
+ pDev->DrawRect( tools::Rectangle( rRect.Left(), rRect.Top(),
rRect.Right()-1, rRect.Bottom()-1 ) );
// adjust target rectangle
@@ -776,11 +776,11 @@ DecorationView::DecorationView(OutputDevice* pOutDev) :
mpOutDev(pOutDev)
{}
-void DecorationView::DrawSymbol( const Rectangle& rRect, SymbolType eType,
+void DecorationView::DrawSymbol( const tools::Rectangle& rRect, SymbolType eType,
const Color& rColor, DrawSymbolFlags nStyle )
{
const StyleSettings& rStyleSettings = mpOutDev->GetSettings().GetStyleSettings();
- const Rectangle aRect = mpOutDev->LogicToPixel( rRect );
+ const tools::Rectangle aRect = mpOutDev->LogicToPixel( rRect );
const Color aOldLineColor = mpOutDev->GetLineColor();
const Color aOldFillColor = mpOutDev->GetFillColor();
const bool bOldMapMode = mpOutDev->IsMapModeEnabled();
@@ -819,11 +819,11 @@ void DecorationView::DrawSymbol( const Rectangle& rRect, SymbolType eType,
mpOutDev->EnableMapMode( bOldMapMode );
}
-void DecorationView::DrawFrame( const Rectangle& rRect,
+void DecorationView::DrawFrame( const tools::Rectangle& rRect,
const Color& rLeftTopColor,
const Color& rRightBottomColor )
{
- Rectangle aRect = mpOutDev->LogicToPixel( rRect );
+ tools::Rectangle aRect = mpOutDev->LogicToPixel( rRect );
const Color aOldLineColor = mpOutDev->GetLineColor();
const bool bOldMapMode = mpOutDev->IsMapModeEnabled();
mpOutDev->EnableMapMode( false );
@@ -832,7 +832,7 @@ void DecorationView::DrawFrame( const Rectangle& rRect,
mpOutDev->EnableMapMode( bOldMapMode );
}
-void DecorationView::DrawHighlightFrame( const Rectangle& rRect,
+void DecorationView::DrawHighlightFrame( const tools::Rectangle& rRect,
DrawHighlightFrameStyle nStyle )
{
const StyleSettings& rStyleSettings = mpOutDev->GetSettings().GetStyleSettings();
@@ -880,9 +880,9 @@ void DecorationView::DrawHighlightFrame( const Rectangle& rRect,
DrawFrame( rRect, aLightColor, aShadowColor );
}
-Rectangle DecorationView::DrawFrame( const Rectangle& rRect, DrawFrameStyle nStyle, DrawFrameFlags nFlags )
+tools::Rectangle DecorationView::DrawFrame( const tools::Rectangle& rRect, DrawFrameStyle nStyle, DrawFrameFlags nFlags )
{
- Rectangle aRect = rRect;
+ tools::Rectangle aRect = rRect;
bool bOldMap = mpOutDev->IsMapModeEnabled();
if ( bOldMap )
{
@@ -913,14 +913,14 @@ Rectangle DecorationView::DrawFrame( const Rectangle& rRect, DrawFrameStyle nSty
return aRect;
}
-Rectangle DecorationView::DrawButton( const Rectangle& rRect, DrawButtonFlags nStyle )
+tools::Rectangle DecorationView::DrawButton( const tools::Rectangle& rRect, DrawButtonFlags nStyle )
{
if ( rRect.IsEmpty() )
{
return rRect;
}
- Rectangle aRect = rRect;
+ tools::Rectangle aRect = rRect;
const bool bOldMap = mpOutDev->IsMapModeEnabled();
if ( bOldMap )
@@ -1003,7 +1003,7 @@ void DecorationView::DrawSeparator( const Point& rStart, const Point& rStop, boo
bool nativeSupported = pWin->IsNativeControlSupported( ControlType::Fixedline, nPart );
ImplControlValue aValue;
ControlState nState = ControlState::NONE;
- Rectangle aRect(rStart,rStop);
+ tools::Rectangle aRect(rStart,rStop);
if(nativeSupported && pWin->DrawNativeControl(ControlType::Fixedline,nPart,aRect,nState,aValue,OUString()))
return;
}
@@ -1033,7 +1033,7 @@ void DecorationView::DrawSeparator( const Point& rStart, const Point& rStop, boo
mpOutDev->Pop();
}
-void DecorationView::DrawHandle(const Rectangle& rRect)
+void DecorationView::DrawHandle(const tools::Rectangle& rRect)
{
const StyleSettings& rStyleSettings = mpOutDev->GetSettings().GetStyleSettings();
@@ -1054,8 +1054,8 @@ void DecorationView::DrawHandle(const Rectangle& rRect)
for (long i = 1; i <= nNumberOfPoints; i++)
{
- Rectangle aLocation;
- aLocation = Rectangle(nHalfWidth - nRadius,
+ tools::Rectangle aLocation;
+ aLocation = tools::Rectangle(nHalfWidth - nRadius,
round(fDistance * i) - nRadius,
nHalfWidth + nRadius,
round(fDistance * i) + nRadius);
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index 2371d88fe73a..e66155d1cc60 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -1161,7 +1161,7 @@ void Dialog::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, Dra
else
{
pDev->SetFillColor( aWallpaper.GetColor() );
- pDev->DrawRect( Rectangle( aPos, aSize ) );
+ pDev->DrawRect( tools::Rectangle( aPos, aSize ) );
}
if (!( GetStyle() & WB_NOBORDER ))
@@ -1172,7 +1172,7 @@ void Dialog::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, Dra
aImplWin->SetDisplayActive( true );
aImplWin->InitView();
- aImplWin->Draw( Rectangle( aPos, aSize ), pDev, aPos );
+ aImplWin->Draw( tools::Rectangle( aPos, aSize ), pDev, aPos );
}
pDev->Pop();
diff --git a/vcl/source/window/dockingarea.cxx b/vcl/source/window/dockingarea.cxx
index f23fc4da10b6..3ed68fc7a1ec 100644
--- a/vcl/source/window/dockingarea.cxx
+++ b/vcl/source/window/dockingarea.cxx
@@ -138,7 +138,7 @@ void DockingAreaWindow::ApplySettings(vcl::RenderContext& rRenderContext)
if (pMenubarWin)
nMenubarHeight = pMenubarWin->GetOutputHeightPixel();
}
- aWallpaper.SetRect(Rectangle(Point(0, -nMenubarHeight),
+ aWallpaper.SetRect(tools::Rectangle(Point(0, -nMenubarHeight),
Size(rRenderContext.GetOutputWidthPixel(),
rRenderContext.GetOutputHeightPixel() + nMenubarHeight)));
@@ -155,7 +155,7 @@ void DockingAreaWindow::ApplySettings(vcl::RenderContext& rRenderContext)
}
-void DockingAreaWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle&)
+void DockingAreaWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&)
{
const StyleSettings rSetting = rRenderContext.GetSettings().GetStyleSettings();
@@ -179,7 +179,7 @@ void DockingAreaWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangl
else if (!ImplGetSVData()->maNWFData.mbDockingAreaSeparateTB)
{
// draw a single toolbar background covering the whole docking area
- Rectangle aCtrlRegion(Point(), GetOutputSizePixel());
+ tools::Rectangle aCtrlRegion(Point(), GetOutputSizePixel());
rRenderContext.DrawNativeControl(ControlType::Toolbar, IsHorizontal() ? ControlPart::DrawBackgroundHorz : ControlPart::DrawBackgroundVert,
aCtrlRegion, nState, aControlValue, OUString() );
@@ -195,7 +195,7 @@ void DockingAreaWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangl
{
Point aPos = pChild->GetPosPixel();
Size aSize = pChild->GetSizePixel();
- Rectangle aRect(aPos, aSize);
+ tools::Rectangle aRect(aPos, aSize);
rRenderContext.SetLineColor(rRenderContext.GetSettings().GetStyleSettings().GetLightColor());
rRenderContext.DrawLine(aRect.TopLeft(), aRect.TopRight());
@@ -229,7 +229,7 @@ void DockingAreaWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangl
std::map<int, int>::const_iterator it;
for (it = ranges.begin(); it != ranges.end(); ++it)
{
- Rectangle aTBRect;
+ tools::Rectangle aTBRect;
if (IsHorizontal())
{
aTBRect.Left() = 0;
diff --git a/vcl/source/window/dockmgr.cxx b/vcl/source/window/dockmgr.cxx
index 2c92d7d984a3..a68d5b1fbd6d 100644
--- a/vcl/source/window/dockmgr.cxx
+++ b/vcl/source/window/dockmgr.cxx
@@ -46,7 +46,7 @@ private:
Idle maDockIdle;
Idle maEndDockIdle;
Point maDockPos;
- Rectangle maDockRect;
+ tools::Rectangle maDockRect;
bool mbInMove;
ImplSVEvent * mnLastUserEvent;
@@ -169,7 +169,7 @@ IMPL_LINK_NOARG(ImplDockFloatWin2, DockingHdl, void*, void)
vcl::Window *pBorder = GetWindow( GetWindowType::Border );
if( pBorder != this )
{
- Rectangle aBorderRect( Point(), pBorder->GetSizePixel() );
+ tools::Rectangle aBorderRect( Point(), pBorder->GetSizePixel() );
sal_Int32 nLeft, nTop, nRight, nBottom;
GetBorder( nLeft, nTop, nRight, nBottom );
// limit borderrect to the caption part only and without the resizing borders
@@ -192,7 +192,7 @@ IMPL_LINK_NOARG(ImplDockFloatWin2, DockingHdl, void*, void)
bRealMove )
{
maDockPos = Point( pDockingArea->OutputToScreenPixel( pDockingArea->AbsoluteScreenToOutputPixel( OutputToAbsoluteScreenPixel( Point() ) ) ) );
- maDockRect = Rectangle( maDockPos, mpDockWin->GetSizePixel() );
+ maDockRect = tools::Rectangle( maDockPos, mpDockWin->GetSizePixel() );
// mouse pos in screen pixels
Point aMousePos = pDockingArea->OutputToScreenPixel( aState.maPos );
@@ -417,12 +417,12 @@ void DockingManager::SetPosSizePixel( vcl::Window *pWindow, long nX, long nY,
pWrapper->setPosSizePixel( nX, nY, nWidth, nHeight, nFlags );
}
-Rectangle DockingManager::GetPosSizePixel( const vcl::Window *pWindow )
+tools::Rectangle DockingManager::GetPosSizePixel( const vcl::Window *pWindow )
{
- Rectangle aRect;
+ tools::Rectangle aRect;
ImplDockingWindowWrapper* pWrapper = GetDockingWindowWrapper( pWindow );
if( pWrapper )
- aRect = Rectangle( pWrapper->GetPosPixel(), pWrapper->GetSizePixel() );
+ aRect = tools::Rectangle( pWrapper->GetPosPixel(), pWrapper->GetSizePixel() );
return aRect;
}
@@ -443,14 +443,14 @@ public:
virtual void dispose() override;
virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible() override;
- 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;
virtual void Tracking( const TrackingEvent& rTEvt ) override;
virtual void Resize() override;
- Rectangle GetDragRect() const;
+ tools::Rectangle GetDragRect() const;
Point GetToolboxPosition() const;
void DrawGrip(vcl::RenderContext& rRenderContext);
void DrawBorder(vcl::RenderContext& rRenderContext);
@@ -513,11 +513,11 @@ void ImplPopupFloatWin::Resize()
ImplSetBorder();
}
-Rectangle ImplPopupFloatWin::GetDragRect() const
+tools::Rectangle ImplPopupFloatWin::GetDragRect() const
{
if( !hasGrip() )
- return Rectangle();
- return Rectangle( 1, 1, GetOutputSizePixel().Width() - 1,
+ return tools::Rectangle();
+ return tools::Rectangle( 1, 1, GetOutputSizePixel().Width() - 1,
2 + ToolBox::ImplGetDragWidth( *this, false ) );
}
@@ -530,11 +530,11 @@ Point ImplPopupFloatWin::GetToolboxPosition() const
void ImplPopupFloatWin::DrawBorder(vcl::RenderContext& rRenderContext)
{
rRenderContext.SetFillColor();
- Rectangle aRect( Point(), GetOutputSizePixel() );
+ tools::Rectangle aRect( Point(), GetOutputSizePixel() );
vcl::Region oldClipRgn( GetClipRegion( ) );
vcl::Region aClipRgn( aRect );
- Rectangle aItemClipRect( ImplGetItemEdgeClipRect() );
+ tools::Rectangle aItemClipRect( ImplGetItemEdgeClipRect() );
if( !aItemClipRect.IsEmpty() )
{
aItemClipRect.SetPos( AbsoluteScreenToOutputPixel( aItemClipRect.TopLeft() ) );
@@ -575,7 +575,7 @@ void ImplPopupFloatWin::DrawGrip(vcl::RenderContext& rRenderContext)
rRenderContext.SetFillColor();
}
-void ImplPopupFloatWin::Paint(vcl::RenderContext& rRenderContext, const Rectangle&)
+void ImplPopupFloatWin::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&)
{
DrawBorder(rRenderContext);
if (hasGrip())
@@ -737,7 +737,7 @@ bool ImplDockingWindowWrapper::ImplStartDocking( const Point& rPos )
// mouse pos in screen pixels
Point aMousePos = pDockingArea->OutputToScreenPixel( aState.maPos );
Point aDockPos = Point( pDockingArea->AbsoluteScreenToOutputPixel( GetWindow()->OutputToAbsoluteScreenPixel( GetWindow()->GetPosPixel() ) ) );
- Rectangle aDockRect( aDockPos, GetWindow()->GetSizePixel() );
+ tools::Rectangle aDockRect( aDockPos, GetWindow()->GetSizePixel() );
StartDocking( aMousePos, aDockRect );
GetWindow()->ImplUpdateAll();
@@ -759,11 +759,11 @@ void ImplDockingWindowWrapper::Tracking( const TrackingEvent& rTEvt )
if ( rTEvt.IsTrackingCanceled() )
{
mbDockCanceled = true;
- EndDocking( Rectangle( Point( mnTrackX, mnTrackY ), Size( mnTrackWidth, mnTrackHeight ) ), mbLastFloatMode );
+ EndDocking( tools::Rectangle( Point( mnTrackX, mnTrackY ), Size( mnTrackWidth, mnTrackHeight ) ), mbLastFloatMode );
mbDockCanceled = false;
}
else
- EndDocking( Rectangle( Point( mnTrackX, mnTrackY ), Size( mnTrackWidth, mnTrackHeight ) ), mbLastFloatMode );
+ EndDocking( tools::Rectangle( Point( mnTrackX, mnTrackY ), Size( mnTrackWidth, mnTrackHeight ) ), mbLastFloatMode );
}
// Docking only upon non-synthetic MouseEvents
else if ( !rTEvt.GetMouseEvent().IsSynthetic() || rTEvt.GetMouseEvent().IsModifierChanged() )
@@ -783,8 +783,8 @@ void ImplDockingWindowWrapper::Tracking( const TrackingEvent& rTEvt )
aMousePos.X() -= maMouseOff.X();
aMousePos.Y() -= maMouseOff.Y();
Point aPos = GetWindow()->ImplOutputToFrame( aMousePos );
- Rectangle aTrackRect( aPos, Size( mnTrackWidth, mnTrackHeight ) );
- Rectangle aCompRect = aTrackRect;
+ tools::Rectangle aTrackRect( aPos, Size( mnTrackWidth, mnTrackHeight ) );
+ tools::Rectangle aCompRect = aTrackRect;
aPos.X() += maMouseOff.X();
aPos.Y() += maMouseOff.Y();
@@ -817,7 +817,7 @@ void ImplDockingWindowWrapper::Tracking( const TrackingEvent& rTEvt )
nTrackStyle = ShowTrackFlags::Object;
else
nTrackStyle = ShowTrackFlags::Big;
- Rectangle aShowTrackRect = aTrackRect;
+ tools::Rectangle aShowTrackRect = aTrackRect;
aShowTrackRect.SetPos( GetWindow()->ImplFrameToOutput( aShowTrackRect.TopLeft() ) );
GetWindow()->ShowTracking( aShowTrackRect, nTrackStyle );
@@ -834,7 +834,7 @@ void ImplDockingWindowWrapper::Tracking( const TrackingEvent& rTEvt )
}
}
-void ImplDockingWindowWrapper::StartDocking( const Point& rPoint, Rectangle& rRect )
+void ImplDockingWindowWrapper::StartDocking( const Point& rPoint, tools::Rectangle& rRect )
{
DockingData data( rPoint, rRect, IsFloatingMode() );
@@ -842,7 +842,7 @@ void ImplDockingWindowWrapper::StartDocking( const Point& rPoint, Rectangle& rRe
mbDocking = true;
}
-bool ImplDockingWindowWrapper::Docking( const Point& rPoint, Rectangle& rRect )
+bool ImplDockingWindowWrapper::Docking( const Point& rPoint, tools::Rectangle& rRect )
{
DockingData data( rPoint, rRect, IsFloatingMode() );
@@ -851,9 +851,9 @@ bool ImplDockingWindowWrapper::Docking( const Point& rPoint, Rectangle& rRect )
return data.mbFloating;
}
-void ImplDockingWindowWrapper::EndDocking( const Rectangle& rRect, bool bFloatMode )
+void ImplDockingWindowWrapper::EndDocking( const tools::Rectangle& rRect, bool bFloatMode )
{
- Rectangle aRect( rRect );
+ tools::Rectangle aRect( rRect );
bool bOrigDockCanceled = mbDockCanceled;
if (bFloatMode && !StyleSettings::GetDockingFloatsSupported())
@@ -1220,7 +1220,7 @@ bool ImplDockingWindowWrapper::IsFloatingMode() const
return (mpFloatWin != nullptr);
}
-void ImplDockingWindowWrapper::SetDragArea( const Rectangle& rRect )
+void ImplDockingWindowWrapper::SetDragArea( const tools::Rectangle& rRect )
{
maDragArea = rRect;
}
diff --git a/vcl/source/window/dockwin.cxx b/vcl/source/window/dockwin.cxx
index ced4ec955b36..4f61ff8aed92 100644
--- a/vcl/source/window/dockwin.cxx
+++ b/vcl/source/window/dockwin.cxx
@@ -58,7 +58,7 @@ private:
sal_uInt64 mnLastTicks;
Idle maDockIdle;
Point maDockPos;
- Rectangle maDockRect;
+ tools::Rectangle maDockRect;
bool mbInMove;
ImplSVEvent * mnLastUserEvent;
@@ -160,7 +160,7 @@ IMPL_LINK_NOARG(ImplDockFloatWin, DockingHdl, void*, void)
if( ! mpDockWin->IsDocking() )
mpDockWin->StartDocking();
- maDockRect = Rectangle( maDockPos, mpDockWin->GetSizePixel() );
+ maDockRect = tools::Rectangle( maDockPos, mpDockWin->GetSizePixel() );
// mouse pos also in screen pixels
Point aMousePos = mpDockWin->GetParent()->OutputToScreenPixel( aState.maPos );
@@ -420,7 +420,7 @@ void DockingWindow::Tracking( const TrackingEvent& rTEvt )
if ( rTEvt.IsTrackingCanceled() )
{
StartDocking();
- Rectangle aRect( Point( mnTrackX, mnTrackY ), Size( mnTrackWidth, mnTrackHeight ) );
+ tools::Rectangle aRect( Point( mnTrackX, mnTrackY ), Size( mnTrackWidth, mnTrackHeight ) );
EndDocking( aRect, mbStartFloat );
}
}
@@ -430,11 +430,11 @@ void DockingWindow::Tracking( const TrackingEvent& rTEvt )
if ( rTEvt.IsTrackingCanceled() )
{
mbDockCanceled = true;
- EndDocking( Rectangle( Point( mnTrackX, mnTrackY ), Size( mnTrackWidth, mnTrackHeight ) ), mbLastFloatMode );
+ EndDocking( tools::Rectangle( Point( mnTrackX, mnTrackY ), Size( mnTrackWidth, mnTrackHeight ) ), mbLastFloatMode );
mbDockCanceled = false;
}
else
- EndDocking( Rectangle( Point( mnTrackX, mnTrackY ), Size( mnTrackWidth, mnTrackHeight ) ), mbLastFloatMode );
+ EndDocking( tools::Rectangle( Point( mnTrackX, mnTrackY ), Size( mnTrackWidth, mnTrackHeight ) ), mbLastFloatMode );
}
}
// dock only for non-synthetic MouseEvents
@@ -455,8 +455,8 @@ void DockingWindow::Tracking( const TrackingEvent& rTEvt )
aMousePos.X() -= maMouseOff.X();
aMousePos.Y() -= maMouseOff.Y();
Point aFramePos = ImplOutputToFrame( aMousePos );
- Rectangle aTrackRect( aFramePos, Size( mnTrackWidth, mnTrackHeight ) );
- Rectangle aCompRect = aTrackRect;
+ tools::Rectangle aTrackRect( aFramePos, Size( mnTrackWidth, mnTrackHeight ) );
+ tools::Rectangle aCompRect = aTrackRect;
aFramePos.X() += maMouseOff.X();
aFramePos.Y() += maMouseOff.Y();
if ( mbDragFull )
@@ -502,7 +502,7 @@ void DockingWindow::Tracking( const TrackingEvent& rTEvt )
nTrackStyle = ShowTrackFlags::Big;
else
nTrackStyle = ShowTrackFlags::Object;
- Rectangle aShowTrackRect = aTrackRect;
+ tools::Rectangle aShowTrackRect = aTrackRect;
aShowTrackRect.SetPos( ImplFrameToOutput( aShowTrackRect.TopLeft() ) );
ShowTracking( aShowTrackRect, nTrackStyle );
@@ -578,12 +578,12 @@ void DockingWindow::StartDocking()
mbDocking = true;
}
-bool DockingWindow::Docking( const Point&, Rectangle& )
+bool DockingWindow::Docking( const Point&, tools::Rectangle& )
{
return IsFloatingMode();
}
-void DockingWindow::EndDocking( const Rectangle& rRect, bool bFloatMode )
+void DockingWindow::EndDocking( const tools::Rectangle& rRect, bool bFloatMode )
{
bool bOrigDockCanceled = mbDockCanceled;
if (bFloatMode && !StyleSettings::GetDockingFloatsSupported())
diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx
index 4337969fc07f..9b27d56b6617 100644
--- a/vcl/source/window/floatwin.cxx
+++ b/vcl/source/window/floatwin.cxx
@@ -39,7 +39,7 @@ public:
ImplData();
VclPtr<ToolBox> mpBox;
- Rectangle maItemEdgeClipRect; // used to clip the common edge between a toolbar item and the border of this window
+ tools::Rectangle maItemEdgeClipRect; // used to clip the common edge between a toolbar item and the border of this window
};
FloatingWindow::ImplData::ImplData()
@@ -47,7 +47,7 @@ FloatingWindow::ImplData::ImplData()
mpBox = nullptr;
}
-Rectangle& FloatingWindow::ImplGetItemEdgeClipRect()
+tools::Rectangle& FloatingWindow::ImplGetItemEdgeClipRect()
{
return mpImplData->maItemEdgeClipRect;
}
@@ -225,19 +225,19 @@ void FloatingWindow::dispose()
SystemWindow::dispose();
}
-Point FloatingWindow::CalcFloatingPosition( vcl::Window* pWindow, const Rectangle& rRect, FloatWinPopupFlags nFlags, sal_uInt16& rArrangeIndex )
+Point FloatingWindow::CalcFloatingPosition( vcl::Window* pWindow, const tools::Rectangle& rRect, FloatWinPopupFlags nFlags, sal_uInt16& rArrangeIndex )
{
return ImplCalcPos( pWindow, rRect, nFlags, rArrangeIndex );
}
Point FloatingWindow::ImplCalcPos( vcl::Window* pWindow,
- const Rectangle& rRect, FloatWinPopupFlags nFlags,
+ const tools::Rectangle& rRect, FloatWinPopupFlags nFlags,
sal_uInt16& rArrangeIndex )
{
// get window position
Point aPos;
Size aSize = ::isLayoutEnabled(pWindow) ? pWindow->get_preferred_size() : pWindow->GetSizePixel();
- Rectangle aScreenRect = pWindow->ImplGetFrameWindow()->GetDesktopRectPixel();
+ tools::Rectangle aScreenRect = pWindow->ImplGetFrameWindow()->GetDesktopRectPixel();
FloatingWindow *pFloatingWindow = dynamic_cast<FloatingWindow*>( pWindow );
// convert....
@@ -245,15 +245,15 @@ Point FloatingWindow::ImplCalcPos( vcl::Window* pWindow,
if ( pW->mpWindowImpl->mpRealParent )
pW = pW->mpWindowImpl->mpRealParent;
- Rectangle normRect( rRect ); // rRect is already relative to top-level window
+ tools::Rectangle normRect( rRect ); // rRect is already relative to top-level window
normRect.SetPos( pW->ScreenToOutputPixel( normRect.TopLeft() ) );
bool bRTL = AllSettings::GetLayoutRTL();
- Rectangle devRect( pW->OutputToAbsoluteScreenPixel( normRect.TopLeft() ),
+ tools::Rectangle devRect( pW->OutputToAbsoluteScreenPixel( normRect.TopLeft() ),
pW->OutputToAbsoluteScreenPixel( normRect.BottomRight() ) );
- Rectangle devRectRTL( devRect );
+ tools::Rectangle devRectRTL( devRect );
if( bRTL )
// create a rect that can be compared to desktop coordinates
devRectRTL = pW->ImplOutputToUnmirroredAbsoluteScreenPixel( normRect );
@@ -431,7 +431,7 @@ Point FloatingWindow::ImplCalcPos( vcl::Window* pWindow,
if( pFloatingWindow )
{
pFloatingWindow->mpImplData->maItemEdgeClipRect =
- Rectangle( e1, e2 );
+ tools::Rectangle( e1, e2 );
}
// caller expects coordinates relative to top-level win
@@ -451,7 +451,7 @@ Point FloatingWindow::ImplConvertToAbsPos(vcl::Window* pReference, const Point&
// --- RTL --- re-mirror back to get device coordinates
pWindowOutDev->ReMirror( aAbsolute );
- Rectangle aRect( pReference->ScreenToOutputPixel(aAbsolute), Size(1,1) ) ;
+ tools::Rectangle aRect( pReference->ScreenToOutputPixel(aAbsolute), Size(1,1) ) ;
aRect = pReference->ImplOutputToUnmirroredAbsoluteScreenPixel( aRect );
aAbsolute = aRect.TopLeft();
}
@@ -462,9 +462,9 @@ Point FloatingWindow::ImplConvertToAbsPos(vcl::Window* pReference, const Point&
return aAbsolute;
}
-Rectangle FloatingWindow::ImplConvertToAbsPos(vcl::Window* pReference, const Rectangle& rRect)
+tools::Rectangle FloatingWindow::ImplConvertToAbsPos(vcl::Window* pReference, const tools::Rectangle& rRect)
{
- Rectangle aFloatRect = rRect;
+ tools::Rectangle aFloatRect = rRect;
const OutputDevice *pParentWinOutDev = pReference->GetOutDev();
@@ -498,7 +498,7 @@ FloatingWindow* FloatingWindow::ImplFloatHitTest( vcl::Window* pReference, const
vcl::Window *pBorderWin = pWin->GetWindow( GetWindowType::Border );
Point aPt; // the top-left corner in output coordinates ie (0,0)
- Rectangle devRect( pBorderWin->ImplOutputToUnmirroredAbsoluteScreenPixel( Rectangle( aPt, pBorderWin->GetSizePixel()) ) ) ;
+ tools::Rectangle devRect( pBorderWin->ImplOutputToUnmirroredAbsoluteScreenPixel( tools::Rectangle( aPt, pBorderWin->GetSizePixel()) ) ) ;
if ( devRect.IsInside( aAbsolute ) )
{
rHitTest = HITTEST_WINDOW;
@@ -651,7 +651,7 @@ void FloatingWindow::SetTitleType( FloatWinTitleType nTitle )
}
}
-void FloatingWindow::StartPopupMode( const Rectangle& rRect, FloatWinPopupFlags nFlags )
+void FloatingWindow::StartPopupMode( const tools::Rectangle& rRect, FloatWinPopupFlags nFlags )
{
if ( IsRollUp() )
RollDown();
@@ -717,7 +717,7 @@ void FloatingWindow::StartPopupMode( ToolBox* pBox, FloatWinPopupFlags nFlags )
pBox->ImplFloatControl( true, this );
// retrieve some data from the ToolBox
- Rectangle aRect = nItemId ? pBox->GetItemRect( nItemId ) : pBox->GetOverflowRect();
+ tools::Rectangle aRect = nItemId ? pBox->GetItemRect( nItemId ) : pBox->GetOverflowRect();
Point aPos;
// convert to parent's screen coordinates
aPos = GetParent()->OutputToScreenPixel( GetParent()->AbsoluteScreenToOutputPixel( pBox->OutputToAbsoluteScreenPixel( aRect.TopLeft() ) ) );
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index 785ec06f13bb..d5a61d4e42f0 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -2585,7 +2585,7 @@ void VclVPaned::arrange(const Size& rAllocation, long nFirstHeight, long nSecond
void VclVPaned::setAllocation(const Size& rAllocation)
{
//supporting "shrink" could be done by adjusting the allowed drag rectangle
- m_pSplitter->SetDragRectPixel(Rectangle(Point(0, 0), rAllocation));
+ m_pSplitter->SetDragRectPixel(tools::Rectangle(Point(0, 0), rAllocation));
Size aSplitterSize(rAllocation.Width(), getLayoutRequisition(*m_pSplitter).Height());
const long nHeight = rAllocation.Height() - aSplitterSize.Height();
@@ -2646,7 +2646,7 @@ Size VclVPaned::calculateRequisition() const
Size getLegacyBestSizeForChildren(const vcl::Window &rWindow)
{
- Rectangle aBounds;
+ tools::Rectangle aBounds;
for (const vcl::Window* pChild = rWindow.GetWindow(GetWindowType::FirstChild); pChild;
pChild = pChild->GetWindow(GetWindowType::Next))
@@ -2654,7 +2654,7 @@ Size getLegacyBestSizeForChildren(const vcl::Window &rWindow)
if (!pChild->IsVisible())
continue;
- Rectangle aChildBounds(pChild->GetPosPixel(), pChild->GetSizePixel());
+ tools::Rectangle aChildBounds(pChild->GetPosPixel(), pChild->GetSizePixel());
aBounds.Union(aChildBounds);
}
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 76a64324ae8b..cda664076440 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -77,7 +77,7 @@ struct MenuLayoutData : public ControlLayoutData
{
std::vector< sal_uInt16 > m_aLineItemIds;
std::vector< sal_uInt16 > m_aLineItemPositions;
- std::map< sal_uInt16, Rectangle > m_aVisibleItemBoundRects;
+ std::map< sal_uInt16, tools::Rectangle > m_aVisibleItemBoundRects;
};
}
@@ -981,7 +981,7 @@ void Menu::EnableItem( sal_uInt16 nItemId, bool bEnable )
MenuItemData* pData = pItemList->GetDataFromPos( n );
if ( n == nPos )
{
- pWin->Invalidate( Rectangle( Point( nX, 0 ), Size( pData->aSz.Width(), pData->aSz.Height() ) ) );
+ pWin->Invalidate( tools::Rectangle( Point( nX, 0 ), Size( pData->aSz.Width(), pData->aSz.Height() ) ) );
break;
}
nX += pData->aSz.Width();
@@ -1368,10 +1368,10 @@ Size Menu::ImplGetNativeCheckAndRadioSize(vcl::RenderContext& rRenderContext, lo
if (!IsMenuBar())
{
ImplControlValue aVal;
- Rectangle aNativeBounds;
- Rectangle aNativeContent;
+ tools::Rectangle aNativeBounds;
+ tools::Rectangle aNativeContent;
- Rectangle aCtrlRegion(Rectangle(Point(), Size(100, 15)));
+ tools::Rectangle aCtrlRegion(tools::Rectangle(Point(), Size(100, 15)));
if (rRenderContext.IsNativeControlSupported(ControlType::MenuPopup, ControlPart::MenuItemCheckMark))
{
if (rRenderContext.GetNativeControlRegion(ControlType::MenuPopup, ControlPart::MenuItemCheckMark,
@@ -1399,9 +1399,9 @@ Size Menu::ImplGetNativeCheckAndRadioSize(vcl::RenderContext& rRenderContext, lo
bool Menu::ImplGetNativeSubmenuArrowSize(vcl::RenderContext& rRenderContext, Size& rArrowSize, long& rArrowSpacing)
{
ImplControlValue aVal;
- Rectangle aNativeBounds;
- Rectangle aNativeContent;
- Rectangle aCtrlRegion(Rectangle(Point(), Size(100, 15)));
+ tools::Rectangle aNativeBounds;
+ tools::Rectangle aNativeContent;
+ tools::Rectangle aCtrlRegion(tools::Rectangle(Point(), Size(100, 15)));
if (rRenderContext.IsNativeControlSupported(ControlType::MenuPopup, ControlPart::SubmenuArrow))
{
if (rRenderContext.GetNativeControlRegion(ControlType::MenuPopup, ControlPart::SubmenuArrow,
@@ -1592,7 +1592,7 @@ Size Menu::ImplCalcSize( vcl::Window* pWin )
pWin->SetFont(aFont);
// Compute text bounding box
- Rectangle aTextBoundRect;
+ tools::Rectangle aTextBoundRect;
pWin->GetTextBoundRect(aTextBoundRect, aTitleText);
// Vertically, one height of char + extra space for decoration
@@ -1612,7 +1612,7 @@ Size Menu::ImplCalcSize( vcl::Window* pWin )
// TODO: move GetScreenNumber from SystemWindow to Window ?
// currently we rely on internal privileges
unsigned int nDisplayScreen = pWin->ImplGetWindowImpl()->mpFrame->maGeometry.nDisplayScreenNumber;
- Rectangle aDispRect( Application::GetScreenPosSizePixel( nDisplayScreen ) );
+ tools::Rectangle aDispRect( Application::GetScreenPosSizePixel( nDisplayScreen ) );
long nScreenWidth = aDispRect.GetWidth() >= 800 ? aDispRect.GetWidth() : 800;
if( nMaxWidth > nScreenWidth/2 )
nMaxWidth = nScreenWidth/2;
@@ -1643,10 +1643,10 @@ Size Menu::ImplCalcSize( vcl::Window* pWin )
if( pWindow->IsNativeControlSupported( ControlType::Menubar, ControlPart::Entire ) )
{
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( pWindow->GetNativeControlRegion( ControlType::Menubar,
ControlPart::Entire,
aCtrlRegion,
@@ -1676,13 +1676,13 @@ Size Menu::ImplCalcSize( vcl::Window* pWin )
return aSz;
}
-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))
{
ImplControlValue aControlValue;
- Rectangle aCtrlRegion( i_rRect );
+ tools::Rectangle aCtrlRegion( i_rRect );
ControlState nState = ControlState::PRESSED | ControlState::ENABLED;
aControlValue.setTristateVal(ButtonValue::On);
@@ -1720,7 +1720,7 @@ static OUString getShortenedString( const OUString& i_rLong, vcl::RenderContext&
return aNonMnem;
}
-void Menu::ImplPaintMenuTitle(vcl::RenderContext& rRenderContext, const Rectangle& rRect ) const
+void Menu::ImplPaintMenuTitle(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) const
{
// Save previous graphical settings, set new one
rRenderContext.Push(PushFlags::FONT | PushFlags::FILLCOLOR);
@@ -1734,7 +1734,7 @@ void Menu::ImplPaintMenuTitle(vcl::RenderContext& rRenderContext, const Rectangl
rRenderContext.SetFont(aFont);
// Draw background rectangle
- Rectangle aBgRect(rRect);
+ tools::Rectangle aBgRect(rRect);
int nOuterSpaceX = ImplGetSVData()->maNWFData.mnMenuFormatBorderX;
aBgRect.setX(aBgRect.getX() + SPACE_AROUND_TITLE);
aBgRect.setWidth(aBgRect.getWidth() - 2 * SPACE_AROUND_TITLE - 2 * nOuterSpaceX);
@@ -1744,7 +1744,7 @@ void Menu::ImplPaintMenuTitle(vcl::RenderContext& rRenderContext, const Rectangl
// Draw the text centered
Point aTextTopLeft(aBgRect.TopLeft());
- Rectangle aTextBoundRect;
+ tools::Rectangle aTextBoundRect;
rRenderContext.GetTextBoundRect( aTextBoundRect, aTitleText );
aTextTopLeft.X() += (aBgRect.getWidth() - aTextBoundRect.GetSize().Width()) / 2;
aTextTopLeft.Y() += (aBgRect.GetHeight() - aTextBoundRect.GetSize().Height()) / 2
@@ -1792,7 +1792,7 @@ void Menu::ImplPaint(vcl::RenderContext& rRenderContext,
// Paint title
if (!pThisItemOnly && !IsMenuBar() && nTitleHeight > 0)
- ImplPaintMenuTitle(rRenderContext, Rectangle(aTopLeft, aOutSz));
+ ImplPaintMenuTitle(rRenderContext, tools::Rectangle(aTopLeft, aOutSz));
for (size_t n = 0; n < nCount; n++)
{
@@ -1864,7 +1864,7 @@ void Menu::ImplPaint(vcl::RenderContext& rRenderContext,
aMpos.X() += nSepPad;
Size aSz(pData->aSz);
aSz.Width() = aOutSz.Width() - 2*nOuterSpaceX - 2 * nSepPad;
- Rectangle aItemRect(aMpos, aSz);
+ tools::Rectangle aItemRect(aMpos, aSz);
MenupopupValue aVal(nTextPos - GUTTERBORDER, aItemRect);
bNativeOk = rRenderContext.DrawNativeControl(ControlType::MenuPopup, ControlPart::Separator,
aItemRect, nState, aVal, OUString());
@@ -1882,7 +1882,7 @@ void Menu::ImplPaint(vcl::RenderContext& rRenderContext,
}
}
- Rectangle aOuterCheckRect(Point(aPos.X()+nImgOrChkPos, aPos.Y()),
+ tools::Rectangle aOuterCheckRect(Point(aPos.X()+nImgOrChkPos, aPos.Y()),
Size(pData->aSz.Height(), pData->aSz.Height()));
aOuterCheckRect.Left() += 1;
aOuterCheckRect.Right() -= 1;
@@ -1924,10 +1924,10 @@ void Menu::ImplPaint(vcl::RenderContext& rRenderContext,
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));
Size aSz(pData->aSz);
aSz.Width() = aOutSz.Width() - 2 * nOuterSpaceX;
- Rectangle aItemRect(aPos, aSz);
+ tools::Rectangle aItemRect(aPos, aSz);
MenupopupValue aVal(nTextPos - GUTTERBORDER, aItemRect);
rRenderContext.DrawNativeControl(ControlType::MenuPopup, nPart, aCheckRect,
nState, aVal, OUString());
@@ -1950,7 +1950,7 @@ void Menu::ImplPaint(vcl::RenderContext& rRenderContext,
}
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, rRenderContext.GetTextColor(), nSymbolStyle);
}
}
@@ -2063,7 +2063,7 @@ void Menu::ImplPaint(vcl::RenderContext& rRenderContext,
aTmpPos.Y() = aPos.Y() + ( pData->aSz.Height() - aTmpSz.Height() ) / 2;
aTmpPos.Y() += nExtra / 2;
- Rectangle aItemRect(aTmpPos, aTmpSz);
+ tools::Rectangle aItemRect(aTmpPos, aTmpSz);
MenupopupValue aVal(nTextPos - GUTTERBORDER, aItemRect);
bNativeOk = rRenderContext.DrawNativeControl(ControlType::MenuPopup, ControlPart::SubmenuArrow,
aItemRect, nState, aVal, OUString());
@@ -2079,11 +2079,11 @@ void Menu::ImplPaint(vcl::RenderContext& rRenderContext,
rRenderContext.SetTextColor(rSettings.GetMenuTextColor());
Point aTmpPos2(aPos);
aTmpPos2.X() = aOutSz.Width() - nFontHeight - nFontHeight/4;
- aDecoView.DrawFrame(Rectangle(aTmpPos2, Size(nFontHeight + nFontHeight / 4,
+ aDecoView.DrawFrame(tools::Rectangle(aTmpPos2, Size(nFontHeight + nFontHeight / 4,
pData->aSz.Height())),
DrawFrameStyle::Group);
}
- aDecoView.DrawSymbol(Rectangle(aTmpPos, Size(nFontHeight / 2, nFontHeight / 2)),
+ aDecoView.DrawSymbol(tools::Rectangle(aTmpPos, Size(nFontHeight / 2, nFontHeight / 2)),
SymbolType::SPIN_RIGHT, rRenderContext.GetTextColor(), nSymbolStyle);
}
}
@@ -2101,9 +2101,9 @@ void Menu::ImplPaint(vcl::RenderContext& rRenderContext,
if( bLayout )
{
if (!IsMenuBar())
- mpLayoutData->m_aVisibleItemBoundRects[ n ] = Rectangle(aTopLeft, Size(aOutSz.Width(), pData->aSz.Height()));
+ mpLayoutData->m_aVisibleItemBoundRects[ n ] = tools::Rectangle(aTopLeft, Size(aOutSz.Width(), pData->aSz.Height()));
else
- mpLayoutData->m_aVisibleItemBoundRects[ n ] = Rectangle(aTopLeft, pData->aSz);
+ mpLayoutData->m_aVisibleItemBoundRects[ n ] = tools::Rectangle(aTopLeft, pData->aSz);
}
}
@@ -2117,7 +2117,7 @@ void Menu::ImplPaint(vcl::RenderContext& rRenderContext,
{
Size aLogoSz = pLogo->aBitmap.GetSizePixel();
- Rectangle aRect(Point(), Point(aLogoSz.Width() - 1, aOutSz.Height()));
+ tools::Rectangle aRect(Point(), Point(aLogoSz.Width() - 1, aOutSz.Height()));
if (rRenderContext.GetColorCount() >= 256)
{
Gradient aGrad(GradientStyle::Linear, pLogo->aStartColor, pLogo->aEndColor);
@@ -2283,7 +2283,7 @@ void Menu::ImplFillLayoutData() const
}
}
-Rectangle Menu::GetCharacterBounds( sal_uInt16 nItemID, long nIndex ) const
+tools::Rectangle Menu::GetCharacterBounds( sal_uInt16 nItemID, long nIndex ) const
{
long nItemIndex = -1;
if( ! mpLayoutData )
@@ -2299,7 +2299,7 @@ Rectangle Menu::GetCharacterBounds( sal_uInt16 nItemID, long nIndex ) const
}
}
}
- return (mpLayoutData && nItemIndex != -1) ? mpLayoutData->GetCharacterBounds( nItemIndex+nIndex ) : Rectangle();
+ return (mpLayoutData && nItemIndex != -1) ? mpLayoutData->GetCharacterBounds( nItemIndex+nIndex ) : tools::Rectangle();
}
long Menu::GetIndexForPoint( const Point& rPoint, sal_uInt16& rItemID ) const
@@ -2326,15 +2326,15 @@ long Menu::GetIndexForPoint( const Point& rPoint, sal_uInt16& rItemID ) const
return nIndex;
}
-Rectangle Menu::GetBoundingRectangle( sal_uInt16 nPos ) const
+tools::Rectangle Menu::GetBoundingRectangle( sal_uInt16 nPos ) const
{
- Rectangle aRet;
+ tools::Rectangle aRet;
if (!mpLayoutData )
ImplFillLayoutData();
if (mpLayoutData)
{
- std::map< sal_uInt16, Rectangle >::const_iterator it = mpLayoutData->m_aVisibleItemBoundRects.find( nPos );
+ std::map< sal_uInt16, tools::Rectangle >::const_iterator it = mpLayoutData->m_aVisibleItemBoundRects.find( nPos );
if( it != mpLayoutData->m_aVisibleItemBoundRects.end() )
aRet = it->second;
}
@@ -2707,10 +2707,10 @@ void MenuBar::RemoveMenuBarButton( sal_uInt16 nId )
pMenuWin->RemoveMenuBarButton(nId);
}
-Rectangle MenuBar::GetMenuBarButtonRectPixel( sal_uInt16 nId )
+tools::Rectangle MenuBar::GetMenuBarButtonRectPixel( sal_uInt16 nId )
{
MenuBarWindow* pMenuWin = getMenuBarWindow();
- return pMenuWin ? pMenuWin->GetMenuBarButtonRectPixel(nId) : Rectangle();
+ return pMenuWin ? pMenuWin->GetMenuBarButtonRectPixel(nId) : tools::Rectangle();
}
bool MenuBar::HandleMenuButtonEvent( Menu *, sal_uInt16 i_nButtonId )
@@ -2845,10 +2845,10 @@ void PopupMenu::SetSelectedEntry( sal_uInt16 nId )
sal_uInt16 PopupMenu::Execute( vcl::Window* pExecWindow, const Point& rPopupPos )
{
- return Execute( pExecWindow, Rectangle( rPopupPos, rPopupPos ), PopupMenuFlags::ExecuteDown );
+ return Execute( pExecWindow, tools::Rectangle( rPopupPos, rPopupPos ), PopupMenuFlags::ExecuteDown );
}
-sal_uInt16 PopupMenu::Execute( vcl::Window* pExecWindow, const Rectangle& rRect, PopupMenuFlags nFlags )
+sal_uInt16 PopupMenu::Execute( vcl::Window* pExecWindow, const tools::Rectangle& rRect, PopupMenuFlags nFlags )
{
ENSURE_OR_RETURN( pExecWindow, "PopupMenu::Execute: need a non-NULL window!", 0 );
@@ -2886,7 +2886,7 @@ void PopupMenu::ImplFlushPendingSelect()
}
}
-sal_uInt16 PopupMenu::ImplExecute( const VclPtr<vcl::Window>& pW, const Rectangle& rRect, FloatWinPopupFlags nPopupModeFlags, Menu* pSFrom, bool bPreSelectFirst )
+sal_uInt16 PopupMenu::ImplExecute( const VclPtr<vcl::Window>& pW, const tools::Rectangle& rRect, FloatWinPopupFlags nPopupModeFlags, Menu* pSFrom, bool bPreSelectFirst )
{
if ( !pSFrom && ( PopupMenu::IsInExecute() || !GetItemCount() ) )
return 0;
@@ -2920,7 +2920,7 @@ sal_uInt16 PopupMenu::ImplExecute( const VclPtr<vcl::Window>& pW, const Rectangl
}
SAL_WARN_IF( ImplGetWindow(), "vcl", "Win?!" );
- Rectangle aRect( rRect );
+ tools::Rectangle aRect( rRect );
aRect.SetPos( pW->OutputToScreenPixel( aRect.TopLeft() ) );
WinBits nStyle = WB_BORDER;
@@ -2986,7 +2986,7 @@ sal_uInt16 PopupMenu::ImplExecute( const VclPtr<vcl::Window>& pW, const Rectangl
Size aSz = ImplCalcSize( pWin );
- Rectangle aDesktopRect(pWin->GetDesktopRectPixel());
+ tools::Rectangle aDesktopRect(pWin->GetDesktopRectPixel());
if( Application::GetScreenCount() > 1 && Application::IsUnifiedDisplay() )
{
vcl::Window* pDeskW = pWindow->GetWindow( GetWindowType::RealParent );
@@ -2994,7 +2994,7 @@ sal_uInt16 PopupMenu::ImplExecute( const VclPtr<vcl::Window>& pW, const Rectangl
pDeskW = pWindow;
Point aDesktopTL( pDeskW->OutputToAbsoluteScreenPixel( aRect.TopLeft() ) );
aDesktopRect = Application::GetScreenPosSizePixel(
- Application::GetBestScreen( Rectangle( aDesktopTL, aRect.GetSize() ) ));
+ Application::GetBestScreen( tools::Rectangle( aDesktopTL, aRect.GetSize() ) ));
}
long nMaxHeight = aDesktopRect.GetHeight();
@@ -3009,7 +3009,7 @@ sal_uInt16 PopupMenu::ImplExecute( const VclPtr<vcl::Window>& pW, const Rectangl
if ( pRef->GetParent() )
pRef = pRef->GetParent();
- Rectangle devRect( pRef->OutputToAbsoluteScreenPixel( aRect.TopLeft() ),
+ tools::Rectangle devRect( pRef->OutputToAbsoluteScreenPixel( aRect.TopLeft() ),
pRef->OutputToAbsoluteScreenPixel( aRect.BottomRight() ) );
long nHeightAbove = devRect.Top() - aDesktopRect.Top();
diff --git a/vcl/source/window/menubarwindow.cxx b/vcl/source/window/menubarwindow.cxx
index 876edcdc51d7..e1f50c0b5632 100644
--- a/vcl/source/window/menubarwindow.cxx
+++ b/vcl/source/window/menubarwindow.cxx
@@ -102,8 +102,8 @@ void DecoToolBox::SetImages( long nMaxHeight, bool bForce )
aBmpExDst.Erase( aEraseColor );
aBmpExDst.SetSizePixel( Size( lastSize, lastSize ) );
- Rectangle aSrcRect( Point(0,0), maImage.GetSizePixel() );
- Rectangle aDestRect( Point((lastSize - maImage.GetSizePixel().Width())/2,
+ tools::Rectangle aSrcRect( Point(0,0), maImage.GetSizePixel() );
+ tools::Rectangle aDestRect( Point((lastSize - maImage.GetSizePixel().Width())/2,
(lastSize - maImage.GetSizePixel().Height())/2 ),
maImage.GetSizePixel() );
@@ -320,7 +320,7 @@ void MenuBarWindow::ImplCreatePopup( bool bPreSelectFirst )
// #99071# do not grab the focus, otherwise it will be restored to the menubar
// when the frame is reactivated later
//GrabFocus();
- pActivePopup->ImplExecute( this, Rectangle( aItemTopLeft, aItemBottomRight ), FloatWinPopupFlags::Down | FloatWinPopupFlags::NoHorzPlacement, pMenu, bPreSelectFirst );
+ pActivePopup->ImplExecute( this, tools::Rectangle( aItemTopLeft, aItemBottomRight ), FloatWinPopupFlags::Down | FloatWinPopupFlags::NoHorzPlacement, pMenu, bPreSelectFirst );
// does not have a window, if aborted before or if there are no entries
if ( pActivePopup->ImplGetFloatingWindow() )
pActivePopup->ImplGetFloatingWindow()->AddPopupModeWindow( this );
@@ -569,7 +569,7 @@ static void ImplAddNWFSeparator(vcl::RenderContext& rRenderContext, const Size&
rRenderContext.SetLineColor(rRenderContext.GetSettings().GetStyleSettings().GetSeparatorColor());
Point aPt;
- Rectangle aRect(aPt, rSize);
+ tools::Rectangle aRect(aPt, rSize);
rRenderContext.DrawLine(aRect.BottomLeft(), aRect.BottomRight());
}
}
@@ -589,7 +589,7 @@ void MenuBarWindow::HighlightItem(vcl::RenderContext& rRenderContext, sal_uInt16
if (pData->eType != MenuItemType::SEPARATOR)
{
// #107747# give menuitems the height of the menubar
- Rectangle aRect = Rectangle(Point(nX, 1), Size(pData->aSz.Width(), GetOutputSizePixel().Height() - 2));
+ tools::Rectangle aRect = tools::Rectangle(Point(nX, 1), Size(pData->aSz.Width(), GetOutputSizePixel().Height() - 2));
rRenderContext.Push(PushFlags::CLIPREGION);
rRenderContext.IntersectClipRegion(aRect);
bool bRollover, bHighlight;
@@ -614,7 +614,7 @@ void MenuBarWindow::HighlightItem(vcl::RenderContext& rRenderContext, sal_uInt16
Erase(rRenderContext);
else
{
- Rectangle aBgRegion(Point(), GetOutputSizePixel());
+ tools::Rectangle aBgRegion(Point(), GetOutputSizePixel());
rRenderContext.DrawNativeControl(ControlType::Menubar, ControlPart::Entire, aBgRegion,
ControlState::ENABLED, aControlValue, OUString());
}
@@ -649,9 +649,9 @@ void MenuBarWindow::HighlightItem(vcl::RenderContext& rRenderContext, sal_uInt16
}
}
-Rectangle MenuBarWindow::ImplGetItemRect( sal_uInt16 nPos )
+tools::Rectangle MenuBarWindow::ImplGetItemRect( sal_uInt16 nPos )
{
- Rectangle aRect;
+ tools::Rectangle aRect;
if( pMenu )
{
long nX = 0;
@@ -663,7 +663,7 @@ Rectangle MenuBarWindow::ImplGetItemRect( sal_uInt16 nPos )
{
if ( pData->eType != MenuItemType::SEPARATOR )
// #107747# give menuitems the height of the menubar
- aRect = Rectangle( Point( nX, 1 ), Size( pData->aSz.Width(), GetOutputSizePixel().Height()-2 ) );
+ aRect = tools::Rectangle( Point( nX, 1 ), Size( pData->aSz.Width(), GetOutputSizePixel().Height()-2 ) );
break;
}
@@ -848,7 +848,7 @@ bool MenuBarWindow::HandleKeyEvent( const KeyEvent& rKEvent, bool bFromMenu )
return bDone;
}
-void MenuBarWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle&)
+void MenuBarWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&)
{
if (!pMenu)
return;
@@ -872,7 +872,7 @@ void MenuBarWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle&)
else
{
Point aPt;
- Rectangle aCtrlRegion( aPt, GetOutputSizePixel() );
+ tools::Rectangle aCtrlRegion( aPt, GetOutputSizePixel() );
rRenderContext.DrawNativeControl(ControlType::Menubar, ControlPart::Entire, aCtrlRegion,
ControlState::ENABLED, aMenubarValue, OUString());
@@ -963,7 +963,7 @@ void MenuBarWindow::RequestHelp( const HelpEvent& rHEvt )
if ( rHEvt.GetMode() & (HelpEventMode::CONTEXT | HelpEventMode::EXTENDED) )
ChangeHighlightItem( ITEMPOS_INVALID, true );
- Rectangle aHighlightRect( ImplGetItemRect( nHighlightedItem ) );
+ tools::Rectangle aHighlightRect( ImplGetItemRect( nHighlightedItem ) );
if( !ImplHandleHelpEvent( this, pMenu, nId, rHEvt, aHighlightRect ) )
Window::RequestHelp( rHEvt );
}
@@ -1143,18 +1143,18 @@ void MenuBarWindow::SetMenuBarButtonHighlightHdl( sal_uInt16 nId, const Link<Men
it->second.m_aHighlightLink = rLink;
}
-Rectangle MenuBarWindow::GetMenuBarButtonRectPixel( sal_uInt16 nId )
+tools::Rectangle MenuBarWindow::GetMenuBarButtonRectPixel( sal_uInt16 nId )
{
- Rectangle aRect;
+ tools::Rectangle aRect;
if( m_aAddButtons.find( nId ) != m_aAddButtons.end() )
{
if( pMenu->mpSalMenu )
{
aRect = pMenu->mpSalMenu->GetMenuBarButtonRectPixel( nId, ImplGetWindowImpl()->mpFrame );
- if( aRect == Rectangle( Point( -1, -1 ), Size( 1, 1 ) ) )
+ if( aRect == tools::Rectangle( Point( -1, -1 ), Size( 1, 1 ) ) )
{
// system menu button is somewhere but location cannot be determined
- return Rectangle();
+ return tools::Rectangle();
}
}
diff --git a/vcl/source/window/menubarwindow.hxx b/vcl/source/window/menubarwindow.hxx
index 86f0192785ec..e1e3d36cb8b9 100644
--- a/vcl/source/window/menubarwindow.hxx
+++ b/vcl/source/window/menubarwindow.hxx
@@ -92,7 +92,7 @@ private:
sal_uInt16 ImplFindEntry( const Point& rMousePos ) const;
void ImplCreatePopup( bool bPreSelectFirst );
bool HandleKeyEvent(const KeyEvent& rKEvent, bool bFromMenu = true);
- Rectangle ImplGetItemRect( sal_uInt16 nPos );
+ tools::Rectangle ImplGetItemRect( sal_uInt16 nPos );
void ImplInitStyleSettings();
@@ -118,7 +118,7 @@ public:
virtual void MouseButtonDown( const MouseEvent& rMEvt ) override;
virtual void MouseButtonUp( const MouseEvent& rMEvt ) override;
virtual void KeyInput( const KeyEvent& rKEvent ) override;
- virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) override;
+ virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override;
virtual void Resize() override;
virtual void RequestHelp( const HelpEvent& rHEvt ) override;
@@ -136,7 +136,7 @@ public:
/// Add an arbitrary button to the menubar that will appear next to the close button.
sal_uInt16 AddMenuBarButton(const Image&, const Link<MenuBar::MenuBarButtonCallbackArg&,bool>&, const OUString&);
void SetMenuBarButtonHighlightHdl(sal_uInt16 nId, const Link<MenuBar::MenuBarButtonCallbackArg&,bool>&);
- Rectangle GetMenuBarButtonRectPixel(sal_uInt16 nId);
+ tools::Rectangle GetMenuBarButtonRectPixel(sal_uInt16 nId);
void RemoveMenuBarButton(sal_uInt16 nId);
bool HandleMenuButtonEvent(sal_uInt16 i_nButtonId);
void SetMBWHideAccel(bool val) { mbHideAccel = val; }
diff --git a/vcl/source/window/menufloatingwindow.cxx b/vcl/source/window/menufloatingwindow.cxx
index 67d430cd9e3d..2c27e57ec775 100644
--- a/vcl/source/window/menufloatingwindow.cxx
+++ b/vcl/source/window/menufloatingwindow.cxx
@@ -98,7 +98,7 @@ void MenuFloatingWindow::doShutdown()
// so this can be taken into account if the commandhandler performs a scroll operation
if( GetParent() )
{
- Rectangle aInvRect( GetWindowExtentsRelative( GetParent() ) );
+ tools::Rectangle aInvRect( GetWindowExtentsRelative( GetParent() ) );
GetParent()->Invalidate( aInvRect );
}
pMenu = nullptr;
@@ -168,7 +168,7 @@ vcl::Region MenuFloatingWindow::ImplCalcClipRegion( bool bIncludeLogo ) const
{
Size aOutSz = GetOutputSizePixel();
Point aPos;
- Rectangle aRect( aPos, aOutSz );
+ tools::Rectangle aRect( aPos, aOutSz );
aRect.Top() += nScrollerHeight;
aRect.Bottom() -= nScrollerHeight;
@@ -177,7 +177,7 @@ vcl::Region MenuFloatingWindow::ImplCalcClipRegion( bool bIncludeLogo ) const
vcl::Region aRegion(aRect);
if ( pMenu && pMenu->pLogo && bIncludeLogo && nScrollerHeight )
- aRegion.Union( Rectangle( Point(), Size( pMenu->pLogo->aBitmap.GetSizePixel().Width(), aOutSz.Height() ) ) );
+ aRegion.Union( tools::Rectangle( Point(), Size( pMenu->pLogo->aBitmap.GetSizePixel().Width(), aOutSz.Height() ) ) );
return aRegion;
}
@@ -354,7 +354,7 @@ IMPL_LINK( MenuFloatingWindow, HighlightChanged, Timer*, pTimer, void )
Menu* pTest = pActivePopup;
FloatWinPopupFlags nOldFlags = GetPopupModeFlags();
SetPopupModeFlags( GetPopupModeFlags() | FloatWinPopupFlags::NoAppFocusClose );
- sal_uInt16 nRet = pActivePopup->ImplExecute( this, Rectangle( aItemTopLeft, aItemBottomRight ), FloatWinPopupFlags::Right, pMenu, pTimer == nullptr );
+ sal_uInt16 nRet = pActivePopup->ImplExecute( this, tools::Rectangle( aItemTopLeft, aItemBottomRight ), FloatWinPopupFlags::Right, pMenu, pTimer == nullptr );
SetPopupModeFlags( nOldFlags );
// nRet != 0, wenn es waerend Activate() abgeschossen wurde...
@@ -780,7 +780,7 @@ void MenuFloatingWindow::InvalidateItem(sal_uInt16 nPos)
if (n == nPos)
{
Size aWidth( GetSizePixel() );
- Rectangle aRect(Point(0, nY), Size(aWidth.Width(), nHeight));
+ tools::Rectangle aRect(Point(0, nY), Size(aWidth.Width(), nHeight));
Invalidate( aRect );
}
nY += nHeight;
@@ -816,7 +816,7 @@ void MenuFloatingWindow::RenderHighlightItem(vcl::RenderContext& rRenderContext,
Color oldLineColor;
bool bDrawItemRect = true;
- Rectangle aItemRect(Point(nX + nOuterSpaceX, nY), Size(aSz.Width() - 2 * nOuterSpaceX, pData->aSz.Height()));
+ tools::Rectangle aItemRect(Point(nX + nOuterSpaceX, nY), Size(aSz.Width() - 2 * nOuterSpaceX, pData->aSz.Height()));
if (pData->nBits & MenuItemBits::POPUPSELECT)
{
long nFontHeight = GetTextHeight();
@@ -827,8 +827,8 @@ void MenuFloatingWindow::RenderHighlightItem(vcl::RenderContext& rRenderContext,
{
Size aPxSize(GetOutputSizePixel());
rRenderContext.Push(PushFlags::CLIPREGION);
- rRenderContext.IntersectClipRegion(Rectangle(Point(nX, nY), Size(aSz.Width(), pData->aSz.Height())));
- Rectangle aCtrlRect(Point(nX, 0), Size(aPxSize.Width()-nX, aPxSize.Height()));
+ rRenderContext.IntersectClipRegion(tools::Rectangle(Point(nX, nY), Size(aSz.Width(), pData->aSz.Height())));
+ tools::Rectangle aCtrlRect(Point(nX, 0), Size(aPxSize.Width()-nX, aPxSize.Height()));
MenupopupValue aVal(pMenu->nTextPos-GUTTERBORDER, aItemRect);
rRenderContext.DrawNativeControl(ControlType::MenuPopup, ControlPart::Entire,
aCtrlRect, ControlState::ENABLED, aVal, OUString());
@@ -873,12 +873,12 @@ void MenuFloatingWindow::RenderHighlightItem(vcl::RenderContext& rRenderContext,
}
}
-Rectangle MenuFloatingWindow::ImplGetItemRect( sal_uInt16 nPos )
+tools::Rectangle MenuFloatingWindow::ImplGetItemRect( sal_uInt16 nPos )
{
if( ! pMenu )
- return Rectangle();
+ return tools::Rectangle();
- Rectangle aRect;
+ tools::Rectangle aRect;
Size aSz = GetOutputSizePixel();
long nStartY = ImplGetStartY();
long nY = nScrollerHeight+nStartY;
@@ -896,7 +896,7 @@ Rectangle MenuFloatingWindow::ImplGetItemRect( sal_uInt16 nPos )
SAL_WARN_IF( !pMenu->ImplIsVisible( n ), "vcl", "ImplGetItemRect: Item not visible!" );
if ( pData->eType != MenuItemType::SEPARATOR )
{
- aRect = Rectangle( Point( nX, nY ), Size( aSz.Width(), pData->aSz.Height() ) );
+ aRect = tools::Rectangle( Point( nX, nY ), Size( aSz.Width(), pData->aSz.Height() ) );
if ( pData->nBits & MenuItemBits::POPUPSELECT )
{
long nFontHeight = GetTextHeight();
@@ -1166,7 +1166,7 @@ void MenuFloatingWindow::KeyInput( const KeyEvent& rKEvent )
}
}
-void MenuFloatingWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle &rPaintRect)
+void MenuFloatingWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle &rPaintRect)
{
if (!pMenu)
return;
@@ -1182,7 +1182,7 @@ void MenuFloatingWindow::Paint(vcl::RenderContext& rRenderContext, const Rectang
aPxSize.Width() -= nX;
ImplControlValue aVal(pMenu->nTextPos - GUTTERBORDER);
rRenderContext.DrawNativeControl(ControlType::MenuPopup, ControlPart::Entire,
- Rectangle(Point(nX, 0), aPxSize),
+ tools::Rectangle(Point(nX, 0), aPxSize),
ControlState::ENABLED, aVal, OUString());
InitMenuClipRegion(rRenderContext);
}
@@ -1209,7 +1209,7 @@ void MenuFloatingWindow::ImplDrawScroller(vcl::RenderContext& rRenderContext, bo
Size aOutSz(GetOutputSizePixel());
long nY = bUp ? 0 : (aOutSz.Height() - nScrollerHeight);
long nX = pMenu->pLogo ? pMenu->pLogo->aBitmap.GetSizePixel().Width() : 0;
- Rectangle aRect(Point(nX, nY), Size(aOutSz.Width() - nX, nScrollerHeight));
+ tools::Rectangle aRect(Point(nX, nY), Size(aOutSz.Width() - nX, nScrollerHeight));
DecorationView aDecoView(&rRenderContext);
SymbolType eSymbol = bUp ? SymbolType::SPIN_UP : SymbolType::SPIN_DOWN;
@@ -1230,7 +1230,7 @@ void MenuFloatingWindow::RequestHelp( const HelpEvent& rHEvt )
vcl::Window* pW = this;
// #102618# Get item rect before destroying the window in EndExecute() call
- Rectangle aHighlightRect( ImplGetItemRect( nHighlightedItem ) );
+ tools::Rectangle aHighlightRect( ImplGetItemRect( nHighlightedItem ) );
if ( rHEvt.GetMode() & (HelpEventMode::CONTEXT | HelpEventMode::EXTENDED) )
{
diff --git a/vcl/source/window/menufloatingwindow.hxx b/vcl/source/window/menufloatingwindow.hxx
index 97d676e2f6bb..d53a92964fe3 100644
--- a/vcl/source/window/menufloatingwindow.hxx
+++ b/vcl/source/window/menufloatingwindow.hxx
@@ -79,7 +79,7 @@ protected:
void ImplCursorUpDown( bool bUp, bool bHomeEnd = false );
void ImplHighlightItem( const MouseEvent& rMEvt, bool bMBDown );
long ImplGetStartY() const;
- Rectangle ImplGetItemRect( sal_uInt16 nPos );
+ tools::Rectangle ImplGetItemRect( sal_uInt16 nPos );
void RenderHighlightItem( vcl::RenderContext& rRenderContext, sal_uInt16 nPos );
long GetInitialItemY( long *pOptStartY = nullptr ) const;
void InvalidateItem( sal_uInt16 nPos );
@@ -96,7 +96,7 @@ public:
virtual void MouseButtonUp(const MouseEvent& rMEvt) override;
virtual void KeyInput(const KeyEvent& rKEvent) override;
virtual void Command(const CommandEvent& rCEvt) 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 Resize() override;
diff --git a/vcl/source/window/menuwindow.cxx b/vcl/source/window/menuwindow.cxx
index 83ca0b610975..baa81fbbdb99 100644
--- a/vcl/source/window/menuwindow.cxx
+++ b/vcl/source/window/menuwindow.cxx
@@ -38,7 +38,7 @@ static sal_uLong ImplChangeTipTimeout( sal_uLong nTimeout, vcl::Window *pWindow
}
bool MenuWindow::ImplHandleHelpEvent(vcl::Window* pMenuWindow, Menu* pMenu, sal_uInt16 nHighlightedItem,
- const HelpEvent& rHEvt, const Rectangle &rHighlightRect)
+ const HelpEvent& rHEvt, const tools::Rectangle &rHighlightRect)
{
if( ! pMenu )
return false;
@@ -61,7 +61,7 @@ bool MenuWindow::ImplHandleHelpEvent(vcl::Window* pMenuWindow, Menu* pMenu, sal_
else
aPos = rHEvt.GetMousePosPixel();
- Rectangle aRect( aPos, Size() );
+ tools::Rectangle aRect( aPos, Size() );
if (!pMenu->GetHelpText(nId).isEmpty())
Help::ShowBalloon( pMenuWindow, aPos, aRect, pMenu->GetHelpText( nId ) );
else
@@ -77,7 +77,7 @@ bool MenuWindow::ImplHandleHelpEvent(vcl::Window* pMenuWindow, Menu* pMenu, sal_
else if ( ( rHEvt.GetMode() &HelpEventMode::QUICK ) && pMenuWindow )
{
Point aPos = rHEvt.GetMousePosPixel();
- Rectangle aRect( aPos, Size() );
+ tools::Rectangle aRect( aPos, Size() );
// give user a chance to read the full filename
sal_uLong oldTimeout=ImplChangeTipTimeout( 60000, pMenuWindow );
// call always, even when strlen==0 to correctly remove tip
diff --git a/vcl/source/window/menuwindow.hxx b/vcl/source/window/menuwindow.hxx
index a61b41ec0ea6..8fa78e138007 100644
--- a/vcl/source/window/menuwindow.hxx
+++ b/vcl/source/window/menuwindow.hxx
@@ -29,7 +29,7 @@ class HelpEvent;
class Image;
class Menu;
class MenuBar;
-class Rectangle;
+namespace tools { class Rectangle; }
namespace vcl { class Window; }
/** Common ancestor for MenuFloatingWindow and MenuBarWindow.
@@ -53,7 +53,7 @@ class MenuWindow
protected:
/// Show the appropriate help tooltip.
static bool ImplHandleHelpEvent(vcl::Window* pMenuWindow, Menu* pMenu, sal_uInt16 nHighlightedItem,
- const HelpEvent& rHEvt, const Rectangle &rHighlightRect);
+ const HelpEvent& rHEvt, const tools::Rectangle &rHighlightRect);
};
#endif // INCLUDED_VCL_SOURCE_WINDOW_MENUWINDOW_HXX
diff --git a/vcl/source/window/mouse.cxx b/vcl/source/window/mouse.cxx
index 7efe8741bb7c..090b2e3e73fd 100644
--- a/vcl/source/window/mouse.cxx
+++ b/vcl/source/window/mouse.cxx
@@ -59,7 +59,7 @@ WindowHitTest Window::ImplHitTest( const Point& rFramePos )
const OutputDevice *pOutDev = GetOutDev();
pOutDev->ReMirror( aFramePos );
}
- Rectangle aRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) );
+ tools::Rectangle aRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) );
if ( !aRect.IsInside( aFramePos ) )
return WindowHitTest::NONE;
if ( mpWindowImpl->mbWinRegion )
@@ -84,7 +84,7 @@ bool Window::ImplTestMousePointerSet()
return true;
// if the mouse is over the window, switch it
- Rectangle aClientRect( Point( 0, 0 ), GetOutputSizePixel() );
+ tools::Rectangle aClientRect( Point( 0, 0 ), GetOutputSizePixel() );
if ( aClientRect.IsInside( GetPointerPosPixel() ) )
return true;
@@ -177,7 +177,7 @@ IMPL_LINK_NOARG(Window, ImplGenerateMouseMoveHdl, void*, void)
}
}
-void Window::ImplInvertFocus( const Rectangle& rRect )
+void Window::ImplInvertFocus( const tools::Rectangle& rRect )
{
InvertTracking( rRect, ShowTrackFlags::Small | ShowTrackFlags::TrackWindow );
}
diff --git a/vcl/source/window/msgbox.cxx b/vcl/source/window/msgbox.cxx
index 81862e62aa4f..1686a9378fda 100644
--- a/vcl/source/window/msgbox.cxx
+++ b/vcl/source/window/msgbox.cxx
@@ -175,8 +175,8 @@ void MessBox::ImplPosControls()
}
TextRectInfo aTextInfo;
- Rectangle aRect( 0, 0, 30000, 30000 );
- Rectangle aFormatRect;
+ tools::Rectangle aRect( 0, 0, 30000, 30000 );
+ tools::Rectangle aFormatRect;
Point aTextPos( IMPL_DIALOG_OFFSET, IMPL_DIALOG_OFFSET+IMPL_MSGBOX_OFFSET_EXTRA_Y );
Size aImageSize;
Size aPageSize;
diff --git a/vcl/source/window/openglwin.cxx b/vcl/source/window/openglwin.cxx
index 7d20fd777ad4..1deb2e47618f 100644
--- a/vcl/source/window/openglwin.cxx
+++ b/vcl/source/window/openglwin.cxx
@@ -88,7 +88,7 @@ OpenGLContext& OpenGLWindow::getContext()
return mxImpl->getContext();
}
-void OpenGLWindow::Paint(vcl::RenderContext& /*rRenderContext*/, const Rectangle&)
+void OpenGLWindow::Paint(vcl::RenderContext& /*rRenderContext*/, const tools::Rectangle&)
{
if(mpRenderer)
mpRenderer->update();
diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx
index 955153bc9ef7..d321ed97b916 100644
--- a/vcl/source/window/paint.cxx
+++ b/vcl/source/window/paint.cxx
@@ -122,7 +122,7 @@ PaintBufferGuard::~PaintBufferGuard()
}
else
{
- Rectangle aRectanglePixel = m_pWindow->LogicToPixel(m_aPaintRect);
+ tools::Rectangle aRectanglePixel = m_pWindow->LogicToPixel(m_aPaintRect);
aPaintRectSize = m_pWindow->PixelToLogic(aRectanglePixel.GetSize());
}
@@ -142,7 +142,7 @@ PaintBufferGuard::~PaintBufferGuard()
mpFrameData->mpBuffer->SetBackground();
}
-void PaintBufferGuard::SetPaintRect(const Rectangle& rRectangle)
+void PaintBufferGuard::SetPaintRect(const tools::Rectangle& rRectangle)
{
m_aPaintRect = rRectangle;
}
@@ -160,8 +160,8 @@ class PaintHelper
private:
VclPtr<vcl::Window> m_pWindow;
vcl::Region* m_pChildRegion;
- Rectangle m_aSelectionRect;
- Rectangle m_aPaintRect;
+ tools::Rectangle m_aSelectionRect;
+ tools::Rectangle m_aPaintRect;
vcl::Region m_aPaintRegion;
ImplPaintFlags m_nPaintFlags;
bool m_bPop : 1;
@@ -173,11 +173,11 @@ public:
{
m_bPop = true;
}
- void SetPaintRect(const Rectangle& rRect)
+ void SetPaintRect(const tools::Rectangle& rRect)
{
m_aPaintRect = rRect;
}
- void SetSelectionRect(const Rectangle& rRect)
+ void SetSelectionRect(const tools::Rectangle& rRect)
{
m_aSelectionRect = rRect;
}
@@ -224,7 +224,7 @@ void PaintHelper::StartBufferedPaint()
assert(!pFrameData->mbInBufferedPaint);
pFrameData->mbInBufferedPaint = true;
- pFrameData->maBufferedRect = Rectangle();
+ pFrameData->maBufferedRect = tools::Rectangle();
m_bStartedBufferedPaint = true;
}
@@ -310,7 +310,7 @@ namespace vcl
{
void RenderTools::DrawSelectionBackground(vcl::RenderContext& rRenderContext, vcl::Window& rWindow,
- const Rectangle& rRect, sal_uInt16 nHighlight,
+ const tools::Rectangle& rRect, sal_uInt16 nHighlight,
bool bChecked, bool bDrawBorder, bool bDrawExtBorderOnly,
Color* pSelectionTextColor, long nCornerRadius, Color* pPaintColor)
{
@@ -350,7 +350,7 @@ void RenderTools::DrawSelectionBackground(vcl::RenderContext& rRenderContext, vc
aSelectionBorderColor.DecreaseLuminance(128);
}
- Rectangle aRect(rRect);
+ tools::Rectangle aRect(rRect);
if (bDrawExtBorderOnly)
{
aRect.Left() -= 1;
@@ -474,7 +474,7 @@ void Window::PushPaintHelper(PaintHelper *pHelper, vcl::RenderContext& rRenderCo
// restore Paint-Region
vcl::Region &rPaintRegion = pHelper->GetPaintRegion();
rPaintRegion = mpWindowImpl->maInvalidateRegion;
- Rectangle aPaintRect = rPaintRegion.GetBoundRect();
+ tools::Rectangle aPaintRect = rPaintRegion.GetBoundRect();
// - RTL - re-mirror paint rect and region at this window
if (ImplIsAntiparallel())
@@ -554,7 +554,7 @@ PaintHelper::~PaintHelper()
{
PaintBuffer();
pFrameData->mbInBufferedPaint = false;
- pFrameData->maBufferedRect = Rectangle();
+ pFrameData->maBufferedRect = tools::Rectangle();
}
// #98943# draw toolbox selection
@@ -797,7 +797,7 @@ void Window::ImplInvalidate( const vcl::Region* pRegion, InvalidateFlags nFlags
ImplInvalidateFrameRegion( nullptr, nFlags );
else
{
- Rectangle aRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) );
+ tools::Rectangle aRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) );
vcl::Region aRegion( aRect );
if ( pRegion )
{
@@ -836,7 +836,7 @@ void Window::ImplInvalidate( const vcl::Region* pRegion, InvalidateFlags nFlags
pOpaqueWindow->Update(); // start painting at the opaque parent
}
-void Window::ImplMoveInvalidateRegion( const Rectangle& rRect,
+void Window::ImplMoveInvalidateRegion( const tools::Rectangle& rRect,
long nHorzScroll, long nVertScroll,
bool bChildren )
{
@@ -859,7 +859,7 @@ void Window::ImplMoveInvalidateRegion( const Rectangle& rRect,
}
}
-void Window::ImplMoveAllInvalidateRegions( const Rectangle& rRect,
+void Window::ImplMoveAllInvalidateRegions( const tools::Rectangle& rRect,
long nHorzScroll, long nVertScroll,
bool bChildren )
{
@@ -908,7 +908,7 @@ void Window::ImplValidateFrameRegion( const vcl::Region* pRegion, ValidateFlags
vcl::Region aChildRegion = mpWindowImpl->maInvalidateRegion;
if ( mpWindowImpl->mnPaintFlags & ImplPaintFlags::PaintAll )
{
- Rectangle aRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) );
+ tools::Rectangle aRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) );
aChildRegion = aRect;
}
vcl::Window* pChild = mpWindowImpl->mpFirstChild;
@@ -920,7 +920,7 @@ void Window::ImplValidateFrameRegion( const vcl::Region* pRegion, ValidateFlags
}
if ( mpWindowImpl->mnPaintFlags & ImplPaintFlags::PaintAll )
{
- Rectangle aRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) );
+ tools::Rectangle aRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) );
mpWindowImpl->maInvalidateRegion = aRect;
}
mpWindowImpl->maInvalidateRegion.Exclude( *pRegion );
@@ -953,7 +953,7 @@ void Window::ImplValidate()
ImplValidateFrameRegion( nullptr, nFlags );
else
{
- Rectangle aRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) );
+ tools::Rectangle aRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) );
vcl::Region aRegion( aRect );
ImplClipBoundaries( aRegion, true, true );
if ( nFlags & ValidateFlags::NoChildren )
@@ -976,7 +976,7 @@ void Window::ImplUpdateAll()
if ( mpWindowImpl->mpFrameWindow->mpWindowImpl->mbPaintFrame )
{
Point aPoint( 0, 0 );
- vcl::Region aRegion( Rectangle( aPoint, Size( mnOutWidth, mnOutHeight ) ) );
+ vcl::Region aRegion( tools::Rectangle( aPoint, Size( mnOutWidth, mnOutHeight ) ) );
ImplInvalidateOverlapFrameRegion( aRegion );
if ( mpWindowImpl->mbFrame || (mpWindowImpl->mpBorderWindow && mpWindowImpl->mpBorderWindow->mpWindowImpl->mbFrame) )
bFlush = true;
@@ -999,9 +999,9 @@ void Window::PostPaint(vcl::RenderContext& /*rRenderContext*/)
{
}
-void Window::Paint(vcl::RenderContext& /*rRenderContext*/, const Rectangle& rRect)
+void Window::Paint(vcl::RenderContext& /*rRenderContext*/, const tools::Rectangle& rRect)
{
- CallEventListeners(VclEventId::WindowPaint, const_cast<Rectangle *>(&rRect));
+ CallEventListeners(VclEventId::WindowPaint, const_cast<tools::Rectangle *>(&rRect));
}
void Window::SetPaintTransparent( bool bTransparent )
@@ -1037,7 +1037,7 @@ void Window::SetWindowRegionPixel()
if ( IsReallyVisible() )
{
- Rectangle aRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) );
+ tools::Rectangle aRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) );
vcl::Region aRegion( aRect );
ImplInvalidateParentFrameRegion( aRegion );
}
@@ -1119,7 +1119,7 @@ void Window::SetWindowRegionPixel( const vcl::Region& rRegion )
if ( IsReallyVisible() )
{
- Rectangle aRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) );
+ tools::Rectangle aRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) );
vcl::Region aRegion( aRect );
ImplInvalidateParentFrameRegion( aRegion );
}
@@ -1169,18 +1169,18 @@ void Window::Invalidate( InvalidateFlags nFlags )
LogicInvalidate(nullptr);
}
-void Window::Invalidate( const Rectangle& rRect, InvalidateFlags nFlags )
+void Window::Invalidate( const tools::Rectangle& rRect, InvalidateFlags nFlags )
{
if ( !comphelper::LibreOfficeKit::isActive() && (!IsDeviceOutputNecessary() || !mnOutWidth || !mnOutHeight) )
return;
OutputDevice *pOutDev = GetOutDev();
- Rectangle aRect = pOutDev->ImplLogicToDevicePixel( rRect );
+ tools::Rectangle aRect = pOutDev->ImplLogicToDevicePixel( rRect );
if ( !aRect.IsEmpty() )
{
vcl::Region aRegion( aRect );
ImplInvalidate( &aRegion, nFlags );
- Rectangle aLogicRectangle(rRect);
+ tools::Rectangle aLogicRectangle(rRect);
LogicInvalidate(&aLogicRectangle);
}
}
@@ -1201,7 +1201,7 @@ void Window::Invalidate( const vcl::Region& rRegion, InvalidateFlags nFlags )
if ( !aRegion.IsEmpty() )
{
ImplInvalidate( &aRegion, nFlags );
- Rectangle aLogicRectangle = rRegion.GetBoundRect();
+ tools::Rectangle aLogicRectangle = rRegion.GetBoundRect();
LogicInvalidate(&aLogicRectangle);
}
}
@@ -1257,7 +1257,7 @@ void Window::Update()
if ( mpWindowImpl->mpFrameWindow->mpWindowImpl->mbPaintFrame )
{
Point aPoint( 0, 0 );
- vcl::Region aRegion( Rectangle( aPoint, Size( mnOutWidth, mnOutHeight ) ) );
+ vcl::Region aRegion( tools::Rectangle( aPoint, Size( mnOutWidth, mnOutHeight ) ) );
ImplInvalidateOverlapFrameRegion( aRegion );
if ( mpWindowImpl->mbFrame || (mpWindowImpl->mpBorderWindow && mpWindowImpl->mpBorderWindow->mpWindowImpl->mbFrame) )
bFlush = true;
@@ -1380,7 +1380,7 @@ void Window::ImplPaintToDevice( OutputDevice* i_pTargetOutDev, const Point& i_rP
SetRefPoint();
SetLayoutMode( GetLayoutMode() );
SetDigitLanguage( GetDigitLanguage() );
- Rectangle aPaintRect( Point( 0, 0 ), GetOutputSizePixel() );
+ tools::Rectangle aPaintRect( Point( 0, 0 ), GetOutputSizePixel() );
aClipRegion.Intersect( aPaintRect );
SetClipRegion( aClipRegion );
@@ -1480,7 +1480,7 @@ void Window::Erase(vcl::RenderContext& rRenderContext)
ControlPart aCtrlPart = ImplGetWindowImpl()->mnNativeBackground;
if (aCtrlPart != ControlPart::NONE && ! IsControlBackground())
{
- Rectangle aCtrlRegion(Point(), GetOutputSizePixel());
+ tools::Rectangle aCtrlRegion(Point(), GetOutputSizePixel());
ControlState nState = ControlState::NONE;
if (IsEnabled())
@@ -1504,7 +1504,7 @@ void Window::Erase(vcl::RenderContext& rRenderContext)
mpAlphaVDev->Erase();
}
-void Window::ImplScroll( const Rectangle& rRect,
+void Window::ImplScroll( const tools::Rectangle& rRect,
long nHorzScroll, long nVertScroll, ScrollFlags nFlags )
{
if ( !IsDeviceOutputNecessary() )
@@ -1539,7 +1539,7 @@ void Window::ImplScroll( const Rectangle& rRect,
// --- RTL --- check if this window requires special action
bool bReMirror = ( ImplIsAntiparallel() );
- Rectangle aRectMirror( rRect );
+ tools::Rectangle aRectMirror( rRect );
if( bReMirror )
{
// --- RTL --- make sure the invalidate region of this window is
@@ -1561,7 +1561,7 @@ void Window::ImplScroll( const Rectangle& rRect,
aInvalidateRegion.Move(bReMirror ? -nHorzScroll : nHorzScroll, nVertScroll);
}
- Rectangle aDestRect(aRectMirror);
+ tools::Rectangle aDestRect(aRectMirror);
aDestRect.Move(bReMirror ? -nHorzScroll : nHorzScroll, nVertScroll);
vcl::Region aWinInvalidateRegion(aRectMirror);
if (!SupportsDoubleBuffering())
@@ -1575,7 +1575,7 @@ void Window::ImplScroll( const Rectangle& rRect,
aInvalidateRegion.Union(aWinInvalidateRegion);
Point aPoint( mnOutOffX, mnOutOffY );
- vcl::Region aRegion( Rectangle( aPoint, Size( mnOutWidth, mnOutHeight ) ) );
+ vcl::Region aRegion( tools::Rectangle( aPoint, Size( mnOutWidth, mnOutHeight ) ) );
if ( nFlags & ScrollFlags::Clip )
aRegion.Intersect( rRect );
if ( mpWindowImpl->mbWinRegion )
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index 0600e9f3d375..ad623fb09830 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -165,7 +165,7 @@ void PrintDialog::PrintPreviewWindow::Resize()
}
-void PrintDialog::PrintPreviewWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle&)
+void PrintDialog::PrintPreviewWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&)
{
long nTextHeight = maHorzDim->GetTextHeight();
Size aSize(GetSizePixel());
@@ -178,7 +178,7 @@ void PrintDialog::PrintPreviewWindow::Paint(vcl::RenderContext& rRenderContext,
rRenderContext.Push();
Font aFont(rRenderContext.GetSettings().GetStyleSettings().GetLabelFont());
SetZoomedPointFont(rRenderContext, aFont);
- Rectangle aTextRect(aOffset + Point(2, 2), Size(maPreviewSize.Width() - 4, maPreviewSize.Height() - 4));
+ tools::Rectangle aTextRect(aOffset + Point(2, 2), Size(maPreviewSize.Width() - 4, maPreviewSize.Height() - 4));
rRenderContext.DrawText(aTextRect, maReplacementString,
DrawTextFlags::Center | DrawTextFlags::VCenter |
DrawTextFlags::WordBreak | DrawTextFlags::MultiLine);
@@ -191,7 +191,7 @@ void PrintDialog::PrintPreviewWindow::Paint(vcl::RenderContext& rRenderContext,
rRenderContext.DrawBitmap(aOffset, aPreviewBitmap);
}
- Rectangle aFrameRect(aOffset + Point(-1, -1), Size(maPreviewSize.Width() + 2, maPreviewSize.Height() + 2));
+ tools::Rectangle aFrameRect(aOffset + Point(-1, -1), Size(maPreviewSize.Width() + 2, maPreviewSize.Height() + 2));
DecorationView aDecorationView(&rRenderContext);
aDecorationView.DrawFrame(aFrameRect, DrawFrameStyle::Group);
}
@@ -319,7 +319,7 @@ Size PrintDialog::ShowNupOrderWindow::GetOptimalSize() const
return Size(70, 70);
}
-void PrintDialog::ShowNupOrderWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle& i_rRect)
+void PrintDialog::ShowNupOrderWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& i_rRect)
{
Window::Paint(rRenderContext, i_rRect);
@@ -373,7 +373,7 @@ void PrintDialog::ShowNupOrderWindow::Paint(vcl::RenderContext& rRenderContext,
nY * aSubSize.Height() + nDeltaY), aPageText);
}
DecorationView aDecorationView(&rRenderContext);
- aDecorationView.DrawFrame(Rectangle(Point(0, 0), aOutSize), DrawFrameStyle::Group);
+ aDecorationView.DrawFrame(tools::Rectangle(Point(0, 0), aOutSize), DrawFrameStyle::Group);
}
PrintDialog::NUpTabPage::NUpTabPage( VclBuilder *pUIBuilder )
diff --git a/vcl/source/window/scrwnd.cxx b/vcl/source/window/scrwnd.cxx
index 7f377fcd7ae0..a904064348f0 100644
--- a/vcl/source/window/scrwnd.cxx
+++ b/vcl/source/window/scrwnd.cxx
@@ -109,7 +109,7 @@ void ImplWheelWindow::ImplSetRegion( const Bitmap& rRegionBmp )
Point aPos( GetPointerPosPixel() );
const Size aSize( rRegionBmp.GetSizePixel() );
Point aPoint;
- const Rectangle aRect( aPoint, aSize );
+ const tools::Rectangle aRect( aPoint, aSize );
maCenter = maLastMousePos = aPos;
aPos.X() -= aSize.Width() >> 1;
@@ -307,7 +307,7 @@ PointerStyle ImplWheelWindow::ImplGetMousePointer( long nDistX, long nDistY )
return eStyle;
}
-void ImplWheelWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle&)
+void ImplWheelWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&)
{
ImplDrawWheel(rRenderContext);
}
diff --git a/vcl/source/window/split.cxx b/vcl/source/window/split.cxx
index 8d607d6f9858..d597a0e15594 100644
--- a/vcl/source/window/split.cxx
+++ b/vcl/source/window/split.cxx
@@ -110,7 +110,7 @@ void Splitter::ImplSplitMousePos( Point& rPos )
void Splitter::ImplDrawSplitter()
{
- Rectangle aInvRect( maDragRect );
+ tools::Rectangle aInvRect( maDragRect );
if ( mbHorzSplit )
{
@@ -443,7 +443,7 @@ void Splitter::EndSplit()
maEndSplitHdl.Call( this );
}
-void Splitter::SetDragRectPixel( const Rectangle& rDragRect, vcl::Window* _pRefWin )
+void Splitter::SetDragRectPixel( const tools::Rectangle& rDragRect, vcl::Window* _pRefWin )
{
maDragRect = rDragRect;
if ( !_pRefWin )
@@ -669,7 +669,7 @@ void Splitter::DataChanged( const DataChangedEvent& rDCEvt )
}
}
-void Splitter::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rPaintRect)
+void Splitter::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rPaintRect)
{
rRenderContext.DrawRect(rPaintRect);
diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx
index eb796b695e07..883fa98c3c61 100644
--- a/vcl/source/window/splitwin.cxx
+++ b/vcl/source/window/splitwin.cxx
@@ -412,7 +412,7 @@ static sal_uInt16 ImplFindItem( ImplSplitSet* pSet, const Point& rPos,
{
Point aPoint( rItems[i]->mnLeft, rItems[i]->mnTop );
Size aSize( rItems[i]->mnWidth, rItems[i]->mnHeight );
- Rectangle aRect( aPoint, aSize );
+ tools::Rectangle aRect( aPoint, aSize );
if ( bRows )
{
if ( bDown )
@@ -823,7 +823,7 @@ void SplitWindow::ImplCalcSet2( SplitWindow* pWindow, ImplSplitSet* pSet, bool b
(rItems[i]->mnOldWidth != rItems[i]->mnWidth) ||
(rItems[i]->mnOldHeight != rItems[i]->mnHeight) )
{
- Rectangle aRect;
+ tools::Rectangle aRect;
// invalidate old rectangle
if ( bRows )
@@ -941,7 +941,7 @@ static void ImplCalcLogSize( std::vector< ImplSplitItem* > rItems, size_t nItems
}
}
-void SplitWindow::ImplDrawBack(vcl::RenderContext& rRenderContext, const Rectangle& rRect,
+void SplitWindow::ImplDrawBack(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect,
const Wallpaper* pWall, const Bitmap* pBitmap)
{
if (pBitmap)
@@ -980,7 +980,7 @@ void SplitWindow::ImplDrawBack(vcl::RenderContext& rRenderContext, ImplSplitSet*
{
if (pSet->mpBitmap)
{
- Rectangle aRect(mnLeftBorder, mnTopBorder,
+ tools::Rectangle aRect(mnLeftBorder, mnTopBorder,
mnDX - mnRightBorder - 1,
mnDY - mnBottomBorder - 1);
@@ -997,7 +997,7 @@ void SplitWindow::ImplDrawBack(vcl::RenderContext& rRenderContext, ImplSplitSet*
{
Point aPoint(rItems[i]->mnLeft, rItems[i]->mnTop);
Size aSize(rItems[i]->mnWidth, rItems[i]->mnHeight);
- Rectangle aRect(aPoint, aSize);
+ tools::Rectangle aRect(aPoint, aSize);
ImplDrawBack(rRenderContext, aRect, pSet->mpWallpaper, pSet->mpBitmap);
}
}
@@ -1246,7 +1246,7 @@ sal_uInt16 SplitWindow::ImplTestSplit( SplitWindow* pWindow, const Point& rPos,
void SplitWindow::ImplDrawSplitTracking(const Point& rPos)
{
- Rectangle aRect;
+ tools::Rectangle aRect;
if (mnSplitTest & SPLIT_HORZ)
{
@@ -1607,7 +1607,7 @@ void SplitWindow::ImplSplitMousePos( Point& rMousePos )
}
}
-void SplitWindow::ImplGetButtonRect( Rectangle& rRect, long nEx, bool bTest ) const
+void SplitWindow::ImplGetButtonRect( tools::Rectangle& rRect, long nEx, bool bTest ) const
{
long nSplitSize = mpMainSet->mnSplitSize-1;
if (mbFadeOut || mbFadeIn)
@@ -1675,9 +1675,9 @@ void SplitWindow::ImplGetButtonRect( Rectangle& rRect, long nEx, bool bTest ) co
}
}
-void SplitWindow::ImplGetFadeInRect( Rectangle& rRect, bool bTest ) const
+void SplitWindow::ImplGetFadeInRect( tools::Rectangle& rRect, bool bTest ) const
{
- Rectangle aRect;
+ tools::Rectangle aRect;
if ( mbFadeIn )
ImplGetButtonRect( aRect, 0, bTest );
@@ -1685,9 +1685,9 @@ void SplitWindow::ImplGetFadeInRect( Rectangle& rRect, bool bTest ) const
rRect = aRect;
}
-void SplitWindow::ImplGetFadeOutRect( Rectangle& rRect, bool ) const
+void SplitWindow::ImplGetFadeOutRect( tools::Rectangle& rRect, bool ) const
{
- Rectangle aRect;
+ tools::Rectangle aRect;
if ( mbFadeOut )
ImplGetButtonRect( aRect, 0, false );
@@ -1695,7 +1695,7 @@ void SplitWindow::ImplGetFadeOutRect( Rectangle& rRect, bool ) const
rRect = aRect;
}
-void SplitWindow::ImplDrawGrip(vcl::RenderContext& rRenderContext, const Rectangle& rRect, bool bHorizontal, bool bLeft)
+void SplitWindow::ImplDrawGrip(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect, bool bHorizontal, bool bLeft)
{
const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings();
@@ -1780,7 +1780,7 @@ void SplitWindow::ImplDrawFadeIn(vcl::RenderContext& rRenderContext)
{
if (mbFadeIn)
{
- Rectangle aTempRect;
+ tools::Rectangle aTempRect;
ImplGetFadeInRect(aTempRect);
bool bLeft = true;
@@ -1805,7 +1805,7 @@ void SplitWindow::ImplDrawFadeOut(vcl::RenderContext& rRenderContext)
{
if (mbFadeOut)
{
- Rectangle aTempRect;
+ tools::Rectangle aTempRect;
ImplGetFadeOutRect(aTempRect);
bool bLeft = true;
@@ -2045,7 +2045,7 @@ void SplitWindow::MouseButtonDown( const MouseEvent& rMEvt )
}
Point aMousePosPixel = rMEvt.GetPosPixel();
- Rectangle aTestRect;
+ tools::Rectangle aTestRect;
mbFadeNoButtonMode = false;
@@ -2089,8 +2089,8 @@ void SplitWindow::MouseMove( const MouseEvent& rMEvt )
sal_uInt16 nTempSplitPos;
sal_uInt16 nSplitTest = ImplTestSplit( this, aPos, nTemp, &pTempSplitSet, nTempSplitPos );
PointerStyle eStyle = PointerStyle::Arrow;
- Rectangle aFadeInRect;
- Rectangle aFadeOutRect;
+ tools::Rectangle aFadeInRect;
+ tools::Rectangle aFadeOutRect;
ImplGetFadeInRect( aFadeInRect );
ImplGetFadeOutRect( aFadeOutRect );
@@ -2131,7 +2131,7 @@ void SplitWindow::Tracking( const TrackingEvent& rTEvt )
}
else
{
- Rectangle aTestRect;
+ tools::Rectangle aTestRect;
ImplGetFadeInRect( aTestRect, true );
bool bNewPressed = aTestRect.IsInside( aMousePosPixel );
if ( bNewPressed != mbFadeInPressed )
@@ -2157,7 +2157,7 @@ void SplitWindow::Tracking( const TrackingEvent& rTEvt )
}
else
{
- Rectangle aTestRect;
+ tools::Rectangle aTestRect;
ImplGetFadeOutRect( aTestRect, true );
bool bNewPressed = aTestRect.IsInside( aMousePosPixel );
if ( !bNewPressed )
@@ -2270,8 +2270,8 @@ bool SplitWindow::PreNotify( NotifyEvent& rNEvt )
if( !pMouseEvt->GetButtons() && !pMouseEvt->IsSynthetic() && !pMouseEvt->IsModifierChanged() )
{
// trigger redraw if mouse over state has changed
- Rectangle aFadeInRect;
- Rectangle aFadeOutRect;
+ tools::Rectangle aFadeInRect;
+ tools::Rectangle aFadeOutRect;
ImplGetFadeInRect( aFadeInRect );
ImplGetFadeOutRect( aFadeOutRect );
@@ -2290,7 +2290,7 @@ bool SplitWindow::PreNotify( NotifyEvent& rNEvt )
return Window::PreNotify( rNEvt );
}
-void SplitWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle&)
+void SplitWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&)
{
if (mnWinStyle & WB_BORDER)
ImplDrawBorder(rRenderContext);
@@ -2326,7 +2326,7 @@ void SplitWindow::RequestHelp( const HelpEvent& rHEvt )
if ( rHEvt.GetMode() & (HelpEventMode::BALLOON | HelpEventMode::QUICK) && !rHEvt.KeyboardActivated() )
{
Point aMousePosPixel = ScreenToOutputPixel( rHEvt.GetMousePosPixel() );
- Rectangle aHelpRect;
+ tools::Rectangle aHelpRect;
sal_uInt16 nHelpResId = 0;
ImplGetFadeInRect( aHelpRect, true );
diff --git a/vcl/source/window/stacking.cxx b/vcl/source/window/stacking.cxx
index ce70ebaf2428..1aa805e0fdee 100644
--- a/vcl/source/window/stacking.cxx
+++ b/vcl/source/window/stacking.cxx
@@ -219,7 +219,7 @@ void Window::ImplCalcToTop( ImplCalcToTopData* pPrevData )
{
// calculate region, where the window overlaps with other windows
Point aPoint( mnOutOffX, mnOutOffY );
- vcl::Region aRegion( Rectangle( aPoint,
+ vcl::Region aRegion( tools::Rectangle( aPoint,
Size( mnOutWidth, mnOutHeight ) ) );
vcl::Region aInvalidateRegion;
ImplCalcOverlapRegionOverlaps( aRegion, aInvalidateRegion );
@@ -559,7 +559,7 @@ void Window::SetZOrder( vcl::Window* pRefWindow, ZOrderFlags nFlags )
{
// Invalidate all windows which are next to each other
// Is INCOMPLETE !!!
- Rectangle aWinRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) );
+ tools::Rectangle aWinRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) );
vcl::Window* pWindow = nullptr;
if ( ImplIsOverlapWindow() )
{
@@ -573,7 +573,7 @@ void Window::SetZOrder( vcl::Window* pRefWindow, ZOrderFlags nFlags )
{
if ( pWindow == this )
break;
- Rectangle aCompRect( Point( pWindow->mnOutOffX, pWindow->mnOutOffY ),
+ tools::Rectangle aCompRect( Point( pWindow->mnOutOffX, pWindow->mnOutOffY ),
Size( pWindow->mnOutWidth, pWindow->mnOutHeight ) );
if ( aWinRect.IsOver( aCompRect ) )
pWindow->Invalidate( InvalidateFlags::Children | InvalidateFlags::NoTransparent );
@@ -586,7 +586,7 @@ void Window::SetZOrder( vcl::Window* pRefWindow, ZOrderFlags nFlags )
{
if ( pWindow != this )
{
- Rectangle aCompRect( Point( pWindow->mnOutOffX, pWindow->mnOutOffY ),
+ tools::Rectangle aCompRect( Point( pWindow->mnOutOffX, pWindow->mnOutOffY ),
Size( pWindow->mnOutWidth, pWindow->mnOutHeight ) );
if ( aWinRect.IsOver( aCompRect ) )
{
diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx
index 764665c0a1ae..9b27520a6fbc 100644
--- a/vcl/source/window/status.cxx
+++ b/vcl/source/window/status.cxx
@@ -292,9 +292,9 @@ void StatusBar::ImplFormat()
mbFormat = false;
}
-Rectangle StatusBar::ImplGetItemRectPos( sal_uInt16 nPos ) const
+tools::Rectangle StatusBar::ImplGetItemRectPos( sal_uInt16 nPos ) const
{
- Rectangle aRect;
+ tools::Rectangle aRect;
ImplStatusItem* pItem;
pItem = ( nPos < mpItemList.size() ) ? mpItemList[ nPos ] : nullptr;
if ( pItem )
@@ -329,7 +329,7 @@ sal_uInt16 StatusBar::ImplGetFirstVisiblePos() const
void StatusBar::ImplDrawText(vcl::RenderContext& rRenderContext)
{
// prevent item box from being overwritten
- Rectangle aTextRect;
+ tools::Rectangle aTextRect;
aTextRect.Left() = STATUSBAR_OFFSET_X + 1;
aTextRect.Top() = mnTextY;
if (mbVisibleItems && (GetStyle() & WB_RIGHT))
@@ -352,7 +352,7 @@ void StatusBar::ImplDrawText(vcl::RenderContext& rRenderContext)
void StatusBar::ImplDrawItem(vcl::RenderContext& rRenderContext, bool bOffScreen, sal_uInt16 nPos)
{
- Rectangle aRect = ImplGetItemRectPos(nPos);
+ tools::Rectangle aRect = ImplGetItemRectPos(nPos);
if (aRect.IsEmpty())
return;
@@ -360,7 +360,7 @@ void StatusBar::ImplDrawItem(vcl::RenderContext& rRenderContext, bool bOffScreen
// compute output region
ImplStatusItem* pItem = mpItemList[nPos];
long nW = mpImplData->mnItemBorderWidth + 1;
- Rectangle aTextRect(aRect.Left() + nW, aRect.Top() + nW,
+ tools::Rectangle aTextRect(aRect.Left() + nW, aRect.Top() + nW,
aRect.Right() - nW, aRect.Bottom() - nW);
Size aTextRectSize(aTextRect.GetSize());
@@ -396,7 +396,7 @@ void StatusBar::ImplDrawItem(vcl::RenderContext& rRenderContext, bool bOffScreen
{
mbInUserDraw = true;
mpImplData->mpVirDev->EnableRTL( IsRTLEnabled() );
- UserDrawEvent aODEvt(this, mpImplData->mpVirDev, Rectangle(Point(), aTextRectSize), pItem->mnId);
+ UserDrawEvent aODEvt(this, mpImplData->mpVirDev, tools::Rectangle(Point(), aTextRectSize), pItem->mnId);
UserDraw(aODEvt);
mpImplData->mpVirDev->EnableRTL(false);
mbInUserDraw = false;
@@ -450,7 +450,7 @@ void StatusBar::ImplDrawItem(vcl::RenderContext& rRenderContext, bool bOffScreen
void DrawProgress(vcl::Window* pWindow, vcl::RenderContext& rRenderContext, const Point& rPos,
long nOffset, long nPrgsWidth, long nPrgsHeight,
sal_uInt16 nPercent1, sal_uInt16 nPercent2, sal_uInt16 nPercentCount,
- const Rectangle& rFramePosSize)
+ const tools::Rectangle& rFramePosSize)
{
if (rRenderContext.IsNativeControlSupported(ControlType::Progress, ControlPart::Entire))
{
@@ -459,8 +459,8 @@ void DrawProgress(vcl::Window* pWindow, vcl::RenderContext& rRenderContext, cons
long nFullWidth = (nPrgsWidth + nOffset) * (10000 / nPercentCount);
long nPerc = (nPercent2 > 10000) ? 10000 : nPercent2;
ImplControlValue aValue(nFullWidth * long(nPerc) / 10000);
- Rectangle aDrawRect(rPos, Size(nFullWidth, nPrgsHeight));
- Rectangle aControlRegion(aDrawRect);
+ tools::Rectangle aDrawRect(rPos, Size(nFullWidth, nPrgsHeight));
+ tools::Rectangle aControlRegion(aDrawRect);
if(bNeedErase)
{
@@ -480,7 +480,7 @@ void DrawProgress(vcl::Window* pWindow, vcl::RenderContext& rRenderContext, cons
// restore transparent background
Point aTL(pWindow->OutputToAbsoluteScreenPixel(rFramePosSize.TopLeft()));
aTL = pEraseWindow->AbsoluteScreenToOutputPixel(aTL);
- Rectangle aRect(aTL, rFramePosSize.GetSize());
+ tools::Rectangle aRect(aTL, rFramePosSize.GetSize());
pEraseWindow->Invalidate(aRect, InvalidateFlags::NoChildren |
InvalidateFlags::NoClipChildren |
InvalidateFlags::Transparent);
@@ -509,7 +509,7 @@ void DrawProgress(vcl::Window* pWindow, vcl::RenderContext& rRenderContext, cons
// compute rectangle
long nDX = nPrgsWidth + nOffset;
long nLeft = rPos.X() + ((nPerc1 - 1) * nDX);
- Rectangle aRect(nLeft, rPos.Y(), nLeft + nPrgsWidth, rPos.Y() + nPrgsHeight);
+ tools::Rectangle aRect(nLeft, rPos.Y(), nLeft + nPrgsWidth, rPos.Y() + nPrgsHeight);
do
{
@@ -534,7 +534,7 @@ void DrawProgress(vcl::Window* pWindow, vcl::RenderContext& rRenderContext, cons
// compute rectangle
long nDX = nPrgsWidth + nOffset;
long nLeft = rPos.X() + (nPerc1 * nDX);
- Rectangle aRect(nLeft, rPos.Y(), nLeft + nPrgsWidth, rPos.Y() + nPrgsHeight);
+ tools::Rectangle aRect(nLeft, rPos.Y(), nLeft + nPrgsWidth, rPos.Y() + nPrgsHeight);
do
{
@@ -614,8 +614,8 @@ void StatusBar::ImplCalcProgressRect()
if( IsNativeControlSupported( ControlType::Progress, ControlPart::Entire ) )
{
ImplControlValue aValue;
- Rectangle aControlRegion( Rectangle( (const Point&)Point(), maPrgsFrameRect.GetSize() ) );
- Rectangle aNativeControlRegion, aNativeContentRegion;
+ tools::Rectangle aControlRegion( tools::Rectangle( (const Point&)Point(), maPrgsFrameRect.GetSize() ) );
+ tools::Rectangle aNativeControlRegion, aNativeContentRegion;
if( (bNativeOK = GetNativeControlRegion( ControlType::Progress, ControlPart::Entire, aControlRegion,
ControlState::ENABLED, aValue, OUString(),
aNativeControlRegion, aNativeContentRegion ) ) )
@@ -671,7 +671,7 @@ void StatusBar::MouseButtonDown( const MouseEvent& rMEvt )
}
}
-void StatusBar::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect)
+void StatusBar::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect)
{
if (mbFormat)
ImplFormat();
@@ -757,7 +757,7 @@ void StatusBar::RequestHelp( const HelpEvent& rHEvt )
if ( nItemId )
{
- Rectangle aItemRect = GetItemRect( nItemId );
+ tools::Rectangle aItemRect = GetItemRect( nItemId );
Point aPt = OutputToScreenPixel( aItemRect.TopLeft() );
aItemRect.Left() = aPt.X();
aItemRect.Top() = aPt.Y();
@@ -1040,7 +1040,7 @@ sal_uInt16 StatusBar::GetItemId( const Point& rPos ) const
for ( nPos = 0; nPos < nItemCount; nPos++ )
{
// get rectangle
- Rectangle aRect = ImplGetItemRectPos( nPos );
+ tools::Rectangle aRect = ImplGetItemRectPos( nPos );
if ( aRect.IsInside( rPos ) )
return mpItemList[ nPos ]->mnId;
}
@@ -1049,9 +1049,9 @@ sal_uInt16 StatusBar::GetItemId( const Point& rPos ) const
return 0;
}
-Rectangle StatusBar::GetItemRect( sal_uInt16 nItemId ) const
+tools::Rectangle StatusBar::GetItemRect( sal_uInt16 nItemId ) const
{
- Rectangle aRect;
+ tools::Rectangle aRect;
if ( AreItemsVisible() && !mbFormat )
{
@@ -1081,9 +1081,9 @@ Point StatusBar::GetItemTextPos( sal_uInt16 nItemId ) const
{
// get rectangle
ImplStatusItem* pItem = mpItemList[ nPos ];
- Rectangle aRect = ImplGetItemRectPos( nPos );
+ tools::Rectangle aRect = ImplGetItemRectPos( nPos );
long nW = mpImplData->mnItemBorderWidth + 1;
- Rectangle aTextRect( aRect.Left()+nW, aRect.Top()+nW,
+ tools::Rectangle aTextRect( aRect.Left()+nW, aRect.Top()+nW,
aRect.Right()-nW, aRect.Bottom()-nW );
Point aPos = ImplGetItemTextPos( aTextRect.GetSize(),
Size( GetTextWidth( pItem->maText ), GetTextHeight() ),
@@ -1156,7 +1156,7 @@ void StatusBar::SetItemText( sal_uInt16 nItemId, const OUString& rText )
// re-draw item if StatusBar is visible and UpdateMode active
if ( pItem->mbVisible && !mbFormat && ImplIsItemUpdate() )
{
- Rectangle aRect = ImplGetItemRectPos(nPos);
+ tools::Rectangle aRect = ImplGetItemRectPos(nPos);
Invalidate(aRect);
Update();
}
@@ -1209,7 +1209,7 @@ void StatusBar::SetItemData( sal_uInt16 nItemId, void* pNewData )
if ( (pItem->mnBits & StatusBarItemBits::UserDraw) && pItem->mbVisible &&
!mbFormat && ImplIsItemUpdate() )
{
- Rectangle aRect = ImplGetItemRectPos(nPos);
+ tools::Rectangle aRect = ImplGetItemRectPos(nPos);
Invalidate(aRect, InvalidateFlags::NoErase);
Update();
}
@@ -1239,7 +1239,7 @@ void StatusBar::RedrawItem(sal_uInt16 nItemId)
if (pItem && (pItem->mnBits & StatusBarItemBits::UserDraw) &&
pItem->mbVisible && ImplIsItemUpdate())
{
- Rectangle aRect = ImplGetItemRectPos(nPos);
+ tools::Rectangle aRect = ImplGetItemRectPos(nPos);
Invalidate(aRect);
Update();
}
@@ -1421,8 +1421,8 @@ Size StatusBar::CalcWindowSizePixel() const
if( IsNativeControlSupported( ControlType::Progress, ControlPart::Entire ) )
{
ImplControlValue aValue;
- Rectangle aControlRegion( (const Point&)Point(), Size( nCalcWidth, nMinHeight ) );
- Rectangle aNativeControlRegion, aNativeContentRegion;
+ tools::Rectangle aControlRegion( (const Point&)Point(), Size( nCalcWidth, nMinHeight ) );
+ tools::Rectangle aNativeControlRegion, aNativeContentRegion;
if( GetNativeControlRegion( ControlType::Progress, ControlPart::Entire,
aControlRegion, ControlState::ENABLED, aValue, OUString(),
aNativeControlRegion, aNativeContentRegion ) )
@@ -1435,8 +1435,8 @@ Size StatusBar::CalcWindowSizePixel() const
IsNativeControlSupported( ControlType::Frame, ControlPart::Border ) )
{
ImplControlValue aControlValue( static_cast<long>(DrawFrameFlags::NoDraw) );
- Rectangle aBound, aContent;
- Rectangle aNatRgn( Point( 0, 0 ), Size( 150, 50 ) );
+ tools::Rectangle aBound, aContent;
+ tools::Rectangle aNatRgn( Point( 0, 0 ), Size( 150, 50 ) );
if( GetNativeControlRegion(ControlType::Frame, ControlPart::Border,
aNatRgn, ControlState::NONE, aControlValue, OUString(), aBound, aContent) )
{
diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx
index 192b85e4c8a8..6656f122ecd3 100644
--- a/vcl/source/window/syswin.cxx
+++ b/vcl/source/window/syswin.cxx
@@ -594,7 +594,7 @@ static OString ImplWindowStateToStr(const WindowStateData& rData)
void SystemWindow::ImplMoveToScreen( long& io_rX, long& io_rY, long i_nWidth, long i_nHeight, vcl::Window* i_pConfigureWin )
{
- Rectangle aScreenRect;
+ tools::Rectangle aScreenRect;
if( !Application::IsUnifiedDisplay() )
aScreenRect = Application::GetScreenPosSizePixel( GetScreenNumber() );
else
@@ -698,7 +698,7 @@ void SystemWindow::SetWindowStateData( const WindowStateData& rData )
if( !((rData.GetMask() & WindowStateMask::State) && (nState & WindowStateState::Maximized)) )
if( rData.GetMask() & (WindowStateMask::Pos|WindowStateMask::Width|WindowStateMask::Height) )
{
- Rectangle aDesktop = GetDesktopRectPixel();
+ tools::Rectangle aDesktop = GetDesktopRectPixel();
ImplSVData *pSVData = ImplGetSVData();
vcl::Window *pWin = pSVData->maWinData.mpFirstFrame;
bool bWrapped = false;
diff --git a/vcl/source/window/tabpage.cxx b/vcl/source/window/tabpage.cxx
index a929a333830d..59c5a653681c 100644
--- a/vcl/source/window/tabpage.cxx
+++ b/vcl/source/window/tabpage.cxx
@@ -128,7 +128,7 @@ void TabPage::DataChanged( const DataChangedEvent& rDCEvt )
}
}
-void TabPage::Paint( vcl::RenderContext& rRenderContext, const Rectangle& )
+void TabPage::Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& )
{
// draw native tabpage only inside tabcontrols, standalone tabpages look ugly (due to bad dialog design)
if( IsNativeControlSupported(ControlType::TabBody, ControlPart::Entire) && GetParent() && (GetParent()->GetType() == WindowType::TABCONTROL) )
@@ -143,7 +143,7 @@ void TabPage::Paint( vcl::RenderContext& rRenderContext, const Rectangle& )
nState |= ControlState::FOCUSED;
// pass the whole window region to NWF as the tab body might be a gradient or bitmap
// that has to be scaled properly, clipping makes sure that we do not paint too much
- Rectangle aCtrlRegion( Point(), GetOutputSizePixel() );
+ tools::Rectangle aCtrlRegion( Point(), GetOutputSizePixel() );
rRenderContext.DrawNativeControl( ControlType::TabBody, part, aCtrlRegion, nState,
aControlValue, OUString() );
}
@@ -170,7 +170,7 @@ void TabPage::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, Dr
pDev->SetFillColor( GetSettings().GetStyleSettings().GetDialogColor() );
else
pDev->SetFillColor( aWallpaper.GetColor() );
- pDev->DrawRect( Rectangle( aPos, aSize ) );
+ pDev->DrawRect( tools::Rectangle( aPos, aSize ) );
}
pDev->Pop();
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 9614d223598b..d026b94b7c6e 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -90,8 +90,8 @@ class ImplTBDragMgr
private:
VclPtr<ToolBox> mpDragBox;
Point maMouseOff;
- Rectangle maRect;
- Rectangle maStartRect;
+ tools::Rectangle maRect;
+ tools::Rectangle maStartRect;
Accelerator maAccel;
sal_uInt16 mnLineMode;
ToolBox::ImplToolItems::size_type mnStartLines;
@@ -103,7 +103,7 @@ private:
public:
ImplTBDragMgr();
- void StartDragging( ToolBox* pDragBox, const Point& rPos, const Rectangle& rRect, sal_uInt16 nLineMode );
+ void StartDragging( ToolBox* pDragBox, const Point& rPos, const tools::Rectangle& rRect, sal_uInt16 nLineMode );
void Dragging( const Point& rPos );
void EndDragging( bool bOK = true );
DECL_LINK( SelectHdl, Accelerator&, void );
@@ -126,8 +126,8 @@ int ToolBox::ImplGetDragWidth( const vcl::RenderContext& rRenderContext, bool bH
ImplControlValue aControlValue;
Point aPoint;
- Rectangle aContent, aBound;
- Rectangle aArea( aPoint, rRenderContext.GetOutputSizePixel() );
+ tools::Rectangle aContent, aBound;
+ tools::Rectangle aArea( aPoint, rRenderContext.GetOutputSizePixel() );
if ( rRenderContext.GetNativeControlRegion(ControlType::Toolbar,
bHorz ? ControlPart::ThumbVert : ControlPart::ThumbHorz,
@@ -168,13 +168,13 @@ void ToolBox::ImplUpdateDragArea() const
if( pWrapper )
{
if ( ImplIsFloatingMode() || pWrapper->IsLocked() )
- pWrapper->SetDragArea( Rectangle() );
+ pWrapper->SetDragArea( tools::Rectangle() );
else
{
if( meAlign == WindowAlign::Top || meAlign == WindowAlign::Bottom )
- pWrapper->SetDragArea( Rectangle( 0, 0, ImplGetDragWidth(), GetOutputSizePixel().Height() ) );
+ pWrapper->SetDragArea( tools::Rectangle( 0, 0, ImplGetDragWidth(), GetOutputSizePixel().Height() ) );
else
- pWrapper->SetDragArea( Rectangle( 0, 0, GetOutputSizePixel().Width(), ImplGetDragWidth() ) );
+ pWrapper->SetDragArea( tools::Rectangle( 0, 0, GetOutputSizePixel().Width(), ImplGetDragWidth() ) );
}
}
}
@@ -240,7 +240,7 @@ void ToolBox::ImplCheckUpdate()
}
void ToolBox::ImplDrawGrip(vcl::RenderContext& rRenderContext,
- const Rectangle &aDragArea, int nDragWidth, WindowAlign eAlign, bool bHorz)
+ const tools::Rectangle &aDragArea, int nDragWidth, WindowAlign eAlign, bool bHorz)
{
bool bNativeOk = false;
const ControlPart ePart = bHorz ? ControlPart::ThumbVert : ControlPart::ThumbHorz;
@@ -251,7 +251,7 @@ void ToolBox::ImplDrawGrip(vcl::RenderContext& rRenderContext,
aToolbarValue.maGripRect = aDragArea;
Point aPt;
- Rectangle aCtrlRegion(aPt, aSz);
+ tools::Rectangle aCtrlRegion(aPt, aSz);
ControlState nState = ControlState::ENABLED;
bNativeOk = rRenderContext.DrawNativeControl( ControlType::Toolbar, ePart,
@@ -275,7 +275,7 @@ void ToolBox::ImplDrawGrip(vcl::RenderContext& rRenderContext,
while (i <= height)
{
int x = nDragWidth / 2;
- rRenderContext.DrawEllipse(Rectangle(Point(x, i), Size(2 * fScaleFactor, 2 * fScaleFactor)));
+ rRenderContext.DrawEllipse(tools::Rectangle(Point(x, i), Size(2 * fScaleFactor, 2 * fScaleFactor)));
i += 4 * fScaleFactor;
}
}
@@ -287,7 +287,7 @@ void ToolBox::ImplDrawGrip(vcl::RenderContext& rRenderContext,
while (i <= width)
{
int y = nDragWidth / 2;
- rRenderContext.DrawEllipse(Rectangle(Point(i, y), Size(2 * fScaleFactor, 2 * fScaleFactor)));
+ rRenderContext.DrawEllipse(tools::Rectangle(Point(i, y), Size(2 * fScaleFactor, 2 * fScaleFactor)));
i += 4 * fScaleFactor;
}
}
@@ -398,31 +398,31 @@ void ToolBox::ImplDrawGradientBackground(vcl::RenderContext& rRenderContext, Imp
{
long y = 0;
- rRenderContext.DrawGradient(Rectangle(0, y, aTopLineSz.Width(), y + aTopLineSz.Height()), g);
+ rRenderContext.DrawGradient(tools::Rectangle(0, y, aTopLineSz.Width(), y + aTopLineSz.Height()), g);
y += aTopLineSz.Height();
while (y < (mnDY - aBottomLineSz.Height()))
{
- rRenderContext.DrawGradient(Rectangle(0, y, aLineSz.Width(), y + aLineSz.Height()), g);
+ rRenderContext.DrawGradient(tools::Rectangle(0, y, aLineSz.Width(), y + aLineSz.Height()), g);
y += aLineSz.Height();
}
- rRenderContext.DrawGradient(Rectangle(0, y, aBottomLineSz.Width(), y + aBottomLineSz.Height()), g);
+ rRenderContext.DrawGradient(tools::Rectangle(0, y, aBottomLineSz.Width(), y + aBottomLineSz.Height()), g);
}
else
{
long x = 0;
- rRenderContext.DrawGradient(Rectangle(x, 0, x + aTopLineSz.Width(), aTopLineSz.Height()), g);
+ rRenderContext.DrawGradient(tools::Rectangle(x, 0, x + aTopLineSz.Width(), aTopLineSz.Height()), g);
x += aTopLineSz.Width();
while (x < (mnDX - aBottomLineSz.Width()))
{
- rRenderContext.DrawGradient(Rectangle(x, 0, x + aLineSz.Width(), aLineSz.Height()), g);
+ rRenderContext.DrawGradient(tools::Rectangle(x, 0, x + aLineSz.Width(), aLineSz.Height()), g);
x += aLineSz.Width();
}
- rRenderContext.DrawGradient(Rectangle( x, 0, x + aBottomLineSz.Width(), aBottomLineSz.Height()), g);
+ rRenderContext.DrawGradient(tools::Rectangle( x, 0, x + aBottomLineSz.Width(), aBottomLineSz.Height()), g);
}
if( bLineColor )
@@ -434,7 +434,7 @@ bool ToolBox::ImplDrawNativeBackground(vcl::RenderContext& rRenderContext, const
{
// use NWF
Point aPt;
- Rectangle aCtrlRegion(aPt, GetOutputSizePixel());
+ tools::Rectangle aCtrlRegion(aPt, GetOutputSizePixel());
ControlState nState = ControlState::ENABLED;
return rRenderContext.DrawNativeControl( ControlType::Toolbar, mbHorz ? ControlPart::DrawBackgroundHorz : ControlPart::DrawBackgroundVert,
@@ -470,7 +470,7 @@ void ToolBox::ImplDrawConstantBackground(vcl::RenderContext& rRenderContext, con
}
}
-void ToolBox::ImplDrawBackground(vcl::RenderContext& rRenderContext, const Rectangle& rRect)
+void ToolBox::ImplDrawBackground(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect)
{
// execute pending paint requests
ImplCheckUpdate();
@@ -522,7 +522,7 @@ void ToolBox::ImplDrawBackground(vcl::RenderContext& rRenderContext, const Recta
rRenderContext.Pop();
}
-void ToolBox::ImplErase(vcl::RenderContext& rRenderContext, const Rectangle &rRect, bool bHighlight, bool bHasOpenPopup)
+void ToolBox::ImplErase(vcl::RenderContext& rRenderContext, const tools::Rectangle &rRect, bool bHighlight, bool bHasOpenPopup)
{
// the background of non NWF buttons is painted in a constant color
// to have the same highlight color (transparency in DrawSelectionBackground())
@@ -941,7 +941,7 @@ sal_uInt16 ToolBox::ImplTestLineSize( const Point& rPos ) const
return 0;
}
-void ToolBox::ImplLineSizing( const Point& rPos, Rectangle& rRect, sal_uInt16 nLineMode )
+void ToolBox::ImplLineSizing( const Point& rPos, tools::Rectangle& rRect, sal_uInt16 nLineMode )
{
bool bHorz;
long nOneLineSize;
@@ -1046,7 +1046,7 @@ ImplTBDragMgr::ImplTBDragMgr()
}
void ImplTBDragMgr::StartDragging( ToolBox* pToolBox,
- const Point& rPos, const Rectangle& rRect,
+ const Point& rPos, const tools::Rectangle& rRect,
sal_uInt16 nDragLineMode )
{
mpDragBox = pToolBox;
@@ -1437,10 +1437,10 @@ bool ToolBox::ImplCalcItem()
mnWinHeight = 0;
// determine minimum size necessary in NWF
{
- Rectangle aRect( Point( 0, 0 ), Size( nMinWidth, nMinHeight ) );
- Rectangle aReg( aRect );
+ tools::Rectangle aRect( Point( 0, 0 ), Size( nMinWidth, nMinHeight ) );
+ tools::Rectangle aReg( aRect );
ImplControlValue aVal;
- Rectangle aNativeBounds, aNativeContent;
+ tools::Rectangle aNativeBounds, aNativeContent;
if( IsNativeControlSupported( ControlType::Toolbar, ControlPart::Button ) )
{
if( GetNativeControlRegion( ControlType::Toolbar, ControlPart::Button,
@@ -1466,7 +1466,7 @@ bool ToolBox::ImplCalcItem()
// also calculate the area for comboboxes, drop down list boxes and spinfields
// as these are often inserted into toolboxes; set mnWinHeight to the
// greater of those values to prevent toolbar flickering (#i103385#)
- aRect = Rectangle( Point( 0, 0 ), Size( nMinWidth, nMinHeight ) );
+ aRect = tools::Rectangle( Point( 0, 0 ), Size( nMinWidth, nMinHeight ) );
aReg = aRect;
if( GetNativeControlRegion( ControlType::Combobox, ControlPart::Entire,
aReg,
@@ -1478,7 +1478,7 @@ bool ToolBox::ImplCalcItem()
if( aRect.GetHeight() > mnWinHeight )
mnWinHeight = aRect.GetHeight();
}
- aRect = Rectangle( Point( 0, 0 ), Size( nMinWidth, nMinHeight ) );
+ aRect = tools::Rectangle( Point( 0, 0 ), Size( nMinWidth, nMinHeight ) );
aReg = aRect;
if( GetNativeControlRegion( ControlType::Listbox, ControlPart::Entire,
aReg,
@@ -1490,7 +1490,7 @@ bool ToolBox::ImplCalcItem()
if( aRect.GetHeight() > mnWinHeight )
mnWinHeight = aRect.GetHeight();
}
- aRect = Rectangle( Point( 0, 0 ), Size( nMinWidth, nMinHeight ) );
+ aRect = tools::Rectangle( Point( 0, 0 ), Size( nMinWidth, nMinHeight ) );
aReg = aRect;
if( GetNativeControlRegion( ControlType::Spinbox, ControlPart::Entire,
aReg,
@@ -1974,7 +1974,7 @@ void ToolBox::ImplFormat( bool bResize )
mpData->ImplClearLayoutData();
// recalculate positions and sizes
- Rectangle aEmptyRect;
+ tools::Rectangle aEmptyRect;
long nLineSize;
long nLeft;
long nTop;
@@ -1993,7 +1993,7 @@ void ToolBox::ImplFormat( bool bResize )
ImplCalcBorder( meAlign, mnLeftBorder, mnTopBorder, mnRightBorder, mnBottomBorder );
// update drag area (where the 'grip' will be placed)
- Rectangle aOldDragRect;
+ tools::Rectangle aOldDragRect;
if( pWrapper )
aOldDragRect = pWrapper->GetDragArea();
ImplUpdateDragArea();
@@ -2125,9 +2125,9 @@ void ToolBox::ImplFormat( bool bResize )
nFormatLine = 1;
// save old scroll rectangles and reset them
- Rectangle aOldLowerRect = maLowerRect;
- Rectangle aOldUpperRect = maUpperRect;
- Rectangle aOldMenubuttonRect = mpData->maMenubuttonItem.maRect;
+ tools::Rectangle aOldLowerRect = maLowerRect;
+ tools::Rectangle aOldUpperRect = maUpperRect;
+ tools::Rectangle aOldMenubuttonRect = mpData->maMenubuttonItem.maRect;
maUpperRect = aEmptyRect;
maLowerRect = aEmptyRect;
mpData->maMenubuttonItem.maRect = aEmptyRect;
@@ -2370,7 +2370,7 @@ void ToolBox::ImplFormat( bool bResize )
{
if ( bMustFullPaint )
{
- maPaintRect = Rectangle( mnLeftBorder, mnTopBorder,
+ maPaintRect = tools::Rectangle( mnLeftBorder, mnTopBorder,
mnDX-mnRightBorder, mnDY-mnBottomBorder );
}
else
@@ -2458,7 +2458,7 @@ IMPL_LINK_NOARG(ToolBox, ImplUpdateHdl, Timer *, void)
ImplFormat();
}
-static void ImplDrawMoreIndicator(vcl::RenderContext& rRenderContext, const Rectangle& rRect, bool bSetColor, bool bRotate )
+static void ImplDrawMoreIndicator(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect, bool bSetColor, bool bRotate )
{
rRenderContext.Push(PushFlags::FILLCOLOR | PushFlags::LINECOLOR);
rRenderContext.SetLineColor();
@@ -2490,9 +2490,9 @@ static void ImplDrawMoreIndicator(vcl::RenderContext& rRenderContext, const Rect
long y = rRect.Top() + (rRect.getHeight() - height)/2 + 1;
while( height >= 1)
{
- rRenderContext.DrawRect( Rectangle( x, y, x + linewidth, y ) );
+ rRenderContext.DrawRect( tools::Rectangle( x, y, x + linewidth, y ) );
x += space;
- rRenderContext.DrawRect( Rectangle( x, y, x + linewidth, y ) );
+ rRenderContext.DrawRect( tools::Rectangle( x, y, x + linewidth, y ) );
x -= space;
y++;
if( height <= heightOrig / 2 + 1) x--;
@@ -2515,9 +2515,9 @@ static void ImplDrawMoreIndicator(vcl::RenderContext& rRenderContext, const Rect
long y = rRect.Top() + (rRect.getHeight() - height)/2 + 1;
while( width >= 1)
{
- rRenderContext.DrawRect( Rectangle( x, y, x, y + linewidth ) );
+ rRenderContext.DrawRect( tools::Rectangle( x, y, x, y + linewidth ) );
y += space;
- rRenderContext.DrawRect( Rectangle( x, y, x, y + linewidth ) );
+ rRenderContext.DrawRect( tools::Rectangle( x, y, x, y + linewidth ) );
y -= space;
x++;
if( width <= widthOrig / 2 + 1) y--;
@@ -2529,7 +2529,7 @@ static void ImplDrawMoreIndicator(vcl::RenderContext& rRenderContext, const Rect
rRenderContext.Pop();
}
-static void ImplDrawDropdownArrow(vcl::RenderContext& rRenderContext, const Rectangle& rDropDownRect, bool bSetColor, bool bRotate )
+static void ImplDrawDropdownArrow(vcl::RenderContext& rRenderContext, const tools::Rectangle& rDropDownRect, bool bSetColor, bool bRotate )
{
bool bLineColor = rRenderContext.IsLineColor();
bool bFillColor = rRenderContext.IsFillColor();
@@ -2556,7 +2556,7 @@ static void ImplDrawDropdownArrow(vcl::RenderContext& rRenderContext, const Rect
long y = rDropDownRect.Top() + (rDropDownRect.getHeight() - height)/2;
while( width >= 1)
{
- rRenderContext.DrawRect( Rectangle( x, y, x+width-1, y ) );
+ rRenderContext.DrawRect( tools::Rectangle( x, y, x+width-1, y ) );
y++;
x++;
width -= 2;
@@ -2571,7 +2571,7 @@ static void ImplDrawDropdownArrow(vcl::RenderContext& rRenderContext, const Rect
long y = rDropDownRect.Top() + (rDropDownRect.getHeight() - height)/2;
while( height >= 1)
{
- rRenderContext.DrawRect( Rectangle( x, y, x, y+height-1 ) );
+ rRenderContext.DrawRect( tools::Rectangle( x, y, x, y+height-1 ) );
y++;
x++;
height -= 2;
@@ -2646,7 +2646,7 @@ void ToolBox::ImplDrawSpin(vcl::RenderContext& rRenderContext)
false/*bUpperIn*/, false/*bLowerIn*/, bTmpUpper, bTmpLower, !mbHorz);
}
-void ToolBox::ImplDrawSeparator(vcl::RenderContext& rRenderContext, ImplToolItems::size_type nPos, const Rectangle& rRect)
+void ToolBox::ImplDrawSeparator(vcl::RenderContext& rRenderContext, ImplToolItems::size_type nPos, const tools::Rectangle& rRect)
{
if ( nPos >= mpData->m_aItems.size() - 1 )
// no separator if it's the last item
@@ -2692,7 +2692,7 @@ void ToolBox::ImplDrawSeparator(vcl::RenderContext& rRenderContext, ImplToolItem
}
}
-void ToolBox::ImplDrawButton(vcl::RenderContext& rRenderContext, const Rectangle &rRect, sal_uInt16 highlight,
+void ToolBox::ImplDrawButton(vcl::RenderContext& rRenderContext, const tools::Rectangle &rRect, sal_uInt16 highlight,
bool bChecked, bool bEnabled, bool bIsWindow )
{
// draws toolbar button background either native or using a coloured selection
@@ -2761,7 +2761,7 @@ void ToolBox::ImplDrawItem(vcl::RenderContext& rRenderContext, ImplToolItems::si
((pItem->mnBits & ToolBoxItemBits::DROPDOWNONLY) != ToolBoxItemBits::DROPDOWNONLY) )
|| ( ( pItem->mnBits & ToolBoxItemBits::DROPDOWN) && ( meTextPosition == ToolBoxTextPosition::Bottom ) ) )
{
- Rectangle aArrowRect = pItem->GetDropDownRect( mbHorz && ( meTextPosition == ToolBoxTextPosition::Right ) );
+ tools::Rectangle aArrowRect = pItem->GetDropDownRect( mbHorz && ( meTextPosition == ToolBoxTextPosition::Right ) );
if( aArrowRect.Top() == pItem->maRect.Top() ) // dropdown arrow on right side
aBtnSize.Width() -= aArrowRect.GetWidth();
else if ( !( (meTextPosition == ToolBoxTextPosition::Bottom)
@@ -2772,7 +2772,7 @@ void ToolBox::ImplDrawItem(vcl::RenderContext& rRenderContext, ImplToolItems::si
/* Compute the button/separator rectangle here, we'll need it for
* both the buttons and the separators. */
- Rectangle aButtonRect( pItem->maRect.TopLeft(), aBtnSize );
+ tools::Rectangle aButtonRect( pItem->maRect.TopLeft(), aBtnSize );
long nOffX = SMALLBUTTON_OFF_NORMAL_X;
long nOffY = SMALLBUTTON_OFF_NORMAL_Y;
long nImageOffX = 0;
@@ -2960,7 +2960,7 @@ void ToolBox::ImplDrawItem(vcl::RenderContext& rRenderContext, ImplToolItems::si
// paint optional drop down arrow
if ( pItem->mnBits & ToolBoxItemBits::DROPDOWN )
{
- Rectangle aDropDownRect( pItem->GetDropDownRect( mbHorz && ( meTextPosition == ToolBoxTextPosition::Right ) ) );
+ tools::Rectangle aDropDownRect( pItem->GetDropDownRect( mbHorz && ( meTextPosition == ToolBoxTextPosition::Right ) ) );
bool bSetColor = true;
if ( !pItem->mbEnabled || !IsEnabled() )
{
@@ -2990,7 +2990,7 @@ void ToolBox::ImplDrawFloatwinBorder(vcl::RenderContext& rRenderContext, ImplToo
{
if ( !pItem->maRect.IsEmpty() )
{
- Rectangle aRect( mpFloatWin->ImplGetItemEdgeClipRect() );
+ tools::Rectangle aRect( mpFloatWin->ImplGetItemEdgeClipRect() );
aRect.SetPos( AbsoluteScreenToOutputPixel( aRect.TopLeft() ) );
rRenderContext.SetLineColor(rRenderContext.GetSettings().GetStyleSettings().GetShadowColor());
Point p1, p2;
@@ -3649,7 +3649,7 @@ void ToolBox::MouseButtonDown( const MouseEvent& rMEvt )
aPos = ScreenToOutputPixel( aPos );
// start dragging
- pMgr->StartDragging( this, aMousePos, Rectangle( aPos, aSize ),
+ pMgr->StartDragging( this, aMousePos, tools::Rectangle( aPos, aSize ),
nLineMode );
return;
}
@@ -3720,12 +3720,12 @@ void ToolBox::InvalidateSpin(bool bUpperIn, bool bLowerIn)
Invalidate(maLowerRect);
}
-void ToolBox::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rPaintRect)
+void ToolBox::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rPaintRect)
{
if( mpData->mbIsPaintLocked )
return;
- if (rPaintRect == Rectangle(0, 0, mnDX-1, mnDY-1))
+ if (rPaintRect == tools::Rectangle(0, 0, mnDX-1, mnDY-1))
mbFullPaint = true;
ImplFormat();
mbFullPaint = false;
@@ -3824,7 +3824,7 @@ void ToolBox::Resize()
if (!aExpandables.empty())
{
//Get how big the optimal size is
- Rectangle aBounds;
+ tools::Rectangle aBounds;
for (const ImplToolItem & rItem : mpData->m_aItems)
{
aBounds.Union( rItem.maRect );
@@ -3864,17 +3864,17 @@ void ToolBox::Resize()
if ( mnRightBorder )
{
if ( nOldDX > mnDX )
- Invalidate( Rectangle( mnDX-mnRightBorder-1, 0, mnDX, mnDY ) );
+ Invalidate( tools::Rectangle( mnDX-mnRightBorder-1, 0, mnDX, mnDY ) );
else
- Invalidate( Rectangle( nOldDX-mnRightBorder-1, 0, nOldDX, nOldDY ) );
+ Invalidate( tools::Rectangle( nOldDX-mnRightBorder-1, 0, nOldDX, nOldDY ) );
}
if ( mnBottomBorder )
{
if ( nOldDY > mnDY )
- Invalidate( Rectangle( 0, mnDY-mnBottomBorder-1, mnDX, mnDY ) );
+ Invalidate( tools::Rectangle( 0, mnDY-mnBottomBorder-1, mnDX, mnDY ) );
else
- Invalidate( Rectangle( 0, nOldDY-mnBottomBorder-1, nOldDX, nOldDY ) );
+ Invalidate( tools::Rectangle( 0, nOldDY-mnBottomBorder-1, nOldDX, nOldDY ) );
}
}
}
@@ -3917,7 +3917,7 @@ void ToolBox::RequestHelp( const HelpEvent& rHEvt )
return;
else
nItemId = mnHighItemId;
- Rectangle aRect( GetItemRect( nItemId ) );
+ tools::Rectangle aRect( GetItemRect( nItemId ) );
if( aRect.IsEmpty() )
return;
else
@@ -3929,7 +3929,7 @@ void ToolBox::RequestHelp( const HelpEvent& rHEvt )
if ( rHEvt.GetMode() & (HelpEventMode::BALLOON | HelpEventMode::QUICK) )
{
// get rectangle
- Rectangle aTempRect = GetItemRect( nItemId );
+ tools::Rectangle aTempRect = GetItemRect( nItemId );
Point aPt = OutputToScreenPixel( aTempRect.TopLeft() );
aTempRect.Left() = aPt.X();
aTempRect.Top() = aPt.Y();
@@ -4079,7 +4079,7 @@ void ToolBox::Command( const CommandEvent& rCEvt )
}
else if ( rCEvt.GetCommand() == CommandEventId::ContextMenu )
{
- ExecuteCustomMenu( Rectangle( rCEvt.GetMousePosPixel(), rCEvt.GetMousePosPixel() ) );
+ ExecuteCustomMenu( tools::Rectangle( rCEvt.GetMousePosPixel(), rCEvt.GetMousePosPixel() ) );
return;
}
@@ -4231,7 +4231,7 @@ void ToolBox::StartDocking()
DockingWindow::StartDocking();
}
-bool ToolBox::Docking( const Point& rPos, Rectangle& rRect )
+bool ToolBox::Docking( const Point& rPos, tools::Rectangle& rRect )
{
// do nothing during dragging, it was calculated before
if ( mbDragging )
@@ -4242,7 +4242,7 @@ bool ToolBox::Docking( const Point& rPos, Rectangle& rRect )
DockingWindow::Docking( rPos, rRect );
// if the mouse is outside the area, it can only become a floating window
- Rectangle aDockingRect( rRect );
+ tools::Rectangle aDockingRect( rRect );
if ( !ImplIsFloatingMode() )
{
// don't use tracking rectangle for alignment check, because it will be too large
@@ -4256,10 +4256,10 @@ bool ToolBox::Docking( const Point& rPos, Rectangle& rRect )
aDockingRect.SetPos( ImplGetFrameWindow()->GetPointerPosPixel() );
}
- Rectangle aIntersection = maOutDockRect.GetIntersection( aDockingRect );
+ tools::Rectangle aIntersection = maOutDockRect.GetIntersection( aDockingRect );
if ( !aIntersection.IsEmpty() )
{
- Rectangle aInRect = maInDockRect;
+ tools::Rectangle aInRect = maInDockRect;
Size aDockSize;
aDockSize.Width() = ImplCalcSize( mnLines, TB_CALCMODE_VERT ).Width();
aDockSize.Height() = ImplCalcSize( mnLines, TB_CALCMODE_HORZ ).Height();
@@ -4282,7 +4282,7 @@ bool ToolBox::Docking( const Point& rPos, Rectangle& rRect )
// if the mouse is outside the Dock area, it can only
// become a floating window
- Rectangle aIntersect = aInRect.GetIntersection( aDockingRect );
+ tools::Rectangle aIntersect = aInRect.GetIntersection( aDockingRect );
if ( aIntersect == aDockingRect )
bFloatMode = true;
else
@@ -4355,7 +4355,7 @@ bool ToolBox::Docking( const Point& rPos, Rectangle& rRect )
return bFloatMode;
}
-void ToolBox::EndDocking( const Rectangle& rRect, bool bFloatMode )
+void ToolBox::EndDocking( const tools::Rectangle& rRect, bool bFloatMode )
{
if ( !IsDockingCanceled() )
{
diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx
index b2d708dfbb32..19cc5a029648 100644
--- a/vcl/source/window/toolbox2.cxx
+++ b/vcl/source/window/toolbox2.cxx
@@ -241,9 +241,9 @@ void ImplToolItem::DetermineButtonDrawStyle( ButtonType eButtonType, bool& rbIma
}
}
-Rectangle ImplToolItem::GetDropDownRect( bool bHorz ) const
+tools::Rectangle ImplToolItem::GetDropDownRect( bool bHorz ) const
{
- Rectangle aRect;
+ tools::Rectangle aRect;
if( (mnBits & ToolBoxItemBits::DROPDOWN) && !maRect.IsEmpty() )
{
aRect = maRect;
@@ -281,7 +281,7 @@ void ToolBox::ImplInvalidate( bool bNewCalc, bool bFullPaint )
// do we need to redraw?
if ( IsReallyVisible() && IsUpdateMode() )
{
- Invalidate( Rectangle( mnLeftBorder, mnTopBorder,
+ Invalidate( tools::Rectangle( mnLeftBorder, mnTopBorder,
mnDX-mnRightBorder-1, mnDY-mnBottomBorder-1 ) );
mpIdle->Stop();
}
@@ -310,7 +310,7 @@ void ToolBox::ImplUpdateItem( ImplToolItems::size_type nIndex )
if ( nIndex == ITEM_NOTFOUND )
{
// #i52217# no immediate draw as this might lead to paint problems
- Invalidate( Rectangle( mnLeftBorder, mnTopBorder, mnDX-mnRightBorder-1, mnDY-mnBottomBorder-1 ) );
+ Invalidate( tools::Rectangle( mnLeftBorder, mnTopBorder, mnDX-mnRightBorder-1, mnDY-mnBottomBorder-1 ) );
}
else
{
@@ -801,12 +801,12 @@ sal_uInt16 ToolBox::GetItemId(const OUString &rCommand) const
return 0;
}
-Point ToolBox::ImplGetPopupPosition( const Rectangle& rRect, const Size& rSize ) const
+Point ToolBox::ImplGetPopupPosition( const tools::Rectangle& rRect, const Size& rSize ) const
{
Point aPos;
if( !rRect.IsEmpty() )
{
- Rectangle aScreen = GetDesktopRectPixel();
+ tools::Rectangle aScreen = GetDesktopRectPixel();
// the popup should be positioned so that it will not cover
// the item rect and that it fits the desktop
@@ -855,7 +855,7 @@ Point ToolBox::ImplGetPopupPosition( const Rectangle& rRect, const Size& rSize )
return aPos;
}
-Rectangle ToolBox::GetItemRect( sal_uInt16 nItemId )
+tools::Rectangle ToolBox::GetItemRect( sal_uInt16 nItemId )
{
if ( mbCalc || mbFormat )
ImplFormat();
@@ -864,7 +864,7 @@ Rectangle ToolBox::GetItemRect( sal_uInt16 nItemId )
return GetItemPosRect( nPos );
}
-Rectangle ToolBox::GetItemPosRect( ImplToolItems::size_type nPos )
+tools::Rectangle ToolBox::GetItemPosRect( ImplToolItems::size_type nPos )
{
if ( mbCalc || mbFormat )
ImplFormat();
@@ -872,10 +872,10 @@ Rectangle ToolBox::GetItemPosRect( ImplToolItems::size_type nPos )
if ( nPos < mpData->m_aItems.size() )
return mpData->m_aItems[nPos].maRect;
else
- return Rectangle();
+ return tools::Rectangle();
}
-Rectangle ToolBox::GetOverflowRect() const
+tools::Rectangle ToolBox::GetOverflowRect() const
{
return mpData->maMenubuttonItem.maRect;
}
@@ -1346,7 +1346,7 @@ bool ToolBox::IsItemReallyVisible( sal_uInt16 nItemId ) const
{
// is the item on the visible area of the toolbox?
bool bRet = false;
- Rectangle aRect( mnLeftBorder, mnTopBorder, mnDX-mnRightBorder, mnDY-mnBottomBorder );
+ tools::Rectangle aRect( mnLeftBorder, mnTopBorder, mnDX-mnRightBorder, mnDY-mnBottomBorder );
ImplToolItem* pItem = ImplGetItem( nItemId );
if ( pItem && pItem->mbVisible &&
@@ -1491,7 +1491,7 @@ OUString ToolBox::GetDisplayText() const
return mpData->m_pLayoutData ? OUString(mpData->m_pLayoutData->m_aDisplayText) : OUString();
}
-Rectangle ToolBox::GetCharacterBounds( sal_uInt16 nItemID, long nIndex )
+tools::Rectangle ToolBox::GetCharacterBounds( sal_uInt16 nItemID, long nIndex )
{
long nItemIndex = -1;
if( ! mpData->m_pLayoutData )
@@ -1507,7 +1507,7 @@ Rectangle ToolBox::GetCharacterBounds( sal_uInt16 nItemID, long nIndex )
}
}
}
- return (mpData->m_pLayoutData && nItemIndex != -1) ? mpData->m_pLayoutData->GetCharacterBounds( nItemIndex+nIndex ) : Rectangle();
+ return (mpData->m_pLayoutData && nItemIndex != -1) ? mpData->m_pLayoutData->GetCharacterBounds( nItemIndex+nIndex ) : tools::Rectangle();
}
long ToolBox::GetIndexForPoint( const Point& rPoint, sal_uInt16& rItemID )
@@ -1693,7 +1693,7 @@ IMPL_LINK_NOARG(ToolBox, ImplCallExecuteCustomMenu, void*, void)
bool bBorderDel = false;
VclPtr<vcl::Window> pWin = this;
- Rectangle aMenuRect = mpData->maMenuRect;
+ tools::Rectangle aMenuRect = mpData->maMenuRect;
mpData->maMenuRect.SetEmpty();
VclPtr<ImplBorderWindow> pBorderWin;
if( aMenuRect.IsEmpty() && IsFloatingMode() )
@@ -1708,7 +1708,7 @@ IMPL_LINK_NOARG(ToolBox, ImplCallExecuteCustomMenu, void*, void)
}
}
- sal_uInt16 uId = GetMenu()->Execute( pWin, Rectangle( ImplGetPopupPosition( aMenuRect, Size() ), Size() ),
+ sal_uInt16 uId = GetMenu()->Execute( pWin, tools::Rectangle( ImplGetPopupPosition( aMenuRect, Size() ), Size() ),
PopupMenuFlags::ExecuteDown | PopupMenuFlags::NoMouseUpClose );
if ( pWin->IsDisposed() )
@@ -1729,7 +1729,7 @@ IMPL_LINK_NOARG(ToolBox, ImplCallExecuteCustomMenu, void*, void)
}
}
-void ToolBox::ExecuteCustomMenu( const Rectangle& rRect )
+void ToolBox::ExecuteCustomMenu( const tools::Rectangle& rRect )
{
if( IsMenuEnabled() )
{
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index c0186a7049ff..6bf40c96f20b 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -1211,9 +1211,9 @@ void Window::ImplInitAppFontData( vcl::Window* pWindow )
// of control sizes, if yes, make app font scalings larger
// so dialog positioning is not completely off
ImplControlValue aControlValue;
- Rectangle aCtrlRegion( Point(), Size( nTextWidth < 10 ? 10 : nTextWidth, nTextHeight < 10 ? 10 : nTextHeight ) );
- Rectangle aBoundingRgn( aCtrlRegion );
- Rectangle aContentRgn( aCtrlRegion );
+ tools::Rectangle aCtrlRegion( Point(), Size( nTextWidth < 10 ? 10 : nTextWidth, nTextHeight < 10 ? 10 : nTextHeight ) );
+ tools::Rectangle aBoundingRgn( aCtrlRegion );
+ tools::Rectangle aContentRgn( aCtrlRegion );
if( pWindow->GetNativeControlRegion( ControlType::Editbox, ControlPart::Entire, aCtrlRegion,
ControlState::ENABLED, aControlValue, OUString(),
aBoundingRgn, aContentRgn ) )
@@ -1248,7 +1248,7 @@ void Window::CopyDeviceArea( SalTwoRect& aPosAry, bool bWindowInvalidate )
if (bWindowInvalidate)
{
- const Rectangle aSrcRect(Point(aPosAry.mnSrcX, aPosAry.mnSrcY),
+ const tools::Rectangle aSrcRect(Point(aPosAry.mnSrcX, aPosAry.mnSrcY),
Size(aPosAry.mnSrcWidth, aPosAry.mnSrcHeight));
ImplMoveAllInvalidateRegions(aSrcRect,
@@ -1454,7 +1454,7 @@ void Window::ImplPosSizeWindow( long nX, long nY,
if ( IsReallyVisible() )
{
- Rectangle aOldWinRect( Point( nOldOutOffX, nOldOutOffY ),
+ tools::Rectangle aOldWinRect( Point( nOldOutOffX, nOldOutOffY ),
Size( nOldOutWidth, nOldOutHeight ) );
pOldRegion = new vcl::Region( aOldWinRect );
if ( mpWindowImpl->mbWinRegion )
@@ -1542,7 +1542,7 @@ void Window::ImplPosSizeWindow( long nX, long nY,
if ( bCopyBits && !pOverlapRegion )
{
pOverlapRegion = new vcl::Region();
- ImplCalcOverlapRegion( Rectangle( Point( mnOutOffX, mnOutOffY ),
+ ImplCalcOverlapRegion( tools::Rectangle( Point( mnOutOffX, mnOutOffY ),
Size( mnOutWidth, mnOutHeight ) ),
*pOverlapRegion, false, true );
}
@@ -1560,7 +1560,7 @@ void Window::ImplPosSizeWindow( long nX, long nY,
if ( bCopyBits && !pOverlapRegion )
{
pOverlapRegion = new vcl::Region();
- ImplCalcOverlapRegion( Rectangle( Point( mnOutOffX, mnOutOffY ),
+ ImplCalcOverlapRegion( tools::Rectangle( Point( mnOutOffX, mnOutOffY ),
Size( mnOutWidth, mnOutHeight ) ),
*pOverlapRegion, false, true );
}
@@ -1646,7 +1646,7 @@ void Window::ImplPosSizeWindow( long nX, long nY,
if ( bCopyBits && bParentPaint && !HasPaintEvent() )
{
Point aPoint( mnOutOffX, mnOutOffY );
- vcl::Region aRegion( Rectangle( aPoint,
+ vcl::Region aRegion( tools::Rectangle( aPoint,
Size( mnOutWidth, mnOutHeight ) ) );
if ( mpWindowImpl->mbWinRegion )
aRegion.Intersect( ImplPixelToDevicePixel( mpWindowImpl->maWinRegion ) );
@@ -1659,7 +1659,7 @@ void Window::ImplPosSizeWindow( long nX, long nY,
if ( !aRegion.IsEmpty() )
{
// adapt Paint areas
- ImplMoveAllInvalidateRegions( Rectangle( Point( nOldOutOffX, nOldOutOffY ),
+ ImplMoveAllInvalidateRegions( tools::Rectangle( Point( nOldOutOffX, nOldOutOffY ),
Size( nOldOutWidth, nOldOutHeight ) ),
mnOutOffX-nOldOutOffX, mnOutOffY-nOldOutOffY,
true );
@@ -1698,7 +1698,7 @@ void Window::ImplPosSizeWindow( long nX, long nY,
else
{
Point aPoint( mnOutOffX, mnOutOffY );
- vcl::Region aRegion( Rectangle( aPoint,
+ vcl::Region aRegion( tools::Rectangle( aPoint,
Size( mnOutWidth, mnOutHeight ) ) );
aRegion.Exclude( *pOldRegion );
if ( mpWindowImpl->mbWinRegion )
@@ -1875,7 +1875,7 @@ void Window::RequestHelp( const HelpEvent& rHEvt )
Point aPos = GetPosPixel();
if ( ImplGetParent() && !ImplIsOverlapWindow() )
aPos = ImplGetParent()->OutputToScreenPixel( aPos );
- Rectangle aRect( aPos, GetSizePixel() );
+ tools::Rectangle aRect( aPos, GetSizePixel() );
Help::ShowBalloon( this, rHEvt.GetMousePosPixel(), aRect, rStr );
}
@@ -1890,7 +1890,7 @@ void Window::RequestHelp( const HelpEvent& rHEvt )
Point aPos = GetPosPixel();
if ( ImplGetParent() && !ImplIsOverlapWindow() )
aPos = ImplGetParent()->OutputToScreenPixel( aPos );
- Rectangle aRect( aPos, GetSizePixel() );
+ tools::Rectangle aRect( aPos, GetSizePixel() );
OUString aHelpText;
if ( !rStr.isEmpty() )
aHelpText = GetHelpText();
@@ -2102,7 +2102,7 @@ void Window::EndExtTextInput()
ImplGetFrame()->EndExtTextInput( EndExtTextInputFlags::Complete );
}
-void Window::SetCursorRect( const Rectangle* pRect, long nExtTextInputWidth )
+void Window::SetCursorRect( const tools::Rectangle* pRect, long nExtTextInputWidth )
{
ImplWinData* pWinData = ImplGetWinData();
@@ -2119,14 +2119,14 @@ void Window::SetCursorRect( const Rectangle* pRect, long nExtTextInputWidth )
else
{
if ( pRect )
- pWinData->mpCursorRect = new Rectangle( *pRect );
+ pWinData->mpCursorRect = new tools::Rectangle( *pRect );
}
pWinData->mnCursorExtWidth = nExtTextInputWidth;
}
-const Rectangle* Window::GetCursorRect() const
+const tools::Rectangle* Window::GetCursorRect() const
{
ImplWinData* pWinData = ImplGetWinData();
@@ -2140,7 +2140,7 @@ long Window::GetCursorExtTextInputWidth() const
return pWinData->mnCursorExtWidth;
}
-void Window::SetCompositionCharRect( const Rectangle* pRect, long nCompositionLength, bool bVertical ) {
+void Window::SetCompositionCharRect( const tools::Rectangle* pRect, long nCompositionLength, bool bVertical ) {
ImplWinData* pWinData = ImplGetWinData();
delete[] pWinData->mpCompositionCharRects;
@@ -2149,7 +2149,7 @@ void Window::SetCompositionCharRect( const Rectangle* pRect, long nCompositionLe
pWinData->mnCompositionCharRects = nCompositionLength;
if ( pRect && (nCompositionLength > 0) )
{
- pWinData->mpCompositionCharRects = new Rectangle[nCompositionLength];
+ pWinData->mpCompositionCharRects = new tools::Rectangle[nCompositionLength];
for (long i = 0; i < nCompositionLength; ++i)
pWinData->mpCompositionCharRects[i] = pRect[i];
}
@@ -2252,7 +2252,7 @@ void Window::Show(bool bVisible, ShowFlags nFlags)
* invalidated. Workaround: invalidate an area on the parent, too
*/
const int workaround_border = 5;
- Rectangle aBounds( aInvRegion.GetBoundRect() );
+ tools::Rectangle aBounds( aInvRegion.GetBoundRect() );
aBounds.Left() -= workaround_border;
aBounds.Top() -= workaround_border;
aBounds.Right() += workaround_border;
@@ -2759,7 +2759,7 @@ void Window::setPosSizePixel( long nX, long nY,
if( pParent && pParent->ImplIsAntiparallel() )
{
// --- RTL --- (re-mirror at parent window)
- Rectangle aRect( Point ( nX, nY ), Size( nWidth, nHeight ) );
+ tools::Rectangle aRect( Point ( nX, nY ), Size( nWidth, nHeight ) );
const OutputDevice *pParentOutDev = pParent->GetOutDev();
pParentOutDev->ReMirror( aRect );
nX = aRect.Left();
@@ -2845,9 +2845,9 @@ Point Window::GetPosPixel() const
return mpWindowImpl->maPos;
}
-Rectangle Window::GetDesktopRectPixel() const
+tools::Rectangle Window::GetDesktopRectPixel() const
{
- Rectangle rRect;
+ tools::Rectangle rRect;
mpWindowImpl->mpFrameWindow->mpWindowImpl->mpFrame->GetWorkArea( rRect );
return rRect;
}
@@ -2921,7 +2921,7 @@ Point Window::AbsoluteScreenToOutputPixel( const Point& rPos ) const
return p;
}
-Rectangle Window::ImplOutputToUnmirroredAbsoluteScreenPixel( const Rectangle &rRect ) const
+tools::Rectangle Window::ImplOutputToUnmirroredAbsoluteScreenPixel( const tools::Rectangle &rRect ) const
{
// this method creates unmirrored screen coordinates to be compared with the desktop
// and is used for positioning of RTL popup windows correctly on the screen
@@ -2935,22 +2935,22 @@ Rectangle Window::ImplOutputToUnmirroredAbsoluteScreenPixel( const Rectangle &rR
p2.X() = g.nX+g.nWidth-p2.X();
p2.Y() += g.nY;
- return Rectangle( p1, p2 );
+ return tools::Rectangle( p1, p2 );
}
-Rectangle Window::GetWindowExtentsRelative( vcl::Window *pRelativeWindow ) const
+tools::Rectangle Window::GetWindowExtentsRelative( vcl::Window *pRelativeWindow ) const
{
// with decoration
return ImplGetWindowExtentsRelative( pRelativeWindow, false );
}
-Rectangle Window::GetClientWindowExtentsRelative() const
+tools::Rectangle Window::GetClientWindowExtentsRelative() const
{
// without decoration
return ImplGetWindowExtentsRelative( nullptr, true );
}
-Rectangle Window::ImplGetWindowExtentsRelative( vcl::Window *pRelativeWindow, bool bClientOnly ) const
+tools::Rectangle Window::ImplGetWindowExtentsRelative( vcl::Window *pRelativeWindow, bool bClientOnly ) const
{
SalFrameGeometry g = mpWindowImpl->mpFrame->GetGeometry();
// make sure we use the extent of our border window,
@@ -2975,23 +2975,23 @@ Rectangle Window::ImplGetWindowExtentsRelative( vcl::Window *pRelativeWindow, bo
vcl::Window *pRelWin = (!bClientOnly && pRelativeWindow->mpWindowImpl->mpBorderWindow) ? pRelativeWindow->mpWindowImpl->mpBorderWindow.get() : pRelativeWindow;
aPos = pRelWin->AbsoluteScreenToOutputPixel( aPos );
}
- return Rectangle( aPos, aSize );
+ return tools::Rectangle( aPos, aSize );
}
void Window::Scroll( long nHorzScroll, long nVertScroll, ScrollFlags nFlags )
{
- ImplScroll( Rectangle( Point( mnOutOffX, mnOutOffY ),
+ ImplScroll( tools::Rectangle( Point( mnOutOffX, mnOutOffY ),
Size( mnOutWidth, mnOutHeight ) ),
nHorzScroll, nVertScroll, nFlags & ~ScrollFlags::Clip );
}
void Window::Scroll( long nHorzScroll, long nVertScroll,
- const Rectangle& rRect, ScrollFlags nFlags )
+ const tools::Rectangle& rRect, ScrollFlags nFlags )
{
OutputDevice *pOutDev = GetOutDev();
- Rectangle aRect = pOutDev->ImplLogicToDevicePixel( rRect );
- aRect.Intersection( Rectangle( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) ) );
+ tools::Rectangle aRect = pOutDev->ImplLogicToDevicePixel( rRect );
+ aRect.Intersection( tools::Rectangle( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) ) );
if ( !aRect.IsEmpty() )
ImplScroll( aRect, nHorzScroll, nVertScroll, nFlags );
}
@@ -2999,7 +2999,7 @@ void Window::Scroll( long nHorzScroll, long nVertScroll,
void Window::Flush()
{
- const Rectangle aWinRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) );
+ const tools::Rectangle aWinRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) );
mpWindowImpl->mpFrame->Flush( aWinRect );
}
@@ -3295,7 +3295,7 @@ Reference< XClipboard > Window::GetPrimarySelection()
return static_cast < XClipboard * > (nullptr);
}
-void Window::RecordLayoutData( vcl::ControlLayoutData* pLayout, const Rectangle& rRect )
+void Window::RecordLayoutData( vcl::ControlLayoutData* pLayout, const tools::Rectangle& rRect )
{
assert(mpOutDevData);
mpOutDevData->mpRecordLayout = pLayout;
@@ -3304,7 +3304,7 @@ void Window::RecordLayoutData( vcl::ControlLayoutData* pLayout, const Rectangle&
mpOutDevData->mpRecordLayout = nullptr;
}
-void Window::DrawSelectionBackground( const Rectangle& rRect,
+void Window::DrawSelectionBackground( const tools::Rectangle& rRect,
sal_uInt16 highlight,
bool bChecked,
bool bDrawBorder
@@ -3336,7 +3336,7 @@ void Window::DrawSelectionBackground( const Rectangle& rRect,
aSelectionBorderCol = aSelectionFillCol;
}
- Rectangle aRect( rRect );
+ tools::Rectangle aRect( rRect );
Color oldFillCol = GetFillColor();
Color oldLineCol = GetLineColor();
diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx
index 9882ce3e3e77..a88d1c0c8a40 100644
--- a/vcl/source/window/window2.cxx
+++ b/vcl/source/window/window2.cxx
@@ -49,7 +49,7 @@ using namespace com::sun::star;
namespace vcl {
-void Window::ShowFocus( const Rectangle& rRect )
+void Window::ShowFocus( const tools::Rectangle& rRect )
{
if( mpWindowImpl->mbInShowFocus )
return;
@@ -77,7 +77,7 @@ void Window::ShowFocus( const Rectangle& rRect )
ImplInvertFocus( rRect );
}
if ( !pWinData->mpFocusRect )
- pWinData->mpFocusRect = new Rectangle( rRect );
+ pWinData->mpFocusRect = new tools::Rectangle( rRect );
else
*(pWinData->mpFocusRect) = rRect;
mpWindowImpl->mbFocusVisible = true;
@@ -127,7 +127,7 @@ void Window::HideFocus()
mpWindowImpl->mbInHideFocus = false;
}
-void Window::ShowTracking( const Rectangle& rRect, ShowTrackFlags nFlags )
+void Window::ShowTracking( const tools::Rectangle& rRect, ShowTrackFlags nFlags )
{
ImplWinData* pWinData = ImplGetWinData();
@@ -146,7 +146,7 @@ void Window::ShowTracking( const Rectangle& rRect, ShowTrackFlags nFlags )
}
if ( !pWinData->mpTrackRect )
- pWinData->mpTrackRect = new Rectangle( rRect );
+ pWinData->mpTrackRect = new tools::Rectangle( rRect );
else
*(pWinData->mpTrackRect) = rRect;
pWinData->mnTrackFlags = nFlags;
@@ -164,10 +164,10 @@ void Window::HideTracking()
}
}
-void Window::InvertTracking( const Rectangle& rRect, ShowTrackFlags nFlags )
+void Window::InvertTracking( const tools::Rectangle& rRect, ShowTrackFlags nFlags )
{
OutputDevice *pOutDev = GetOutDev();
- Rectangle aRect( pOutDev->ImplLogicToDevicePixel( rRect ) );
+ tools::Rectangle aRect( pOutDev->ImplLogicToDevicePixel( rRect ) );
if ( aRect.IsEmpty() )
return;
@@ -202,7 +202,7 @@ void Window::InvertTracking( const Rectangle& rRect, ShowTrackFlags nFlags )
if ( nFlags & ShowTrackFlags::Clip )
{
Point aPoint( mnOutOffX, mnOutOffY );
- vcl::Region aRegion( Rectangle( aPoint,
+ vcl::Region aRegion( tools::Rectangle( aPoint,
Size( mnOutWidth, mnOutHeight ) ) );
ImplClipBoundaries( aRegion, false, false );
pOutDev->SelectClipRegion( aRegion, pGraphics );
@@ -266,7 +266,7 @@ void Window::InvertTracking( const tools::Polygon& rPoly, ShowTrackFlags nFlags
if ( nFlags & ShowTrackFlags::Clip )
{
Point aPoint( mnOutOffX, mnOutOffY );
- vcl::Region aRegion( Rectangle( aPoint,
+ vcl::Region aRegion( tools::Rectangle( aPoint,
Size( mnOutWidth, mnOutHeight ) ) );
ImplClipBoundaries( aRegion, false, false );
pOutDev->SelectClipRegion( aRegion, pGraphics );
diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx
index 567f1c969412..17ada9bc8752 100644
--- a/vcl/source/window/winproc.cxx
+++ b/vcl/source/window/winproc.cxx
@@ -1240,7 +1240,7 @@ static bool ImplHandleEndExtTextInput( vcl::Window* /* pWindow */ )
}
static void ImplHandleExtTextInputPos( vcl::Window* pWindow,
- Rectangle& rRect, long& rInputWidth,
+ tools::Rectangle& rRect, long& rInputWidth,
bool * pVertical )
{
ImplSVData* pSVData = ImplGetSVData();
@@ -1259,7 +1259,7 @@ static void ImplHandleExtTextInputPos( vcl::Window* pWindow,
{
const OutputDevice *pChildOutDev = pChild->GetOutDev();
ImplCallCommand( pChild, CommandEventId::CursorPos );
- const Rectangle* pRect = pChild->GetCursorRect();
+ const tools::Rectangle* pRect = pChild->GetCursorRect();
if ( pRect )
rRect = pChildOutDev->ImplLogicToDevicePixel( *pRect );
else
@@ -1271,10 +1271,10 @@ static void ImplHandleExtTextInputPos( vcl::Window* pWindow,
Size aSize = pChild->LogicToPixel( pCursor->GetSize() );
if ( !aSize.Width() )
aSize.Width() = pChild->GetSettings().GetStyleSettings().GetCursorSize();
- rRect = Rectangle( aPos, aSize );
+ rRect = tools::Rectangle( aPos, aSize );
}
else
- rRect = Rectangle( Point( pChild->GetOutOffXPixel(), pChild->GetOutOffYPixel() ), Size() );
+ rRect = tools::Rectangle( Point( pChild->GetOutOffXPixel(), pChild->GetOutOffYPixel() ), Size() );
}
rInputWidth = pChild->ImplLogicWidthToDevicePixel( pChild->GetCursorExtTextInputWidth() );
if ( !rInputWidth )
@@ -1573,7 +1573,7 @@ static bool ImplHandleLongPress(vcl::Window *pWindow, const SalLongPressEvent& r
return aHandler.HandleEvent();
}
-static void ImplHandlePaint( vcl::Window* pWindow, const Rectangle& rBoundRect, bool bImmediateUpdate )
+static void ImplHandlePaint( vcl::Window* pWindow, const tools::Rectangle& rBoundRect, bool bImmediateUpdate )
{
// system paint events must be checked for re-mirroring
pWindow->ImplGetWindowImpl()->mnPaintFlags |= ImplPaintFlags::CheckRtl;
@@ -2157,7 +2157,7 @@ static void ImplHandleSalSettings( SalEvent nEvent )
static void ImplHandleSalExtTextInputPos( vcl::Window* pWindow, SalExtTextInputPosEvent* pEvt )
{
- Rectangle aCursorRect;
+ tools::Rectangle aCursorRect;
ImplHandleExtTextInputPos( pWindow, aCursorRect, pEvt->mnExtWidth, &pEvt->mbVertical );
if ( aCursorRect.IsEmpty() )
{
@@ -2283,8 +2283,8 @@ static void ImplHandleSalQueryCharPosition( vcl::Window *pWindow,
if ( pWinData->mpCompositionCharRects && pEvt->mnCharPos < static_cast<sal_uLong>( pWinData->mnCompositionCharRects ) )
{
const OutputDevice *pChildOutDev = pChild->GetOutDev();
- const Rectangle& aRect = pWinData->mpCompositionCharRects[ pEvt->mnCharPos ];
- Rectangle aDeviceRect = pChildOutDev->ImplLogicToDevicePixel( aRect );
+ const tools::Rectangle& aRect = pWinData->mpCompositionCharRects[ pEvt->mnCharPos ];
+ tools::Rectangle aDeviceRect = pChildOutDev->ImplLogicToDevicePixel( aRect );
Point aAbsScreenPos = pChild->OutputToAbsoluteScreenPixel( pChild->ScreenToOutputPixel(aDeviceRect.TopLeft()) );
pEvt->mnCursorBoundX = aAbsScreenPos.X();
pEvt->mnCursorBoundY = aAbsScreenPos.Y();
@@ -2429,7 +2429,7 @@ bool ImplWindowFrameProc( vcl::Window* _pWindow, SalEvent nEvent, const void* pE
const_cast<SalPaintEvent *>(pPaintEvt)->mnBoundX = pSalFrame->maGeometry.nWidth-pPaintEvt->mnBoundWidth-pPaintEvt->mnBoundX;
}
- Rectangle aBoundRect( Point( pPaintEvt->mnBoundX, pPaintEvt->mnBoundY ),
+ tools::Rectangle aBoundRect( Point( pPaintEvt->mnBoundX, pPaintEvt->mnBoundY ),
Size( pPaintEvt->mnBoundWidth, pPaintEvt->mnBoundHeight ) );
ImplHandlePaint( pWindow, aBoundRect, pPaintEvt->mbImmediateUpdate );
}