summaryrefslogtreecommitdiff
path: root/sc
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 /sc
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 'sc')
-rw-r--r--sc/qa/unit/tiledrendering/tiledrendering.cxx2
-rw-r--r--sc/source/core/data/documen5.cxx2
-rw-r--r--sc/source/core/data/documen9.cxx8
-rw-r--r--sc/source/core/data/drwlayer.cxx12
-rw-r--r--sc/source/core/tool/detfunc.cxx6
-rw-r--r--sc/source/filter/html/htmlexp2.cxx2
-rw-r--r--sc/source/ui/Accessibility/AccessibleContextBase.cxx4
-rw-r--r--sc/source/ui/Accessibility/AccessibleDocument.cxx2
-rw-r--r--sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx14
-rw-r--r--sc/source/ui/dbgui/csvgrid.cxx2
-rw-r--r--sc/source/ui/dbgui/csvruler.cxx2
-rw-r--r--sc/source/ui/drawfunc/fudraw.cxx2
-rw-r--r--sc/source/ui/drawfunc/fusel2.cxx2
-rw-r--r--sc/source/ui/unoobj/docuno.cxx2
-rw-r--r--sc/source/ui/view/gridwin.cxx16
-rw-r--r--sc/source/ui/view/gridwin2.cxx4
-rw-r--r--sc/source/ui/view/prevloc.cxx8
-rw-r--r--sc/source/ui/view/printfun.cxx4
-rw-r--r--sc/source/ui/view/tabview3.cxx2
19 files changed, 48 insertions, 48 deletions
diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx b/sc/qa/unit/tiledrendering/tiledrendering.cxx
index 60d67e5d6a39..bcd694b11f01 100644
--- a/sc/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx
@@ -2776,7 +2776,7 @@ void ScTiledRenderingTest::testEditCursorBounds()
CPPUNIT_ASSERT(!aView.m_aInvalidateCursorResult.empty());
CPPUNIT_ASSERT_MESSAGE("Edit cursor must be in cell bounds!",
- aCellBounds.IsInside(aView.m_aInvalidateCursorResult.getBounds()));
+ aCellBounds.Contains(aView.m_aInvalidateCursorResult.getBounds()));
SfxViewShell::Current()->registerLibreOfficeKitViewCallback(nullptr, nullptr);
}
diff --git a/sc/source/core/data/documen5.cxx b/sc/source/core/data/documen5.cxx
index 1933601aa7db..60d6d6cf068b 100644
--- a/sc/source/core/data/documen5.cxx
+++ b/sc/source/core/data/documen5.cxx
@@ -108,7 +108,7 @@ bool ScDocument::HasChartAtPoint( SCTAB nTab, const Point& rPos, OUString& rName
while (pObject)
{
if ( pObject->GetObjIdentifier() == OBJ_OLE2 &&
- pObject->GetCurrentBoundRect().IsInside(rPos) )
+ pObject->GetCurrentBoundRect().Contains(rPos) )
{
// also Chart-Objects that are not in the Collection
diff --git a/sc/source/core/data/documen9.cxx b/sc/source/core/data/documen9.cxx
index 5c6defa59f40..5a8f97bb36db 100644
--- a/sc/source/core/data/documen9.cxx
+++ b/sc/source/core/data/documen9.cxx
@@ -304,7 +304,7 @@ bool ScDocument::HasOLEObjectsInArea( const ScRange& rRange, const ScMarkData* p
while (pObject)
{
if ( pObject->GetObjIdentifier() == OBJ_OLE2 &&
- aMMRect.IsInside( pObject->GetCurrentBoundRect() ) )
+ aMMRect.Contains( pObject->GetCurrentBoundRect() ) )
return true;
pObject = aIter.Next();
@@ -357,7 +357,7 @@ bool ScDocument::HasBackgroundDraw( SCTAB nTab, const tools::Rectangle& rMMRect
SdrObject* pObject = aIter.Next();
while (pObject && !bFound)
{
- if ( pObject->GetLayer() == SC_LAYER_BACK && pObject->GetCurrentBoundRect().IsOver( rMMRect ) )
+ if ( pObject->GetLayer() == SC_LAYER_BACK && pObject->GetCurrentBoundRect().Overlaps( rMMRect ) )
bFound = true;
pObject = aIter.Next();
}
@@ -382,7 +382,7 @@ bool ScDocument::HasAnyDraw( SCTAB nTab, const tools::Rectangle& rMMRect ) const
SdrObject* pObject = aIter.Next();
while (pObject && !bFound)
{
- if ( pObject->GetCurrentBoundRect().IsOver( rMMRect ) )
+ if ( pObject->GetCurrentBoundRect().Overlaps( rMMRect ) )
bFound = true;
pObject = aIter.Next();
}
@@ -410,7 +410,7 @@ SdrObject* ScDocument::GetObjectAtPoint( SCTAB nTab, const Point& rPos )
SdrObject* pObject = aIter.Next();
while (pObject)
{
- if ( pObject->GetCurrentBoundRect().IsInside(rPos) )
+ if ( pObject->GetCurrentBoundRect().Contains(rPos) )
{
// Intern is of no interest
// Only object form background layer, when no object form another layer is found
diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx
index 0e1f55f4d7c8..27e860af94bc 100644
--- a/sc/source/core/data/drwlayer.cxx
+++ b/sc/source/core/data/drwlayer.cxx
@@ -1520,7 +1520,7 @@ bool ScDrawLayer::HasObjectsInRows( SCTAB nTab, SCROW nStartRow, SCROW nEndRow )
while ( pObject && !bFound )
{
aObjRect = pObject->GetSnapRect(); //TODO: GetLogicRect ?
- if (aTestRect.IsInside(aObjRect.TopLeft()) || aTestRect.IsInside(aObjRect.BottomLeft()))
+ if (aTestRect.Contains(aObjRect.TopLeft()) || aTestRect.Contains(aObjRect.BottomLeft()))
bFound = true;
pObject = aIter.Next();
@@ -1570,13 +1570,13 @@ void ScDrawLayer::DeleteObjectsInArea( SCTAB nTab, SCCOL nCol1,SCROW nRow1,
if (pObjData && pObjData->meType == ScDrawObjData::ValidationCircle)
{
aObjRect = pObject->GetLogicRect();
- if(aDelCircle.IsInside(aObjRect))
+ if(aDelCircle.Contains(aObjRect))
ppObj.push_back(pObject);
}
else
{
aObjRect = pObject->GetCurrentBoundRect();
- if (aDelRect.IsInside(aObjRect))
+ if (aDelRect.Contains(aObjRect))
{
if (bAnchored)
{
@@ -1645,7 +1645,7 @@ void ScDrawLayer::DeleteObjectsInSelection( const ScMarkData& rMark )
tools::Rectangle aObjRect = pObject->GetCurrentBoundRect();
ScRange aRange = pDoc->GetRange(nTab, aObjRect);
bool bObjectInMarkArea =
- aMarkBound.IsInside(aObjRect) && rMark.IsAllMarked(aRange);
+ aMarkBound.Contains(aObjRect) && rMark.IsAllMarked(aRange);
const ScDrawObjData* pObjData = ScDrawLayer::GetObjData(pObject);
ScAnchorType aAnchorType = ScDrawLayer::GetAnchorType(*pObject);
bool bObjectAnchoredToMarkedCell
@@ -1695,7 +1695,7 @@ void ScDrawLayer::CopyToClip( ScDocument* pClipDoc, SCTAB nTab, const tools::Rec
{
tools::Rectangle aObjRect = pOldObject->GetCurrentBoundRect();
- bool bObjectInArea = rRange.IsInside(aObjRect);
+ bool bObjectInArea = rRange.Contains(aObjRect);
const ScDrawObjData* pObjData = ScDrawLayer::GetObjData(pOldObject);
if (pObjData)
{
@@ -1886,7 +1886,7 @@ void ScDrawLayer::CopyFromClip( ScDrawLayer* pClipModel, SCTAB nSourceTab, const
SCTAB nClipTab = bRestoreDestTabName ? nDestTab : nSourceTab;
ScRange aClipRange = lcl_getClipRangeFromClipDoc(pClipDoc, nClipTab);
- bool bObjectInArea = rSourceRange.IsInside(aObjRect);
+ bool bObjectInArea = rSourceRange.Contains(aObjRect);
const ScDrawObjData* pObjData = ScDrawLayer::GetObjData(pOldObject);
if (pObjData) // Consider images anchored to the copied cell
bObjectInArea = bObjectInArea || aClipRange.In(pObjData->maStart);
diff --git a/sc/source/core/tool/detfunc.cxx b/sc/source/core/tool/detfunc.cxx
index 8013ac29ab76..cbd53ca5c870 100644
--- a/sc/source/core/tool/detfunc.cxx
+++ b/sc/source/core/tool/detfunc.cxx
@@ -410,9 +410,9 @@ bool ScDetectiveFunc::HasArrow( const ScAddress& rStart,
lcl_IsOtherTab( rSet.Get(XATTR_LINEEND).GetLineEndValue() );
bool bStartHit = bStartAlien ? bObjStartAlien :
- ( !bObjStartAlien && aStartRect.IsInside(pObject->GetPoint(0)) );
+ ( !bObjStartAlien && aStartRect.Contains(pObject->GetPoint(0)) );
bool bEndHit = bEndAlien ? bObjEndAlien :
- ( !bObjEndAlien && aEndRect.IsInside(pObject->GetPoint(1)) );
+ ( !bObjEndAlien && aEndRect.Contains(pObject->GetPoint(1)) );
if ( bStartHit && bEndHit )
bFound = true;
@@ -684,7 +684,7 @@ void ScDetectiveFunc::DeleteArrowsAt( SCCOL nCol, SCROW nRow, bool bDestPnt )
if ( pObject->GetLayer()==SC_LAYER_INTERN &&
pObject->IsPolyObj() && pObject->GetPointCount()==2 )
{
- if (aRect.IsInside(pObject->GetPoint(bDestPnt ? 1 : 0))) // start/destinationpoint
+ if (aRect.Contains(pObject->GetPoint(bDestPnt ? 1 : 0))) // start/destinationpoint
ppObj[nDelCount++] = pObject;
}
diff --git a/sc/source/filter/html/htmlexp2.cxx b/sc/source/filter/html/htmlexp2.cxx
index 055a04f81f81..50ff33b6ffc8 100644
--- a/sc/source/filter/html/htmlexp2.cxx
+++ b/sc/source/filter/html/htmlexp2.cxx
@@ -75,7 +75,7 @@ void ScHTMLExport::FillGraphList( const SdrPage* pPage, SCTAB nTab,
while ( pObject )
{
tools::Rectangle aObjRect = pObject->GetCurrentBoundRect();
- if ( (bAll || aRect.IsInside( aObjRect )) && !ScDrawLayer::IsNoteCaption(pObject) )
+ if ( (bAll || aRect.Contains( aObjRect )) && !ScDrawLayer::IsNoteCaption(pObject) )
{
Size aSpace;
ScRange aR = pDoc->GetRange( nTab, aObjRect );
diff --git a/sc/source/ui/Accessibility/AccessibleContextBase.cxx b/sc/source/ui/Accessibility/AccessibleContextBase.cxx
index b1d9cf3dfab6..38620240baaf 100644
--- a/sc/source/ui/Accessibility/AccessibleContextBase.cxx
+++ b/sc/source/ui/Accessibility/AccessibleContextBase.cxx
@@ -143,7 +143,7 @@ sal_Bool SAL_CALL ScAccessibleContextBase::containsPoint(const awt::Point& rPoin
{
SolarMutexGuard aGuard;
IsObjectValid();
- return tools::Rectangle (Point(), GetBoundingBox().GetSize()).IsInside(VCLPoint(rPoint));
+ return tools::Rectangle (Point(), GetBoundingBox().GetSize()).Contains(VCLPoint(rPoint));
}
uno::Reference< XAccessible > SAL_CALL ScAccessibleContextBase::getAccessibleAtPoint(
@@ -193,7 +193,7 @@ bool ScAccessibleContextBase::isShowing( )
{
tools::Rectangle aParentBounds(VCLRectangle(xParentComponent->getBounds()));
tools::Rectangle aBounds(VCLRectangle(getBounds()));
- bShowing = aBounds.IsOver(aParentBounds);
+ bShowing = aBounds.Overlaps(aParentBounds);
}
}
return bShowing;
diff --git a/sc/source/ui/Accessibility/AccessibleDocument.cxx b/sc/source/ui/Accessibility/AccessibleDocument.cxx
index 3b78798d05c0..0ac7d931d6e6 100644
--- a/sc/source/ui/Accessibility/AccessibleDocument.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocument.cxx
@@ -1647,7 +1647,7 @@ uno::Reference< XAccessible > SAL_CALL ScAccessibleDocument::getAccessibleAtPoin
if (xComp.is())
{
tools::Rectangle aBound(VCLRectangle(xComp->getBounds()));
- if (aBound.IsInside(VCLPoint(rPoint)))
+ if (aBound.Contains(VCLPoint(rPoint)))
xAccessible = mxTempAcc;
}
}
diff --git a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
index 336fd112af8b..9656b82af035 100644
--- a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
@@ -273,7 +273,7 @@ struct ScPointFound
bool operator() (const ScAccNote& rNote)
{
bool bResult(false);
- if (maPoint.IsInside(rNote.maRect))
+ if (maPoint.Contains(rNote.maRect))
bResult = true;
else
mnParagraphs += rNote.mnParaCount;
@@ -918,7 +918,7 @@ struct ScShapePointFound
bool operator() (const ScShapeChild& rShape)
{
bool bResult(false);
- if (VCLRectangle(rShape.mpAccShape->getBounds()).IsInside(maPoint))
+ if (VCLRectangle(rShape.mpAccShape->getBounds()).Contains(maPoint))
bResult = true;
return bResult;
}
@@ -1117,10 +1117,10 @@ ScPagePreviewCountData::ScPagePreviewCountData( const ScPreviewLocationData& rDa
tools::Rectangle aObjRect;
- if ( rData.GetHeaderPosition( aObjRect ) && aObjRect.IsOver( aVisRect ) )
+ if ( rData.GetHeaderPosition( aObjRect ) && aObjRect.Overlaps( aVisRect ) )
nHeaders = 1;
- if ( rData.GetFooterPosition( aObjRect ) && aObjRect.IsOver( aVisRect ) )
+ if ( rData.GetFooterPosition( aObjRect ) && aObjRect.Overlaps( aVisRect ) )
nFooters = 1;
if ( rData.HasCellsInRange( aVisRect ) )
@@ -1289,7 +1289,7 @@ uno::Reference< XAccessible > SAL_CALL ScAccessibleDocumentPagePreview::getAcces
mpTable = new ScAccessiblePreviewTable( this, mpViewShell, nIndex );
mpTable->Init();
}
- if (mpTable.is() && VCLRectangle(mpTable->getBounds()).IsInside(VCLPoint(rPoint)))
+ if (mpTable.is() && VCLRectangle(mpTable->getBounds()).Contains(VCLPoint(rPoint)))
xAccessible = mpTable.get();
}
if (!xAccessible.is())
@@ -1313,9 +1313,9 @@ uno::Reference< XAccessible > SAL_CALL ScAccessibleDocumentPagePreview::getAcces
Point aPoint(VCLPoint(rPoint));
- if (VCLRectangle(mpHeader->getBounds()).IsInside(aPoint))
+ if (VCLRectangle(mpHeader->getBounds()).Contains(aPoint))
xAccessible = mpHeader.get();
- else if (VCLRectangle(mpFooter->getBounds()).IsInside(aPoint))
+ else if (VCLRectangle(mpFooter->getBounds()).Contains(aPoint))
xAccessible = mpFooter.get();
}
if (!xAccessible.is())
diff --git a/sc/source/ui/dbgui/csvgrid.cxx b/sc/source/ui/dbgui/csvgrid.cxx
index 29edeba6cf85..325353606fdd 100644
--- a/sc/source/ui/dbgui/csvgrid.cxx
+++ b/sc/source/ui/dbgui/csvgrid.cxx
@@ -1028,7 +1028,7 @@ bool ScCsvGrid::Command( const CommandEvent& rCEvt )
case CommandEventId::Wheel:
{
tools::Rectangle aRect( Point(), maWinSize );
- if( aRect.IsInside( rCEvt.GetMousePosPixel() ) )
+ if( aRect.Contains( rCEvt.GetMousePosPixel() ) )
{
const CommandWheelData* pData = rCEvt.GetWheelData();
if( pData && (pData->GetMode() == CommandWheelMode::SCROLL) && !pData->IsHorz() )
diff --git a/sc/source/ui/dbgui/csvruler.cxx b/sc/source/ui/dbgui/csvruler.cxx
index 7d18bfb31d5e..9935cf795d30 100644
--- a/sc/source/ui/dbgui/csvruler.cxx
+++ b/sc/source/ui/dbgui/csvruler.cxx
@@ -438,7 +438,7 @@ bool ScCsvRuler::MouseMove( const MouseEvent& rMEvt )
else
{
tools::Rectangle aRect( Point(), maWinSize );
- if( !IsVisibleSplitPos( nPos ) || !aRect.IsInside( rMEvt.GetPosPixel() ) )
+ if( !IsVisibleSplitPos( nPos ) || !aRect.Contains( rMEvt.GetPosPixel() ) )
// if focused, keep old cursor position for key input
nPos = HasFocus() ? GetRulerCursorPos() : CSV_POS_INVALID;
MoveCursor( nPos, false );
diff --git a/sc/source/ui/drawfunc/fudraw.cxx b/sc/source/ui/drawfunc/fudraw.cxx
index 9306a5fd9556..ee9090765e2c 100644
--- a/sc/source/ui/drawfunc/fudraw.cxx
+++ b/sc/source/ui/drawfunc/fudraw.cxx
@@ -478,7 +478,7 @@ bool FuDraw::KeyInput(const KeyEvent& rKEvt)
tools::Rectangle aMarkRect(pView->GetMarkedObjRect());
aMarkRect.Move(nX, nY);
- if(!aMarkRect.IsInside(rWorkArea))
+ if(!aMarkRect.Contains(rWorkArea))
{
if(aMarkRect.Left() < rWorkArea.Left())
{
diff --git a/sc/source/ui/drawfunc/fusel2.cxx b/sc/source/ui/drawfunc/fusel2.cxx
index cd84fbca9b93..0d18fea87d00 100644
--- a/sc/source/ui/drawfunc/fusel2.cxx
+++ b/sc/source/ui/drawfunc/fusel2.cxx
@@ -129,7 +129,7 @@ bool FuSelection::IsNoteCaptionClicked( const Point& rPos ) const
SdrObjListIter aIter( pPageView->GetObjList(), SdrIterMode::DeepNoGroups, true );
for( SdrObject* pObj = aIter.Next(); pObj; pObj = aIter.Next() )
{
- if( pObj->GetLogicRect().IsInside( rPos ) )
+ if( pObj->GetLogicRect().Contains( rPos ) )
{
if( const ScDrawObjData* pCaptData = ScDrawLayer::GetNoteCaptionData( pObj, nTab ) )
{
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 96b2e03e06a2..7c5eafa81774 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -778,7 +778,7 @@ void ScModelObj::setTextSelection(int nType, int nX, int nY)
Point aPoint(convertTwipToMm100(nX), convertTwipToMm100(nY));
- if (pTableView->GetOutputArea().IsInside(aPoint))
+ if (pTableView->GetOutputArea().Contains(aPoint))
{
switch (nType)
{
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 877da1760bd4..250b1152f114 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -293,7 +293,7 @@ static void lcl_UnLockComment( ScDrawView* pView, const Point& rPos, const ScVie
ScAddress aCellPos( rViewData.GetCurX(), rViewData.GetCurY(), rViewData.GetTabNo() );
ScPostIt* pNote = rDoc.GetNote( aCellPos );
SdrObject* pObj = pNote ? pNote->GetCaption() : nullptr;
- if( pObj && pObj->GetLogicRect().IsInside( rPos ) && ScDrawLayer::IsNoteCaption( pObj ) )
+ if( pObj && pObj->GetLogicRect().Contains( rPos ) && ScDrawLayer::IsNoteCaption( pObj ) )
{
const ScProtectionAttr* pProtAttr = rDoc.GetAttr( aCellPos, ATTR_PROTECTION );
bool bProtectAttr = pProtAttr->GetProtection() || pProtAttr->GetHideCell() ;
@@ -1398,7 +1398,7 @@ bool ScGridWindow::TestMouse( const MouseEvent& rMEvt, bool bAction )
if (aMarkRange.aStart.Tab() == mrViewData.GetTabNo() && mpAutoFillRect)
{
Point aMousePos = rMEvt.GetPosPixel();
- if (mpAutoFillRect->IsInside(aMousePos))
+ if (mpAutoFillRect->Contains(aMousePos))
{
SetPointer( PointerStyle::Cross ); //! bold cross ?
if (bAction)
@@ -1868,7 +1868,7 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt, MouseEventSta
if ( bListValButton )
{
tools::Rectangle aButtonRect = GetListValButtonRect( aListValPos );
- if ( aButtonRect.IsInside( aPos ) )
+ if ( aButtonRect.Contains( aPos ) )
{
// tdf#125917 typically we have the mouse captured already, except if are editing the cell.
// Ensure its captured before the menu is launched even in the cell editing case
@@ -3217,7 +3217,7 @@ void ScGridWindow::SelectForContextMenu( const Point& rPosPixel, SCCOL nCellX, S
{
OutlinerView* pOlView = pDrawView->GetTextEditOutlinerView();
tools::Rectangle aOutputArea = pOlView->GetOutputArea();
- if ( aOutputArea.IsInside( aLogicPos ) )
+ if ( aOutputArea.Contains( aLogicPos ) )
{
// handle selection within the OutlinerView
@@ -4631,7 +4631,7 @@ void ScGridWindow::PasteSelection( const Point& rPosPixel )
for (size_t i = 0; i < nCount; ++i)
{
SdrObject* pObj = pDrawView->GetMarkedObjectByIndex(i);
- if (pObj && pObj->GetLogicRect().IsInside(aLogicPos))
+ if (pObj && pObj->GetLogicRect().Contains(aLogicPos))
{
// Inside an active drawing object. Bail out.
return;
@@ -5534,7 +5534,7 @@ bool ScGridWindow::GetEditUrl( const Point& rPos,
aLogicEdit.SetBottom( aLogicEdit.Top() + nTextHeight );
Point aLogicClick = PixelToLogic(rPos,aEditMode);
- if ( aLogicEdit.IsInside(aLogicClick) )
+ if ( aLogicEdit.Contains(aLogicClick) )
{
EditView aTempView(pEngine.get(), this);
aTempView.SetOutputArea( aLogicEdit );
@@ -5598,7 +5598,7 @@ bool ScGridWindow::IsSpellErrorAtPos( const Point& rPos, SCCOL nCol1, SCROW nRow
aLogicEdit.setWidth(nTextWidth + 1);
- if (!aLogicEdit.IsInside(aLogicClick))
+ if (!aLogicEdit.Contains(aLogicClick))
return false;
pEngine->SetControlWord(pEngine->GetControlWord() | EEControlBits::ONLINESPELLING);
@@ -5662,7 +5662,7 @@ bool ScGridWindow::HasScenarioButton( const Point& rPosPixel, ScRange& rScenRang
aButtonPos.AdjustX( -(nBWidth - nHSpace) ); // same for top or bottom
tools::Rectangle aButRect( aButtonPos, Size(nBWidth,nBHeight) );
- if ( aButRect.IsInside( rPosPixel ) )
+ if ( aButRect.Contains( rPosPixel ) )
{
rScenRange = aRange;
return true;
diff --git a/sc/source/ui/view/gridwin2.cxx b/sc/source/ui/view/gridwin2.cxx
index f9a29bb3b5d7..cfcd088bba34 100644
--- a/sc/source/ui/view/gridwin2.cxx
+++ b/sc/source/ui/view/gridwin2.cxx
@@ -127,7 +127,7 @@ bool ScGridWindow::DoAutoFilterButton( SCCOL nCol, SCROW nRow, const MouseEvent&
Size aPopupSize;
mpFilterButton->getPopupBoundingBox(aPopupPos, aPopupSize);
tools::Rectangle aRect(aPopupPos, aPopupSize);
- if (aRect.IsInside(rMEvt.GetPosPixel()))
+ if (aRect.Contains(rMEvt.GetPosPixel()))
{
if ( DoPageFieldSelection( nCol, nRow ) )
return true;
@@ -358,7 +358,7 @@ bool ScGridWindow::DPTestFieldPopupArrow(
Size aPopupSize;
aBtn.getPopupBoundingBox(aPopupPos, aPopupSize);
tools::Rectangle aRect(aPopupPos, aPopupSize);
- if (aRect.IsInside(rMEvt.GetPosPixel()))
+ if (aRect.Contains(rMEvt.GetPosPixel()))
{
// Mouse cursor inside the popup arrow box. Launch the field menu.
DPLaunchFieldPopupMenu(OutputToScreenPixel(aScrPos), aScrSize, rDimPos, pDPObj);
diff --git a/sc/source/ui/view/prevloc.cxx b/sc/source/ui/view/prevloc.cxx
index e7922b252510..83538f0b21e8 100644
--- a/sc/source/ui/view/prevloc.cxx
+++ b/sc/source/ui/view/prevloc.cxx
@@ -324,7 +324,7 @@ bool ScPreviewLocationData::HasCellsInRange( const tools::Rectangle& rVisiblePix
for (auto const& it : m_Entries)
{
if ( it->eType == SC_PLOC_CELLRANGE || it->eType == SC_PLOC_COLHEADER || it->eType == SC_PLOC_ROWHEADER )
- if ( it->aPixelRect.IsOver( rVisiblePixel ) )
+ if ( it->aPixelRect.Overlaps( rVisiblePixel ) )
return true;
}
@@ -394,7 +394,7 @@ tools::Long ScPreviewLocationData::GetNoteCountInRange( const tools::Rectangle&
sal_uLong nRet = 0;
for (auto const& it : m_Entries)
{
- if ( it->eType == eType && it->aPixelRect.IsOver( rVisiblePixel ) )
+ if ( it->eType == eType && it->aPixelRect.Overlaps( rVisiblePixel ) )
++nRet;
}
@@ -409,7 +409,7 @@ bool ScPreviewLocationData::GetNoteInRange( const tools::Rectangle& rVisiblePixe
sal_uLong nPos = 0;
for (auto const& it : m_Entries)
{
- if ( it->eType == eType && it->aPixelRect.IsOver( rVisiblePixel ) )
+ if ( it->eType == eType && it->aPixelRect.Overlaps( rVisiblePixel ) )
{
if ( nPos == sal::static_int_cast<sal_uLong>(nIndex) )
{
@@ -431,7 +431,7 @@ tools::Rectangle ScPreviewLocationData::GetNoteInRangeOutputRect(const tools::Re
sal_uLong nPos = 0;
for (auto const& it : m_Entries)
{
- if ( it->eType == eType && it->aPixelRect.IsOver( rVisiblePixel ) )
+ if ( it->eType == eType && it->aPixelRect.Overlaps( rVisiblePixel ) )
{
if ( aCellPos == it->aCellRange.aStart )
return it->aPixelRect;
diff --git a/sc/source/ui/view/printfun.cxx b/sc/source/ui/view/printfun.cxx
index f8e7c302b971..eb7de664694b 100644
--- a/sc/source/ui/view/printfun.cxx
+++ b/sc/source/ui/view/printfun.cxx
@@ -1144,7 +1144,7 @@ void ScPrintFunc::SetDateTime( const DateTime& rDateTime )
static void lcl_DrawGraphic( const Graphic &rGraphic, vcl::RenderContext& rOutDev,
const tools::Rectangle &rGrf, const tools::Rectangle &rOut )
{
- const bool bNotInside = !rOut.IsInside( rGrf );
+ const bool bNotInside = !rOut.Contains( rGrf );
if ( bNotInside )
{
rOutDev.Push();
@@ -1273,7 +1273,7 @@ static void lcl_DrawGraphic( const SvxBrushItem &rBrush, vcl::RenderContext& rOu
default: OSL_ENSURE( false, "new Graphic position?" );
}
tools::Rectangle aGrf( aPos,aDrawSize );
- if ( bDraw && aGrf.IsOver( rOut ) )
+ if ( bDraw && aGrf.Overlaps( rOut ) )
{
lcl_DrawGraphic( *pGraphic, rOutDev, aGrf, rOut );
}
diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx
index c44db32ce716..cb9fcba6f2d3 100644
--- a/sc/source/ui/view/tabview3.cxx
+++ b/sc/source/ui/view/tabview3.cxx
@@ -998,7 +998,7 @@ void ScTabView::AlignToCursor( SCCOL nCurX, SCROW nCurY, ScFollowMode eMode,
tools::Long nCSX, nCSY;
aViewData.GetMergeSizePixel( nCurX, nCurY, nCSX, nCSY );
tools::Rectangle aCursor( aStart, Size( nCSX, nCSY ) );
- if ( aCursor.IsOver( aDlgPixel ) )
+ if ( aCursor.Overlaps( aDlgPixel ) )
bLimit = true; // cell is covered by the dialog
}
}