summaryrefslogtreecommitdiff
path: root/sfx2/source/view/lokcharthelper.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 /sfx2/source/view/lokcharthelper.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 'sfx2/source/view/lokcharthelper.cxx')
-rw-r--r--sfx2/source/view/lokcharthelper.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/sfx2/source/view/lokcharthelper.cxx b/sfx2/source/view/lokcharthelper.cxx
index 1e85f269cf3d..789a497f9593 100644
--- a/sfx2/source/view/lokcharthelper.cxx
+++ b/sfx2/source/view/lokcharthelper.cxx
@@ -165,7 +165,7 @@ bool LokChartHelper::Hit(const Point& aPos)
if (pChartWindow)
{
tools::Rectangle rChartBBox = GetChartBoundingBox();
- return rChartBBox.IsInside(aPos);
+ return rChartBBox.Contains(aPos);
}
}
return false;
@@ -281,7 +281,7 @@ bool LokChartHelper::postMouseEvent(int nType, int nX, int nY,
if (pChartWindow)
{
tools::Rectangle rChartBBox = GetChartBoundingBox();
- if (rChartBBox.IsInside(aMousePos))
+ if (rChartBBox.Contains(aMousePos))
{
int nChartWinX = nX - rChartBBox.Left();
int nChartWinY = nY - rChartBBox.Top();
@@ -303,7 +303,7 @@ bool LokChartHelper::postMouseEvent(int nType, int nX, int nY,
bool LokChartHelper::setTextSelection(int nType, int nX, int nY)
{
tools::Rectangle rChartBBox = GetChartBoundingBox();
- if (rChartBBox.IsInside(Point(nX, nY)))
+ if (rChartBBox.Contains(Point(nX, nY)))
{
css::uno::Reference<css::frame::XDispatch> xDispatcher = GetXDispatcher();
if (xDispatcher.is())
@@ -330,7 +330,7 @@ bool LokChartHelper::setGraphicSelection(int nType, int nX, int nY,
double fScaleX, double fScaleY)
{
tools::Rectangle rChartBBox = GetChartBoundingBox();
- if (rChartBBox.IsInside(Point(nX, nY)))
+ if (rChartBBox.Contains(Point(nX, nY)))
{
int nChartWinX = nX - rChartBBox.Left();
int nChartWinY = nY - rChartBBox.Top();