From b22d4785310eac35696df771803dfba0871a50ac Mon Sep 17 00:00:00 2001 From: Luboš Luňák Date: Fri, 17 Sep 2021 21:49:21 +0200 Subject: clean up ambiguous confusing rectangle APIs like IsInside() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Luboš Luňák Tested-by: Jenkins --- chart2/source/controller/drawinglayer/DrawViewWrapper.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'chart2') diff --git a/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx b/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx index d72e6cb2dccf..afa919b1e3ec 100644 --- a/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx +++ b/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx @@ -283,7 +283,7 @@ bool DrawViewWrapper::IsObjectHit( SdrObject const * pObj, const Point& rPnt ) if(pObj) { tools::Rectangle aRect(pObj->GetCurrentBoundRect()); - return aRect.IsInside(rPnt); + return aRect.Contains(rPnt); } return false; } -- cgit