diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2021-09-17 21:49:21 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2021-09-20 12:10:44 +0200 |
commit | b22d4785310eac35696df771803dfba0871a50ac (patch) | |
tree | 56e394a3c38a2e1f17530fbc18dd8e6b3c5d5098 /sw | |
parent | 3e2370260f2b79c43b4f8a86b123861aa95d3ef2 (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 'sw')
74 files changed, 241 insertions, 241 deletions
diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx index 38b12309c4f2..ddc4ef53834b 100644 --- a/sw/inc/crsrsh.hxx +++ b/sw/inc/crsrsh.hxx @@ -517,7 +517,7 @@ public: /* * Returns if cursor is wholly or partly within visible range. */ - bool IsCursorVisible() const { return VisArea().IsOver( GetCharRect() ); } + bool IsCursorVisible() const { return VisArea().Overlaps( GetCharRect() ); } /* * Returns SwRect, at which the character is located. */ diff --git a/sw/inc/swrect.hxx b/sw/inc/swrect.hxx index 9467b728f2e7..3ba1f67d0882 100644 --- a/sw/inc/swrect.hxx +++ b/sw/inc/swrect.hxx @@ -82,10 +82,10 @@ public: // Same as Intersection, only assume that Rects are overlapping! SwRect &Intersection_( const SwRect &rRect ); - bool IsInside( const Point& rPOINT ) const; + bool Contains( const Point& rPOINT ) const; + bool Contains( const SwRect& rRect ) const; + bool Overlaps( const SwRect& rRect ) const; bool IsNear(const Point& rPoint, tools::Long nTolerance ) const; - bool IsInside( const SwRect& rRect ) const; - bool IsOver( const SwRect& rRect ) const; inline bool HasArea() const; inline bool IsEmpty() const; inline void Clear(); diff --git a/sw/inc/viscrs.hxx b/sw/inc/viscrs.hxx index a14c2e207722..9ad0753f0bc0 100644 --- a/sw/inc/viscrs.hxx +++ b/sw/inc/viscrs.hxx @@ -189,7 +189,7 @@ public: virtual void FillStartEnd(SwRect& rStart, SwRect& rEnd) const override; // Check if SPoint is within table SSelection. - bool IsInside( const Point& rPt ) const; + bool Contains( const Point& rPt ) const; virtual void SetMark() override; virtual SwCursor* Create( SwPaM* pRing = nullptr ) const override; diff --git a/sw/qa/core/layout/layout.cxx b/sw/qa/core/layout/layout.cxx index 46ede2b8ada3..b1cb3136b963 100644 --- a/sw/qa/core/layout/layout.cxx +++ b/sw/qa/core/layout/layout.cxx @@ -223,7 +223,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testTextBoxAutoGrowVertical) tools::Rectangle aFlyRect(nFlyLeft, nFlyTop, nFlyRight, nFlyBottom); // Without the accompanying fix in place, this test would have failed, as aFlyRect was too wide, // so it was not inside aShapeRect anymore. - CPPUNIT_ASSERT(aShapeRect.IsInside(aFlyRect)); + CPPUNIT_ASSERT(aShapeRect.Contains(aFlyRect)); } CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testTextboxModification) diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx index 11d4f2ed378c..6c7e71df3ef2 100644 --- a/sw/qa/extras/layout/layout.cxx +++ b/sw/qa/extras/layout/layout.cxx @@ -522,7 +522,7 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, TestTdf136613) CPPUNIT_ASSERT(!rRect.IsEmpty()); //...if it is on the page. This will fail if not. - CPPUNIT_ASSERT_MESSAGE("The pictures are outside the page!", rPageRect.IsInside(rRect)); + CPPUNIT_ASSERT_MESSAGE("The pictures are outside the page!", rPageRect.Contains(rRect)); } } @@ -2750,7 +2750,7 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testBtlrCell) { std::stringstream ss; ss << "selection rectangle " << rRect << " is not inside cell rectangle " << aCellRect; - CPPUNIT_ASSERT_MESSAGE(ss.str(), aCellRect.IsInside(rRect)); + CPPUNIT_ASSERT_MESSAGE(ss.str(), aCellRect.Contains(rRect)); } // Make sure that the correct rectangle gets repainted on scroll. @@ -3181,7 +3181,7 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testShapeAllowOverlapWrap) SwAnchoredObject* pSecond = rObjs[1]; // Without the accompanying fix in place, this test would have failed: AllowOverlap=no had // priority over Surround=through (which is bad for Word compat). - CPPUNIT_ASSERT(pSecond->GetObjRect().IsOver(pFirst->GetObjRect())); + CPPUNIT_ASSERT(pSecond->GetObjRect().Overlaps(pFirst->GetObjRect())); } CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf124600) @@ -3513,7 +3513,7 @@ static SwRect lcl_getVisibleFlyObjRect(SwWrtShell* pWrtShell) pDrawObj = (*pDrawObjs)[0]; CPPUNIT_ASSERT_EQUAL(OUString("Rahmen123"), pDrawObj->GetFrameFormat().GetName()); SwRect aFlyRect = pDrawObj->GetObjRect(); - CPPUNIT_ASSERT(pPage->getFrameArea().IsInside(aFlyRect)); + CPPUNIT_ASSERT(pPage->getFrameArea().Contains(aFlyRect)); return aFlyRect; } diff --git a/sw/qa/extras/layout/layout2.cxx b/sw/qa/extras/layout/layout2.cxx index dad0d84ff135..91cb32016942 100644 --- a/sw/qa/extras/layout/layout2.cxx +++ b/sw/qa/extras/layout/layout2.cxx @@ -273,7 +273,7 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testtdf138951) const bool bIsAnchTheSame = *pShFrm->GetAnchor().GetContentAnchor() == *pShFrm->GetAnchor().GetContentAnchor(); CPPUNIT_ASSERT_MESSAGE("The anchor is different for the textbox and shape!", bIsAnchTheSame); - CPPUNIT_ASSERT_MESSAGE("The textbox has fallen apart!", aShpRect.IsInside(aTxtFrmRect)); + CPPUNIT_ASSERT_MESSAGE("The textbox has fallen apart!", aShpRect.Contains(aTxtFrmRect)); // Without the fix the anchor differs, and the frame outside of the shape } diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx index 03f6b21d8c9f..1890f2819d37 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx @@ -586,7 +586,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf112443) const SwRect aPageRect = pRootFrame->getFrameArea(); const SwRect aShapeRect(getShape(1)->getPosition().X, getShape(1)->getPosition().Y, getShape(1)->getSize().Width, getShape(1)->getSize().Height); - CPPUNIT_ASSERT_MESSAGE("The textframe must be off-page!", !aPageRect.IsInside(aShapeRect)); + CPPUNIT_ASSERT_MESSAGE("The textframe must be off-page!", !aPageRect.Contains(aShapeRect)); //OUString aTop = parseDump("//anchored/fly[1]/infos/bounds", "top"); //CPPUNIT_ASSERT_EQUAL(sal_Int32(30624), aTop.toInt32() ); @@ -788,7 +788,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf127825) CPPUNIT_ASSERT(rDrawObjs.size()); // Without the accompanying fix in place, this overlapped the footer area, not the body area. - CPPUNIT_ASSERT(rDrawObjs[0]->GetObjRect().IsOver(pBody->getFrameArea())); + CPPUNIT_ASSERT(rDrawObjs[0]->GetObjRect().Overlaps(pBody->getFrameArea())); } CPPUNIT_TEST_FIXTURE(Test, testTdf103345) diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx b/sw/qa/extras/tiledrendering/tiledrendering.cxx index c87f81b08a8a..ed2ba675644f 100644 --- a/sw/qa/extras/tiledrendering/tiledrendering.cxx +++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx @@ -442,7 +442,7 @@ void SwTiledRenderingTest::testRegisterCallback() // Check that the top left 256x256px tile would be invalidated. CPPUNIT_ASSERT(!m_aInvalidation.IsEmpty()); tools::Rectangle aTopLeft(0, 0, 256*15, 256*15); // 1 px = 15 twips, assuming 96 DPI. - CPPUNIT_ASSERT(m_aInvalidation.IsOver(aTopLeft)); + CPPUNIT_ASSERT(m_aInvalidation.Overlaps(aTopLeft)); } void SwTiledRenderingTest::testPostKeyEvent() @@ -3065,7 +3065,7 @@ void SwTiledRenderingTest::testBulletDeleteInvalidation() SwFrame* pBody = pPage->GetLower(); SwFrame* pFirstText = pBody->GetLower(); tools::Rectangle aFirstTextRect = pFirstText->getFrameArea().SVRect(); - CPPUNIT_ASSERT(!aFirstTextRect.IsOver(m_aInvalidations)); + CPPUNIT_ASSERT(!aFirstTextRect.Overlaps(m_aInvalidations)); } void SwTiledRenderingTest::testBulletNoNumInvalidation() @@ -3097,7 +3097,7 @@ void SwTiledRenderingTest::testBulletNoNumInvalidation() SwFrame* pBody = pPage->GetLower(); SwFrame* pFirstText = pBody->GetLower(); tools::Rectangle aFirstTextRect = pFirstText->getFrameArea().SVRect(); - CPPUNIT_ASSERT(!aFirstTextRect.IsOver(m_aInvalidations)); + CPPUNIT_ASSERT(!aFirstTextRect.Overlaps(m_aInvalidations)); } void SwTiledRenderingTest::testBulletMultiDeleteInvalidation() @@ -3133,7 +3133,7 @@ void SwTiledRenderingTest::testBulletMultiDeleteInvalidation() SwFrame* pBody = pPage->GetLower(); SwFrame* pFirstText = pBody->GetLower(); tools::Rectangle aFirstTextRect = pFirstText->getFrameArea().SVRect(); - CPPUNIT_ASSERT(!aFirstTextRect.IsOver(m_aInvalidations)); + CPPUNIT_ASSERT(!aFirstTextRect.Overlaps(m_aInvalidations)); } void SwTiledRenderingTest::testCondCollCopy() diff --git a/sw/source/core/access/acccontext.cxx b/sw/source/core/access/acccontext.cxx index ecfcc65b60bc..76638a251913 100644 --- a/sw/source/core/access/acccontext.cxx +++ b/sw/source/core/access/acccontext.cxx @@ -135,9 +135,9 @@ void SwAccessibleContext::ChildrenScrolled( const SwFrame *pFrame, if( rLower.IsAccessible( GetShell()->IsPreview() ) ) { Action eAction = Action::NONE; - if( aBox.IsOver( rNewVisArea ) ) + if( aBox.Overlaps( rNewVisArea ) ) { - if( aBox.IsOver( rOldVisArea ) ) + if( aBox.Overlaps( rOldVisArea ) ) { eAction = Action::SCROLLED_WITHIN; } @@ -154,7 +154,7 @@ void SwAccessibleContext::ChildrenScrolled( const SwFrame *pFrame, } } } - else if( aBox.IsOver( rOldVisArea ) ) + else if( aBox.Overlaps( rOldVisArea ) ) { if ( bVisibleChildrenOnly && !rLower.AlwaysIncludeAsChild() ) @@ -251,8 +251,8 @@ void SwAccessibleContext::ChildrenScrolled( const SwFrame *pFrame, } else if ( rLower.GetSwFrame() && ( !bVisibleChildrenOnly || - aBox.IsOver( rOldVisArea ) || - aBox.IsOver( rNewVisArea ) ) ) + aBox.Overlaps( rOldVisArea ) || + aBox.Overlaps( rNewVisArea ) ) ) { // There are no unaccessible SdrObjects that need to be notified ChildrenScrolled( rLower.GetSwFrame(), rOldVisArea ); diff --git a/sw/source/core/access/accdoc.cxx b/sw/source/core/access/accdoc.cxx index 2643877038d0..e73e4e951acc 100644 --- a/sw/source/core/access/accdoc.cxx +++ b/sw/source/core/access/accdoc.cxx @@ -305,7 +305,7 @@ sal_Bool SAL_CALL SwAccessibleDocumentBase::containsPoint( aPixBounds.Move(-aPixBounds.Left(), -aPixBounds.Top()); Point aPixPoint( aPoint.X, aPoint.Y ); - return aPixBounds.IsInside( aPixPoint ); + return aPixBounds.Contains( aPixPoint ); } uno::Reference< XAccessible > SAL_CALL SwAccessibleDocumentBase::getAccessibleAtPoint( @@ -324,7 +324,7 @@ uno::Reference< XAccessible > SAL_CALL SwAccessibleDocumentBase::getAccessibleAt } Point aPixPoint( aPoint.X, aPoint.Y ); // px rel to window - if( mpChildWin->GetWindowExtentsRelative( pWin ).IsInside( aPixPoint ) ) + if( mpChildWin->GetWindowExtentsRelative( pWin ).Contains( aPixPoint ) ) return mpChildWin->GetAccessible(); } diff --git a/sw/source/core/access/accframe.cxx b/sw/source/core/access/accframe.cxx index 7b0ff2693e69..684953c6df6f 100644 --- a/sw/source/core/access/accframe.cxx +++ b/sw/source/core/access/accframe.cxx @@ -226,7 +226,7 @@ SwAccessibleChild SwAccessibleFrame::GetChildAtPixel( const SwRect& rVisArea, if( !aLogBounds.IsEmpty() ) { tools::Rectangle aPixBounds( rAccMap.CoreToPixel( aLogBounds ) ); - if( aPixBounds.IsInside( rPixPos ) ) + if( aPixBounds.Contains( rPixPos ) ) aRet = rLower; } } @@ -257,7 +257,7 @@ SwAccessibleChild SwAccessibleFrame::GetChildAtPixel( const SwRect& rVisArea, if( !aLogBounds.IsEmpty() ) { tools::Rectangle aPixBounds( rAccMap.CoreToPixel( aLogBounds ) ); - if( aPixBounds.IsInside( rPixPos ) ) + if( aPixBounds.Contains( rPixPos ) ) aRet = rLower; } } diff --git a/sw/source/core/access/accframe.hxx b/sw/source/core/access/accframe.hxx index c3ebd59d40ec..6f2dff0ae555 100644 --- a/sw/source/core/access/accframe.hxx +++ b/sw/source/core/access/accframe.hxx @@ -143,7 +143,7 @@ protected: inline bool SwAccessibleFrame::IsShowing( const SwRect& rFrame ) const { - return !rFrame.IsEmpty() && rFrame.IsOver( maVisArea ); + return !rFrame.IsEmpty() && rFrame.Overlaps( maVisArea ); } inline bool SwAccessibleFrame::IsShowing( const SwAccessibleMap& rAccMap ) const diff --git a/sw/source/core/access/accfrmobjmap.cxx b/sw/source/core/access/accfrmobjmap.cxx index f088ff8fd419..5da8dad1ad2b 100644 --- a/sw/source/core/access/accfrmobjmap.cxx +++ b/sw/source/core/access/accfrmobjmap.cxx @@ -46,7 +46,7 @@ SwAccessibleChildMap::SwAccessibleChildMap( const SwRect& rVisArea, { if ( !bVisibleChildrenOnly || aLower.AlwaysIncludeAsChild() || - aLower.GetBox( rAccMap ).IsOver( rVisArea ) ) + aLower.GetBox( rAccMap ).Overlaps( rVisArea ) ) { insert( nPos++, SwAccessibleChildMapKey::TEXT, aLower ); } @@ -65,7 +65,7 @@ SwAccessibleChildMap::SwAccessibleChildMap( const SwRect& rVisArea, for(const SwAnchoredObject* pObj : *pObjs) { aLower = pObj->GetDrawObj(); - if ( aLower.GetBox( rAccMap ).IsOver( rVisArea ) ) + if ( aLower.GetBox( rAccMap ).Overlaps( rVisArea ) ) { insert( aLower.GetDrawObject(), aLower ); } @@ -83,7 +83,7 @@ SwAccessibleChildMap::SwAccessibleChildMap( const SwRect& rVisArea, if ( aLower.IsBoundAsChar() && ( !bVisibleChildrenOnly || aLower.AlwaysIncludeAsChild() || - aLower.GetBox( rAccMap ).IsOver( rVisArea ) ) ) + aLower.GetBox( rAccMap ).Overlaps( rVisArea ) ) ) { insert( aLower.GetDrawObject(), aLower ); } diff --git a/sw/source/core/access/accfrmobjslist.cxx b/sw/source/core/access/accfrmobjslist.cxx index 7eca43a7b873..c62987798ccc 100644 --- a/sw/source/core/access/accfrmobjslist.cxx +++ b/sw/source/core/access/accfrmobjslist.cxx @@ -78,7 +78,7 @@ SwAccessibleChildSList_const_iterator::SwAccessibleChildSList_const_iterator( // Find the first visible while( m_aCurr.IsValid() && !m_aCurr.AlwaysIncludeAsChild() && - !m_aCurr.GetBox( rAccMap ).IsOver( m_rList.GetVisArea() ) ) + !m_aCurr.GetBox( rAccMap ).Overlaps( m_rList.GetVisArea() ) ) { next(); } @@ -147,7 +147,7 @@ SwAccessibleChildSList_const_iterator& SwAccessibleChildSList_const_iterator::ne next(); while( m_aCurr.IsValid() && !m_aCurr.AlwaysIncludeAsChild() && - !m_aCurr.GetBox( m_rList.GetAccMap() ).IsOver( m_rList.GetVisArea() ) ) + !m_aCurr.GetBox( m_rList.GetAccMap() ).Overlaps( m_rList.GetVisArea() ) ) { next(); } diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx index 04fd9f659f91..c1c4eebcfb2e 100644 --- a/sw/source/core/access/accmap.cxx +++ b/sw/source/core/access/accmap.cxx @@ -818,7 +818,7 @@ struct ContainsPredicate explicit ContainsPredicate( const Point& rPoint ) : mrPoint(rPoint) {} bool operator() ( const tools::Rectangle& rRect ) const { - return rRect.IsInside( mrPoint ); + return rRect.Contains( mrPoint ); } }; diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx index 1c3f64e1f6dd..9aed81d4759e 100644 --- a/sw/source/core/access/accpara.cxx +++ b/sw/source/core/access/accpara.cxx @@ -2117,7 +2117,7 @@ sal_Int32 SwAccessibleParagraph::getIndexAtPoint( const awt::Point& rPoint ) aPoint.setX(aPoint.getX() + aPixPos.getX()); aPoint.setY(aPoint.getY() + aPixPos.getY()); Point aCorePoint( GetMap()->PixelToCore( aPoint ) ); - if( !aLogBounds.IsInside( aCorePoint ) ) + if( !aLogBounds.Contains( aCorePoint ) ) { // #i12332# rPoint is may also be in rectangle returned by // getCharacterBounds(getCharacterCount() diff --git a/sw/source/core/access/acctable.cxx b/sw/source/core/access/acctable.cxx index da48a7aadc12..49a0520cf499 100644 --- a/sw/source/core/access/acctable.cxx +++ b/sw/source/core/access/acctable.cxx @@ -231,7 +231,7 @@ void SwAccessibleTableData_Impl::GetSelection( const SwFrame *pLower = rLower.GetSwFrame(); OSL_ENSURE( pLower, "child should be a frame" ); const SwRect& rBox = rLower.GetBox( mrAccMap ); - if( pLower && rBox.IsOver( rArea ) ) + if( pLower && rBox.Overlaps( rArea ) ) { if( rLower.IsAccessible( mbIsInPagePreview ) ) { diff --git a/sw/source/core/bastyp/swrect.cxx b/sw/source/core/bastyp/swrect.cxx index 62984819175a..8f94cef23727 100644 --- a/sw/source/core/bastyp/swrect.cxx +++ b/sw/source/core/bastyp/swrect.cxx @@ -56,7 +56,7 @@ SwRect& SwRect::Union( const SwRect& rRect ) SwRect& SwRect::Intersection( const SwRect& rRect ) { // any similarity between me and given element? - if ( IsOver( rRect ) ) + if ( Overlaps( rRect ) ) { // get smaller right and lower, and greater left and upper edge if ( Left() < rRect.Left() ) @@ -90,7 +90,7 @@ SwRect& SwRect::Intersection_( const SwRect& rOther ) return *this; } -bool SwRect::IsInside( const SwRect& rRect ) const +bool SwRect::Contains( const SwRect& rRect ) const { const tools::Long nRight = Right(); const tools::Long nBottom = Bottom(); @@ -102,7 +102,7 @@ bool SwRect::IsInside( const SwRect& rRect ) const (Top() <= nrBottom) && (nrBottom <= nBottom); } -bool SwRect::IsInside( const Point& rPoint ) const +bool SwRect::Contains( const Point& rPoint ) const { return (Left() <= rPoint.X()) && (Top() <= rPoint.Y()) && @@ -117,10 +117,10 @@ bool SwRect::IsNear( const Point& rPoint, tools::Long nTolerance ) const ((Top() - nTolerance) <= rPoint.Y()) && ((Right() + nTolerance) >= rPoint.X()) && ((Bottom() + nTolerance) >= rPoint.Y())); - return IsInside(rPoint) || bIsNearby; + return Contains(rPoint) || bIsNearby; } -bool SwRect::IsOver( const SwRect& rRect ) const +bool SwRect::Overlaps( const SwRect& rRect ) const { return (Top() <= rRect.Bottom()) && (Left() <= rRect.Right()) && diff --git a/sw/source/core/bastyp/swregion.cxx b/sw/source/core/bastyp/swregion.cxx index a2e3c405707d..21e645500fa0 100644 --- a/sw/source/core/bastyp/swregion.cxx +++ b/sw/source/core/bastyp/swregion.cxx @@ -66,7 +66,7 @@ void SwRegionRects::operator-=( const SwRect &rRect ) sal_uInt16 nMax = size(); for ( sal_uInt16 i = 0; i < nMax; ++i ) { - if ( rRect.IsOver( (*this)[i] ) ) + if ( rRect.Overlaps( (*this)[i] ) ) { SwRect aTmp( (*this)[i] ); SwRect aInter( aTmp ); @@ -175,11 +175,11 @@ void SwRegionRects::Compress() { // If one rectangle contains a second completely than the latter // does not need to be stored and can be deleted - if ( (*this)[i].IsInside( (*this)[j] ) ) + if ( (*this)[i].Contains( (*this)[j] ) ) { erase( begin() + j ); } - else if ( (*this)[j].IsInside( (*this)[i] ) ) + else if ( (*this)[j].Contains( (*this)[i] ) ) { (*this)[i] = (*this)[j]; erase( begin() + j ); diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index 2d86a96d9a6d..916e1aa6f980 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -818,7 +818,7 @@ int SwCursorShell::SetCursor( const Point &rLPt, bool bOnlyText, bool bBlock ) { if( pFrame ) { - if( pFrame->getFrameArea().IsInside( rCurrentCursorPt )) + if( pFrame->getFrameArea().Contains( rCurrentCursorPt )) return bRet; } else if( aPos.nNode.GetNode().IsContentNode() ) @@ -839,7 +839,7 @@ int SwCursorShell::SetCursor( const Point &rLPt, bool bOnlyText, bool bBlock ) { // SSelection over not allowed sections or if in header/footer -> different if( !CheckNodesRange( aPos.nNode, pCursor->GetMark()->nNode, true ) - || ( pFrame && !pFrame->getFrameArea().IsInside( pCursor->GetMkPos() ) )) + || ( pFrame && !pFrame->getFrameArea().Contains( pCursor->GetMkPos() ) )) return bRet; // is at same position but not in header/footer @@ -996,7 +996,7 @@ bool SwCursorShell::TestCurrPam( // check if the SPoint is in a table selection if( m_pTableCursor ) - return m_pTableCursor->IsInside( rPt ); + return m_pTableCursor->Contains( rPt ); SwCallLink aLk( *this ); // watch Cursor-Moves; call Link if needed // search position <rPt> in document @@ -1418,7 +1418,7 @@ void SwCursorShell::Paint(vcl::RenderContext& rRenderContext, const tools::Recta bool bVis = false; // if a cursor is visible then hide the SV cursor - if( m_pVisibleCursor->IsVisible() && !aRect.IsOver( m_aCharRect ) ) + if( m_pVisibleCursor->IsVisible() && !aRect.Overlaps( m_aCharRect ) ) { bVis = true; m_pVisibleCursor->Hide(); diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx index 4ba5d741a68a..87ab068e6ded 100644 --- a/sw/source/core/crsr/crstrvl.cxx +++ b/sw/source/core/crsr/crstrvl.cxx @@ -1721,7 +1721,7 @@ bool SwCursorShell::GetContentAtPos( const Point& rPt, if( aTmpState.m_bPosCorr ) { - if( pF && !pF->getFrameArea().IsInside( aPt )) + if( pF && !pF->getFrameArea().Contains( aPt )) pF = nullptr; } else if( !pF ) diff --git a/sw/source/core/crsr/trvlfnfl.cxx b/sw/source/core/crsr/trvlfnfl.cxx index c93faffff95b..45dcb5415afa 100644 --- a/sw/source/core/crsr/trvlfnfl.cxx +++ b/sw/source/core/crsr/trvlfnfl.cxx @@ -357,7 +357,7 @@ void SwCursorShell::GotoFlyAnchor() // jump in BodyFrame closest to FlyFrame SwRect aTmpRect( m_aCharRect ); - if( !pFrame->getFrameArea().IsInside( aTmpRect )) + if( !pFrame->getFrameArea().Contains( aTmpRect )) aTmpRect = pFrame->getFrameArea(); Point aPt( aTmpRect.Left(), aTmpRect.Top() + ( aTmpRect.Bottom() - aTmpRect.Top() ) / 2 ); diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx index 7d8064719228..c430c228def5 100644 --- a/sw/source/core/crsr/viscrs.cxx +++ b/sw/source/core/crsr/viscrs.cxx @@ -94,7 +94,7 @@ void SwVisibleCursor::Show() m_bIsVisible = true; // display at all? - if( m_pCursorShell->VisArea().IsOver( m_pCursorShell->m_aCharRect ) || comphelper::LibreOfficeKit::isActive() ) + if( m_pCursorShell->VisArea().Overlaps( m_pCursorShell->m_aCharRect ) || comphelper::LibreOfficeKit::isActive() ) SetPosAndShow(nullptr); } } @@ -872,7 +872,7 @@ void SwShellTableCursor::FillRects() while ( pFrame ) { - if( aReg.GetOrigin().IsOver( pFrame->getFrameArea() ) ) + if( aReg.GetOrigin().Overlaps( pFrame->getFrameArea() ) ) { aReg -= pFrame->getFrameArea(); if (bStart) @@ -899,7 +899,7 @@ void SwShellTableCursor::FillStartEnd(SwRect& rStart, SwRect& rEnd) const } // Check if the SPoint is within the Table-SSelection. -bool SwShellTableCursor::IsInside( const Point& rPt ) const +bool SwShellTableCursor::Contains( const Point& rPt ) const { // Calculate the new rectangles. If the cursor is still "parked" do nothing if (m_SelectedBoxes.empty() || m_bParked || !GetPoint()->nNode.GetIndex()) @@ -918,12 +918,12 @@ bool SwShellTableCursor::IsInside( const Point& rPt ) const while( pFrame && !pFrame->IsCellFrame() ) pFrame = pFrame->GetUpper(); OSL_ENSURE( pFrame, "Node not in a table" ); - if( pFrame && pFrame->getFrameArea().IsInside( rPt ) ) + if( pFrame && pFrame->getFrameArea().Contains( rPt ) ) return true; for ( SwCellFrame* pCellFrame = static_cast<SwCellFrame*>(pFrame); pCellFrame; pCellFrame = pCellFrame->GetFollowCell() ) { - if( pCellFrame->getFrameArea().IsInside( rPt ) ) + if( pCellFrame->getFrameArea().Contains( rPt ) ) return true; } } diff --git a/sw/source/core/doc/docfly.cxx b/sw/source/core/doc/docfly.cxx index d8fe293c7f0a..f8b0a15e942a 100644 --- a/sw/source/core/doc/docfly.cxx +++ b/sw/source/core/doc/docfly.cxx @@ -853,7 +853,7 @@ bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList, case RndStdIds::FLY_AT_PAGE: { pNewAnchorFrame = getIDocumentLayoutAccess().GetCurrentLayout()->Lower(); - while ( pNewAnchorFrame && !pNewAnchorFrame->getFrameArea().IsInside( aPt ) ) + while ( pNewAnchorFrame && !pNewAnchorFrame->getFrameArea().Contains( aPt ) ) pNewAnchorFrame = pNewAnchorFrame->GetNext(); if ( !pNewAnchorFrame ) continue; @@ -889,7 +889,7 @@ bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList, SwTextFrame const*const pFrame( static_cast<SwTextFrame const*>(pNewAnchorFrame)); SwPosition aPos( *pFrame->GetTextNodeForParaProps() ); - if ( pNewAnchorFrame->getFrameArea().IsInside( aPoint ) ) + if ( pNewAnchorFrame->getFrameArea().Contains( aPoint ) ) { // We need to find a TextNode, because only there we can anchor a // content-bound DrawObject. diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx index a934cee0e13a..4cd8c10ec25a 100644 --- a/sw/source/core/doc/notxtfrm.cxx +++ b/sw/source/core/doc/notxtfrm.cxx @@ -298,7 +298,7 @@ void SwNoTextFrame::PaintSwFrame(vcl::RenderContext& rRenderContext, SwRect cons SwRect aNormal( getFrameArea().Pos() + getFramePrintArea().Pos(), getFramePrintArea().SSize() ); aNormal.Justify(); // Normalized rectangle for the comparisons - if( aPaintArea.IsOver( aNormal ) ) + if( aPaintArea.Overlaps( aNormal ) ) { // Calculate the four to-be-deleted rectangles if( pSh->GetWin() ) @@ -679,7 +679,7 @@ bool SwNoTextFrame::GetCharRect( SwRect &rRect, const SwPosition& rPos, rRect.Justify(); // Is the Bitmap in the visible area at all? - if( !aFrameRect.IsOver( rRect ) ) + if( !aFrameRect.Overlaps( rRect ) ) { // If not, then the Cursor is on the Frame rRect = aFrameRect; diff --git a/sw/source/core/docnode/ndtbl1.cxx b/sw/source/core/docnode/ndtbl1.cxx index c36e7e3b3f6e..9922a5d97338 100644 --- a/sw/source/core/docnode/ndtbl1.cxx +++ b/sw/source/core/docnode/ndtbl1.cxx @@ -598,7 +598,7 @@ static void lcl_CollectCells( std::vector<SwCellFrame*> &rArr, const SwRect &rUn while ( !pCell->IsCellFrame() ) pCell = pCell->GetUpper(); OSL_ENSURE( pCell, "Frame is not a Cell" ); - if ( rUnion.IsOver( pCell->getFrameArea() ) ) + if ( rUnion.Overlaps( pCell->getFrameArea() ) ) ::InsertCell( rArr, static_cast<SwCellFrame*>(pCell) ); // Make sure the Cell is left (Areas) diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx index 1e34abfa4b5f..7d7ff10ed73d 100644 --- a/sw/source/core/docnode/node.cxx +++ b/sw/source/core/docnode/node.cxx @@ -405,7 +405,7 @@ bool SwNode::IsInVisibleArea( SwViewShell const * pSh ) const while ( pFrame && !pFrame->isFrameAreaDefinitionValid() ); } - if( !pFrame || pSh->VisArea().IsOver( pFrame->getFrameArea() ) ) + if( !pFrame || pSh->VisArea().Overlaps( pFrame->getFrameArea() ) ) bRet = true; } } diff --git a/sw/source/core/draw/dflyobj.cxx b/sw/source/core/draw/dflyobj.cxx index d37a65b83482..428c567662ea 100644 --- a/sw/source/core/draw/dflyobj.cxx +++ b/sw/source/core/draw/dflyobj.cxx @@ -1269,14 +1269,14 @@ SdrObject* SwVirtFlyDrawObj::CheckMacroHit( const SdrObjMacroHitRec& rRec ) cons else aRect = m_pFlyFrame->getFrameArea(); - if( aRect.IsInside( rRec.aPos ) ) + if( aRect.Contains( rRec.aPos ) ) { aRect.Pos().setX(aRect.Pos().getX() + rRec.nTol); aRect.Pos().setY(aRect.Pos().getY() + rRec.nTol); aRect.AddHeight( -(2 * rRec.nTol) ); aRect.AddWidth( -(2 * rRec.nTol) ); - if( aRect.IsInside( rRec.aPos ) ) + if( aRect.Contains( rRec.aPos ) ) { if( !rURL.GetMap() || m_pFlyFrame->GetFormat()->GetIMapObject( rRec.aPos, m_pFlyFrame )) diff --git a/sw/source/core/draw/dpage.cxx b/sw/source/core/draw/dpage.cxx index 13e08682b23e..bd62ee33e4be 100644 --- a/sw/source/core/draw/dpage.cxx +++ b/sw/source/core/draw/dpage.cxx @@ -123,7 +123,7 @@ const SdrPageGridFrameList* SwDPage::GetGridFrameList( const SwRect aRect( *pRect ); const SwFrame *pPg = pSh->GetLayout()->Lower(); do - { if ( pPg->getFrameArea().IsOver( aRect ) ) + { if ( pPg->getFrameArea().Overlaps( aRect ) ) ::InsertGridFrame( const_cast<SwDPage*>(this)->m_pGridLst.get(), pPg ); pPg = pPg->GetNext(); } while ( pPg ); @@ -136,7 +136,7 @@ const SdrPageGridFrameList* SwDPage::GetGridFrameList( do { ::InsertGridFrame( const_cast<SwDPage*>(this)->m_pGridLst.get(), pPg ); pPg = pPg->GetNext(); - } while ( pPg && pPg->getFrameArea().IsOver( pSh->VisArea() ) ); + } while ( pPg && pPg->getFrameArea().Overlaps( pSh->VisArea() ) ); } } return m_pGridLst.get(); diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx index 6e3792eb9f29..b5fcb696ec24 100644 --- a/sw/source/core/frmedt/fecopy.cxx +++ b/sw/source/core/frmedt/fecopy.cxx @@ -223,7 +223,7 @@ void SwFEShell::Copy( SwDoc& rClpDoc, const OUString* pNewClpText ) static const Point &lcl_FindBasePos( const SwFrame *pFrame, const Point &rPt ) { const SwFrame *pF = pFrame; - while ( pF && !pF->getFrameArea().IsInside( rPt ) ) + while ( pF && !pF->getFrameArea().Contains( rPt ) ) { if ( pF->IsContentFrame() ) pF = static_cast<const SwContentFrame*>(pF)->GetFollow(); diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx index c55324d48150..81b8becdc24a 100644 --- a/sw/source/core/frmedt/feshview.cxx +++ b/sw/source/core/frmedt/feshview.cxx @@ -879,14 +879,14 @@ static void lcl_NotifyNeighbours( const SdrMarkList *pLst ) SwRect aTmpCalcPnt( pAct->getFramePrintArea() ); aTmpCalcPnt += pAct->getFrameArea().Pos(); - if ( aRect.IsOver( aTmpCalcPnt ) ) + if ( aRect.Overlaps( aTmpCalcPnt ) ) { SwContentFrame *pCnt = pAct->ContainsContent(); while ( pCnt ) { aTmpCalcPnt = pCnt->getFramePrintArea(); aTmpCalcPnt += pCnt->getFrameArea().Pos(); - if ( aRect.IsOver( aTmpCalcPnt ) ) + if ( aRect.Overlaps( aTmpCalcPnt ) ) static_cast<SwFrame*>(pCnt)->Prepare( PrepareHint::FlyFrameAttributesChanged ); pCnt = pCnt->GetNextContentFrame(); } @@ -1448,7 +1448,7 @@ bool SwFEShell::ShouldObjectBeSelected(const Point& rPt) const SwContentFrame* pContentFrame( pPageFrame->ContainsContent() ); while ( pContentFrame ) { - if ( pContentFrame->UnionFrame().IsInside( rPt ) ) + if ( pContentFrame->UnionFrame().Contains( rPt ) ) { const SwTextFrame* pTextFrame = pContentFrame->DynCastTextFrame(); if ( pTextFrame ) @@ -1461,7 +1461,7 @@ bool SwFEShell::ShouldObjectBeSelected(const Point& rPt) if (pTextFrame->GetCharRect(aCursorCharRect, aPos)) { - if ( aCursorCharRect.IsOver( SwRect( pObj->GetLastBoundRect() ) ) ) + if ( aCursorCharRect.Overlaps( SwRect( pObj->GetLastBoundRect() ) ) ) { bRet = false; } @@ -1500,7 +1500,7 @@ bool SwFEShell::ShouldObjectBeSelected(const Point& rPt) SdrObject *pCandidate = pPage->GetObj(a); SwVirtFlyDrawObj* pDrawObj = dynamic_cast<SwVirtFlyDrawObj*>(pCandidate); - if (pDrawObj && pDrawObj->GetCurrentBoundRect().IsInside(rPt)) + if (pDrawObj && pDrawObj->GetCurrentBoundRect().Contains(rPt)) { bRet = false; } @@ -1915,7 +1915,7 @@ bool SwFEShell::ImpEndCreate() aRect.AdjustRight(constTwips_1cm); aRect.AdjustBottom(constTwips_1cm); - if( !aRect.IsOver( rBound ) && !::GetHtmlMode( GetDoc()->GetDocShell() )) + if( !aRect.Overlaps( rBound ) && !::GetHtmlMode( GetDoc()->GetDocShell() )) bCharBound = false; // anchor in header/footer also not allowed. @@ -1971,7 +1971,7 @@ bool SwFEShell::ImpEndCreate() SwRect aBound( rBound ); while( pTmp ) { - if( pTmp->getFrameArea().IsInside( aBound ) ) + if( pTmp->getFrameArea().Contains( aBound ) ) { if( !bBodyOnly || !pTmp->FindFooterOrHeader() ) pPage = pTmpFrame; @@ -2816,7 +2816,7 @@ void SwFEShell::CheckUnboundObjects() const Point aPt( rBound.TopLeft() ); const SwFrame *pPage = GetLayout()->Lower(); const SwFrame *pLast = pPage; - while ( pPage && !pPage->getFrameArea().IsInside( aPt ) ) + while ( pPage && !pPage->getFrameArea().Contains( aPt ) ) { if ( aPt.Y() > pPage->getFrameArea().Bottom() ) pLast = pPage; @@ -3325,7 +3325,7 @@ Point SwFEShell::GetRelativePagePosition(const Point& rDocPos) { Point aRet(-1, -1); const SwFrame *pPage = GetLayout()->Lower(); - while ( pPage && !pPage->getFrameArea().IsInside( rDocPos ) ) + while ( pPage && !pPage->getFrameArea().Contains( rDocPos ) ) { pPage = pPage->GetNext(); } diff --git a/sw/source/core/frmedt/fetab.cxx b/sw/source/core/frmedt/fetab.cxx index 11103b98cfbf..352ba86f587c 100644 --- a/sw/source/core/frmedt/fetab.cxx +++ b/sw/source/core/frmedt/fetab.cxx @@ -1503,7 +1503,7 @@ static const SwCellFrame *lcl_FindFrame( const SwLayoutFrame *pLay, const Point SwRect aPrevRect = pPrev->getFramePrintArea(); aPrevRect.Pos() += pPrev->getFrameArea().Pos(); - if( aPrevRect.IsInside( rPt ) ) + if( aPrevRect.Contains( rPt ) ) { bCloseToCol = false; } diff --git a/sw/source/core/frmedt/fews.cxx b/sw/source/core/frmedt/fews.cxx index ae04ee30efb7..9cda400c1c80 100644 --- a/sw/source/core/frmedt/fews.cxx +++ b/sw/source/core/frmedt/fews.cxx @@ -185,7 +185,7 @@ const SwRect& SwFEShell::GetAnyCurRect( CurRectType eType, const Point* pPt, sal_uInt16 SwFEShell::GetPageNumber( const Point &rPoint ) const { const SwFrame *pPage = GetLayout()->Lower(); - while ( pPage && !pPage->getFrameArea().IsInside( rPoint ) ) + while ( pPage && !pPage->getFrameArea().Contains( rPoint ) ) pPage = pPage->GetNext(); if ( pPage ) return static_cast<const SwPageFrame*>(pPage)->GetPhyPageNum(); diff --git a/sw/source/core/frmedt/tblsel.cxx b/sw/source/core/frmedt/tblsel.cxx index e5aae5f1a945..6a99841d1bdd 100644 --- a/sw/source/core/frmedt/tblsel.cxx +++ b/sw/source/core/frmedt/tblsel.cxx @@ -301,7 +301,7 @@ void GetTableSel( const SwLayoutFrame* pStart, const SwLayoutFrame* pEnd, break; } - if ( pRow->getFrameArea().IsOver( pUnion->GetUnion() ) ) + if ( pRow->getFrameArea().Overlaps( pUnion->GetUnion() ) ) { const SwLayoutFrame *pCell = pRow->FirstCell(); @@ -515,7 +515,7 @@ bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd ) break; } - if( pRow->getFrameArea().IsOver( pUnion->GetUnion() ) ) + if( pRow->getFrameArea().Overlaps( pUnion->GetUnion() ) ) { const SwLayoutFrame *pCell = pRow->FirstCell(); @@ -728,7 +728,7 @@ bool GetAutoSumSel( const SwCursorShell& rShell, SwCellFrames& rBoxes ) while( pRow ) { - if( pRow->getFrameArea().IsOver( pUnion->GetUnion() ) ) + if( pRow->getFrameArea().Overlaps( pUnion->GetUnion() ) ) { const SwCellFrame* pUpperCell = nullptr; const SwLayoutFrame *pCell = pRow->FirstCell(); @@ -799,7 +799,7 @@ bool GetAutoSumSel( const SwCursorShell& rShell, SwCellFrames& rBoxes ) while( pRow ) { - if( pRow->getFrameArea().IsOver( pUnion->GetUnion() ) ) + if( pRow->getFrameArea().Overlaps( pUnion->GetUnion() ) ) { const SwLayoutFrame *pCell = pRow->FirstCell(); @@ -979,7 +979,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes, while ( pRow ) { - if ( pRow->getFrameArea().IsOver( rUnion ) ) + if ( pRow->getFrameArea().Overlaps( rUnion ) ) { const SwLayoutFrame *pCell = pRow->FirstCell(); @@ -1896,7 +1896,7 @@ void MakeSelUnions( SwSelUnions& rUnions, const SwLayoutFrame *pStart, pTable->GetFirstNonHeadlineRow() : static_cast<const SwLayoutFrame*>(pTable->Lower()); - while ( pRow && !pRow->getFrameArea().IsOver( aUnion ) ) + while ( pRow && !pRow->getFrameArea().Overlaps( aUnion ) ) pRow = static_cast<const SwLayoutFrame*>(pRow->GetNext()); // #i31976# @@ -2016,7 +2016,7 @@ bool CheckSplitCells( const SwCursor& rCursor, sal_uInt16 nDiv, while ( pRow ) { - if ( pRow->getFrameArea().IsOver( rSelUnion.GetUnion() ) ) + if ( pRow->getFrameArea().Overlaps( rSelUnion.GetUnion() ) ) { const SwLayoutFrame *pCell = pRow->FirstCell(); diff --git a/sw/source/core/layout/anchoredobject.cxx b/sw/source/core/layout/anchoredobject.cxx index a2e182870f55..23c1e2f17906 100644 --- a/sw/source/core/layout/anchoredobject.cxx +++ b/sw/source/core/layout/anchoredobject.cxx @@ -801,7 +801,7 @@ bool SwAnchoredObject::OverlapsPrevColumn() const aChkRect.Union( pTmpColFrame->getFrameArea() ); pTmpColFrame = pTmpColFrame->GetPrev(); } - bOverlapsPrevColumn = GetObjRect().IsOver( aChkRect ); + bOverlapsPrevColumn = GetObjRect().Overlaps( aChkRect ); } } diff --git a/sw/source/core/layout/findfrm.cxx b/sw/source/core/layout/findfrm.cxx index 48088fdb2d1c..e90ee98c1fdf 100644 --- a/sw/source/core/layout/findfrm.cxx +++ b/sw/source/core/layout/findfrm.cxx @@ -585,7 +585,7 @@ const SwPageFrame* SwRootFrame::GetPageAtPos( const Point& rPt, const Size* pSiz if ( !bExtend ) { - if( !getFrameArea().IsInside( rPt ) ) + if( !getFrameArea().Contains( rPt ) ) return nullptr; // skip pages above point: @@ -600,8 +600,8 @@ const SwPageFrame* SwRootFrame::GetPageAtPos( const Point& rPt, const Size* pSiz { const SwRect& rBoundRect = bExtend ? maPageRects[ nPageIdx++ ] : pPage->getFrameArea(); - if ( (!pSize && rBoundRect.IsInside(rPt)) || - (pSize && rBoundRect.IsOver(aRect)) ) + if ( (!pSize && rBoundRect.Contains(rPt)) || + (pSize && rBoundRect.Overlaps(aRect)) ) { pRet = static_cast<const SwPageFrame*>(pPage); } @@ -614,7 +614,7 @@ const SwPageFrame* SwRootFrame::GetPageAtPos( const Point& rPt, const Size* pSiz bool SwRootFrame::IsBetweenPages(const Point& rPt) const { - if (!getFrameArea().IsInside(rPt)) + if (!getFrameArea().Contains(rPt)) return false; // top visible page @@ -631,7 +631,7 @@ bool SwRootFrame::IsBetweenPages(const Point& rPt) const rPt.X() <= pPage->getFrameArea().Right()) { // Trivial case when we're right in between. - if (!pPage->getFrameArea().IsInside(rPt)) + if (!pPage->getFrameArea().Contains(rPt)) return true; // In normal mode the gap is large enough and diff --git a/sw/source/core/layout/flowfrm.cxx b/sw/source/core/layout/flowfrm.cxx index a86c35d9bbd1..1ffbbeed764e 100644 --- a/sw/source/core/layout/flowfrm.cxx +++ b/sw/source/core/layout/flowfrm.cxx @@ -370,7 +370,7 @@ sal_uInt8 SwFlowFrame::BwdMoveNecessary( const SwPageFrame *pPage, const SwRect SwAnchoredObject* pObj = rObjs[i]; const SwFrameFormat& rFormat = pObj->GetFrameFormat(); const SwRect aRect( pObj->GetObjRect() ); - if ( aRect.IsOver( rRect ) && + if ( aRect.Overlaps( rRect ) && rFormat.GetSurround().GetSurround() != css::text::WrapTextMode_THROUGH ) { if( m_rThis.IsLayoutFrame() && //Fly Lower of This? diff --git a/sw/source/core/layout/flycnt.cxx b/sw/source/core/layout/flycnt.cxx index 9f3bf54debb0..b90469066c70 100644 --- a/sw/source/core/layout/flycnt.cxx +++ b/sw/source/core/layout/flycnt.cxx @@ -600,7 +600,7 @@ static const SwFrame * lcl_CalcDownDist( SwDistance &rRet, rRet.m_nSub = 0; //If the point stays inside the Cnt everything is clear already; the Content //automatically has a distance of 0. - if ( pCnt->getFrameArea().IsInside( rPt ) ) + if ( pCnt->getFrameArea().Contains( rPt ) ) { rRet.m_nMain = 0; return pCnt; @@ -619,7 +619,7 @@ static const SwFrame * lcl_CalcDownDist( SwDistance &rRet, // #i70582# // --> OD 2009-03-05 - adopted for Support for Classical Mongolian Script const SwTwips nTopForObjPos = lcl_GetTopForObjPos(pCnt, bVert, bVertL2R); - if ( pUp->getFrameArea().IsInside( rPt ) ) + if ( pUp->getFrameArea().Contains( rPt ) ) { // <rPt> point is inside environment of given content frame // #i70582# @@ -760,7 +760,7 @@ static const SwFrame * lcl_CalcDownDist( SwDistance &rRet, } bSct = nullptr != pSect; } - while ( pLay && !pLay->getFrameArea().IsInside( rPt ) && + while ( pLay && !pLay->getFrameArea().Contains( rPt ) && ( pLay->getFrameArea().Top() <= rPt.Y() || pLay->IsInFly() || ( pLay->IsInSct() && pLay->FindSctFrame()->GetUpper()->getFrameArea().Top() <= rPt.Y())) ) @@ -867,7 +867,7 @@ static const SwFrame * lcl_CalcDownDist( SwDistance &rRet, } if ( pLay ) { - if ( pLay->getFrameArea().IsInside( rPt ) ) + if ( pLay->getFrameArea().Contains( rPt ) ) { SwTwips nDiff = pLay->IsVertical() ? ( pLay->IsVertLR() ? ( rPt.X() - nFrameTop ) : ( nFrameTop - rPt.X() ) ) : ( rPt.Y() - nFrameTop ); @@ -1093,7 +1093,7 @@ const SwContentFrame *FindAnchor( const SwFrame *pOldAnch, const Point &rNew, ::lcl_PointToPrt( aNew, pPage ); } - if ( pCnt->IsInDocBody() == bBody && pCnt->getFrameArea().IsInside( aNew ) ) + if ( pCnt->IsInDocBody() == bBody && pCnt->getFrameArea().Contains( aNew ) ) return pCnt; else if ( pOldAnch->IsInDocBody() || pOldAnch->IsPageFrame() ) { @@ -1102,7 +1102,7 @@ const SwContentFrame *FindAnchor( const SwFrame *pOldAnch, const Point &rNew, Point aTmp( aNew ); const SwContentFrame *pTmp = pCnt->FindPageFrame()-> GetContentPos( aTmp, false, true ); - if ( pTmp && pTmp->getFrameArea().IsInside( aNew ) ) + if ( pTmp && pTmp->getFrameArea().Contains( aNew ) ) return pTmp; } @@ -1251,7 +1251,7 @@ void SwFlyAtContentFrame::SetAbsPos( const Point &rNew ) //!!!!!We can optimize here: FindAnchor could also return RelPos! const SwFrame *pFrame = nullptr; SwTwips nY; - if ( pCnt->getFrameArea().IsInside( aNew ) ) + if ( pCnt->getFrameArea().Contains( aNew ) ) { // #i70582# if ( bVert ) diff --git a/sw/source/core/layout/flylay.cxx b/sw/source/core/layout/flylay.cxx index b39fdd3452ec..44083e8a5001 100644 --- a/sw/source/core/layout/flylay.cxx +++ b/sw/source/core/layout/flylay.cxx @@ -1304,7 +1304,7 @@ bool CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, bool bMove ) else { if( ( pUp->GetType() & (SwFrameType::Fly | SwFrameType::Ftn ) ) && - !pUp->getFrameArea().IsInside( pFly->getFrameArea().Pos() ) ) + !pUp->getFrameArea().Contains( pFly->getFrameArea().Pos() ) ) { if( pUp->IsFlyFrame() ) { @@ -1312,7 +1312,7 @@ bool CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, bool bMove ) while( pTmpFly->GetNextLink() ) { pTmpFly = pTmpFly->GetNextLink(); - if( pTmpFly->getFrameArea().IsInside( pFly->getFrameArea().Pos() ) ) + if( pTmpFly->getFrameArea().Contains( pFly->getFrameArea().Pos() ) ) break; } pUp = pTmpFly; @@ -1323,7 +1323,7 @@ bool CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, bool bMove ) while( pTmp->GetFollow() ) { pTmp = pTmp->GetFollow(); - if( pTmp->getFrameArea().IsInside( pFly->getFrameArea().Pos() ) ) + if( pTmp->getFrameArea().Contains( pFly->getFrameArea().Pos() ) ) break; } pUp = pTmp; diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx index 2a0b52b8f219..549e88f20e14 100644 --- a/sw/source/core/layout/frmtool.cxx +++ b/sw/source/core/layout/frmtool.cxx @@ -3294,7 +3294,7 @@ static void lcl_CheckFlowBack( SwFrame* pFrame, const SwRect &rRect ) { if( pFrame->IsLayoutFrame() ) { - if( rRect.IsOver( pFrame->getFrameArea() ) ) + if( rRect.Overlaps( pFrame->getFrameArea() ) ) lcl_CheckFlowBack( static_cast<SwLayoutFrame*>(pFrame)->Lower(), rRect ); } else if( !pFrame->GetNext() && nBottom > pFrame->getFrameArea().Bottom() ) @@ -3320,12 +3320,12 @@ static void lcl_NotifyContent( const SdrObject *pThis, SwContentFrame *pCnt, { // #i35640# - use given rectangle <rRect> instead // of current bound rectangle - if ( aCntPrt.IsOver( rRect ) ) + if ( aCntPrt.Overlaps( rRect ) ) pCnt->Prepare( PrepareHint::FlyFrameAttributesChanged ); } // #i23129# - only invalidate, if the text frame // printing area overlaps with the given rectangle. - else if ( aCntPrt.IsOver( rRect ) ) + else if ( aCntPrt.Overlaps( rRect ) ) pCnt->Prepare( eHint, static_cast<void*>(&aCntPrt.Intersection_( rRect )) ); if ( !pCnt->GetDrawObjs() ) return; @@ -3434,8 +3434,8 @@ void Notify_Background( const SdrObject* pObj, // instead of <GetCurrentBoundRect()>, because a recalculation // of the bounding rectangle isn't intended here. if (!isValidTableBeforeAnchor - && (pTab->getFrameArea().IsOver(SwRect(pObj->GetLastBoundRect())) || - pTab->getFrameArea().IsOver(rRect))) + && (pTab->getFrameArea().Overlaps(SwRect(pObj->GetLastBoundRect())) || + pTab->getFrameArea().Overlaps(rRect))) { if ( !pFlyFrame || !pFlyFrame->IsLowerOf( pTab ) ) pTab->InvalidatePrt(); @@ -3446,8 +3446,8 @@ void Notify_Background( const SdrObject* pObj, // instead of <GetCurrentBoundRect()>, because a recalculation // of the bounding rectangle isn't intended here. if (!isValidTableBeforeAnchor && pCell->IsCellFrame() && - ( pCell->getFrameArea().IsOver( SwRect(pObj->GetLastBoundRect()) ) || - pCell->getFrameArea().IsOver( rRect ) ) ) + ( pCell->getFrameArea().Overlaps( SwRect(pObj->GetLastBoundRect()) ) || + pCell->getFrameArea().Overlaps( rRect ) ) ) { const SwFormatVertOrient &rOri = pCell->GetFormat()->GetVertOrient(); if ( text::VertOrientation::NONE != rOri.GetVertOrient() ) @@ -3531,14 +3531,14 @@ const SwFrame* GetVirtualUpper( const SwFrame* pFrame, const Point& rPos ) if( pFrame->IsTextFrame() ) { pFrame = pFrame->GetUpper(); - if( !pFrame->getFrameArea().IsInside( rPos ) ) + if( !pFrame->getFrameArea().Contains( rPos ) ) { if( pFrame->IsFootnoteFrame() ) { const SwFootnoteFrame* pTmp = static_cast<const SwFootnoteFrame*>(pFrame)->GetFollow(); while( pTmp ) { - if( pTmp->getFrameArea().IsInside( rPos ) ) + if( pTmp->getFrameArea().Contains( rPos ) ) return pTmp; pTmp = pTmp->GetFollow(); } @@ -3548,7 +3548,7 @@ const SwFrame* GetVirtualUpper( const SwFrame* pFrame, const Point& rPos ) SwFlyFrame* pTmp = const_cast<SwFlyFrame*>(pFrame->FindFlyFrame()); while( pTmp ) { - if( pTmp->getFrameArea().IsInside( rPos ) ) + if( pTmp->getFrameArea().Contains( rPos ) ) return pTmp; pTmp = pTmp->GetNextLink(); } @@ -3689,7 +3689,7 @@ SwTwips CalcRowRstHeight( SwLayoutFrame *pRow ) const SwFrame* FindPage( const SwRect &rRect, const SwFrame *pPage ) { - if ( !rRect.IsOver( pPage->getFrameArea() ) ) + if ( !rRect.Overlaps( pPage->getFrameArea() ) ) { const SwRootFrame* pRootFrame = static_cast<const SwRootFrame*>(pPage->GetUpper()); const SwFrame* pTmpPage = pRootFrame ? pRootFrame->GetPageAtPos( rRect.TopLeft(), &rRect.SSize(), true ) : nullptr; @@ -3817,7 +3817,7 @@ SwFrame* GetFrameOfModify(SwRootFrame const*const pLayout, sw::BroadcastingModif else aCalcRect = pTmpFrame->getFrameArea(); - if (aCalcRect.IsInside(pViewPosAndCalcFrame->first)) + if (aCalcRect.Contains(pViewPosAndCalcFrame->first)) { pMinFrame = pTmpFrame; break; diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx index 2b689f10b52e..5205e214b735 100644 --- a/sw/source/core/layout/layact.cxx +++ b/sw/source/core/layout/layact.cxx @@ -120,7 +120,7 @@ bool SwLayAction::PaintWithoutFlys( const SwRect &rRect, const SwContentFrame *p SwFlyFrame *pFly = pVirtFly->GetFlyFrame(); - if ( pFly == pSelfFly || !rRect.IsOver( pFly->getFrameArea() ) ) + if ( pFly == pSelfFly || !rRect.Overlaps( pFly->getFrameArea() ) ) continue; if ( pSelfFly && pSelfFly->IsLowerOf( pFly ) ) @@ -1603,7 +1603,7 @@ bool SwLayAction::FormatLayoutTab( SwTabFrame *pTab, bool bAddRect ) // Ugly shortcut! if ( pTab->IsLowersFormatted() && - (bPainted || !m_pImp->GetShell()->VisArea().IsOver( pTab->getFrameArea())) ) + (bPainted || !m_pImp->GetShell()->VisArea().Overlaps( pTab->getFrameArea())) ) return false; // Now, deal with the lowers @@ -2174,7 +2174,7 @@ bool SwLayIdle::DoIdleJob( IdleJobType eJob, bool bVisAreaOnly ) pPage = static_cast<SwPageFrame*>(pPage->GetNext()); if ( pPage && bVisAreaOnly && - !pPage->getFrameArea().IsOver( m_pImp->GetShell()->VisArea())) + !pPage->getFrameArea().Overlaps( m_pImp->GetShell()->VisArea())) break; } return false; @@ -2238,7 +2238,7 @@ SwLayIdle::SwLayIdle( SwRootFrame *pRt, SwViewShellImp *pI ) : bool bVis = false; if ( auto pCursorShell = dynamic_cast<SwCursorShell*>( &rSh) ) { - bVis = pCursorShell->GetCharRect().IsOver(rSh.VisArea()); + bVis = pCursorShell->GetCharRect().Overlaps(rSh.VisArea()); } aBools.push_back( bVis ); } @@ -2286,7 +2286,7 @@ SwLayIdle::SwLayIdle( SwRootFrame *pRt, SwViewShellImp *pI ) : bActions |= aTmp != rSh.VisArea(); if ( aTmp == rSh.VisArea() ) if ( auto pCursorShell = dynamic_cast< SwCursorShell*>( &rSh) ) - bActions |= aBools[nBoolIdx] != pCursorShell->GetCharRect().IsOver( rSh.VisArea() ); + bActions |= aBools[nBoolIdx] != pCursorShell->GetCharRect().Overlaps( rSh.VisArea() ); } ++nBoolIdx; diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx index 4d289a69e5d7..5c74da5b7a8a 100644 --- a/sw/source/core/layout/pagechg.cxx +++ b/sw/source/core/layout/pagechg.cxx @@ -2493,7 +2493,7 @@ bool SwPageFrame::IsOverHeaderFooterArea( const Point& rPt, FrameControlType &rC SwViewShell* pViewShell = getRootFrame()->GetCurrShell(); const bool bHideWhitespaceMode = pViewShell->GetViewOptions()->IsHideWhitespaceMode(); - if ( aHeaderArea.IsInside( rPt ) ) + if ( aHeaderArea.Contains( rPt ) ) { if (!bHideWhitespaceMode || static_cast<const SwFrameFormat*>(GetDep())->GetHeader().IsActive()) { @@ -2506,7 +2506,7 @@ bool SwPageFrame::IsOverHeaderFooterArea( const Point& rPt, FrameControlType &rC SwRect aFooterArea( Point( getFrameArea().Left(), nLowerLimit ), Size( getFrameArea().Width(), getFrameArea().Bottom() - nLowerLimit ) ); - if ( aFooterArea.IsInside( rPt ) && + if ( aFooterArea.Contains( rPt ) && (!bHideWhitespaceMode || static_cast<const SwFrameFormat*>(GetDep())->GetFooter().IsActive()) ) { rControl = FrameControlType::Footer; diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 0e7d0a031a46..c910daa2053e 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -683,7 +683,7 @@ void SwLineRects::ConnectEdges( OutputDevice const *pOut, SwPaintProperties cons SwRect aIns( rL1 ); aIns.Bottom( pLA->Bottom() ); - if ( !rL1.IsInside( aIns ) ) + if ( !rL1.Contains( aIns ) ) continue; m_aLineRects.emplace_back(aIns, &rL1.GetColor(), SvxBorderLineStyle::SOLID, rL1.GetTab(), @@ -724,7 +724,7 @@ void SwLineRects::ConnectEdges( OutputDevice const *pOut, SwPaintProperties cons SwRect aIns( rL1 ); aIns.Right( pLA->Right() ); - if ( !rL1.IsInside( aIns ) ) + if ( !rL1.Contains( aIns ) ) continue; m_aLineRects.emplace_back(aIns, &rL1.GetColor(), SvxBorderLineStyle::SOLID, rL1.GetTab(), @@ -792,7 +792,7 @@ void SwSubsRects::RemoveSuperfluousSubsidiaryLines( const SwLineRects &rRects, S if ( !bVerticalSubs == ( rLine.Height() > rLine.Width() ) ) //same direction? continue; - if ( aSubsRect.IsOver( rLine ) ) + if ( aSubsRect.Overlaps( rLine ) ) { if ( bVerticalSubs ) // Vertical? { @@ -1403,7 +1403,7 @@ static void lcl_SubtractFlys( const SwFrame *pFrame, const SwPageFrame *pPage, if (!pFly) continue; - if (pSelfFly == pFly || gProp.pSRetoucheFly == pFly || !rRect.IsOver(pFly->getFrameArea())) + if (pSelfFly == pFly || gProp.pSRetoucheFly == pFly || !rRect.Overlaps(pFly->getFrameArea())) continue; if (!pFly->GetFormat()->GetPrint().GetValue() && @@ -1679,7 +1679,7 @@ static void lcl_DrawGraphic( const SvxBrushItem& rBrush, vcl::RenderContext &rOu ::SwAlignRect( aAlignedGrfRect, &rSh, &rOutDev ); // Change type from <bool> to <bool>. - const bool bNotInside = !rOut.IsInside( aAlignedGrfRect ); + const bool bNotInside = !rOut.Contains( aAlignedGrfRect ); if ( bNotInside ) { rOutDev.Push( PushFlags::CLIPREGION ); @@ -1907,7 +1907,7 @@ void DrawGraphic( // E.g. this is the case for a Fly Frame without a background // brush positioned on the border of the page which inherited the background // brush from the page. - bRetouche = !rOut.IsInside( aGrf ); + bRetouche = !rOut.Contains( aGrf ); break; case GPOS_TILED: @@ -2131,7 +2131,7 @@ void DrawGraphic( rOutDev.Pop(); } - if( bDraw && aGrf.IsOver( rOut ) ) + if( bDraw && aGrf.Overlaps( rOut ) ) lcl_DrawGraphic( *pBrush, rOutDev, rSh, aGrf, rOut, bGrfNum, gProp, bGrfBackgrdAlreadyDrawn ); @@ -2544,7 +2544,7 @@ void SwTabFramePainter::PaintLines(OutputDevice& rDev, const SwRect& rRect) cons } } - if (!rRect.IsOver(aRepaintRect)) + if (!rRect.Overlaps(aRepaintRect)) { continue; } @@ -3143,7 +3143,7 @@ void SwRootFrame::PaintSwFrame(vcl::RenderContext& rRenderContext, SwRect const& SwPageFrame::GetBorderAndShadowBoundRect( pPage->getFrameArea(), pSh, &rRenderContext, aPaintRect, bPaintLeftShadow, bPaintRightShadow, bRightSidebar ); - if ( aRect.IsOver( aPaintRect ) ) + if ( aRect.Overlaps( aPaintRect ) ) { if ( pSh->GetWin() ) { @@ -3305,7 +3305,7 @@ void SwRootFrame::PaintSwFrame(vcl::RenderContext& rRenderContext, SwRect const& bPaintLeftShadow, bPaintRightShadow, bRightSidebar ); aPaintRect.Intersection_( aRect ); - if ( aRect.IsOver( aEmptyPageRect ) ) + if ( aRect.Overlaps( aEmptyPageRect ) ) { // #i75172# if called from SwViewShell::ImplEndAction it should no longer // really be used but handled by SwViewShell::ImplEndAction already @@ -3482,10 +3482,10 @@ void SwLayoutFrame::PaintSwFrame(vcl::RenderContext& rRenderContext, SwRect cons pFrame->ResetRetouche(); } - if ( rRect.IsOver( aPaintRect ) ) + if ( rRect.Overlaps( aPaintRect ) ) { if ( bCnt && pFrame->IsCompletePaint() && - !rRect.IsInside( aPaintRect ) && Application::AnyInput( VclInputFlags::KEYBOARD ) ) + !rRect.Contains( aPaintRect ) && Application::AnyInput( VclInputFlags::KEYBOARD ) ) { //fix(8104): It may happen, that the processing wasn't complete //but some parts of the paragraph were still repainted. @@ -3894,7 +3894,7 @@ bool SwFlyFrame::IsPaint( SdrObject *pObj, const SwViewShell *pSh ) //HACK: exception: printing of frames in tables, those can overlap //a page once in a while when dealing with oversized tables (HTML). SwPageFrame *pPage = pFly->FindPageFrame(); - if ( pPage && pPage->getFrameArea().IsOver( pFly->getFrameArea() ) ) + if ( pPage && pPage->getFrameArea().Overlaps( pFly->getFrameArea() ) ) { pAnch = pFly->AnchorFrame(); } @@ -3917,7 +3917,7 @@ bool SwFlyFrame::IsPaint( SdrObject *pObj, const SwViewShell *pSh ) //right now. Afterwards they must not be printed if the //page over which they float position wise gets printed. const SwPageFrame *pPage = pAnch->FindPageFrame(); - if ( !pPage->getFrameArea().IsOver( SwRect(pObj->GetCurrentBoundRect()) ) ) + if ( !pPage->getFrameArea().Overlaps( SwRect(pObj->GetCurrentBoundRect()) ) ) pAnch = nullptr; } } @@ -3992,7 +3992,7 @@ void SwFlyFrame::PaintSwFrame(vcl::RenderContext& rRenderContext, SwRect const& if (bInGenerateThumbnail) { const SwRect& aVisRect = pShell->VisArea(); - if (!aVisRect.IsOver(getFrameArea())) + if (!aVisRect.Overlaps(getFrameArea())) return; } } @@ -4516,7 +4516,7 @@ static void lcl_PaintShadow( const SwRect& rRect, SwRect& rOutRect, for (const SwRect & rOut : aRegion) { aOut = rOut; - if ( rRect.IsOver( aOut ) && aOut.Height() > 0 && aOut.Width() > 0 ) + if ( rRect.Overlaps( aOut ) && aOut.Height() > 0 && aOut.Width() > 0 ) { aOut.Intersection_( rRect ); pOut->DrawRect( aOut.SVRect() ); @@ -4576,7 +4576,7 @@ void SwFrame::PaintBorderLine( const SwRect& rRect, const Color *pColor, const SvxBorderLineStyle nStyle ) const { - if ( !rOutRect.IsOver( rRect ) ) + if ( !rOutRect.Overlaps( rRect ) ) return; SwRect aOut( rOutRect ); @@ -5207,7 +5207,7 @@ void SwFrame::PaintSwFrameShadowAndBorder( // suspend border paint under special cases - see below. // NOTE: This is a fix for the implementation of feature #99657#. bool bDrawOnlyShadowForTransparentFrame = false; - if ( aRect.IsInside( rRect ) ) + if ( aRect.Contains( rRect ) ) { // paint shadow, if background is transparent. // Because of introduced transparent background for fly frame #99657#, @@ -5345,7 +5345,7 @@ void SwFootnoteContFrame::PaintSwFrameShadowAndBorder( //be painted. SwRect aRect( getFramePrintArea() ); aRect.Pos() += getFrameArea().Pos(); - if ( !aRect.IsInside( rRect ) ) + if ( !aRect.Contains( rRect ) ) PaintLine( rRect, pPage ); } @@ -5438,7 +5438,7 @@ void SwLayoutFrame::PaintColLines( const SwRect &rRect, const SwFormatCol &rForm { (aLineRect.*fnRect->fnSetPosX) ( (pCol->getFrameArea().*fnGetX)() - nPenHalf ); - if ( aRect.IsOver( aLineRect ) ) + if ( aRect.Overlaps( aLineRect ) ) PaintBorderLine( aRect, aLineRect , pPage, &rFormatCol.GetLineColor(), rFormatCol.GetLineStyle() ); pCol = pCol->GetNext(); @@ -6108,7 +6108,7 @@ static void lcl_paintBitmapExToRect(vcl::RenderContext *pOut, const Point& aPoin tools::Rectangle aRectBottom(aPointBottom,aSize); tools::Rectangle aRectTop(aPointTop,aSize); - if (aRectBottom.IsOver(aVisRect)) + if (aRectBottom.Overlaps(aVisRect)) { if (Application::GetSettings().GetStyleSettings().GetHighContrastMode() ) @@ -6129,7 +6129,7 @@ static void lcl_paintBitmapExToRect(vcl::RenderContext *pOut, const Point& aPoin Point aMiddleSecond(aPointBottom + Point(pMgr->GetSidebarWidth()/3*2,_pViewShell->GetOut()->PixelToLogic(Size(0,nScrollerHeight)).Height()/2)); PaintNotesSidebarArrows(aMiddleFirst,aMiddleSecond,_pViewShell,pMgr->GetArrowColor(KEY_PAGEUP,nPageNum), pMgr->GetArrowColor(KEY_PAGEDOWN,nPageNum)); } - if (!aRectTop.IsOver(aVisRect)) + if (!aRectTop.Overlaps(aVisRect)) return; if (Application::GetSettings().GetStyleSettings().GetHighContrastMode() ) @@ -6359,7 +6359,7 @@ void SwFrame::PaintSwFrameBackground( const SwRect &rRect, const SwPageFrame *pP // bOnlyTextBackground means background that's on top of background shapes, // this includes both text and cell frames. - if ( (!bOnlyTextBackground || IsTextFrame() || IsCellFrame()) && aPaintRect.IsOver( rRect ) ) + if ( (!bOnlyTextBackground || IsTextFrame() || IsCellFrame()) && aPaintRect.Overlaps( rRect ) ) { if ( bBack || bPageFrame || !bLowerMode ) { @@ -6496,11 +6496,11 @@ void SwFrame::PaintSwFrameBackground( const SwRect &rRect, const SwPageFrame *pP SfxProgress::Reschedule(); aFrameRect = pFrame->GetPaintArea(); - if ( aFrameRect.IsOver( aBorderRect ) ) + if ( aFrameRect.Overlaps( aBorderRect ) ) { SwBorderAttrAccess aAccess( SwFrame::GetCache(), pFrame ); const SwBorderAttrs &rTmpAttrs = *aAccess.Get(); - if ( ( pFrame->IsLayoutFrame() && bLowerBorder ) || aFrameRect.IsOver( aRect ) ) + if ( ( pFrame->IsLayoutFrame() && bLowerBorder ) || aFrameRect.Overlaps( aRect ) ) { pFrame->PaintSwFrameBackground( aRect, pPage, rTmpAttrs, bLowMode, bLowerBorder, bOnlyTextBackground ); @@ -6563,7 +6563,7 @@ void SwLayoutFrame::RefreshLaySubsidiary( const SwPageFrame *pPage, SwShortCut aShortCut( *pLow, rRect ); while( pLow && !aShortCut.Stop( pLow->getFrameArea() ) ) { - if ( pLow->getFrameArea().IsOver( rRect ) && pLow->getFrameArea().HasArea() ) + if ( pLow->getFrameArea().Overlaps( rRect ) && pLow->getFrameArea().HasArea() ) { if ( pLow->IsLayoutFrame() ) static_cast<const SwLayoutFrame*>(pLow)->RefreshLaySubsidiary( pPage, rRect); @@ -6576,7 +6576,7 @@ void SwLayoutFrame::RefreshLaySubsidiary( const SwPageFrame *pPage, pAnchoredObj->GetDrawObj()->GetLayer() ) ) if (auto pFly = pAnchoredObj->DynCastFlyFrame() ) { - if ( pFly->IsFlyInContentFrame() && pFly->getFrameArea().IsOver( rRect ) ) + if ( pFly->IsFlyInContentFrame() && pFly->getFrameArea().Overlaps( rRect ) ) { if ( !pFly->Lower() || !pFly->Lower()->IsNoTextFrame() || !static_cast<const SwNoTextFrame*>(pFly->Lower())->HasAnimation()) @@ -6937,7 +6937,7 @@ void SwLayoutFrame::PaintSubsidiaryLines( const SwPageFrame *pPage, ::SwAlignRect( aOriginal, gProp.pSGlobalShell, gProp.pSGlobalShell->GetOut() ); - if ( !aOriginal.IsOver( rRect ) ) + if ( !aOriginal.Overlaps( rRect ) ) return; SwRect aOut( aOriginal ); diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx index 5771bbab6dd6..38d8c0e14305 100644 --- a/sw/source/core/layout/tabfrm.cxx +++ b/sw/source/core/layout/tabfrm.cxx @@ -2812,7 +2812,7 @@ bool SwTabFrame::CalcFlyOffsets( SwTwips& rUpper, // fly anchored at character or at paragraph pFly->IsFlyAtContentFrame() && // fly overlaps with corresponding table rectangle - aFlyRect.IsOver( aRect ) && + aFlyRect.Overlaps( aRect ) && // fly isn't lower of table and // anchor character frame of fly isn't lower of table (pSpaceBelowBottom // not if in ShouldBwdMoved @@ -5380,7 +5380,7 @@ void SwCellFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorder { SwRect aTmp( pAnchoredObj->GetObjRect() ); const SwFrame* pAnch = pAnchoredObj->GetAnchorFrame(); - if ( (bConsiderWrapOnObjPos && IsAnLower( pAnch )) || (!bConsiderWrapOnObjPos && aTmp.IsOver( aRect )) ) + if ( (bConsiderWrapOnObjPos && IsAnLower( pAnch )) || (!bConsiderWrapOnObjPos && aTmp.Overlaps( aRect )) ) { const SwFrameFormat& rAnchoredObjFrameFormat = pAnchoredObj->GetFrameFormat(); const SwFormatSurround &rSur = rAnchoredObjFrameFormat.GetSurround(); diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx index d8eee05dc383..bbf94d9d149a 100644 --- a/sw/source/core/layout/trvlfrm.cxx +++ b/sw/source/core/layout/trvlfrm.cxx @@ -96,7 +96,7 @@ namespace { // If the point is inside the rectangle, then distance is 0 // Otherwise, compute the distance to the center of the rectangle. - if ( !rRect.IsInside( rPoint ) ) + if ( !rRect.Contains( rPoint ) ) { tools::Line aLine( rPoint, rRect.Center( ) ); nDist = aLine.GetLength( ); @@ -164,7 +164,7 @@ bool SwLayoutFrame::GetModelPositionForViewPoint( SwPosition *pPos, Point &rPoin pFrame->UnionFrame() : pFrame->GetPaintArea() ); - if ( aPaintRect.IsInside( rPoint ) && + if ( aPaintRect.Contains( rPoint ) && ( bContentCheck || pFrame->GetModelPositionForViewPoint( pPos, rPoint, pCMS ) ) ) bRet = true; else @@ -183,7 +183,7 @@ bool SwPageFrame::GetModelPositionForViewPoint( SwPosition *pPos, Point &rPoint, Point aPoint( rPoint ); // check, if we have to adjust the point - if ( !getFrameArea().IsInside( aPoint ) ) + if ( !getFrameArea().Contains( aPoint ) ) { aPoint.setX( std::max( aPoint.X(), getFrameArea().Left() ) ); aPoint.setX( std::min( aPoint.X(), getFrameArea().Right() ) ); @@ -366,7 +366,7 @@ bool SwPageFrame::GetModelPositionForViewPoint( SwPosition *pPos, Point &rPoint, bool SwLayoutFrame::FillSelection( SwSelectionList& rList, const SwRect& rRect ) const { - if( rRect.IsOver(GetPaintArea()) ) + if( rRect.Overlaps(GetPaintArea()) ) { const SwFrame* pFrame = Lower(); while( pFrame ) @@ -381,7 +381,7 @@ bool SwLayoutFrame::FillSelection( SwSelectionList& rList, const SwRect& rRect ) bool SwPageFrame::FillSelection( SwSelectionList& rList, const SwRect& rRect ) const { bool bRet = false; - if( rRect.IsOver(GetPaintArea()) ) + if( rRect.Overlaps(GetPaintArea()) ) { bRet = SwLayoutFrame::FillSelection( rList, rRect ); if( GetSortedObjs() ) @@ -504,7 +504,7 @@ bool SwCellFrame::GetModelPositionForViewPoint( SwPosition *pPos, Point &rPoint, while ( pFrame && !bRet ) { pFrame->Calc(pRenderContext); - if ( pFrame->getFrameArea().IsInside( rPoint ) ) + if ( pFrame->getFrameArea().Contains( rPoint ) ) { bRet = pFrame->GetModelPositionForViewPoint( pPos, rPoint, pCMS ); if ( pCMS && pCMS->m_bStop ) @@ -547,7 +547,7 @@ bool SwFlyFrame::GetModelPositionForViewPoint( SwPosition *pPos, Point &rPoint, //However if the Point sits inside a Fly which is completely located inside //the current one, we call GetModelPositionForViewPoint for it. Calc(pRenderContext); - bool bInside = getFrameArea().IsInside( rPoint ) && Lower(); + bool bInside = getFrameArea().Contains( rPoint ) && Lower(); bool bRet = false; //If a Frame contains a graphic, but only text was requested, it basically @@ -565,8 +565,8 @@ bool SwFlyFrame::GetModelPositionForViewPoint( SwPosition *pPos, Point &rPoint, { const SwVirtFlyDrawObj* pObj = static_cast<const SwVirtFlyDrawObj*>(aIter()); const SwFlyFrame* pFly = pObj ? pObj->GetFlyFrame() : nullptr; - if ( pFly && pFly->getFrameArea().IsInside( rPoint ) && - getFrameArea().IsInside( pFly->getFrameArea() ) ) + if ( pFly && pFly->getFrameArea().Contains( rPoint ) && + getFrameArea().Contains( pFly->getFrameArea() ) ) { if (g_OszCtrl.ChkOsz(pFly)) break; @@ -586,7 +586,7 @@ bool SwFlyFrame::GetModelPositionForViewPoint( SwPosition *pPos, Point &rPoint, while ( pFrame && !bRet ) { pFrame->Calc(pRenderContext); - if ( pFrame->getFrameArea().IsInside( rPoint ) ) + if ( pFrame->getFrameArea().Contains( rPoint ) ) { bRet = pFrame->GetModelPositionForViewPoint( pPos, rPoint, pCMS ); if ( pCMS && pCMS->m_bStop ) @@ -912,11 +912,11 @@ static bool lcl_UpDown( SwPaM *pPam, const SwContentFrame *pStart, else aInsideCnt = Point( nX, nTmpTop ); - if ( pCell && pCell->getFrameArea().IsInside( aInsideCell ) ) + if ( pCell && pCell->getFrameArea().Contains( aInsideCell ) ) { bEnd = true; //Get the right Content out of the cell. - if ( !pCnt->getFrameArea().IsInside( aInsideCnt ) ) + if ( !pCnt->getFrameArea().Contains( aInsideCnt ) ) { pCnt = pCell->ContainsContent(); if ( fnNxtPrv == lcl_GetPrvCnt ) @@ -924,7 +924,7 @@ static bool lcl_UpDown( SwPaM *pPam, const SwContentFrame *pStart, pCnt = pCnt->GetNextContentFrame(); } } - else if ( pCnt->getFrameArea().IsInside( aInsideCnt ) ) + else if ( pCnt->getFrameArea().Contains( aInsideCnt ) ) bEnd = true; } } @@ -1170,7 +1170,7 @@ static const SwLayoutFrame* lcl_Inside( const SwContentFrame *pCnt, Point const return nullptr; } if( pUp->IsFootnoteContFrame() ) - return pUp->getFrameArea().IsInside( rPt ) ? pUp : nullptr; + return pUp->getFrameArea().Contains( rPt ) ? pUp : nullptr; pUp = pUp->GetUpper(); } return nullptr; @@ -1227,7 +1227,7 @@ const SwContentFrame *SwLayoutFrame::GetContentPos( Point& rPoint, if ( !pContent->IsTextFrame() || !static_cast<const SwTextFrame*>(pContent)->IsHiddenNow() ) { SwRect aContentFrame( pContent->UnionFrame() ); - if ( aContentFrame.IsInside( rPoint ) ) + if ( aContentFrame.Contains( rPoint ) ) { pActual = pContent; aPoint = rPoint; @@ -1402,7 +1402,7 @@ void SwPageFrame::GetContentPosition( const Point &rPt, SwPosition &rPos ) const while ( pContent ) { SwRect aContentFrame( pContent->UnionFrame() ); - if ( aContentFrame.IsInside( rPt ) ) + if ( aContentFrame.Contains( rPt ) ) { //This is the nearest one. pAct = pContent; @@ -1524,7 +1524,7 @@ Point SwRootFrame::GetNextPrevContentPos( const Point& rPoint, bool bNext ) cons { //Does the point lie in the current ContentFrame? SwRect aContentFrame( pCnt->UnionFrame() ); - if ( aContentFrame.IsInside( rPoint ) && !lcl_IsInRepeatedHeadline( pCnt )) + if ( aContentFrame.Contains( rPoint ) && !lcl_IsInRepeatedHeadline( pCnt )) { aRet = rPoint; break; @@ -1917,7 +1917,7 @@ bool SwRootFrame::MakeTableCursors( SwTableCursor& rTableCursor ) while ( pRow ) { - if ( pRow->getFrameArea().IsOver( rUnion.GetUnion() ) ) + if ( pRow->getFrameArea().Overlaps( rUnion.GetUnion() ) ) { const SwLayoutFrame *pCell = pRow->FirstCell(); @@ -1971,7 +1971,7 @@ bool SwRootFrame::MakeTableCursors( SwTableCursor& rTableCursor ) static void Sub( SwRegionRects& rRegion, const SwRect& rRect ) { if( rRect.Width() > 1 && rRect.Height() > 1 && - rRect.IsOver( rRegion.GetOrigin() )) + rRect.Overlaps( rRegion.GetOrigin() )) rRegion -= rRect; } @@ -2507,7 +2507,7 @@ void SwRootFrame::CalcFrameRects(SwShellCursor &rCursor) { SwRect aCRect( pContent->UnionFrame( true ) ); aCRect.Intersection( pContent->GetPaintArea() ); - if( aCRect.IsOver( aRegion.GetOrigin() )) + if( aCRect.Overlaps( aRegion.GetOrigin() )) { SwRect aTmp( aPrvRect ); aTmp.Union( aCRect ); diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx index 1a00e0b7919f..86628d906bcf 100644 --- a/sw/source/core/layout/wsfrm.cxx +++ b/sw/source/core/layout/wsfrm.cxx @@ -2302,7 +2302,7 @@ SwTwips SwContentFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool bInfo ) if( aBound.Left() > aRect.Right() ) continue; - if( aBound.IsOver( aRect ) ) + if( aBound.Overlaps( aRect ) ) { const SwFrameFormat& rFormat = pAnchoredObj->GetFrameFormat(); if( css::text::WrapTextMode_THROUGH != rFormat.GetSurround().GetSurround() ) diff --git a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx index d6d17459fc2b..a5ea2bf7e43f 100644 --- a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx +++ b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx @@ -1164,7 +1164,7 @@ void SwToContentAnchoredObjectPosition::CalcOverlap(const SwTextFrame* pAnchorFr continue; } - if (!GetAnchoredObj().GetObjRect().IsOver(pAnchoredObj->GetObjRect())) + if (!GetAnchoredObj().GetObjRect().Overlaps(pAnchoredObj->GetObjRect())) { // Found an already positioned object, but it doesn't overlap, ignore. continue; diff --git a/sw/source/core/ole/ndole.cxx b/sw/source/core/ole/ndole.cxx index 26079490a2f4..024b73cdbbed 100644 --- a/sw/source/core/ole/ndole.cxx +++ b/sw/source/core/ole/ndole.cxx @@ -666,7 +666,7 @@ void SwOLENode::SetChanged() { CurrShell aCurr(&rShell); - if(rShell.VisArea().IsOver(aFrameArea) && OUTDEV_WINDOW == rShell.GetOut()->GetOutDevType()) + if(rShell.VisArea().Overlaps(aFrameArea) && OUTDEV_WINDOW == rShell.GetOut()->GetOutDevType()) { // invalidate instead of painting rShell.GetWin()->Invalidate(aFrameArea.SVRect()); diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx b/sw/source/core/text/EnhancedPDFExportHelper.cxx index c81b41f35b75..0cbc2187fd37 100644 --- a/sw/source/core/text/EnhancedPDFExportHelper.cxx +++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx @@ -816,7 +816,7 @@ void SwTaggedPDFHelper::SetAttributes( vcl::PDFWriter::StructElement eType ) rInf.CalcRect( *pPor, &aPorRect ); const Point aPorCenter = aPorRect.Center(); auto aIter = std::find_if(rLinkIdMap.begin(), rLinkIdMap.end(), - [&aPorCenter](const IdMapEntry& rEntry) { return rEntry.first.IsInside(aPorCenter); }); + [&aPorCenter](const IdMapEntry& rEntry) { return rEntry.first.Contains(aPorCenter); }); if (aIter != rLinkIdMap.end()) { sal_Int32 nLinkId = (*aIter).second; diff --git a/sw/source/core/text/frmcrsr.cxx b/sw/source/core/text/frmcrsr.cxx index 9ea484912cff..d2d7434b0da2 100644 --- a/sw/source/core/text/frmcrsr.cxx +++ b/sw/source/core/text/frmcrsr.cxx @@ -629,7 +629,7 @@ bool SwTextFrame::GetModelPositionForViewPoint_(SwPosition* pPos, const Point& r } } bool bChgFillData = false; - if( pFillData && FindPageFrame()->getFrameArea().IsInside( aOldPoint ) ) + if( pFillData && FindPageFrame()->getFrameArea().Contains( aOldPoint ) ) { FillCursorPos( *pFillData ); bChgFillData = true; diff --git a/sw/source/core/text/frmpaint.cxx b/sw/source/core/text/frmpaint.cxx index 76630fc573f6..98582b931659 100644 --- a/sw/source/core/text/frmpaint.cxx +++ b/sw/source/core/text/frmpaint.cxx @@ -248,7 +248,7 @@ void SwExtraPainter::PaintExtra( SwTwips nY, tools::Long nAsc, tools::Long nMax, SwRect aRct( Point( aTmpPos.X(), aTmpPos.Y() - pTmpFnt->GetAscent( m_pSh, *m_pSh->GetOut() ) ), aSize ); - if( !m_aRect.IsInside( aRct ) ) + if( !m_aRect.Contains( aRct ) ) { if( aRct.Intersection( m_aRect ).IsEmpty() ) bPaint = false; @@ -280,7 +280,7 @@ void SwExtraPainter::PaintRedline( SwTwips nY, tools::Long nMax ) if( !IsClipChg() ) { SwRect aRct( aStart, aEnd ); - if( !m_aRect.IsInside( aRct ) ) + if( !m_aRect.Contains( aRct ) ) { if( aRct.Intersection( m_aRect ).IsEmpty() ) return; diff --git a/sw/source/core/text/itrcrsr.cxx b/sw/source/core/text/itrcrsr.cxx index 287b32460ad6..1bcc68373890 100644 --- a/sw/source/core/text/itrcrsr.cxx +++ b/sw/source/core/text/itrcrsr.cxx @@ -1767,7 +1767,7 @@ TextFrameIndex SwTextCursor::GetModelPositionForViewPoint( SwPosition *pPos, con if ( m_pFrame->IsVertical() ) m_pFrame->SwitchHorizontalToVertical( aTmpPoint ); - if( bChgNodeInner && pTmp->getFrameArea().IsInside( aTmpPoint ) && + if( bChgNodeInner && pTmp->getFrameArea().Contains( aTmpPoint ) && !( pTmp->IsProtected() ) ) { pFlyPor->GetFlyCursorOfst(aTmpPoint, *pPos, pCMS); @@ -1819,7 +1819,7 @@ bool SwTextFrame::FillSelection( SwSelectionList& rSelList, const SwRect& rRect bool bRet = false; // GetPaintArea() instead getFrameArea() for negative indents SwRect aTmpFrame( GetPaintArea() ); - if( !rRect.IsOver( aTmpFrame ) ) + if( !rRect.Overlaps( aTmpFrame ) ) return false; if( rSelList.checkContext( this ) ) { diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx index 99fb83aeaa23..728744276f22 100644 --- a/sw/source/core/text/itrform2.cxx +++ b/sw/source/core/text/itrform2.cxx @@ -2342,7 +2342,7 @@ bool SwTextFormatter::ChkFlyUnderflow( SwTextFormatInfo &rInf ) const // New flys from below? if( !pPos->IsFlyPortion() ) { - if( aInter.IsOver( aLine ) ) + if( aInter.Overlaps( aLine ) ) { aInter.Intersection_( aLine ); if( aInter.HasArea() ) @@ -2359,7 +2359,7 @@ bool SwTextFormatter::ChkFlyUnderflow( SwTextFormatInfo &rInf ) const else { // The fly portion is not intersected by a fly anymore - if ( ! aInter.IsOver( aLine ) ) + if ( ! aInter.Overlaps( aLine ) ) { rInf.SetLineHeight( nHeight ); rInf.SetLineNetHeight( m_pCurr->Height() ); @@ -2470,7 +2470,7 @@ void SwTextFormatter::CalcFlyWidth( SwTextFormatInfo &rInf ) aInter.Height(0); } - if( !aInter.IsOver( aLine ) ) + if( !aInter.Overlaps( aLine ) ) return; aLine.Left( rInf.X() + nLeftMar ); diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx index 5a62aa07d290..49ac25ac686d 100644 --- a/sw/source/core/text/porfld.cxx +++ b/sw/source/core/text/porfld.cxx @@ -935,7 +935,7 @@ void SwGrfNumPortion::Paint( const SwTextPaintInfo &rInf ) const SetId( reinterpret_cast<sal_IntPtr>( rInf.GetTextFrame() ) ); rInf.GetTextFrame()->SetAnimation(); } - if( aTmp.IsOver( rInf.GetPaintRect() ) && !bDraw ) + if( aTmp.Overlaps( rInf.GetPaintRect() ) && !bDraw ) { rInf.NoteAnimation(); const SwViewShell* pViewShell = rInf.GetVsh(); diff --git a/sw/source/core/text/porfly.cxx b/sw/source/core/text/porfly.cxx index de72a0ec6076..fc540731a975 100644 --- a/sw/source/core/text/porfly.cxx +++ b/sw/source/core/text/porfly.cxx @@ -213,7 +213,7 @@ void sw::FlyContentPortion::Paint(const SwTextPaintInfo& rInf) const rInf.GetTextFrame()->SwitchHorizontalToVertical(aRepaintRect); if(!((m_pFly->IsCompletePaint() || - m_pFly->getFrameArea().IsOver(aRepaintRect)) && + m_pFly->getFrameArea().Overlaps(aRepaintRect)) && SwFlyFrame::IsPaint(m_pFly->GetVirtDrawObj(), m_pFly->getRootFrame()->GetCurrShell()))) return; diff --git a/sw/source/core/text/txtfly.cxx b/sw/source/core/text/txtfly.cxx index 92508cde9bc3..05ab2d873b86 100644 --- a/sw/source/core/text/txtfly.cxx +++ b/sw/source/core/text/txtfly.cxx @@ -181,7 +181,7 @@ SwRect SwContourCache::CalcBoundRect( const SwAnchoredObject* pAnchoredObj, static_cast<const SwFlyFrame*>(pAnchoredObj)->Lower()->IsNoTextFrame() ) ) ) { aRet = pAnchoredObj->GetObjRectWithSpaces(); - if( aRet.IsOver( rLine ) ) + if( aRet.Overlaps( rLine ) ) { if( !pContourCache ) pContourCache = new SwContourCache; @@ -428,7 +428,7 @@ bool SwTextFly::IsAnyObj( const SwRect &rRect ) const continue; // #i68520# - if( mpCurrAnchoredObj != pObj && aBound.IsOver( aRect ) ) + if( mpCurrAnchoredObj != pObj && aBound.Overlaps( aRect ) ) return true; } } @@ -496,7 +496,7 @@ void SwTextFly::DrawTextOpaque( SwDrawTextInfo &rInf ) if( pFly && mpCurrAnchoredObj != pTmpAnchoredObj ) { // #i68520# - if( aRegion.GetOrigin().IsOver( pFly->getFrameArea() ) ) + if( aRegion.GetOrigin().Overlaps( pFly->getFrameArea() ) ) { const SwFrameFormat *pFormat = pFly->GetFormat(); const SwFormatSurround &rSur = pFormat->GetSurround(); @@ -734,7 +734,7 @@ bool SwTextFly::GetTop( const SwAnchoredObject* _pAnchoredObj, { // #i68520# const SwRect& aTmp( _pAnchoredObj->GetObjRectWithSpaces() ); - if ( !aTmp.IsOver( mpCurrAnchoredObj->GetObjRectWithSpaces() ) ) + if ( !aTmp.Overlaps( mpCurrAnchoredObj->GetObjRectWithSpaces() ) ) bEvade = false; } } @@ -1031,7 +1031,7 @@ bool SwTextFly::ForEach( const SwRect &rRect, SwRect* pRect, bool bAvoid ) const break; // #i68520# - if ( mpCurrAnchoredObj != pAnchoredObj && aRect.IsOver( rRect ) ) + if ( mpCurrAnchoredObj != pAnchoredObj && aRect.Overlaps( rRect ) ) { // #i68520# const SwFormat* pFormat( &(pAnchoredObj->GetFrameFormat()) ); @@ -1068,7 +1068,7 @@ bool SwTextFly::ForEach( const SwRect &rRect, SwRect* pRect, bool bAvoid ) const { // #i68520# SwRect aFly = AnchoredObjToRect( pAnchoredObj, rRect ); - if( aFly.IsEmpty() || !aFly.IsOver( rRect ) ) + if( aFly.IsEmpty() || !aFly.Overlaps( rRect ) ) continue; if( !bRet || ( (!m_pCurrFrame->IsRightToLeft() && @@ -1176,7 +1176,7 @@ void SwTextFly::CalcRightMargin( SwRect &rFly, aRectFnSet.GetTop(aLine) ) > 0 ) SetNextTop( 0 ); } - if( aTmp.IsOver( aLine ) && nTmpRight > nFlyRight ) + if( aTmp.Overlaps( aLine ) && nTmpRight > nFlyRight ) { nFlyRight = nTmpRight; if( css::text::WrapTextMode_RIGHT == eSurroundForTextWrap || @@ -1242,7 +1242,7 @@ void SwTextFly::CalcLeftMargin( SwRect &rFly, const SwRect aTmp( SwContourCache::CalcBoundRect (pNext, aLine, m_pCurrFrame, nFlyLeft, false) ); - if( aRectFnSet.GetLeft(aTmp) < nFlyLeft && aTmp.IsOver( aLine ) ) + if( aRectFnSet.GetLeft(aTmp) < nFlyLeft && aTmp.Overlaps( aLine ) ) { // #118796# - no '+1', because <..fnGetRight> // returns the correct value. diff --git a/sw/source/core/view/pagepreviewlayout.cxx b/sw/source/core/view/pagepreviewlayout.cxx index 4a19062f4db6..1dac62197f13 100644 --- a/sw/source/core/view/pagepreviewlayout.cxx +++ b/sw/source/core/view/pagepreviewlayout.cxx @@ -879,7 +879,7 @@ struct PreviewPosInsidePagePred if ( _pPreviewPage->bVisible ) { tools::Rectangle aPreviewPageRect( _pPreviewPage->aPreviewWinPos, _pPreviewPage->aPageSize ); - return aPreviewPageRect.IsInside( mnPreviewPos ); + return aPreviewPageRect.Contains( mnPreviewPos ); } return false; } @@ -1058,7 +1058,7 @@ bool SwPagePreviewLayout::Paint(vcl::RenderContext& rRenderContext, const tools: aMapMode.SetOrigin( rpPreviewPage->aMapOffset ); pOutputDev->SetMapMode( aMapMode ); tools::Rectangle aPxPaintRect = pOutputDev->LogicToPixel( aPageRect ); - if ( aPxOutRect.IsOver( aPxPaintRect) ) + if ( aPxOutRect.Overlaps( aPxPaintRect) ) { const SwPageFrame* pPage = rpPreviewPage->pPage; @@ -1182,7 +1182,7 @@ void SwPagePreviewLayout::Repaint( const tools::Rectangle& rInvalidCoreRect ) co continue; tools::Rectangle aPageRect( rpPreviewPage->aLogicPos, rpPreviewPage->aPageSize ); - if ( rInvalidCoreRect.IsOver( aPageRect ) ) + if ( rInvalidCoreRect.Overlaps( aPageRect ) ) { aPageRect.Intersection(rInvalidCoreRect); tools::Rectangle aInvalidPreviewRect = aPageRect; diff --git a/sw/source/core/view/vdraw.cxx b/sw/source/core/view/vdraw.cxx index ef739ec61768..37b6d67e58d6 100644 --- a/sw/source/core/view/vdraw.cxx +++ b/sw/source/core/view/vdraw.cxx @@ -188,7 +188,7 @@ bool SwViewShellImp::IsDragPossible( const Point &rPoint ) aRect.AddBottom( FUZZY_EDGE ); aRect.AddLeft (- FUZZY_EDGE ); aRect.AddRight ( FUZZY_EDGE ); - return aRect.IsInside( rPoint ); + return aRect.Contains( rPoint ); } void SwViewShellImp::NotifySizeChg( const Size &rNewSz ) @@ -257,7 +257,7 @@ void SwViewShellImp::NotifySizeChg( const Size &rNewSz ) } const tools::Rectangle aObjBound( pObj->GetCurrentBoundRect() ); - if ( !aDocRect.IsInside( aObjBound ) ) + if ( !aDocRect.Contains( aObjBound ) ) { Size aSz; if ( aObjBound.Left() > aDocRect.Right() ) diff --git a/sw/source/core/view/viewimp.cxx b/sw/source/core/view/viewimp.cxx index 50304b384020..6f9492df7f4d 100644 --- a/sw/source/core/view/viewimp.cxx +++ b/sw/source/core/view/viewimp.cxx @@ -122,7 +122,7 @@ void SwViewShellImp::DelRegion() bool SwViewShellImp::AddPaintRect( const SwRect &rRect ) { // In case of tiled rendering the visual area is the last painted tile -> not interesting. - if ( rRect.IsOver( m_pShell->VisArea() ) || comphelper::LibreOfficeKit::isActive() ) + if ( rRect.Overlaps( m_pShell->VisArea() ) || comphelper::LibreOfficeKit::isActive() ) { if ( !m_pRegion ) { @@ -177,7 +177,7 @@ void SwViewShellImp::SetFirstVisPage(OutputDevice const * pRenderContext) SwPageFrame *pPage = static_cast<SwPageFrame*>(m_pShell->GetLayout()->Lower()); SwRect aPageRect = pPage->GetBoundRect(pRenderContext); - while ( pPage && !aPageRect.IsOver( m_pShell->VisArea() ) ) + while ( pPage && !aPageRect.Overlaps( m_pShell->VisArea() ) ) { pPage = static_cast<SwPageFrame*>(pPage->GetNext()); if ( pPage ) diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index c78ea43516b1..e80d07769f09 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -559,7 +559,7 @@ void SwViewShell::InvalidateWindows( const SwRect &rRect ) ::RepaintPagePreview( &rSh, rRect ); // In case of tiled rendering, invalidation is wanted even if // the rectangle is outside the visual area. - else if ( rSh.VisArea().IsOver( rRect ) || comphelper::LibreOfficeKit::isActive() ) + else if ( rSh.VisArea().Overlaps( rRect ) || comphelper::LibreOfficeKit::isActive() ) rSh.GetWin()->Invalidate( rRect.SVRect() ); } } @@ -574,7 +574,7 @@ const SwRect& SwViewShell::VisArea() const void SwViewShell::MakeVisible( const SwRect &rRect ) { - if ( !(!VisArea().IsInside( rRect ) || IsScrollMDI( this, rRect ) || GetCareDialog(*this)) ) + if ( !(!VisArea().Contains( rRect ) || IsScrollMDI( this, rRect ) || GetCareDialog(*this)) ) return; if ( IsViewLocked() ) @@ -1138,7 +1138,7 @@ void SwViewShell::VisPortChgd( const SwRect &rRect) } // #i9719# - consider new border and shadow width - if ( aPageRect.IsOver( aBoth ) ) + if ( aPageRect.Overlaps( aBoth ) ) { SwTwips nPageLeft = 0; SwTwips nPageRight = 0; @@ -1184,7 +1184,7 @@ void SwViewShell::VisPortChgd( const SwRect &rRect) tools::Rectangle aRect( aPrevArea.SVRect() ); aRect.SetLeft( nMinLeft ); aRect.SetRight( nMaxRight ); - if( VisArea().IsOver( aPrevArea ) && !mnLockPaint ) + if( VisArea().Overlaps( aPrevArea ) && !mnLockPaint ) { bScrolled = true; maVisArea.Pos() = aPrevArea.Pos(); @@ -1197,7 +1197,7 @@ void SwViewShell::VisPortChgd( const SwRect &rRect) } else if ( !mnLockPaint ) //will be released in Unlock { - if( VisArea().IsOver( aPrevArea ) ) + if( VisArea().Overlaps( aPrevArea ) ) { bScrolled = true; maVisArea.Pos() = aPrevArea.Pos(); @@ -1491,7 +1491,7 @@ void SwViewShell::PaintDesktop(vcl::RenderContext& rRenderContext, const SwRect const SwFrame *pPg = pRoot->Lower(); while ( pPg && pPg->GetNext() ) pPg = pPg->GetNext(); - if ( !pPg || !pPg->getFrameArea().IsOver( VisArea() ) ) + if ( !pPg || !pPg->getFrameArea().Overlaps( VisArea() ) ) bBorderOnly = true; } @@ -1546,7 +1546,7 @@ void SwViewShell::PaintDesktop(vcl::RenderContext& rRenderContext, const SwRect aPageRect.Pos().AdjustX( -(bSidebarRight ? 0 : nSidebarWidth) ); aPageRect.AddWidth(nSidebarWidth ); - if ( aPageRect.IsOver( rRect ) ) + if ( aPageRect.Overlaps( rRect ) ) aRegion -= aPageRect; pPage = pPage->GetNext(); @@ -1652,7 +1652,7 @@ bool SwViewShell::CheckInvalidForPaint( const SwRect &rRect ) for ( size_t i = 0; i < pRegion->size(); ++i ) { const SwRect &rTmp = (*pRegion)[i]; - bStop = rTmp.IsOver( VisArea() ); + bStop = rTmp.Overlaps( VisArea() ); if ( !bStop ) break; } @@ -1673,10 +1673,10 @@ bool SwViewShell::CheckInvalidForPaint( const SwRect &rRect ) SwRegionRects aRegion( rRect ); for ( size_t i = 0; i < pRegion->size(); ++i ) { const SwRect &rTmp = (*pRegion)[i]; - if ( !rRect.IsInside( rTmp ) ) + if ( !rRect.Contains( rTmp ) ) { InvalidateWindows( rTmp ); - if ( rTmp.IsOver( VisArea() ) ) + if ( rTmp.Overlaps( VisArea() ) ) { aRegion -= rTmp; bRet = true; } @@ -1764,7 +1764,7 @@ void SwViewShell::Paint(vcl::RenderContext& rRenderContext, const tools::Rectang if ( Imp()->m_bSmoothUpdate ) { SwRect aTmp( rRect ); - if ( !Imp()->m_aSmoothRect.IsInside( aTmp ) ) + if ( !Imp()->m_aSmoothRect.Contains( aTmp ) ) Imp()->m_bStopSmooth = true; else { @@ -1811,7 +1811,7 @@ void SwViewShell::Paint(vcl::RenderContext& rRenderContext, const tools::Rectang if ( IsPreview() ) { //When useful, process or destroy the old InvalidRect. - if ( aRect.IsInside( maInvalidRect ) ) + if ( aRect.Contains( maInvalidRect ) ) ResetInvalidRect(); SwViewShell::sbLstAct = true; GetLayout()->PaintSwFrame( rRenderContext, aRect ); @@ -1832,7 +1832,7 @@ void SwViewShell::Paint(vcl::RenderContext& rRenderContext, const tools::Rectang PaintDesktop(rRenderContext, aRect); //When useful, process or destroy the old InvalidRect. - if ( aRect.IsInside( maInvalidRect ) ) + if ( aRect.Contains( maInvalidRect ) ) ResetInvalidRect(); SwViewShell::sbLstAct = true; GetLayout()->PaintSwFrame( rRenderContext, aRect ); @@ -2592,7 +2592,7 @@ void SwViewShell::OnGraphicArrived(const SwRect& rRect) if(rShell.GetWin()) ::RepaintPagePreview(&rShell, rRect); } - else if(rShell.VisArea().IsOver(rRect) && OUTDEV_WINDOW == rShell.GetOut()->GetOutDevType()) + else if(rShell.VisArea().Overlaps(rRect) && OUTDEV_WINDOW == rShell.GetOut()->GetOutDevType()) { // invalidate instead of painting rShell.GetWin()->Invalidate(rRect.SVRect()); diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index a8c7dba32850..cd1ef329e70b 100644 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -1530,7 +1530,7 @@ void SwMarkPreview::PaintPage(vcl::RenderContext& rRenderContext, const tools::R if (i == (nLines - 1)) aTextLine.SetSize(Size(aTextLine.GetWidth() / 2, aTextLine.GetHeight())); - if (aPage.IsInside(aTextLine)) + if (aPage.Contains(aTextLine)) drawRect(rRenderContext, aTextLine, m_aTextCol, m_aTransCol); aTextLine.Move(0, nStep); diff --git a/sw/source/uibase/docvw/AnnotationWin2.cxx b/sw/source/uibase/docvw/AnnotationWin2.cxx index aeb18ab29fe8..a736bd0291df 100644 --- a/sw/source/uibase/docvw/AnnotationWin2.cxx +++ b/sw/source/uibase/docvw/AnnotationWin2.cxx @@ -143,7 +143,7 @@ void SwAnnotationWin::PaintTile(vcl::RenderContext& rRenderContext, const tools: bool SwAnnotationWin::IsHitWindow(const Point& rPointLogic) { tools::Rectangle aRectangleLogic(EditWin().PixelToLogic(GetPosPixel()), EditWin().PixelToLogic(GetSizePixel())); - return aRectangleLogic.IsInside(rPointLogic); + return aRectangleLogic.Contains(rPointLogic); } void SwAnnotationWin::SetCursorLogicPosition(const Point& rPosition, bool bPoint, bool bClearMark) diff --git a/sw/source/uibase/docvw/HeaderFooterWin.cxx b/sw/source/uibase/docvw/HeaderFooterWin.cxx index 78ad35b28745..e7808576e380 100644 --- a/sw/source/uibase/docvw/HeaderFooterWin.cxx +++ b/sw/source/uibase/docvw/HeaderFooterWin.cxx @@ -283,11 +283,11 @@ void SwHeaderFooterWin::ShowAll(bool bShow) bool SwHeaderFooterWin::Contains( const Point &rDocPt ) const { ::tools::Rectangle aRect(GetPosPixel(), GetSizePixel()); - if (aRect.IsInside(rDocPt)) + if (aRect.Contains(rDocPt)) return true; ::tools::Rectangle aLineRect(m_pLine->GetPosPixel(), m_pLine->GetSizePixel()); - return aLineRect.IsInside(rDocPt); + return aLineRect.Contains(rDocPt); } void SwHeaderFooterWin::PaintButton() diff --git a/sw/source/uibase/docvw/OutlineContentVisibilityWin.cxx b/sw/source/uibase/docvw/OutlineContentVisibilityWin.cxx index 23e836a96a24..3375c6896325 100644 --- a/sw/source/uibase/docvw/OutlineContentVisibilityWin.cxx +++ b/sw/source/uibase/docvw/OutlineContentVisibilityWin.cxx @@ -162,7 +162,7 @@ void SwOutlineContentVisibilityWin::ShowAll(bool bShow) bool SwOutlineContentVisibilityWin::Contains(const Point& rDocPt) const { ::tools::Rectangle aRect(GetPosPixel(), GetSizePixel()); - if (aRect.IsInside(rDocPt)) + if (aRect.Contains(rDocPt)) return true; return false; } diff --git a/sw/source/uibase/docvw/PageBreakWin.cxx b/sw/source/uibase/docvw/PageBreakWin.cxx index c4c4ed9b73ad..252651048fe9 100644 --- a/sw/source/uibase/docvw/PageBreakWin.cxx +++ b/sw/source/uibase/docvw/PageBreakWin.cxx @@ -426,11 +426,11 @@ void SwPageBreakWin::ShowAll( bool bShow ) bool SwPageBreakWin::Contains( const Point &rDocPt ) const { ::tools::Rectangle aRect( GetPosPixel(), GetSizePixel() ); - if ( aRect.IsInside( rDocPt ) ) + if ( aRect.Contains( rDocPt ) ) return true; ::tools::Rectangle aLineRect( m_pLine->GetPosPixel(), m_pLine->GetSizePixel() ); - return aLineRect.IsInside( rDocPt ); + return aLineRect.Contains( rDocPt ); } void SwPageBreakWin::SetReadonly( bool bReadonly ) diff --git a/sw/source/uibase/docvw/PostItMgr.cxx b/sw/source/uibase/docvw/PostItMgr.cxx index 1e6a2c801cbc..85e9fd91e5ff 100644 --- a/sw/source/uibase/docvw/PostItMgr.cxx +++ b/sw/source/uibase/docvw/PostItMgr.cxx @@ -1939,7 +1939,7 @@ bool SwPostItMgr::IsHit(const Point &aPointPixel) aRect = mPages[nPageNum-1]->eSidebarPosition == sw::sidebarwindows::SidebarPosition::LEFT ? tools::Rectangle(Point(aPageFrame.Left()-GetSidebarWidth()-GetSidebarBorderWidth(),aPageFrame.Top()),Size(GetSidebarWidth(),aPageFrame.Height())) : tools::Rectangle( Point(aPageFrame.Right()+GetSidebarBorderWidth(),aPageFrame.Top()) , Size(GetSidebarWidth(),aPageFrame.Height())); - if (aRect.IsInside(aPoint)) + if (aRect.Contains(aPoint)) { // we hit the note's sidebar // lets now test for the arrow area @@ -2018,7 +2018,7 @@ bool SwPostItMgr::ScrollbarHit(const tools::ULong aPage,const Point &aPoint) tools::Rectangle aRectBottom(GetBottomScrollRect(aPage)); tools::Rectangle aRectTop(GetTopScrollRect(aPage)); - if (aRectBottom.IsInside(aPoint)) + if (aRectBottom.Contains(aPoint)) { if (aPoint.X() < tools::Long((aPointBottom.X() + GetSidebarWidth()/3))) Scroll( GetScrollSize(),aPage); @@ -2026,7 +2026,7 @@ bool SwPostItMgr::ScrollbarHit(const tools::ULong aPage,const Point &aPoint) Scroll( -1*GetScrollSize(), aPage); return true; } - else if (aRectTop.IsInside(aPoint)) + else if (aRectTop.Contains(aPoint)) { if (aPoint.X() < tools::Long((aPointTop.X() + GetSidebarWidth()/3*2))) Scroll(GetScrollSize(), aPage); diff --git a/sw/source/uibase/docvw/UnfloatTableButton.cxx b/sw/source/uibase/docvw/UnfloatTableButton.cxx index e3169581c944..8abc5105f7d8 100644 --- a/sw/source/uibase/docvw/UnfloatTableButton.cxx +++ b/sw/source/uibase/docvw/UnfloatTableButton.cxx @@ -242,7 +242,7 @@ void UnfloatTableButton::ShowAll(bool bShow) { Show(bShow); } bool UnfloatTableButton::Contains(const Point& rDocPt) const { ::tools::Rectangle aRect(GetPosPixel(), GetSizePixel()); - if (aRect.IsInside(rDocPt)) + if (aRect.Contains(rDocPt)) return true; return false; diff --git a/sw/source/uibase/docvw/edtdd.cxx b/sw/source/uibase/docvw/edtdd.cxx index c8984a32844b..c1641717ca40 100644 --- a/sw/source/uibase/docvw/edtdd.cxx +++ b/sw/source/uibase/docvw/edtdd.cxx @@ -207,7 +207,7 @@ sal_Int8 SwEditWin::ExecuteDrop( const ExecuteDropEvent& rEvt ) tools::Rectangle aRect( pOLV->GetOutputArea() ); aRect.Union( pObj->GetLogicRect() ); const Point aPos = pOLV->GetWindow()->PixelToLogic(rEvt.maPosPixel); - if ( aRect.IsInside(aPos) ) + if ( aRect.Contains(aPos) ) { rSh.StartAllAction(); rSh.EndAllAction(); @@ -267,7 +267,7 @@ SotExchangeDest SwEditWin::GetDropDestination( const Point& rPixPnt, SdrObject * tools::Rectangle aRect( pOLV->GetOutputArea() ); aRect.Union( pObj->GetLogicRect() ); const Point aPos = pOLV->GetWindow()->PixelToLogic( rPixPnt ); - if( aRect.IsInside( aPos ) ) + if( aRect.Contains( aPos ) ) return SotExchangeDest::NONE; } } @@ -346,7 +346,7 @@ sal_Int8 SwEditWin::AcceptDrop( const AcceptDropEvent& rEvt ) aWin.AdjustTop(nMargin ); aWin.AdjustRight( -nMargin ); aWin.AdjustBottom( -nMargin ); - if(!aWin.IsInside(aPixPt)) { + if(!aWin.Contains(aPixPt)) { static sal_uInt64 last_tick = 0; sal_uInt64 current_tick = tools::Time::GetSystemTicks(); if((current_tick-last_tick) > 500) { diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index 3a3b64defb26..e93158eb17ba 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -637,7 +637,7 @@ IMPL_LINK_NOARG(SwEditWin, TimerHandler, Timer *, void) const SwRect aOldVis( rSh.VisArea() ); bool bDone = false; - if ( !rSh.VisArea().IsInside( aModPt ) ) + if ( !rSh.VisArea().Contains( aModPt ) ) { if ( m_bInsDraw ) { @@ -3957,7 +3957,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) } const Point aOldPt( rSh.VisArea().Pos() ); - const bool bInsWin = rSh.VisArea().IsInside( aDocPt ) || comphelper::LibreOfficeKit::isActive(); + const bool bInsWin = rSh.VisArea().Contains( aDocPt ) || comphelper::LibreOfficeKit::isActive(); if (rSh.GetViewOptions()->IsShowOutlineContentVisibilityButton()) { @@ -3994,7 +3994,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) Point aDD( SwEditWin::m_nDDStartPosX, SwEditWin::m_nDDStartPosY ); aDD = LogicToPixel( aDD ); tools::Rectangle aRect( aDD.X()-3, aDD.Y()-3, aDD.X()+3, aDD.Y()+3 ); - if ( !aRect.IsInside( aPixPt ) ) + if ( !aRect.Contains( aPixPt ) ) StopDDTimer( &rSh, aDocPt ); } @@ -4831,7 +4831,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) MOUSE_LEFT == (rMEvt.GetModifier() + rMEvt.GetButtons()) && !rSh.HasSelection() && !GetOutDev()->GetConnectMetaFile() && - rSh.VisArea().IsInside( aDocPt )) + rSh.VisArea().Contains( aDocPt )) { SwUndoId nLastUndoId(SwUndoId::EMPTY); if (rSh.GetLastUndoInfo(nullptr, & nLastUndoId)) diff --git a/sw/source/uibase/docvw/edtwin2.cxx b/sw/source/uibase/docvw/edtwin2.cxx index 4f98553cd38c..5b4f6ce4c5c6 100644 --- a/sw/source/uibase/docvw/edtwin2.cxx +++ b/sw/source/uibase/docvw/edtwin2.cxx @@ -431,12 +431,12 @@ void SwEditWin::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle { tools::Rectangle aRect( m_pShadCursor->GetRect()); // fully resides inside? - if( rRect.IsInside( aRect ) ) + if( rRect.Contains( aRect ) ) { // then cancel m_pShadCursor.reset(); } - else if( rRect.IsOver( aRect )) + else if( rRect.Overlaps( aRect )) { // resides somewhat above, then everything is clipped outside // and we have to make the "inner part" at the end of the diff --git a/sw/source/uibase/misc/swruler.cxx b/sw/source/uibase/misc/swruler.cxx index e26e9aa41d5c..cfedd2ea011e 100644 --- a/sw/source/uibase/misc/swruler.cxx +++ b/sw/source/uibase/misc/swruler.cxx @@ -193,7 +193,7 @@ void SwCommentRuler::Command(const CommandEvent& rCEvt) Point aMousePos = rCEvt.GetMousePosPixel(); // Ignore command request if it is inside Comment Control if (!mpViewShell->GetPostItMgr() || !mpViewShell->GetPostItMgr()->HasNotes() - || !GetCommentControlRegion().IsInside(aMousePos)) + || !GetCommentControlRegion().Contains(aMousePos)) SvxRuler::Command(rCEvt); } @@ -207,7 +207,7 @@ void SwCommentRuler::MouseMove(const MouseEvent& rMEvt) Point aMousePos = rMEvt.GetPosPixel(); bool bWasHighlighted = mbIsHighlighted; - mbIsHighlighted = GetCommentControlRegion().IsInside(aMousePos); + mbIsHighlighted = GetCommentControlRegion().Contains(aMousePos); if (mbIsHighlighted != bWasHighlighted) // Do start fading maFadeTimer.Start(); @@ -216,7 +216,7 @@ void SwCommentRuler::MouseMove(const MouseEvent& rMEvt) void SwCommentRuler::MouseButtonDown(const MouseEvent& rMEvt) { Point aMousePos = rMEvt.GetPosPixel(); - if (!rMEvt.IsLeft() || IsTracking() || !GetCommentControlRegion().IsInside(aMousePos)) + if (!rMEvt.IsLeft() || IsTracking() || !GetCommentControlRegion().Contains(aMousePos)) { SvxRuler::MouseButtonDown(rMEvt); return; diff --git a/sw/source/uibase/uiview/swcli.cxx b/sw/source/uibase/uiview/swcli.cxx index d076bb5f0ae5..b3d312b07e5c 100644 --- a/sw/source/uibase/uiview/swcli.cxx +++ b/sw/source/uibase/uiview/swcli.cxx @@ -88,7 +88,7 @@ void SwOleClient::ObjectAreaChanged() { SwWrtShell &rSh = static_cast<SwView*>(GetViewShell())->GetWrtShell(); SwRect aFrame( rSh.GetAnyCurRect( CurRectType::FlyEmbedded, nullptr, GetObject() )); - if ( !aFrame.IsOver( rSh.VisArea() ) ) + if ( !aFrame.Overlaps( rSh.VisArea() ) ) rSh.MakeVisible( aFrame ); } diff --git a/sw/source/uibase/uiview/viewport.cxx b/sw/source/uibase/uiview/viewport.cxx index c7b6a48a4179..1edfa5d52c26 100644 --- a/sw/source/uibase/uiview/viewport.cxx +++ b/sw/source/uibase/uiview/viewport.cxx @@ -387,7 +387,7 @@ void SwView::CalcPt( Point *pPt, const tools::Rectangle &rRect, bool SwView::IsScroll( const tools::Rectangle &rRect ) const { - return m_bCenterCursor || m_bTopCursor || !m_aVisArea.IsInside(rRect); + return m_bCenterCursor || m_bTopCursor || !m_aVisArea.Contains(rRect); } void SwView::Scroll( const tools::Rectangle &rRect, sal_uInt16 nRangeX, sal_uInt16 nRangeY ) @@ -416,7 +416,7 @@ void SwView::Scroll( const tools::Rectangle &rRect, sal_uInt16 nRangeX, sal_uInt { // If we are not supposed to be centered, lying in the VisArea // and are not covered by the dialogue ... - if ( !m_bCenterCursor && aOldVisArea.IsInside( rRect ) + if ( !m_bCenterCursor && aOldVisArea.Contains( rRect ) && ( rRect.Left() > aDlgRect.Right() || rRect.Right() < aDlgRect.Left() || rRect.Top() > aDlgRect.Bottom() @@ -443,7 +443,7 @@ void SwView::Scroll( const tools::Rectangle &rRect, sal_uInt16 nRangeX, sal_uInt } //s.o. !IsScroll() - if( !(m_bCenterCursor || m_bTopCursor) && m_aVisArea.IsInside( rRect ) ) + if( !(m_bCenterCursor || m_bTopCursor) && m_aVisArea.Contains( rRect ) ) { m_aVisArea = aOldVisArea; return; diff --git a/sw/source/uibase/wrtsh/move.cxx b/sw/source/uibase/wrtsh/move.cxx index 933bdba0f57b..95443ba16ca7 100644 --- a/sw/source/uibase/wrtsh/move.cxx +++ b/sw/source/uibase/wrtsh/move.cxx @@ -436,7 +436,7 @@ bool SwWrtShell::PushCursor(SwTwips lOffset, bool bSelect) //position is longer on the stack. //The new visible region is to be determined beforehand. aTmpArea.Pos().AdjustY(lOffset ); - if( aTmpArea.IsInside(m_aDest) ) + if( aTmpArea.Contains(m_aDest) ) { if( bSelect ) SttSelect(); @@ -494,7 +494,7 @@ bool SwWrtShell::PopCursor(bool bUpdate, bool bSelect) // use the flag for a valid position. SwRect aTmpArea(VisArea()); aTmpArea.Pos().AdjustY( -(m_pCursorStack->lOffset) ); - if( aTmpArea.IsInside( m_pCursorStack->aDocPos ) ) + if( aTmpArea.Contains( m_pCursorStack->aDocPos ) ) { if( bSelect ) SttSelect(); |