summaryrefslogtreecommitdiff
path: root/vcl/win/window/salframe.cxx
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2021-09-17 21:49:21 +0200
committerLuboš Luňák <l.lunak@collabora.com>2021-09-20 12:10:44 +0200
commitb22d4785310eac35696df771803dfba0871a50ac (patch)
tree56e394a3c38a2e1f17530fbc18dd8e6b3c5d5098 /vcl/win/window/salframe.cxx
parent3e2370260f2b79c43b4f8a86b123861aa95d3ef2 (diff)
clean up ambiguous confusing rectangle APIs like IsInside()
Reading 'rectA.IsInside( rectB )' kind of suggests that the code checks whether 'rectA is inside rectB', but it's actually the other way around. Rename IsInside() -> Contains(), IsOver() -> Overlaps(), which should make it clear which way the logic goes. Change-Id: I9347450fe7dc34c96df6d636a4e3e660de1801ac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122271 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Luboš Luňák <l.lunak@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'vcl/win/window/salframe.cxx')
-rw-r--r--vcl/win/window/salframe.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx
index 259a1395a3b2..89d1d10c6961 100644
--- a/vcl/win/window/salframe.cxx
+++ b/vcl/win/window/salframe.cxx
@@ -897,7 +897,7 @@ void WinSalFrame::updateScreenNumber()
size_t nMon = rMonitors.size();
for( size_t i = 0; i < nMon; i++ )
{
- if( rMonitors[i].m_aArea.IsInside( aPoint ) )
+ if( rMonitors[i].m_aArea.Contains( aPoint ) )
{
mnDisplay = static_cast<sal_Int32>(i);
maGeometry.nDisplayScreenNumber = static_cast<unsigned int>(i);
@@ -1769,7 +1769,7 @@ void WinSalFrame::SetScreenNumber( unsigned int nNewScreen )
Point aCurPos( maGeometry.nX, maGeometry.nY );
for( size_t i = 0; i < nMon; i++ )
{
- if( rMonitors[i].m_aArea.IsInside( aCurPos ) )
+ if( rMonitors[i].m_aArea.Contains( aCurPos ) )
{
aOldMonPos = rMonitors[i].m_aArea.TopLeft();
break;
@@ -3096,7 +3096,7 @@ static bool ImplHandleMouseMsg( HWND hWnd, UINT nMsg,
if (const auto& pHelpWin = ImplGetSVHelpData().mpHelpWin)
{
const tools::Rectangle& rHelpRect = pHelpWin->GetHelpArea();
- if (rHelpRect.IsInside(Point(aPt.x, aPt.y)))
+ if (rHelpRect.Contains(Point(aPt.x, aPt.y)))
{
// We have entered a tooltip (help window). Don't call the handler here; it
// would launch the sequence "Mouse leaves the Control->Control redraws->