summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2021-09-17 21:49:21 +0200
committerLuboš Luňák <l.lunak@collabora.com>2021-09-20 12:10:44 +0200
commitb22d4785310eac35696df771803dfba0871a50ac (patch)
tree56e394a3c38a2e1f17530fbc18dd8e6b3c5d5098 /svx
parent3e2370260f2b79c43b4f8a86b123861aa95d3ef2 (diff)
clean up ambiguous confusing rectangle APIs like IsInside()
Reading 'rectA.IsInside( rectB )' kind of suggests that the code checks whether 'rectA is inside rectB', but it's actually the other way around. Rename IsInside() -> Contains(), IsOver() -> Overlaps(), which should make it clear which way the logic goes. Change-Id: I9347450fe7dc34c96df6d636a4e3e660de1801ac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122271 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Luboš Luňák <l.lunak@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'svx')
-rw-r--r--svx/source/accessibility/AccessibleTextHelper.cxx2
-rw-r--r--svx/source/accessibility/ChildrenManagerImpl.cxx4
-rw-r--r--svx/source/dialog/charmap.cxx2
-rw-r--r--svx/source/dialog/contwnd.cxx4
-rw-r--r--svx/source/dialog/frmsel.cxx2
-rw-r--r--svx/source/dialog/graphctl.cxx6
-rw-r--r--svx/source/dialog/imapwnd.cxx2
-rw-r--r--svx/source/dialog/swframeexample.cxx6
-rw-r--r--svx/source/svdraw/sdrpaintwindow.cxx2
-rw-r--r--svx/source/svdraw/svdedtv.cxx4
-rw-r--r--svx/source/svdraw/svdedtv2.cxx4
-rw-r--r--svx/source/svdraw/svdedxv.cxx6
-rw-r--r--svx/source/svdraw/svdetc.cxx2
-rw-r--r--svx/source/svdraw/svdglue.cxx2
-rw-r--r--svx/source/svdraw/svdmrkv.cxx6
-rw-r--r--svx/source/svdraw/svdmrkv1.cxx4
-rw-r--r--svx/source/svdraw/svdoedge.cxx4
-rw-r--r--svx/source/svdraw/svdpntv.cxx2
-rw-r--r--svx/source/svdraw/svdsnpv.cxx4
-rw-r--r--svx/source/unodraw/UnoGraphicExporter.cxx2
20 files changed, 35 insertions, 35 deletions
diff --git a/svx/source/accessibility/AccessibleTextHelper.cxx b/svx/source/accessibility/AccessibleTextHelper.cxx
index 65e158e164b6..d28666be8b80 100644
--- a/svx/source/accessibility/AccessibleTextHelper.cxx
+++ b/svx/source/accessibility/AccessibleTextHelper.cxx
@@ -1499,7 +1499,7 @@ namespace accessibility
tools::Rectangle aParaBounds( rCacheTF.GetParaBounds( nChild ) );
- if( aParaBounds.IsInside( aLogPoint ) )
+ if( aParaBounds.Contains( aLogPoint ) )
return getAccessibleChild( nChild - mnFirstVisibleChild + GetStartIndex() );
}
diff --git a/svx/source/accessibility/ChildrenManagerImpl.cxx b/svx/source/accessibility/ChildrenManagerImpl.cxx
index c4b75024c9fc..4d474a4953fa 100644
--- a/svx/source/accessibility/ChildrenManagerImpl.cxx
+++ b/svx/source/accessibility/ChildrenManagerImpl.cxx
@@ -315,7 +315,7 @@ void ChildrenManagerImpl::CreateListOfVisibleShapes (
// Insert shape if it is visible, i.e. its bounding box overlaps
// the visible area.
- if ( aBoundingBox.IsOver (aVisibleArea) )
+ if ( aBoundingBox.Overlaps(aVisibleArea) )
raDescriptorList.emplace_back(xShape);
}
}
@@ -439,7 +439,7 @@ void ChildrenManagerImpl::AddShape (const Reference<drawing::XShape>& rxShape)
if (xParent != mxShapeList)
return;
- if (!aBoundingBox.IsOver (aVisibleArea))
+ if (!aBoundingBox.Overlaps(aVisibleArea))
return;
// Add shape to list of visible shapes.
diff --git a/svx/source/dialog/charmap.cxx b/svx/source/dialog/charmap.cxx
index 8910db46c804..50fdca8133db 100644
--- a/svx/source/dialog/charmap.cxx
+++ b/svx/source/dialog/charmap.cxx
@@ -154,7 +154,7 @@ bool SvxShowCharSet::MouseButtonUp(const MouseEvent& rMEvt)
if ( bDrag && rMEvt.IsLeft() )
{
// released mouse over character map
- if ( tools::Rectangle(Point(), GetOutputSizePixel()).IsInside(rMEvt.GetPosPixel()))
+ if ( tools::Rectangle(Point(), GetOutputSizePixel()).Contains(rMEvt.GetPosPixel()))
aSelectHdl.Call( this );
ReleaseMouse();
bDrag = false;
diff --git a/svx/source/dialog/contwnd.cxx b/svx/source/dialog/contwnd.cxx
index bfc0adb8cd97..eb77959f4a91 100644
--- a/svx/source/dialog/contwnd.cxx
+++ b/svx/source/dialog/contwnd.cxx
@@ -165,7 +165,7 @@ bool ContourWindow::MouseMove( const MouseEvent& rMEvt )
aPipetteColor = GetDrawingArea()->get_ref_device().GetPixel( aLogPt );
weld::CustomWidgetController::MouseMove( rMEvt );
- if ( aPipetteLink.IsSet() && tools::Rectangle( Point(), GetGraphicSize() ).IsInside( aLogPt ) )
+ if ( aPipetteLink.IsSet() && tools::Rectangle( Point(), GetGraphicSize() ).Contains( aLogPt ) )
{
SetPointer( PointerStyle::RefHand );
aPipetteLink.Call( *this );
@@ -182,7 +182,7 @@ bool ContourWindow::MouseButtonUp(const MouseEvent& rMEvt)
const tools::Rectangle aGraphRect( Point(), GetGraphicSize() );
const Point aLogPt( GetDrawingArea()->get_ref_device().PixelToLogic( rMEvt.GetPosPixel() ) );
- bClickValid = aGraphRect.IsInside( aLogPt );
+ bClickValid = aGraphRect.Contains( aLogPt );
ReleaseMouse();
if ( bPipetteMode )
diff --git a/svx/source/dialog/frmsel.cxx b/svx/source/dialog/frmsel.cxx
index 75e1a066ec63..435cd489d482 100644
--- a/svx/source/dialog/frmsel.cxx
+++ b/svx/source/dialog/frmsel.cxx
@@ -180,7 +180,7 @@ void FrameBorder::AddClickRect( const tools::Rectangle& rRect )
bool FrameBorder::ContainsClickPoint( const Point& rPos ) const
{
- return vcl::Region( maClickArea ).IsInside( rPos );
+ return vcl::Region( maClickArea ).Contains( rPos );
}
tools::Rectangle FrameBorder::GetClickBoundRect() const
diff --git a/svx/source/dialog/graphctl.cxx b/svx/source/dialog/graphctl.cxx
index f23afd447cf7..8b113c86e7d8 100644
--- a/svx/source/dialog/graphctl.cxx
+++ b/svx/source/dialog/graphctl.cxx
@@ -434,7 +434,7 @@ bool GraphCtrl::KeyInput( const KeyEvent& rKEvt )
tools::Rectangle aMarkRect(pView->GetMarkedObjRect());
aMarkRect.Move(nX, nY);
- if(!aMarkRect.IsInside(rWorkArea))
+ if(!aMarkRect.Contains(rWorkArea))
{
if(aMarkRect.Left() < rWorkArea.Left())
{
@@ -585,7 +585,7 @@ bool GraphCtrl::MouseButtonDown( const MouseEvent& rMEvt )
const Point aLogPt( rDevice.PixelToLogic( rMEvt.GetPosPixel() ) );
- if ( !tools::Rectangle( Point(), aGraphSize ).IsInside( aLogPt ) && !pView->IsEditMode() )
+ if ( !tools::Rectangle( Point(), aGraphSize ).Contains( aLogPt ) && !pView->IsEditMode() )
weld::CustomWidgetController::MouseButtonDown( rMEvt );
else
{
@@ -645,7 +645,7 @@ bool GraphCtrl::MouseMove(const MouseEvent& rMEvt)
if ( aMousePosLink.IsSet() )
{
- if ( tools::Rectangle( Point(), aGraphSize ).IsInside( aLogPos ) )
+ if ( tools::Rectangle( Point(), aGraphSize ).Contains( aLogPos ) )
aMousePos = aLogPos;
else
aMousePos = Point();
diff --git a/svx/source/dialog/imapwnd.cxx b/svx/source/dialog/imapwnd.cxx
index 5f820685dd2d..0d90d3dcef4e 100644
--- a/svx/source/dialog/imapwnd.cxx
+++ b/svx/source/dialog/imapwnd.cxx
@@ -440,7 +440,7 @@ SdrObject* IMapWindow::GetHitSdrObj( const Point& rPosPixel ) const
SdrObject* pObj = nullptr;
Point aPt = rDevice.PixelToLogic( rPosPixel );
- if ( tools::Rectangle( Point(), GetGraphicSize() ).IsInside( aPt ) )
+ if ( tools::Rectangle( Point(), GetGraphicSize() ).Contains( aPt ) )
{
SdrPage* pPage = pModel->GetPage( 0 );
if ( pPage )
diff --git a/svx/source/dialog/swframeexample.cxx b/svx/source/dialog/swframeexample.cxx
index dbb1e0410491..aa82ccecaf7b 100644
--- a/svx/source/dialog/swframeexample.cxx
+++ b/svx/source/dialog/swframeexample.cxx
@@ -639,7 +639,7 @@ void SwFrameExample::Paint(vcl::RenderContext& rRenderContext, const tools::Rect
if (i == (nLines - 1))
aTxt.SetSize(Size(aTxt.GetWidth() / 2, aTxt.GetHeight()));
- if (aTxt.IsOver(aFrmRect) && nAnchor != RndStdIds::FLY_AS_CHAR && !bIgnoreWrap)
+ if (aTxt.Overlaps(aFrmRect) && nAnchor != RndStdIds::FLY_AS_CHAR && !bIgnoreWrap)
{
switch(nWrap)
{
@@ -658,7 +658,7 @@ void SwFrameExample::Paint(vcl::RenderContext& rRenderContext, const tools::Rect
default: break;
}
}
- if (pOuterFrame->IsInside(aTxt))
+ if (pOuterFrame->Contains(aTxt))
DrawRect_Impl(rRenderContext, aTxt, m_aTxtCol, m_aTransColor );
aTxt.Move(0, nStep);
@@ -692,7 +692,7 @@ void SwFrameExample::Paint(vcl::RenderContext& rRenderContext, const tools::Rect
DrawRect_Impl(rRenderContext, aRect, m_aTransColor, m_aAlignColor);
// Frame View
- bool bDontFill = (nAnchor == RndStdIds::FLY_AT_CHAR && aFrmRect.IsOver(aAutoCharFrame)) || bTrans;
+ bool bDontFill = (nAnchor == RndStdIds::FLY_AT_CHAR && aFrmRect.Overlaps(aAutoCharFrame)) || bTrans;
DrawRect_Impl(rRenderContext, aFrmRect, bDontFill? m_aTransColor : m_aBgCol, m_aFrameColor);
}
diff --git a/svx/source/svdraw/sdrpaintwindow.cxx b/svx/source/svdraw/sdrpaintwindow.cxx
index 171f8348b9ac..6c3b328ba5ea 100644
--- a/svx/source/svdraw/sdrpaintwindow.cxx
+++ b/svx/source/svdraw/sdrpaintwindow.cxx
@@ -87,7 +87,7 @@ void CandidateMgr::PaintTransparentChildren(vcl::Window const & rWindow, tools::
pCandidate->GetPosPixel(),
pCandidate->GetSizePixel());
- if (aCandidatePosSizePixel.IsOver(rPixelRect))
+ if (aCandidatePosSizePixel.Overlaps(rPixelRect))
{
m_aCandidates.emplace_back(pCandidate);
pCandidate->AddEventListener(LINK(this, CandidateMgr, WindowEventListener));
diff --git a/svx/source/svdraw/svdedtv.cxx b/svx/source/svdraw/svdedtv.cxx
index 2288db38cc7b..0d4bb55d09f5 100644
--- a/svx/source/svdraw/svdedtv.cxx
+++ b/svx/source/svdraw/svdedtv.cxx
@@ -687,13 +687,13 @@ void SdrEditView::ForceMarkedObjToAnotherPage()
SdrObject* pObj=pM->GetMarkedSdrObj();
tools::Rectangle aObjRect(pObj->GetCurrentBoundRect());
tools::Rectangle aPgRect(pM->GetPageView()->GetPageRect());
- if (!aObjRect.IsOver(aPgRect)) {
+ if (!aObjRect.Overlaps(aPgRect)) {
bool bFnd=false;
SdrPageView* pPV = GetSdrPageView();
if(pPV)
{
- bFnd = aObjRect.IsOver(pPV->GetPageRect());
+ bFnd = aObjRect.Overlaps(pPV->GetPageRect());
}
if(bFnd)
diff --git a/svx/source/svdraw/svdedtv2.cxx b/svx/source/svdraw/svdedtv2.cxx
index e284b5c965f2..4e5a5e3c4f43 100644
--- a/svx/source/svdraw/svdedtv2.cxx
+++ b/svx/source/svdraw/svdedtv2.cxx
@@ -128,7 +128,7 @@ void SdrEditView::MovMarkedToTop()
nNewPos--;
bEnd=true;
}
- else if (rBR.IsOver(pCmpObj->GetCurrentBoundRect()))
+ else if (rBR.Overlaps(pCmpObj->GetCurrentBoundRect()))
{
nNewPos=nCmpPos;
bEnd=true;
@@ -218,7 +218,7 @@ void SdrEditView::MovMarkedToBtm()
nNewPos++;
bEnd=true;
}
- else if (rBR.IsOver(pCmpObj->GetCurrentBoundRect()))
+ else if (rBR.Overlaps(pCmpObj->GetCurrentBoundRect()))
{
nNewPos=nCmpPos;
bEnd=true;
diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index 273719218663..45ac84a3c49b 100644
--- a/svx/source/svdraw/svdedxv.cxx
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -1721,7 +1721,7 @@ bool SdrObjEditView::IsTextEditHit(const Point& rHit) const
if (OutlinerView* pOLV = pTextEditOutliner->GetView(0))
aEditArea.Union(pOLV->GetOutputArea());
- if (aEditArea.IsInside(rHit))
+ if (aEditArea.Contains(rHit))
{ // check if any characters were actually hit
const Point aPnt(rHit - aEditArea.TopLeft());
tools::Long nHitTol = 2000;
@@ -1750,14 +1750,14 @@ bool SdrObjEditView::IsTextEditFrameHit(const Point& rHit) const
sal_uInt16 nPixSiz = pOLV->GetInvalidateMore();
tools::Rectangle aEditArea(aMinTextEditArea);
aEditArea.Union(pOLV->GetOutputArea());
- if (!aEditArea.IsInside(rHit))
+ if (!aEditArea.Contains(rHit))
{
Size aSiz(pWin->PixelToLogic(Size(nPixSiz, nPixSiz)));
aEditArea.AdjustLeft(-(aSiz.Width()));
aEditArea.AdjustTop(-(aSiz.Height()));
aEditArea.AdjustRight(aSiz.Width());
aEditArea.AdjustBottom(aSiz.Height());
- bOk = aEditArea.IsInside(rHit);
+ bOk = aEditArea.Contains(rHit);
}
}
}
diff --git a/svx/source/svdraw/svdetc.cxx b/svx/source/svdraw/svdetc.cxx
index e97593ca0319..2ad70c9dee90 100644
--- a/svx/source/svdraw/svdetc.cxx
+++ b/svx/source/svdraw/svdetc.cxx
@@ -503,7 +503,7 @@ namespace
if(pText
&& pObj->IsClosedObj()
&& (!bMaster || (!pObj->IsNotVisibleAsMaster() && 0 != no))
- && pObj->GetCurrentBoundRect().IsInside(rPnt)
+ && pObj->GetCurrentBoundRect().Contains(rPnt)
&& !pText->IsHideContour()
&& SdrObjectPrimitiveHit(*pObj, rPnt, 0, rTextEditPV, &rVisLayers, false))
{
diff --git a/svx/source/svdraw/svdglue.cxx b/svx/source/svdraw/svdglue.cxx
index 7f25074cf425..9808372f8401 100644
--- a/svx/source/svdraw/svdglue.cxx
+++ b/svx/source/svdraw/svdglue.cxx
@@ -276,7 +276,7 @@ bool SdrGluePoint::IsHit(const Point& rPnt, const OutputDevice& rOut, const SdrO
Point aPt(pObj!=nullptr ? GetAbsolutePos(*pObj) : GetPos());
Size aSiz=rOut.PixelToLogic(aGlueHalfSize);
tools::Rectangle aRect(aPt.X()-aSiz.Width(),aPt.Y()-aSiz.Height(),aPt.X()+aSiz.Width(),aPt.Y()+aSiz.Height());
- return aRect.IsInside(rPnt);
+ return aRect.Contains(rPnt);
}
diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx
index 456ffd30f7fd..7334b82324aa 100644
--- a/svx/source/svdraw/svdmrkv.cxx
+++ b/svx/source/svdraw/svdmrkv.cxx
@@ -2074,7 +2074,7 @@ void SdrMarkView::MarkObj(const tools::Rectangle& rRect, bool bUnmark)
for (size_t nO=0; nO<nObjCount; ++nO) {
SdrObject* pObj=pObjList->GetObj(nO);
tools::Rectangle aRect(pObj->GetCurrentBoundRect());
- if (aFrm1.IsInside(aRect)) {
+ if (aFrm1.Contains(aRect)) {
if (!bUnmark) {
if (IsObjMarkable(pObj,pPV))
{
@@ -2279,7 +2279,7 @@ SdrObject* SdrMarkView::CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nT
aRect.AdjustRight(nTol2 );
aRect.AdjustBottom(nTol2 );
- if (aRect.IsInside(rPnt))
+ if (aRect.Contains(rPnt))
{
if (!bCheckIfMarkable || IsObjMarkable(pObj,pPV))
{
@@ -2499,7 +2499,7 @@ bool SdrMarkView::PickMarkedObj(const Point& rPnt, SdrObject*& rpObj, SdrPageVie
aRect.AdjustTop( -mnHitTolLog );
aRect.AdjustRight(mnHitTolLog );
aRect.AdjustBottom(mnHitTolLog );
- if (aRect.IsInside(rPnt)) {
+ if (aRect.Contains(rPnt)) {
rpObj=pObj;
rpPV=pPV;
return true;
diff --git a/svx/source/svdraw/svdmrkv1.cxx b/svx/source/svdraw/svdmrkv1.cxx
index 0c32aefcfd11..693965b10f81 100644
--- a/svx/source/svdraw/svdmrkv1.cxx
+++ b/svx/source/svdraw/svdmrkv1.cxx
@@ -215,7 +215,7 @@ bool SdrMarkView::MarkPoints(const tools::Rectangle* pRect, bool bUnmark)
}
}
Point aPos(pHdl->GetPos());
- if (pM!=nullptr && (pRect==nullptr || pRect->IsInside(aPos))) {
+ if (pM!=nullptr && (pRect==nullptr || pRect->Contains(aPos))) {
if (ImpMarkPoint(pHdl,pM,bUnmark)) bChgd=true;
}
}
@@ -415,7 +415,7 @@ bool SdrMarkView::MarkGluePoints(const tools::Rectangle* pRect, bool bUnmark)
if(rGP.IsUserDefined())
{
Point aPos(rGP.GetAbsolutePos(*pObj));
- if (pRect==nullptr || pRect->IsInside(aPos)) {
+ if (pRect==nullptr || pRect->Contains(aPos)) {
bool bContains = rPts.find( rGP.GetId() ) != rPts.end();
if (!bUnmark && !bContains) {
bChgd=true;
diff --git a/svx/source/svdraw/svdoedge.cxx b/svx/source/svdraw/svdoedge.cxx
index 45e4329a54a8..549d75af74e1 100644
--- a/svx/source/svdraw/svdoedge.cxx
+++ b/svx/source/svdraw/svdoedge.cxx
@@ -2177,7 +2177,7 @@ bool SdrEdgeObj::ImpFindConnector(const Point& rPt, const SdrPageView& rPV, SdrO
(pThis==nullptr || pObj!=static_cast<SdrObject const *>(pThis))) // don't connect it to itself
{
tools::Rectangle aObjBound(pObj->GetCurrentBoundRect());
- if (aObjBound.IsOver(aMouseRect)) {
+ if (aObjBound.Overlaps(aMouseRect)) {
aTestCon.ResetVars();
bool bEdge=dynamic_cast<const SdrEdgeObj *>(pObj) != nullptr; // no BestCon for Edge
// User-defined connectors have absolute priority.
@@ -2222,7 +2222,7 @@ bool SdrEdgeObj::ImpFindConnector(const Point& rPt, const SdrPageView& rPV, SdrO
bOk = true;
}
}
- if (bOk && aMouseRect.IsInside(aConPos)) {
+ if (bOk && aMouseRect.Contains(aConPos)) {
if (bUser) bUserFnd = true;
bFnd = true;
sal_uIntPtr nDist=static_cast<sal_uIntPtr>(std::abs(aConPos.X()-rPt.X()))+static_cast<sal_uIntPtr>(std::abs(aConPos.Y()-rPt.Y()));
diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx
index 3a9fa3970cb8..188dae9ff881 100644
--- a/svx/source/svdraw/svdpntv.cxx
+++ b/svx/source/svdraw/svdpntv.cxx
@@ -845,7 +845,7 @@ void SdrPaintView::InvalidateAllWin(const tools::Rectangle& rRect)
tools::Rectangle aOutRect(aOrg, rOutDev.GetOutputSize());
// In case of tiled rendering we want to get all invalidations, so visual area is not interesting.
- if (aRect.IsOver(aOutRect) || comphelper::LibreOfficeKit::isActive())
+ if (aRect.Overlaps(aOutRect) || comphelper::LibreOfficeKit::isActive())
{
InvalidateOneWin(rOutDev, aRect);
}
diff --git a/svx/source/svdraw/svdsnpv.cxx b/svx/source/svdraw/svdsnpv.cxx
index b827ab6ae439..bcef8b3c3ea5 100644
--- a/svx/source/svdraw/svdsnpv.cxx
+++ b/svx/source/svdraw/svdsnpv.cxx
@@ -334,7 +334,7 @@ SdrSnap SdrSnapView::SnapPos(Point& rPnt, const SdrPageView* pPV) const
aRect.AdjustRight(mx );
aRect.AdjustTop( -my );
aRect.AdjustBottom(my );
- if (aRect.IsInside(rPnt)) {
+ if (aRect.Contains(rPnt)) {
if (bOPntSnap && nMaxPointSnapCount>0)
{
sal_uInt32 nCount(pO->GetSnapPointCount());
@@ -357,7 +357,7 @@ SdrSnap SdrSnapView::SnapPos(Point& rPnt, const SdrPageView* pPV) const
aR1.AdjustRight(mx );
aR1.AdjustTop( -my );
aR1.AdjustBottom(my );
- if (aR1.IsInside(rPnt)) {
+ if (aR1.Contains(rPnt)) {
if (std::abs(x-aLog.Left ())<=mx) { dx1=-(x-aLog.Left ()); if (std::abs(dx1)<std::abs(dx)) dx=dx1; }
if (std::abs(x-aLog.Right ())<=mx) { dx1=-(x-aLog.Right ()); if (std::abs(dx1)<std::abs(dx)) dx=dx1; }
if (std::abs(y-aLog.Top ())<=my) { dy1=-(y-aLog.Top ()); if (std::abs(dy1)<std::abs(dy)) dy=dy1; }
diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx b/svx/source/unodraw/UnoGraphicExporter.cxx
index 12ac69f92411..e5861ffb5060 100644
--- a/svx/source/unodraw/UnoGraphicExporter.cxx
+++ b/svx/source/unodraw/UnoGraphicExporter.cxx
@@ -860,7 +860,7 @@ bool GraphicExporter::GetGraphic( ExportSettings const & rSettings, Graphic& aGr
// metafile)
tools::Rectangle aTextRect;
- if( aScrollRectangle.IsInside( aPaintRectangle ) )
+ if( aScrollRectangle.Contains( aPaintRectangle ) )
aTextRect = aScrollRectangle;
else
aTextRect = aPaintRectangle;