summaryrefslogtreecommitdiffstats
path: root/chart2/source
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 /chart2/source
parentFix type of css.drawing.FillProperties FillColor property (diff)
downloadcore-b22d4785310eac35696df771803dfba0871a50ac.tar.gz
core-b22d4785310eac35696df771803dfba0871a50ac.zip
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 'chart2/source')
-rw-r--r--chart2/source/controller/drawinglayer/DrawViewWrapper.cxx2
1 files changed, 1 insertions, 1 deletions
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;
}