summaryrefslogtreecommitdiff
path: root/svx/source/svdraw
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/svdraw')
-rw-r--r--svx/source/svdraw/gradtrns.cxx4
-rw-r--r--svx/source/svdraw/sdrpagewindow.cxx2
-rw-r--r--svx/source/svdraw/sdrpaintwindow.cxx12
-rw-r--r--svx/source/svdraw/svdcrtv.cxx18
-rw-r--r--svx/source/svdraw/svddrag.cxx6
-rw-r--r--svx/source/svdraw/svddrgm1.hxx4
-rw-r--r--svx/source/svdraw/svddrgmt.cxx48
-rw-r--r--svx/source/svdraw/svddrgv.cxx10
-rw-r--r--svx/source/svdraw/svdedtv.cxx4
-rw-r--r--svx/source/svdraw/svdedtv1.cxx46
-rw-r--r--svx/source/svdraw/svdedtv2.cxx10
-rw-r--r--svx/source/svdraw/svdedxv.cxx54
-rw-r--r--svx/source/svdraw/svdetc.cxx4
-rw-r--r--svx/source/svdraw/svdfmtf.cxx34
-rw-r--r--svx/source/svdraw/svdfmtf.hxx4
-rw-r--r--svx/source/svdraw/svdglue.cxx10
-rw-r--r--svx/source/svdraw/svdhdl.cxx56
-rw-r--r--svx/source/svdraw/svdhlpln.cxx4
-rw-r--r--svx/source/svdraw/svdibrow.cxx10
-rw-r--r--svx/source/svdraw/svdmark.cxx8
-rw-r--r--svx/source/svdraw/svdmrkv.cxx50
-rw-r--r--svx/source/svdraw/svdmrkv1.cxx16
-rw-r--r--svx/source/svdraw/svdoashp.cxx80
-rw-r--r--svx/source/svdraw/svdoattr.cxx4
-rw-r--r--svx/source/svdraw/svdobj.cxx106
-rw-r--r--svx/source/svdraw/svdocapt.cxx22
-rw-r--r--svx/source/svdraw/svdocirc.cxx20
-rw-r--r--svx/source/svdraw/svdoedge.cxx72
-rw-r--r--svx/source/svdraw/svdograf.cxx10
-rw-r--r--svx/source/svdraw/svdogrp.cxx30
-rw-r--r--svx/source/svdraw/svdomeas.cxx14
-rw-r--r--svx/source/svdraw/svdomedia.cxx6
-rw-r--r--svx/source/svdraw/svdoole2.cxx40
-rw-r--r--svx/source/svdraw/svdopage.cxx2
-rw-r--r--svx/source/svdraw/svdopath.cxx18
-rw-r--r--svx/source/svdraw/svdorect.cxx14
-rw-r--r--svx/source/svdraw/svdotext.cxx66
-rw-r--r--svx/source/svdraw/svdotxat.cxx8
-rw-r--r--svx/source/svdraw/svdotxdr.cxx12
-rw-r--r--svx/source/svdraw/svdotxed.cxx14
-rw-r--r--svx/source/svdraw/svdotxtr.cxx8
-rw-r--r--svx/source/svdraw/svdovirt.cxx42
-rw-r--r--svx/source/svdraw/svdpage.cxx8
-rw-r--r--svx/source/svdraw/svdpagv.cxx18
-rw-r--r--svx/source/svdraw/svdpntv.cxx12
-rw-r--r--svx/source/svdraw/svdsnpv.cxx10
-rw-r--r--svx/source/svdraw/svdtrans.cxx14
-rw-r--r--svx/source/svdraw/svdundo.cxx4
-rw-r--r--svx/source/svdraw/svdview.cxx10
-rw-r--r--svx/source/svdraw/svdxcgv.cxx12
50 files changed, 545 insertions, 545 deletions
diff --git a/svx/source/svdraw/gradtrns.cxx b/svx/source/svdraw/gradtrns.cxx
index 0ea08d95e646..b25ae340d0e4 100644
--- a/svx/source/svdraw/gradtrns.cxx
+++ b/svx/source/svdraw/gradtrns.cxx
@@ -46,7 +46,7 @@ void GradTransformer::GradToVec(GradTransGradient& rG, GradTransVector& rV, cons
}
// calc the basic positions
- const Rectangle aObjectSnapRectangle(pObj->GetSnapRect());
+ const tools::Rectangle aObjectSnapRectangle(pObj->GetSnapRect());
const basegfx::B2DRange aRange(aObjectSnapRectangle.Left(), aObjectSnapRectangle.Top(), aObjectSnapRectangle.Right(), aObjectSnapRectangle.Bottom());
const basegfx::B2DPoint aCenter(aRange.getCenter());
basegfx::B2DPoint aStartPos, aEndPos;
@@ -198,7 +198,7 @@ void GradTransformer::VecToGrad(GradTransVector& rV, GradTransGradient& rG, Grad
}
// calc the basic positions
- const Rectangle aObjectSnapRectangle(pObj->GetSnapRect());
+ const tools::Rectangle aObjectSnapRectangle(pObj->GetSnapRect());
const basegfx::B2DRange aRange(aObjectSnapRectangle.Left(), aObjectSnapRectangle.Top(), aObjectSnapRectangle.Right(), aObjectSnapRectangle.Bottom());
const basegfx::B2DPoint aCenter(aRange.getCenter());
basegfx::B2DPoint aStartPos(rV.maPositionA);
diff --git a/svx/source/svdraw/sdrpagewindow.cxx b/svx/source/svdraw/sdrpagewindow.cxx
index 2fdb7db20e49..add2130a32be 100644
--- a/svx/source/svdraw/sdrpagewindow.cxx
+++ b/svx/source/svdraw/sdrpagewindow.cxx
@@ -423,7 +423,7 @@ void SdrPageWindow::InvalidatePageWindow(const basegfx::B2DRange& rRange)
aDiscreteRange.grow(1.0);
}
- const Rectangle aVCLDiscreteRectangle(
+ const tools::Rectangle aVCLDiscreteRectangle(
static_cast<long>(floor(aDiscreteRange.getMinX())),
static_cast<long>(floor(aDiscreteRange.getMinY())),
static_cast<long>(ceil(aDiscreteRange.getMaxX())),
diff --git a/svx/source/svdraw/sdrpaintwindow.cxx b/svx/source/svdraw/sdrpaintwindow.cxx
index 8105a65ce05a..c3fc94e02c9f 100644
--- a/svx/source/svdraw/sdrpaintwindow.cxx
+++ b/svx/source/svdraw/sdrpaintwindow.cxx
@@ -38,7 +38,7 @@ class CandidateMgr
std::set<VclPtr<vcl::Window> > m_aDeletedCandidates;
DECL_LINK(WindowEventListener, VclWindowEvent&, void);
public:
- void PaintTransparentChildren(vcl::Window & rWindow, Rectangle const& rPixelRect);
+ void PaintTransparentChildren(vcl::Window & rWindow, tools::Rectangle const& rPixelRect);
~CandidateMgr();
};
@@ -62,7 +62,7 @@ CandidateMgr::~CandidateMgr()
}
}
-void PaintTransparentChildren(vcl::Window & rWindow, Rectangle const& rPixelRect)
+void PaintTransparentChildren(vcl::Window & rWindow, tools::Rectangle const& rPixelRect)
{
if (!rWindow.IsChildTransparentModeEnabled())
return;
@@ -71,14 +71,14 @@ void PaintTransparentChildren(vcl::Window & rWindow, Rectangle const& rPixelRect
aManager.PaintTransparentChildren(rWindow, rPixelRect);
}
-void CandidateMgr::PaintTransparentChildren(vcl::Window & rWindow, Rectangle const& rPixelRect)
+void CandidateMgr::PaintTransparentChildren(vcl::Window & rWindow, tools::Rectangle const& rPixelRect)
{
vcl::Window * pCandidate = rWindow.GetWindow( GetWindowType::FirstChild );
while (pCandidate)
{
if (pCandidate->IsPaintTransparent())
{
- const Rectangle aCandidatePosSizePixel(
+ const tools::Rectangle aCandidatePosSizePixel(
pCandidate->GetPosPixel(),
pCandidate->GetSizePixel());
@@ -268,10 +268,10 @@ rtl::Reference< sdr::overlay::OverlayManager > const & SdrPaintWindow::GetOverla
return mxOverlayManager;
}
-Rectangle SdrPaintWindow::GetVisibleArea() const
+tools::Rectangle SdrPaintWindow::GetVisibleArea() const
{
Size aVisSizePixel(GetOutputDevice().GetOutputSizePixel());
- return Rectangle(GetOutputDevice().PixelToLogic(Rectangle(Point(0,0), aVisSizePixel)));
+ return tools::Rectangle(GetOutputDevice().PixelToLogic(tools::Rectangle(Point(0,0), aVisSizePixel)));
}
bool SdrPaintWindow::OutputToRecordingMetaFile() const
diff --git a/svx/source/svdraw/svdcrtv.cxx b/svx/source/svdraw/svdcrtv.cxx
index 2b3ff4203766..28c6a9cad4ea 100644
--- a/svx/source/svdraw/svdcrtv.cxx
+++ b/svx/source/svdraw/svdcrtv.cxx
@@ -243,14 +243,14 @@ void SdrCreateView::BrkAction()
BrkCreateObj();
}
-void SdrCreateView::TakeActionRect(Rectangle& rRect) const
+void SdrCreateView::TakeActionRect(tools::Rectangle& rRect) const
{
if (pAktCreate!=nullptr)
{
rRect=maDragStat.GetActionRect();
if (rRect.IsEmpty())
{
- rRect=Rectangle(maDragStat.GetPrev(),maDragStat.GetNow());
+ rRect=tools::Rectangle(maDragStat.GetPrev(),maDragStat.GetNow());
}
}
else
@@ -376,7 +376,7 @@ void SdrCreateView::SetCurrentObj(sal_uInt16 nIdent, SdrInventor nInvent)
}
bool SdrCreateView::ImpBegCreateObj(SdrInventor nInvent, sal_uInt16 nIdent, const Point& rPnt, OutputDevice* pOut,
- short nMinMov, const Rectangle& rLogRect, SdrObject* pPreparedFactoryObject)
+ short nMinMov, const tools::Rectangle& rLogRect, SdrObject* pPreparedFactoryObject)
{
bool bRet=false;
UnmarkAllObj();
@@ -459,7 +459,7 @@ bool SdrCreateView::ImpBegCreateObj(SdrInventor nInvent, sal_uInt16 nIdent, cons
if (!rLogRect.IsEmpty()) pAktCreate->NbcSetLogicRect(rLogRect);
// make sure drag start point is inside WorkArea
- const Rectangle& rWorkArea = GetWorkArea();
+ const tools::Rectangle& rWorkArea = GetWorkArea();
if(!rWorkArea.IsEmpty())
{
@@ -508,7 +508,7 @@ bool SdrCreateView::ImpBegCreateObj(SdrInventor nInvent, sal_uInt16 nIdent, cons
bool SdrCreateView::BegCreateObj(const Point& rPnt, OutputDevice* pOut, short nMinMov)
{
- return ImpBegCreateObj(nAktInvent,nAktIdent,rPnt,pOut,nMinMov,Rectangle(), nullptr);
+ return ImpBegCreateObj(nAktInvent,nAktIdent,rPnt,pOut,nMinMov,tools::Rectangle(), nullptr);
}
bool SdrCreateView::BegCreatePreparedObject(const Point& rPnt, sal_Int16 nMinMov, SdrObject* pPreparedFactoryObject)
@@ -522,14 +522,14 @@ bool SdrCreateView::BegCreatePreparedObject(const Point& rPnt, sal_Int16 nMinMov
nIdent = pPreparedFactoryObject->GetObjIdentifier();
}
- return ImpBegCreateObj(nInvent, nIdent, rPnt, nullptr, nMinMov, Rectangle(), pPreparedFactoryObject);
+ return ImpBegCreateObj(nInvent, nIdent, rPnt, nullptr, nMinMov, tools::Rectangle(), pPreparedFactoryObject);
}
bool SdrCreateView::BegCreateCaptionObj(const Point& rPnt, const Size& rObjSiz,
OutputDevice* pOut, short nMinMov)
{
return ImpBegCreateObj(SdrInventor::Default,OBJ_CAPTION,rPnt,pOut,nMinMov,
- Rectangle(rPnt,Size(rObjSiz.Width()+1,rObjSiz.Height()+1)), nullptr);
+ tools::Rectangle(rPnt,Size(rObjSiz.Width()+1,rObjSiz.Height()+1)), nullptr);
}
void SdrCreateView::MovCreateObj(const Point& rPnt)
@@ -779,11 +779,11 @@ void SdrCreateView::ShowCreateObj(/*OutputDevice* pOut, sal_Bool bFull*/)
{
// ensure object has some size, necessary for SdrTextObj because
// there are still untested divisions by that sizes
- Rectangle aCurrentSnapRect(pAktCreate->GetSnapRect());
+ tools::Rectangle aCurrentSnapRect(pAktCreate->GetSnapRect());
if(!(aCurrentSnapRect.GetWidth() > 1 && aCurrentSnapRect.GetHeight() > 1))
{
- Rectangle aNewRect(maDragStat.GetStart(), maDragStat.GetStart() + Point(2, 2));
+ tools::Rectangle aNewRect(maDragStat.GetStart(), maDragStat.GetStart() + Point(2, 2));
pAktCreate->NbcSetSnapRect(aNewRect);
}
}
diff --git a/svx/source/svdraw/svddrag.cxx b/svx/source/svdraw/svddrag.cxx
index 75c046a1326b..d527c9865d8e 100644
--- a/svx/source/svdraw/svddrag.cxx
+++ b/svx/source/svdraw/svddrag.cxx
@@ -53,7 +53,7 @@ void SdrDragStat::Reset()
mbEndDragChangesLayout=false;
bMouseIsUp=false;
Clear(true);
- aActionRect=Rectangle();
+ aActionRect=tools::Rectangle();
}
void SdrDragStat::Reset(const Point& rPnt)
@@ -124,9 +124,9 @@ Fraction SdrDragStat::GetYFact() const
return Fraction(nMul,nDiv);
}
-void SdrDragStat::TakeCreateRect(Rectangle& rRect) const
+void SdrDragStat::TakeCreateRect(tools::Rectangle& rRect) const
{
- rRect=Rectangle(GetStart(),GetNow());
+ rRect=tools::Rectangle(GetStart(),GetNow());
if (GetPointCount()>=2) {
Point aBtmRgt(GetPoint(1));
rRect.Right()=aBtmRgt.X();
diff --git a/svx/source/svdraw/svddrgm1.hxx b/svx/source/svdraw/svddrgm1.hxx
index 46f3e53020dd..94de57531ff0 100644
--- a/svx/source/svdraw/svddrgm1.hxx
+++ b/svx/source/svdraw/svddrgm1.hxx
@@ -139,7 +139,7 @@ public:
class SdrDragCrook : public SdrDragMethod
{
private:
- Rectangle aMarkRect;
+ tools::Rectangle aMarkRect;
Point aMarkCenter;
Point aCenter;
Point aStart;
@@ -187,7 +187,7 @@ public:
class SdrDragDistort : public SdrDragMethod
{
private:
- Rectangle aMarkRect;
+ tools::Rectangle aMarkRect;
XPolygon aDistortedRect;
sal_uInt16 nPolyPt;
bool bContortionAllowed;
diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx
index 5d16e8b95e07..b46d6ae7e0c8 100644
--- a/svx/source/svdraw/svddrgmt.cxx
+++ b/svx/source/svdraw/svddrgmt.cxx
@@ -450,7 +450,7 @@ void SdrDragMethod::createSdrDragEntries_PolygonDrag()
if(bNoPolygons)
{
- const Rectangle aR(getSdrDragView().GetSdrPageView()->MarkSnap());
+ const tools::Rectangle aR(getSdrDragView().GetSdrPageView()->MarkSnap());
const basegfx::B2DRange aNewRectangle(aR.Left(), aR.Top(), aR.Right(), aR.Bottom());
basegfx::B2DPolygon aNewPolygon(basegfx::tools::createPolygonFromRect(aNewRectangle));
@@ -800,7 +800,7 @@ void SdrDragMethod::CreateOverlayGeometry(sdr::overlay::OverlayManager& rOverlay
// add DragStripes if necessary (help lines cross the page when dragging)
if(getSdrDragView().IsDragStripes())
{
- Rectangle aActionRectangle;
+ tools::Rectangle aActionRectangle;
getSdrDragView().TakeActionRect(aActionRectangle);
const basegfx::B2DPoint aTopLeft(aActionRectangle.Left(), aActionRectangle.Top());
@@ -965,12 +965,12 @@ bool SdrDragMovHdl::BeginSdrDrag()
return false;
}
- DragStat().SetActionRect(Rectangle(pH1->GetPos(),pH2->GetPos()));
+ DragStat().SetActionRect(tools::Rectangle(pH1->GetPos(),pH2->GetPos()));
}
else
{
Point aPt(GetDragHdl()->GetPos());
- DragStat().SetActionRect(Rectangle(aPt,aPt));
+ DragStat().SetActionRect(tools::Rectangle(aPt,aPt));
}
return true;
@@ -1017,7 +1017,7 @@ void SdrDragMovHdl::MoveSdrDrag(const Point& rNoSnapPnt)
pHM->Touch();
Show();
- DragStat().SetActionRect(Rectangle(pH1->GetPos(),pH2->GetPos()));
+ DragStat().SetActionRect(tools::Rectangle(pH1->GetPos(),pH2->GetPos()));
}
}
else
@@ -1083,7 +1083,7 @@ void SdrDragMovHdl::MoveSdrDrag(const Point& rNoSnapPnt)
pHM->Touch();
Show();
- DragStat().SetActionRect(Rectangle(aPnt,aPnt));
+ DragStat().SetActionRect(tools::Rectangle(aPnt,aPnt));
}
}
}
@@ -1377,7 +1377,7 @@ bool SdrDragObjOwn::EndSdrDrag(bool /*bCopy*/)
// in its SdrTableObj::endSpecialDrag, so currently not possible. OTOH it uses
// a CreateUndoGeoObject(), so maybe setting SetEndDragChangesAttributes is okay. I
// will test this now
- Rectangle aBoundRect0;
+ tools::Rectangle aBoundRect0;
if(pObj->GetUserCall())
{
@@ -1561,7 +1561,7 @@ void SdrDragMove::MoveSdrDrag(const Point& rNoSnapPnt_)
bXSnapped=false;
bYSnapped=false;
Point aNoSnapPnt(rNoSnapPnt_);
- const Rectangle& aSR=GetMarkedRect();
+ const tools::Rectangle& aSR=GetMarkedRect();
long nMovedx=aNoSnapPnt.X()-DragStat().GetStart().X();
long nMovedy=aNoSnapPnt.Y()-DragStat().GetStart().Y();
Point aLO(aSR.TopLeft()); aLO.X()+=nMovedx; aLO.Y()+=nMovedy;
@@ -1586,18 +1586,18 @@ void SdrDragMove::MoveSdrDrag(const Point& rNoSnapPnt_)
if (DragStat().CheckMinMoved(aNoSnapPnt))
{
Point aPt1(aPnt);
- Rectangle aLR(getSdrDragView().GetWorkArea());
+ tools::Rectangle aLR(getSdrDragView().GetWorkArea());
bool bWorkArea=!aLR.IsEmpty();
bool bDragLimit=IsDragLimit();
if (bDragLimit || bWorkArea)
{
- Rectangle aSR2(GetMarkedRect());
+ tools::Rectangle aSR2(GetMarkedRect());
Point aD(aPt1-DragStat().GetStart());
if (bDragLimit)
{
- Rectangle aR2(GetDragLimitRect());
+ tools::Rectangle aR2(GetDragLimitRect());
if (bWorkArea)
aLR.Intersection(aR2);
@@ -1653,7 +1653,7 @@ void SdrDragMove::MoveSdrDrag(const Point& rNoSnapPnt_)
{
const SdrObject* pObj=pM->GetMarkedSdrObj();
const SdrGluePointList* pGPL=pObj->GetGluePointList();
- Rectangle aBound(pObj->GetCurrentBoundRect());
+ tools::Rectangle aBound(pObj->GetCurrentBoundRect());
for (SdrUShortCont::const_iterator it = rPts.begin(); it != rPts.end(); ++it)
{
@@ -1683,7 +1683,7 @@ void SdrDragMove::MoveSdrDrag(const Point& rNoSnapPnt_)
{
Hide();
DragStat().NextMove(aPt1);
- Rectangle aAction(GetMarkedRect());
+ tools::Rectangle aAction(GetMarkedRect());
aAction.Move(DragStat().GetDX(),DragStat().GetDY());
DragStat().SetActionRect(aAction);
Show();
@@ -1819,7 +1819,7 @@ bool SdrDragResize::BeginSdrDrag()
if (pRef1!=nullptr && pRef2!=nullptr)
{
- DragStat().Ref1()=Rectangle(pRef1->GetPos(),pRef2->GetPos()).Center();
+ DragStat().Ref1()=tools::Rectangle(pRef1->GetPos(),pRef2->GetPos()).Center();
}
else
{
@@ -1848,17 +1848,17 @@ void SdrDragResize::MoveSdrDrag(const Point& rNoSnapPnt)
Point aStart(DragStat().GetStart());
Point aRef(DragStat().GetRef1());
Fraction aMaxFact(0x7FFFFFFF,1);
- Rectangle aLR(getSdrDragView().GetWorkArea());
+ tools::Rectangle aLR(getSdrDragView().GetWorkArea());
bool bWorkArea=!aLR.IsEmpty();
bool bDragLimit=IsDragLimit();
if (bDragLimit || bWorkArea)
{
- Rectangle aSR(GetMarkedRect());
+ tools::Rectangle aSR(GetMarkedRect());
if (bDragLimit)
{
- Rectangle aR2(GetDragLimitRect());
+ tools::Rectangle aR2(GetDragLimitRect());
if (bWorkArea)
aLR.Intersection(aR2);
@@ -2812,14 +2812,14 @@ void SdrDragCrook::TakeSdrDragComment(OUString& rStr) const
#define DRAG_CROOK_RASTER_MAXIMUM (15)
#define DRAG_CROOK_RASTER_DISTANCE (30)
-basegfx::B2DPolyPolygon impCreateDragRaster(SdrPageView& rPageView, const Rectangle& rMarkRect)
+basegfx::B2DPolyPolygon impCreateDragRaster(SdrPageView& rPageView, const tools::Rectangle& rMarkRect)
{
basegfx::B2DPolyPolygon aRetval;
if(rPageView.PageWindowCount())
{
OutputDevice& rOut = (rPageView.GetPageWindow(0)->GetPaintWindow().GetOutputDevice());
- Rectangle aPixelSize = rOut.LogicToPixel(rMarkRect);
+ tools::Rectangle aPixelSize = rOut.LogicToPixel(rMarkRect);
sal_uInt32 nHorDiv(aPixelSize.GetWidth() / DRAG_CROOK_RASTER_DISTANCE);
sal_uInt32 nVerDiv(aPixelSize.GetHeight() / DRAG_CROOK_RASTER_DISTANCE);
@@ -2946,7 +2946,7 @@ void SdrDragCrook::MovAllPoints(basegfx::B2DPolyPolygon& rTarget)
{
nLast=n1st;
while (nLast<nPolyCount && aTempPolyPoly[nLast].GetPointCount()!=0) nLast++;
- Rectangle aBound(aTempPolyPoly[n1st].GetBoundRect());
+ tools::Rectangle aBound(aTempPolyPoly[n1st].GetBoundRect());
sal_uInt16 i;
for (i=n1st+1; i<nLast; i++)
@@ -3295,7 +3295,7 @@ void SdrDragCrook::applyCurrentTransformationToSdrObject(SdrObject& rTarget)
if (bDoCrook)
{
- const Rectangle aLocalMarkRect(getSdrDragView().GetMarkedObjRect());
+ const tools::Rectangle aLocalMarkRect(getSdrDragView().GetMarkedObjRect());
const bool bLocalRotate(!bContortion && eMode == SdrCrookMode::Rotate && getSdrDragView().IsRotateAllowed());
SdrEditView::ImpCrookObj(&rTarget,aCenter,aRad,eMode,bVertical,!bContortion,bLocalRotate,aLocalMarkRect);
@@ -3624,7 +3624,7 @@ bool SdrDragCrop::EndSdrDrag(bool /*bCopy*/)
if (pRef1==nullptr || pRef2==nullptr)
return false;
- Rectangle rect(pRef1->GetPos(),pRef2->GetPos());
+ tools::Rectangle rect(pRef1->GetPos(),pRef2->GetPos());
Point aEnd(DragStat().GetNow());
Point aStart(DragStat().GetStart());
@@ -3940,12 +3940,12 @@ bool SdrDragCrop::EndSdrDrag(bool /*bCopy*/)
aRangeNewNoShearNoRotate.transform(aMatrixOriginalNoShearNoRotate * aDiscreteChangeMatrix);
// extract the old Rectangle structures
- Rectangle aOldRect(
+ tools::Rectangle aOldRect(
basegfx::fround(aRangeOriginalNoShearNoRotate.getMinX()),
basegfx::fround(aRangeOriginalNoShearNoRotate.getMinY()),
basegfx::fround(aRangeOriginalNoShearNoRotate.getMaxX()),
basegfx::fround(aRangeOriginalNoShearNoRotate.getMaxY()));
- Rectangle aNewRect(
+ tools::Rectangle aNewRect(
basegfx::fround(aRangeNewNoShearNoRotate.getMinX()),
basegfx::fround(aRangeNewNoShearNoRotate.getMinY()),
basegfx::fround(aRangeNewNoShearNoRotate.getMaxX()),
diff --git a/svx/source/svdraw/svddrgv.cxx b/svx/source/svdraw/svddrgv.cxx
index 65a92c50c8b7..787e7434ef9e 100644
--- a/svx/source/svdraw/svddrgv.cxx
+++ b/svx/source/svdraw/svddrgv.cxx
@@ -120,7 +120,7 @@ void SdrDragView::BrkAction()
BrkDragObj();
}
-void SdrDragView::TakeActionRect(Rectangle& rRect) const
+void SdrDragView::TakeActionRect(tools::Rectangle& rRect) const
{
if (mpCurrentSdrDragMethod)
{
@@ -139,7 +139,7 @@ void SdrDragView::TakeActionRect(Rectangle& rRect) const
}
else
{
- rRect = Rectangle(
+ rRect = tools::Rectangle(
basegfx::fround(aBoundRange.getMinX()), basegfx::fround(aBoundRange.getMinY()),
basegfx::fround(aBoundRange.getMaxX()), basegfx::fround(aBoundRange.getMaxY()));
}
@@ -147,7 +147,7 @@ void SdrDragView::TakeActionRect(Rectangle& rRect) const
}
if (rRect.IsEmpty())
{
- rRect=Rectangle(maDragStat.GetNow(),maDragStat.GetNow());
+ rRect=tools::Rectangle(maDragStat.GetNow(),maDragStat.GetNow());
}
}
else
@@ -158,7 +158,7 @@ void SdrDragView::TakeActionRect(Rectangle& rRect) const
bool SdrDragView::TakeDragObjAnchorPos(Point& rPos, bool bTR ) const
{
- Rectangle aR;
+ tools::Rectangle aR;
TakeActionRect(aR);
rPos = bTR ? aR.TopRight() : aR.TopLeft();
if (GetMarkedObjectCount()==1 && IsDragObj() && // only on single selection
@@ -192,7 +192,7 @@ bool SdrDragView::TakeDragObjAnchorPos(Point& rPos, bool bTR ) const
}
-bool SdrDragView::TakeDragLimit(SdrDragMode /*eMode*/, Rectangle& /*rRect*/) const
+bool SdrDragView::TakeDragLimit(SdrDragMode /*eMode*/, tools::Rectangle& /*rRect*/) const
{
return false;
}
diff --git a/svx/source/svdraw/svdedtv.cxx b/svx/source/svdraw/svdedtv.cxx
index 97bd8a7b9287..6cdd8e926f6d 100644
--- a/svx/source/svdraw/svdedtv.cxx
+++ b/svx/source/svdraw/svdedtv.cxx
@@ -662,8 +662,8 @@ void SdrEditView::ForceMarkedObjToAnotherPage()
for (size_t nm=0; nm<GetMarkedObjectCount(); ++nm) {
SdrMark* pM=GetSdrMarkByIndex(nm);
SdrObject* pObj=pM->GetMarkedSdrObj();
- Rectangle aObjRect(pObj->GetCurrentBoundRect());
- Rectangle aPgRect(pM->GetPageView()->GetPageRect());
+ tools::Rectangle aObjRect(pObj->GetCurrentBoundRect());
+ tools::Rectangle aPgRect(pM->GetPageView()->GetPageRect());
if (!aObjRect.IsOver(aPgRect)) {
bool bFnd=false;
SdrPageView* pPV = GetSdrPageView();
diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx
index dddb0bd0ee98..dcef2d237b0a 100644
--- a/svx/source/svdraw/svdedtv1.cxx
+++ b/svx/source/svdraw/svdedtv1.cxx
@@ -66,13 +66,13 @@
// EditView
-void SdrEditView::SetMarkedObjRect(const Rectangle& rRect)
+void SdrEditView::SetMarkedObjRect(const tools::Rectangle& rRect)
{
DBG_ASSERT(!rRect.IsEmpty(),"SetMarkedObjRect() with an empty Rect does not make sense.");
if (rRect.IsEmpty()) return;
const size_t nCount=GetMarkedObjectCount();
if (nCount==0) return;
- Rectangle aR0(GetMarkedObjRect());
+ tools::Rectangle aR0(GetMarkedObjRect());
DBG_ASSERT(!aR0.IsEmpty(),"SetMarkedObjRect(): GetMarkedObjRect() is empty.");
if (aR0.IsEmpty()) return;
long x0=aR0.Left();
@@ -97,7 +97,7 @@ void SdrEditView::SetMarkedObjRect(const Rectangle& rRect)
if( bUndo )
AddUndo( GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pO));
- Rectangle aR1(pO->GetSnapRect());
+ tools::Rectangle aR1(pO->GetSnapRect());
if (!aR1.IsEmpty())
{
if (aR1==aR0)
@@ -500,7 +500,7 @@ void SdrEditView::ShearMarkedObj(const Point& rRef, long nAngle, bool bVShear, b
}
void SdrEditView::ImpCrookObj(SdrObject* pO, const Point& rRef, const Point& rRad,
- SdrCrookMode eMode, bool bVertical, bool bNoContortion, bool bRotate, const Rectangle& rMarkRect)
+ SdrCrookMode eMode, bool bVertical, bool bNoContortion, bool bRotate, const tools::Rectangle& rMarkRect)
{
SdrPathObj* pPath=dynamic_cast<SdrPathObj*>( pO );
bool bDone = false;
@@ -580,7 +580,7 @@ void SdrEditView::ImpCrookObj(SdrObject* pO, const Point& rRef, const Point& rRa
void SdrEditView::CrookMarkedObj(const Point& rRef, const Point& rRad, SdrCrookMode eMode,
bool bVertical, bool bNoContortion, bool bCopy)
{
- Rectangle aMarkRect(GetMarkedObjRect());
+ tools::Rectangle aMarkRect(GetMarkedObjRect());
const bool bUndo = IsUndoEnabled();
bool bRotate=bNoContortion && eMode==SdrCrookMode::Rotate && IsRotateAllowed();
@@ -621,7 +621,7 @@ void SdrEditView::CrookMarkedObj(const Point& rRef, const Point& rRad, SdrCrookM
EndUndo();
}
-void SdrEditView::ImpDistortObj(SdrObject* pO, const Rectangle& rRef, const XPolygon& rDistortedRect, bool bNoContortion)
+void SdrEditView::ImpDistortObj(SdrObject* pO, const tools::Rectangle& rRef, const XPolygon& rDistortedRect, bool bNoContortion)
{
SdrPathObj* pPath = dynamic_cast<SdrPathObj*>( pO );
@@ -655,7 +655,7 @@ void SdrEditView::ImpDistortObj(SdrObject* pO, const Rectangle& rRef, const XPol
}
}
-void SdrEditView::DistortMarkedObj(const Rectangle& rRef, const XPolygon& rDistortedRect, bool bNoContortion, bool bCopy)
+void SdrEditView::DistortMarkedObj(const tools::Rectangle& rRef, const XPolygon& rDistortedRect, bool bNoContortion, bool bCopy)
{
const bool bUndo = IsUndoEnabled();
@@ -679,7 +679,7 @@ void SdrEditView::DistortMarkedObj(const Rectangle& rRef, const XPolygon& rDisto
if( bUndo )
AddUndo( GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pO));
- Rectangle aRefRect(rRef);
+ tools::Rectangle aRefRect(rRef);
const SdrObjList* pOL=pO->GetSubList();
if (bNoContortion || pOL==nullptr) {
ImpDistortObj(pO,aRefRect,rDistortedRect,bNoContortion);
@@ -699,7 +699,7 @@ void SdrEditView::DistortMarkedObj(const Rectangle& rRef, const XPolygon& rDisto
void SdrEditView::SetNotPersistAttrToMarked(const SfxItemSet& rAttr, bool /*bReplaceAll*/)
{
// bReplaceAll has no effect here
- Rectangle aAllSnapRect(GetMarkedObjRect());
+ tools::Rectangle aAllSnapRect(GetMarkedObjRect());
const SfxPoolItem *pPoolItem=nullptr;
if (rAttr.GetItemState(SDRATTR_TRANSFORMREF1X,true,&pPoolItem)==SfxItemState::SET) {
long n=static_cast<const SdrTransformRef1XItem*>(pPoolItem)->GetValue();
@@ -739,7 +739,7 @@ void SdrEditView::SetNotPersistAttrToMarked(const SfxItemSet& rAttr, bool /*bRep
bAllHgt=true; bDoIt=true;
}
if (bDoIt) {
- Rectangle aRect(aAllSnapRect); // TODO: change this for PolyPt's and GluePt's!!!
+ tools::Rectangle aRect(aAllSnapRect); // TODO: change this for PolyPt's and GluePt's!!!
if (bAllPosX) aRect.Move(nAllPosX-aRect.Left(),0);
if (bAllPosY) aRect.Move(0,nAllPosY-aRect.Top());
if (bAllWdt) aRect.Right()=aAllSnapRect.Left()+nAllWdt;
@@ -786,7 +786,7 @@ void SdrEditView::MergeNotPersistAttrFromMarked(SfxItemSet& rAttr, bool /*bOnlyH
{
// bOnlyHardAttr has no effect here.
// TODO: Take into account the origin and PvPos.
- Rectangle aAllSnapRect(GetMarkedObjRect()); // TODO: change this for PolyPt's and GluePt's!!!
+ tools::Rectangle aAllSnapRect(GetMarkedObjRect()); // TODO: change this for PolyPt's and GluePt's!!!
long nAllSnapPosX=aAllSnapRect.Left();
long nAllSnapPosY=aAllSnapRect.Top();
long nAllSnapWdt=aAllSnapRect.GetWidth()-1;
@@ -807,8 +807,8 @@ void SdrEditView::MergeNotPersistAttrFromMarked(SfxItemSet& rAttr, bool /*bOnlyH
long nLogicHgt=0; bool bLogicHgtDC=false,bLogicHgtDiff=false;
long nRotAngle=0; bool bRotAngleDC=false;
long nShrAngle=0; bool bShrAngleDC=false;
- Rectangle aSnapRect;
- Rectangle aLogicRect;
+ tools::Rectangle aSnapRect;
+ tools::Rectangle aLogicRect;
const size_t nMarkCount=GetMarkedObjectCount();
for (size_t nm=0; nm<nMarkCount; ++nm) {
const SdrMark* pM=GetSdrMarkByIndex(nm);
@@ -819,8 +819,8 @@ void SdrEditView::MergeNotPersistAttrFromMarked(SfxItemSet& rAttr, bool /*bOnlyH
bSizProtect=pObj->IsResizeProtect();
bPrintable =pObj->IsPrintable();
bVisible = pObj->IsVisible();
- Rectangle aSnapRect2(pObj->GetSnapRect());
- Rectangle aLogicRect2(pObj->GetLogicRect());
+ tools::Rectangle aSnapRect2(pObj->GetSnapRect());
+ tools::Rectangle aLogicRect2(pObj->GetLogicRect());
nSnapPosX=aSnapRect2.Left();
nSnapPosY=aSnapRect2.Top();
nSnapWdt=aSnapRect2.GetWidth()-1;
@@ -1133,7 +1133,7 @@ void SdrEditView::SetAttrToMarked(const SfxItemSet& rAttr, bool bReplaceAll)
if(!aCharWhichIds.empty())
{
- Rectangle aOldBoundRect = pTextObj->GetLastBoundRect();
+ tools::Rectangle aOldBoundRect = pTextObj->GetLastBoundRect();
// #110094#-14 pTextObj->SendRepaintBroadcast(pTextObj->GetBoundRect());
pTextObj->RemoveOutlinerCharacterAttribs( aCharWhichIds );
@@ -1284,7 +1284,7 @@ SfxItemSet SdrEditView::GetGeoAttrFromMarked() const
if (AreObjectsMarked())
{
SfxItemSet aMarkAttr(GetAttrFromMarked(false)); // because of AutoGrowHeight and corner radius
- Rectangle aRect(GetMarkedObjRect());
+ tools::Rectangle aRect(GetMarkedObjRect());
// restore position to that before calc hack
aRect -= GetGridOffset();
@@ -1434,7 +1434,7 @@ SfxItemSet SdrEditView::GetGeoAttrFromMarked() const
return aRetSet;
}
-Point ImpGetPoint(const Rectangle& rRect, RectPoint eRP)
+Point ImpGetPoint(const tools::Rectangle& rRect, RectPoint eRP)
{
switch(eRP) {
case RectPoint::LT: return rRect.TopLeft();
@@ -1452,7 +1452,7 @@ Point ImpGetPoint(const Rectangle& rRect, RectPoint eRP)
void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& rAttr)
{
- Rectangle aRect(GetMarkedObjRect());
+ tools::Rectangle aRect(GetMarkedObjRect());
if(GetSdrPageView())
{
@@ -1790,7 +1790,7 @@ void SdrEditView::AlignMarkedObjects(SdrHorAlign eHor, SdrVertAlign eVert)
BegUndo(aStr);
}
- Rectangle aBound;
+ tools::Rectangle aBound;
const size_t nMarkCount=GetMarkedObjectCount();
bool bHasFixed=false;
for (size_t nm=0; nm<nMarkCount; ++nm)
@@ -1801,7 +1801,7 @@ void SdrEditView::AlignMarkedObjects(SdrHorAlign eHor, SdrVertAlign eVert)
pObj->TakeObjInfo(aInfo);
if (!aInfo.bMoveAllowed || pObj->IsMoveProtect())
{
- Rectangle aObjRect(pObj->GetSnapRect());
+ tools::Rectangle aObjRect(pObj->GetSnapRect());
aBound.Union(aObjRect);
bHasFixed=true;
}
@@ -1825,7 +1825,7 @@ void SdrEditView::AlignMarkedObjects(SdrHorAlign eHor, SdrVertAlign eVert)
}
else
{
- aBound=Rectangle(pPage->GetLftBorder(),pPage->GetUppBorder(),
+ aBound=tools::Rectangle(pPage->GetLftBorder(),pPage->GetUppBorder(),
pPage->GetWdt()-pPage->GetRgtBorder(),
pPage->GetHgt()-pPage->GetLwrBorder());
}
@@ -1846,7 +1846,7 @@ void SdrEditView::AlignMarkedObjects(SdrHorAlign eHor, SdrVertAlign eVert)
{
long nXMov=0;
long nYMov=0;
- Rectangle aObjRect(pObj->GetSnapRect());
+ tools::Rectangle aObjRect(pObj->GetSnapRect());
switch (eVert)
{
case SdrVertAlign::Top : nYMov=aBound.Top() -aObjRect.Top() ; break;
diff --git a/svx/source/svdraw/svdedtv2.cxx b/svx/source/svdraw/svdedtv2.cxx
index cfd03d34b76a..671f1d4591e8 100644
--- a/svx/source/svdraw/svdedtv2.cxx
+++ b/svx/source/svdraw/svdedtv2.cxx
@@ -91,7 +91,7 @@ void SdrEditView::MovMarkedToTop()
pOL0=pOL;
}
const size_t nNowPos = pObj->GetOrdNumDirect();
- const Rectangle& rBR=pObj->GetCurrentBoundRect();
+ const tools::Rectangle& rBR=pObj->GetCurrentBoundRect();
size_t nCmpPos = nNowPos+1;
SdrObject* pMaxObj=GetMaxToTopObj(pObj);
if (pMaxObj!=nullptr)
@@ -178,7 +178,7 @@ void SdrEditView::MovMarkedToBtm()
pOL0=pOL;
}
const size_t nNowPos = pObj->GetOrdNumDirect();
- const Rectangle& rBR=pObj->GetCurrentBoundRect();
+ const tools::Rectangle& rBR=pObj->GetCurrentBoundRect();
size_t nCmpPos = nNowPos;
if (nCmpPos>0)
--nCmpPos;
@@ -1207,7 +1207,7 @@ void SdrEditView::EqualizeMarkedObjects(bool bWidth)
continue;
SdrMark* pM = rMarkList.GetMark(a);
SdrObject* pObj = pM->GetMarkedSdrObj();
- Rectangle aLogicRect(pObj->GetLogicRect());
+ tools::Rectangle aLogicRect(pObj->GetLogicRect());
Size aLogicRectSize(aLogicRect.GetSize());
if (bWidth)
aLogicRectSize.Width() = aLastRectSize.Width();
@@ -1622,7 +1622,7 @@ void SdrEditView::ImpDismantleOneObject(const SdrObject* pObj, SdrObjList& rOL,
aTargetItemSet.Put(XFillStyleItem(drawing::FillStyle_NONE));
// get the text bounds and set at text object
- Rectangle aTextBounds = pCustomShape->GetSnapRect();
+ tools::Rectangle aTextBounds = pCustomShape->GetSnapRect();
if(pCustomShape->GetTextBounds(aTextBounds))
{
pTextObj->SetSnapRect(aTextBounds);
@@ -2038,7 +2038,7 @@ void SdrEditView::DoImportMarkedMtf(SvdProgressInfo *pProgrInfo)
SdrGrafObj* pGraf= dynamic_cast<SdrGrafObj*>( pObj );
SdrOle2Obj* pOle2= dynamic_cast<SdrOle2Obj*>( pObj );
sal_uIntPtr nInsAnz=0;
- Rectangle aLogicRect;
+ tools::Rectangle aLogicRect;
if (pGraf && (pGraf->HasGDIMetaFile() || pGraf->isEmbeddedSvg()))
{
diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index f015928901e0..436c5740094e 100644
--- a/svx/source/svdraw/svdedxv.cxx
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -204,7 +204,7 @@ void SdrObjEditView::HideSdrPage()
SdrGlueEditView::HideSdrPage();
}
-void SdrObjEditView::TakeActionRect(Rectangle& rRect) const
+void SdrObjEditView::TakeActionRect(tools::Rectangle& rRect) const
{
if (IsMacroObj()) {
rRect=pMacroObj->GetCurrentBoundRect();
@@ -245,14 +245,14 @@ void SdrObjEditView::ModelHasChanged()
bool bColorChg=false;
bool bContourFrame=pTextObj->IsContourTextFrame();
EVAnchorMode eNewAnchor(ANCHOR_VCENTER_HCENTER);
- Rectangle aOldArea(aMinTextEditArea);
+ tools::Rectangle aOldArea(aMinTextEditArea);
aOldArea.Union(aTextEditArea);
Color aNewColor;
{ // check area
Size aPaperMin1;
Size aPaperMax1;
- Rectangle aEditArea1;
- Rectangle aMinArea1;
+ tools::Rectangle aEditArea1;
+ tools::Rectangle aMinArea1;
pTextObj->TakeTextEditArea(&aPaperMin1,&aPaperMax1,&aEditArea1,&aMinArea1);
Point aPvOfs(pTextObj->GetTextEditOffset());
@@ -263,7 +263,7 @@ void SdrObjEditView::ModelHasChanged()
aMinArea1 += pTextObj->GetGridOffset();
aEditArea1.Move(aPvOfs.X(),aPvOfs.Y());
aMinArea1.Move(aPvOfs.X(),aPvOfs.Y());
- Rectangle aNewArea(aMinArea1);
+ tools::Rectangle aNewArea(aMinArea1);
aNewArea.Union(aEditArea1);
if (aNewArea!=aOldArea || aEditArea1!=aTextEditArea || aMinArea1!=aMinTextEditArea ||
@@ -283,7 +283,7 @@ void SdrObjEditView::ModelHasChanged()
EEControlBits nStat=pTextEditOutliner->GetControlWord();
nStat&=~EEControlBits::AUTOPAGESIZE;
pTextEditOutliner->SetControlWord(nStat);
- Rectangle aAnchorRect;
+ tools::Rectangle aAnchorRect;
pTextObj->TakeTextAnchorRect(aAnchorRect);
pTextObj->ImpSetContourPolygon(*pTextEditOutliner,aAnchorRect, true);
}
@@ -330,7 +330,7 @@ void SdrObjEditView::ModelHasChanged()
OutlinerView* pOLV=pTextEditOutliner->GetView(nOV);
{ // invalidate old OutlinerView area
vcl::Window* pWin=pOLV->GetWindow();
- Rectangle aTmpRect(aOldArea);
+ tools::Rectangle aTmpRect(aOldArea);
sal_uInt16 nPixSiz=pOLV->GetInvalidateMore()+1;
Size aMore(pWin->PixelToLogic(Size(nPixSiz,nPixSiz)));
aTmpRect.Left()-=aMore.Width();
@@ -372,7 +372,7 @@ void SdrObjEditView::TextEditDrawing(SdrPaintWindow& rPaintWindow) const
if(nViewCount)
{
const vcl::Region& rRedrawRegion = rPaintWindow.GetRedrawRegion();
- const Rectangle aCheckRect(rRedrawRegion.GetBoundRect());
+ const tools::Rectangle aCheckRect(rRedrawRegion.GetBoundRect());
for(sal_uInt32 i(0); i < nViewCount; i++)
{
@@ -394,15 +394,15 @@ void SdrObjEditView::TextEditDrawing(SdrPaintWindow& rPaintWindow) const
}
}
-void SdrObjEditView::ImpPaintOutlinerView(OutlinerView& rOutlView, const Rectangle& rRect, OutputDevice& rTargetDevice) const
+void SdrObjEditView::ImpPaintOutlinerView(OutlinerView& rOutlView, const tools::Rectangle& rRect, OutputDevice& rTargetDevice) const
{
const SdrTextObj* pText = dynamic_cast<SdrTextObj*>( GetTextEditObject() );
bool bTextFrame(pText && pText->IsTextFrame());
bool bFitToSize(pTextEditOutliner->GetControlWord() & EEControlBits::STRETCHING);
bool bModifyMerk(pTextEditOutliner->IsModified());
- Rectangle aBlankRect(rOutlView.GetOutputArea());
+ tools::Rectangle aBlankRect(rOutlView.GetOutputArea());
aBlankRect.Union(aMinTextEditArea);
- Rectangle aPixRect(rTargetDevice.LogicToPixel(aBlankRect));
+ tools::Rectangle aPixRect(rTargetDevice.LogicToPixel(aBlankRect));
// in the tiled rendering case, the setup is incomplete, and we very
// easily get an empty rRect on input - that will cause that everything is
@@ -467,9 +467,9 @@ void SdrObjEditView::ImpInvalidateOutlinerView(OutlinerView& rOutlView) const
if(bTextFrame && !bFitToSize)
{
- Rectangle aBlankRect(rOutlView.GetOutputArea());
+ tools::Rectangle aBlankRect(rOutlView.GetOutputArea());
aBlankRect.Union(aMinTextEditArea);
- Rectangle aPixRect(pWin->LogicToPixel(aBlankRect));
+ tools::Rectangle aPixRect(pWin->LogicToPixel(aBlankRect));
sal_uInt16 nPixSiz(rOutlView.GetInvalidateMore() - 1);
aPixRect.Left()--;
@@ -490,7 +490,7 @@ void SdrObjEditView::ImpInvalidateOutlinerView(OutlinerView& rOutlView) const
if (aPixRect.Bottom()>nMaxY) aPixRect.Bottom()=nMaxY;
}
- Rectangle aOuterPix(aPixRect);
+ tools::Rectangle aOuterPix(aPixRect);
aOuterPix.Left()-=nPixSiz;
aOuterPix.Top()-=nPixSiz;
aOuterPix.Right()+=nPixSiz;
@@ -827,8 +827,8 @@ bool SdrObjEditView::SdrBeginTextEdit(
// but aMinTextEditArea has to happen, too (therefore leaving this in right now)
pTextObj->TakeTextEditArea(nullptr,nullptr,&aTextEditArea,&aMinTextEditArea);
- Rectangle aTextRect;
- Rectangle aAnchorRect;
+ tools::Rectangle aTextRect;
+ tools::Rectangle aAnchorRect;
pTextObj->TakeTextRect(*pTextEditOutliner, aTextRect, true,
&aAnchorRect /* Give true here, not false */);
@@ -1078,7 +1078,7 @@ SdrEndTextEditKind SdrObjEditView::SdrEndTextEdit(bool bDontDeleteReally)
pTextEditOutliner=nullptr;
pTextEditOutlinerView=nullptr;
pTextEditCursorMerker=nullptr;
- aTextEditArea=Rectangle();
+ aTextEditArea=tools::Rectangle();
if (pTEOutliner!=nullptr)
{
@@ -1202,7 +1202,7 @@ SdrEndTextEditKind SdrObjEditView::SdrEndTextEdit(bool bDontDeleteReally)
OutlinerView* pOLV=pTEOutliner->GetView(i);
sal_uInt16 nMorePix=pOLV->GetInvalidateMore() + 10;
vcl::Window* pWin=pOLV->GetWindow();
- Rectangle aRect(pOLV->GetOutputArea());
+ tools::Rectangle aRect(pOLV->GetOutputArea());
pTEOutliner->RemoveView(i);
if (!bTextEditDontDelete || i!=0)
{
@@ -1320,7 +1320,7 @@ bool SdrObjEditView::IsTextEditHit(const Point& rHit) const
bool bOk=false;
if(mxTextEditObj.is())
{
- Rectangle aEditArea;
+ tools::Rectangle aEditArea;
OutlinerView* pOLV=pTextEditOutliner->GetView(0);
if (pOLV!=nullptr)
{
@@ -1353,7 +1353,7 @@ bool SdrObjEditView::IsTextEditFrameHit(const Point& rHit) const
vcl::Window* pWin=pOLV->GetWindow();
if (pText!=nullptr && pText->IsTextFrame() && pOLV!=nullptr && pWin!=nullptr) {
sal_uInt16 nPixSiz=pOLV->GetInvalidateMore();
- Rectangle aEditArea(aMinTextEditArea);
+ tools::Rectangle aEditArea(aMinTextEditArea);
aEditArea.Union(pOLV->GetOutputArea());
if (!aEditArea.IsInside(rHit)) {
Size aSiz(pWin->PixelToLogic(Size(nPixSiz,nPixSiz)));
@@ -1447,7 +1447,7 @@ bool SdrObjEditView::MouseButtonDown(const MouseEvent& rMEvt, vcl::Window* pWin)
Point aPixPos(rMEvt.GetPosPixel());
if (pWin)
{
- Rectangle aR(pWin->LogicToPixel(pTextEditOutlinerView->GetOutputArea()));
+ tools::Rectangle aR(pWin->LogicToPixel(pTextEditOutlinerView->GetOutputArea()));
if (aPixPos.X()<aR.Left ()) aPixPos.X()=aR.Left ();
if (aPixPos.X()>aR.Right ()) aPixPos.X()=aR.Right ();
if (aPixPos.Y()<aR.Top ()) aPixPos.Y()=aR.Top ();
@@ -1480,7 +1480,7 @@ bool SdrObjEditView::MouseButtonUp(const MouseEvent& rMEvt, vcl::Window* pWin)
}
if (bPostIt && pWin) {
Point aPixPos(rMEvt.GetPosPixel());
- Rectangle aR(pWin->LogicToPixel(pTextEditOutlinerView->GetOutputArea()));
+ tools::Rectangle aR(pWin->LogicToPixel(pTextEditOutlinerView->GetOutputArea()));
if (aPixPos.X()<aR.Left ()) aPixPos.X()=aR.Left ();
if (aPixPos.X()>aR.Right ()) aPixPos.X()=aR.Right ();
if (aPixPos.Y()<aR.Top ()) aPixPos.Y()=aR.Top ();
@@ -1514,7 +1514,7 @@ bool SdrObjEditView::MouseMove(const MouseEvent& rMEvt, vcl::Window* pWin)
}
if (bPostIt) {
Point aPixPos(rMEvt.GetPosPixel());
- Rectangle aR(pTextEditOutlinerView->GetOutputArea());
+ tools::Rectangle aR(pTextEditOutlinerView->GetOutputArea());
if (pWin)
aR = pWin->LogicToPixel(aR);
else if (pTextEditWin)
@@ -1553,7 +1553,7 @@ bool SdrObjEditView::Command(const CommandEvent& rCEvt, vcl::Window* pWin)
if (bPostIt) {
Point aPixPos(rCEvt.GetMousePosPixel());
if (rCEvt.IsMouseEvent() && pWin) {
- Rectangle aR(pWin->LogicToPixel(pTextEditOutlinerView->GetOutputArea()));
+ tools::Rectangle aR(pWin->LogicToPixel(pTextEditOutlinerView->GetOutputArea()));
if (aPixPos.X()<aR.Left ()) aPixPos.X()=aR.Left ();
if (aPixPos.X()>aR.Right ()) aPixPos.X()=aR.Right ();
if (aPixPos.Y()<aR.Top ()) aPixPos.Y()=aR.Top ();
@@ -1618,7 +1618,7 @@ void SdrObjEditView::ImpMakeTextCursorAreaVisible()
if (pCsr!=nullptr) {
Size aSiz(pCsr->GetSize());
if (aSiz.Width()!=0 && aSiz.Height()!=0) {
- MakeVisible(Rectangle(pCsr->GetPos(),aSiz),*pTextEditWin);
+ MakeVisible(tools::Rectangle(pCsr->GetPos(),aSiz),*pTextEditWin);
}
}
}
@@ -1953,7 +1953,7 @@ void SdrObjEditView::ImpMacroUp(const Point& rUpPos)
aHitRec.pVisiLayer=&pMacroPV->GetVisibleLayers();
aHitRec.pPageView=pMacroPV;
aHitRec.pOut=pMacroWin.get();
- pMacroObj->PaintMacro(*pMacroWin,Rectangle(),aHitRec);
+ pMacroObj->PaintMacro(*pMacroWin,tools::Rectangle(),aHitRec);
bMacroDown=false;
}
}
@@ -1970,7 +1970,7 @@ void SdrObjEditView::ImpMacroDown(const Point& rDownPos)
aHitRec.pPageView=pMacroPV;
aHitRec.bDown=true;
aHitRec.pOut=pMacroWin.get();
- pMacroObj->PaintMacro(*pMacroWin,Rectangle(),aHitRec);
+ pMacroObj->PaintMacro(*pMacroWin,tools::Rectangle(),aHitRec);
bMacroDown=true;
}
}
diff --git a/svx/source/svdraw/svdetc.cxx b/svx/source/svdraw/svdetc.cxx
index 74cb4343adcb..9187f2c1d386 100644
--- a/svx/source/svdraw/svdetc.cxx
+++ b/svx/source/svdraw/svdetc.cxx
@@ -653,7 +653,7 @@ namespace
}
Color impCalcBackgroundColor(
- const Rectangle& rArea,
+ const tools::Rectangle& rArea,
const SdrPageView& rTextEditPV,
const SdrPage& rPage)
{
@@ -803,7 +803,7 @@ Color GetTextEditBackgroundColor(const SdrObjEditView& rView)
if(pPg)
{
- Rectangle aSnapRect( pText->GetSnapRect() );
+ tools::Rectangle aSnapRect( pText->GetSnapRect() );
aSnapRect.Move(aPvOfs.X(), aPvOfs.Y());
return impCalcBackgroundColor(aSnapRect, *pTextEditPV, *pPg);
diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx
index adf930c3fba5..5b53f4ad2d54 100644
--- a/svx/source/svdraw/svdfmtf.cxx
+++ b/svx/source/svdraw/svdfmtf.cxx
@@ -76,7 +76,7 @@ using namespace com::sun::star;
ImpSdrGDIMetaFileImport::ImpSdrGDIMetaFileImport(
SdrModel& rModel,
SdrLayerID nLay,
- const Rectangle& rRect)
+ const tools::Rectangle& rRect)
: maTmpList(),
mpVD(VclPtr<VirtualDevice>::Create()),
maScaleRect(rRect),
@@ -994,7 +994,7 @@ void ImpSdrGDIMetaFileImport::ImportText( const Point& rPos, const OUString& rSt
else if ( eAlg == ALIGN_BOTTOM )
aPos.Y() -= nTextHeight;
- Rectangle aTextRect( aPos, aSize );
+ tools::Rectangle aTextRect( aPos, aSize );
SdrRectObj* pText =new SdrRectObj( OBJ_TEXT, aTextRect );
pText->SetMergedItem ( makeSdrTextUpperDistItem (0));
@@ -1062,7 +1062,7 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaStretchTextAction& rAct)
void ImpSdrGDIMetaFileImport::DoAction(MetaBmpAction& rAct)
{
- Rectangle aRect(rAct.GetPoint(),rAct.GetBitmap().GetSizePixel());
+ tools::Rectangle aRect(rAct.GetPoint(),rAct.GetBitmap().GetSizePixel());
aRect.Right()++; aRect.Bottom()++;
SdrGrafObj* pGraf=new SdrGrafObj(Graphic(rAct.GetBitmap()),aRect);
@@ -1074,7 +1074,7 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaBmpAction& rAct)
void ImpSdrGDIMetaFileImport::DoAction(MetaBmpScaleAction& rAct)
{
- Rectangle aRect(rAct.GetPoint(),rAct.GetSize());
+ tools::Rectangle aRect(rAct.GetPoint(),rAct.GetSize());
aRect.Right()++; aRect.Bottom()++;
SdrGrafObj* pGraf=new SdrGrafObj(Graphic(rAct.GetBitmap()),aRect);
@@ -1086,7 +1086,7 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaBmpScaleAction& rAct)
void ImpSdrGDIMetaFileImport::DoAction(MetaBmpExAction& rAct)
{
- Rectangle aRect(rAct.GetPoint(),rAct.GetBitmapEx().GetSizePixel());
+ tools::Rectangle aRect(rAct.GetPoint(),rAct.GetBitmapEx().GetSizePixel());
aRect.Right()++; aRect.Bottom()++;
SdrGrafObj* pGraf=new SdrGrafObj( rAct.GetBitmapEx(), aRect );
@@ -1098,7 +1098,7 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaBmpExAction& rAct)
void ImpSdrGDIMetaFileImport::DoAction(MetaBmpExScaleAction& rAct)
{
- Rectangle aRect(rAct.GetPoint(),rAct.GetSize());
+ tools::Rectangle aRect(rAct.GetPoint(),rAct.GetSize());
aRect.Right()++; aRect.Bottom()++;
SdrGrafObj* pGraf=new SdrGrafObj( rAct.GetBitmapEx(), aRect );
@@ -1274,12 +1274,12 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaTextRectAction& rAct)
void ImpSdrGDIMetaFileImport::DoAction(MetaBmpScalePartAction& rAct)
{
- Rectangle aRect(rAct.GetDestPoint(), rAct.GetDestSize());
+ tools::Rectangle aRect(rAct.GetDestPoint(), rAct.GetDestSize());
Bitmap aBitmap(rAct.GetBitmap());
aRect.Right()++;
aRect.Bottom()++;
- aBitmap.Crop(Rectangle(rAct.GetSrcPoint(), rAct.GetSrcSize()));
+ aBitmap.Crop(tools::Rectangle(rAct.GetSrcPoint(), rAct.GetSrcSize()));
SdrGrafObj* pGraf = new SdrGrafObj(aBitmap, aRect);
// This action is not creating line and fill, set directly, do not use SetAttributes(..)
@@ -1290,12 +1290,12 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaBmpScalePartAction& rAct)
void ImpSdrGDIMetaFileImport::DoAction(MetaBmpExScalePartAction& rAct)
{
- Rectangle aRect(rAct.GetDestPoint(),rAct.GetDestSize());
+ tools::Rectangle aRect(rAct.GetDestPoint(),rAct.GetDestSize());
BitmapEx aBitmapEx(rAct.GetBitmapEx());
aRect.Right()++;
aRect.Bottom()++;
- aBitmapEx.Crop(Rectangle(rAct.GetSrcPoint(), rAct.GetSrcSize()));
+ aBitmapEx.Crop(tools::Rectangle(rAct.GetSrcPoint(), rAct.GetSrcSize()));
SdrGrafObj* pGraf = new SdrGrafObj(aBitmapEx, aRect);
// This action is not creating line and fill, set directly, do not use SetAttributes(..)
@@ -1306,7 +1306,7 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaBmpExScalePartAction& rAct)
void ImpSdrGDIMetaFileImport::DoAction(MetaMaskAction& rAct)
{
- Rectangle aRect(rAct.GetPoint(), rAct.GetBitmap().GetSizePixel());
+ tools::Rectangle aRect(rAct.GetPoint(), rAct.GetBitmap().GetSizePixel());
BitmapEx aBitmapEx(rAct.GetBitmap(), rAct.GetColor());
aRect.Right()++; aRect.Bottom()++;
@@ -1320,7 +1320,7 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaMaskAction& rAct)
void ImpSdrGDIMetaFileImport::DoAction(MetaMaskScaleAction& rAct)
{
- Rectangle aRect(rAct.GetPoint(), rAct.GetSize());
+ tools::Rectangle aRect(rAct.GetPoint(), rAct.GetSize());
BitmapEx aBitmapEx(rAct.GetBitmap(), rAct.GetColor());
aRect.Right()++; aRect.Bottom()++;
@@ -1334,11 +1334,11 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaMaskScaleAction& rAct)
void ImpSdrGDIMetaFileImport::DoAction(MetaMaskScalePartAction& rAct)
{
- Rectangle aRect(rAct.GetDestPoint(), rAct.GetDestSize());
+ tools::Rectangle aRect(rAct.GetDestPoint(), rAct.GetDestSize());
BitmapEx aBitmapEx(rAct.GetBitmap(), rAct.GetColor());
aRect.Right()++; aRect.Bottom()++;
- aBitmapEx.Crop(Rectangle(rAct.GetSrcPoint(), rAct.GetSrcSize()));
+ aBitmapEx.Crop(tools::Rectangle(rAct.GetSrcPoint(), rAct.GetSrcSize()));
SdrGrafObj* pGraf = new SdrGrafObj(aBitmapEx, aRect);
// This action is not creating line and fill, set directly, do not use SetAttributes(..)
@@ -1385,7 +1385,7 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaGradientAction& rAct)
aRange.transform(aTransform);
const Gradient& rGradient = rAct.GetGradient();
SdrRectObj* pRect = new SdrRectObj(
- Rectangle(
+ tools::Rectangle(
floor(aRange.getMinX()),
floor(aRange.getMinY()),
ceil(aRange.getMaxX()),
@@ -1492,7 +1492,7 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaFloatTransparentAction& rAct)
if(rMtf.GetActionSize())
{
- const Rectangle aRect(rAct.GetPoint(),rAct.GetSize());
+ const tools::Rectangle aRect(rAct.GetPoint(),rAct.GetSize());
// convert metafile sub-content to BitmapEx
BitmapEx aBitmapEx(
@@ -1553,7 +1553,7 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaFloatTransparentAction& rAct)
ScopedVclPtrInstance< VirtualDevice > pVDev;
pVDev->SetOutputSizePixel(aBitmapEx.GetBitmap().GetSizePixel());
- pVDev->DrawGradient(Rectangle(Point(0, 0), pVDev->GetOutputSizePixel()), rGradient);
+ pVDev->DrawGradient(tools::Rectangle(Point(0, 0), pVDev->GetOutputSizePixel()), rGradient);
aNewMask = AlphaMask(pVDev->GetBitmap(Point(0, 0), pVDev->GetOutputSizePixel()));
bHasNewMask = true;
diff --git a/svx/source/svdraw/svdfmtf.hxx b/svx/source/svdraw/svdfmtf.hxx
index e8440da97246..b6b4b7e0df26 100644
--- a/svx/source/svdraw/svdfmtf.hxx
+++ b/svx/source/svdraw/svdfmtf.hxx
@@ -44,7 +44,7 @@ class ImpSdrGDIMetaFileImport
protected:
::std::vector< SdrObject* > maTmpList;
ScopedVclPtr<VirtualDevice> mpVD;
- Rectangle maScaleRect;
+ tools::Rectangle maScaleRect;
size_t mnMapScalingOfs; // from here on, not edited with MapScaling
SfxItemSet* mpLineAttr;
SfxItemSet* mpFillAttr;
@@ -161,7 +161,7 @@ public:
ImpSdrGDIMetaFileImport(
SdrModel& rModel,
SdrLayerID nLay,
- const Rectangle& rRect);
+ const tools::Rectangle& rRect);
~ImpSdrGDIMetaFileImport();
size_t DoImport(
diff --git a/svx/source/svdraw/svdglue.cxx b/svx/source/svdraw/svdglue.cxx
index 0b73f7f65897..7563fa3bc57c 100644
--- a/svx/source/svdraw/svdglue.cxx
+++ b/svx/source/svdraw/svdglue.cxx
@@ -46,8 +46,8 @@ void SdrGluePoint::SetReallyAbsolute(bool bOn, const SdrObject& rObj)
Point SdrGluePoint::GetAbsolutePos(const SdrObject& rObj) const
{
if (bReallyAbsolute) return aPos;
- Rectangle aSnap(rObj.GetSnapRect());
- Rectangle aBound(rObj.GetSnapRect());
+ tools::Rectangle aSnap(rObj.GetSnapRect());
+ tools::Rectangle aBound(rObj.GetSnapRect());
Point aPt(aPos);
Point aOfs(aSnap.Center());
@@ -90,7 +90,7 @@ void SdrGluePoint::SetAbsolutePos(const Point& rNewPos, const SdrObject& rObj)
aPos=rNewPos;
return;
}
- Rectangle aSnap(rObj.GetSnapRect());
+ tools::Rectangle aSnap(rObj.GetSnapRect());
Point aPt(rNewPos);
Point aOfs(aSnap.Center());
@@ -258,7 +258,7 @@ void SdrGluePoint::Invalidate(vcl::Window& rWin, const SdrObject* pObj) const
rWin.EnableMapMode(false);
Size aSiz( aGlueHalfSize );
- Rectangle aRect(aPt.X()-aSiz.Width(),aPt.Y()-aSiz.Height(),
+ tools::Rectangle aRect(aPt.X()-aSiz.Width(),aPt.Y()-aSiz.Height(),
aPt.X()+aSiz.Width(),aPt.Y()+aSiz.Height());
// do not erase background, that causes flicker (!)
@@ -271,7 +271,7 @@ bool SdrGluePoint::IsHit(const Point& rPnt, const OutputDevice& rOut, const SdrO
{
Point aPt(pObj!=nullptr ? GetAbsolutePos(*pObj) : GetPos());
Size aSiz=rOut.PixelToLogic(aGlueHalfSize);
- Rectangle aRect(aPt.X()-aSiz.Width(),aPt.Y()-aSiz.Height(),aPt.X()+aSiz.Width(),aPt.Y()+aSiz.Height());
+ tools::Rectangle aRect(aPt.X()-aSiz.Width(),aPt.Y()-aSiz.Height(),aPt.X()+aSiz.Width(),aPt.Y()+aSiz.Height());
return aRect.IsInside(rPnt);
}
diff --git a/svx/source/svdraw/svdhdl.cxx b/svx/source/svdraw/svdhdl.cxx
index 174b964f8c59..16a28661adb6 100644
--- a/svx/source/svdraw/svdhdl.cxx
+++ b/svx/source/svdraw/svdhdl.cxx
@@ -87,7 +87,7 @@ class SdrHdlBitmapSet
::std::vector< BitmapEx > maRealMarkers;
// helpers
- BitmapEx& impGetOrCreateTargetBitmap(sal_uInt16 nIndex, const Rectangle& rRectangle);
+ BitmapEx& impGetOrCreateTargetBitmap(sal_uInt16 nIndex, const tools::Rectangle& rRectangle);
public:
explicit SdrHdlBitmapSet();
@@ -107,7 +107,7 @@ SdrHdlBitmapSet::SdrHdlBitmapSet()
{
}
-BitmapEx& SdrHdlBitmapSet::impGetOrCreateTargetBitmap(sal_uInt16 nIndex, const Rectangle& rRectangle)
+BitmapEx& SdrHdlBitmapSet::impGetOrCreateTargetBitmap(sal_uInt16 nIndex, const tools::Rectangle& rRectangle)
{
BitmapEx& rTargetBitmap = maRealMarkers[nIndex];
@@ -135,17 +135,17 @@ const BitmapEx& SdrHdlBitmapSet::GetBitmapEx(BitmapMarkerKind eKindOfMarker, sal
}
case BitmapMarkerKind::Rect_9x9:
{
- return impGetOrCreateTargetBitmap((1 * INDEX_COUNT) + nInd, Rectangle(Point(7, nYPos), Size(9, 9)));
+ return impGetOrCreateTargetBitmap((1 * INDEX_COUNT) + nInd, tools::Rectangle(Point(7, nYPos), Size(9, 9)));
}
case BitmapMarkerKind::Rect_7x7:
{
- return impGetOrCreateTargetBitmap((0 * INDEX_COUNT) + nInd, Rectangle(Point(0, nYPos), Size(7, 7)));
+ return impGetOrCreateTargetBitmap((0 * INDEX_COUNT) + nInd, tools::Rectangle(Point(0, nYPos), Size(7, 7)));
}
case BitmapMarkerKind::Rect_11x11:
{
- return impGetOrCreateTargetBitmap((2 * INDEX_COUNT) + nInd, Rectangle(Point(16, nYPos), Size(11, 11)));
+ return impGetOrCreateTargetBitmap((2 * INDEX_COUNT) + nInd, tools::Rectangle(Point(16, nYPos), Size(11, 11)));
}
case BitmapMarkerKind::Rect_13x13:
@@ -156,27 +156,27 @@ const BitmapEx& SdrHdlBitmapSet::GetBitmapEx(BitmapMarkerKind eKindOfMarker, sal
{
case 0:
{
- return impGetOrCreateTargetBitmap(nIndex, Rectangle(Point(72, 66), Size(13, 13)));
+ return impGetOrCreateTargetBitmap(nIndex, tools::Rectangle(Point(72, 66), Size(13, 13)));
}
case 1:
{
- return impGetOrCreateTargetBitmap(nIndex, Rectangle(Point(85, 66), Size(13, 13)));
+ return impGetOrCreateTargetBitmap(nIndex, tools::Rectangle(Point(85, 66), Size(13, 13)));
}
case 2:
{
- return impGetOrCreateTargetBitmap(nIndex, Rectangle(Point(72, 79), Size(13, 13)));
+ return impGetOrCreateTargetBitmap(nIndex, tools::Rectangle(Point(72, 79), Size(13, 13)));
}
case 3:
{
- return impGetOrCreateTargetBitmap(nIndex, Rectangle(Point(85, 79), Size(13, 13)));
+ return impGetOrCreateTargetBitmap(nIndex, tools::Rectangle(Point(85, 79), Size(13, 13)));
}
case 4:
{
- return impGetOrCreateTargetBitmap(nIndex, Rectangle(Point(98, 79), Size(13, 13)));
+ return impGetOrCreateTargetBitmap(nIndex, tools::Rectangle(Point(98, 79), Size(13, 13)));
}
default: // case 5:
{
- return impGetOrCreateTargetBitmap(nIndex, Rectangle(Point(98, 66), Size(13, 13)));
+ return impGetOrCreateTargetBitmap(nIndex, tools::Rectangle(Point(98, 66), Size(13, 13)));
}
}
}
@@ -184,82 +184,82 @@ const BitmapEx& SdrHdlBitmapSet::GetBitmapEx(BitmapMarkerKind eKindOfMarker, sal
case BitmapMarkerKind::Circ_7x7:
case BitmapMarkerKind::Customshape_7x7:
{
- return impGetOrCreateTargetBitmap((4 * INDEX_COUNT) + nInd, Rectangle(Point(27, nYPos), Size(7, 7)));
+ return impGetOrCreateTargetBitmap((4 * INDEX_COUNT) + nInd, tools::Rectangle(Point(27, nYPos), Size(7, 7)));
}
case BitmapMarkerKind::Circ_9x9:
case BitmapMarkerKind::Customshape_9x9:
{
- return impGetOrCreateTargetBitmap((5 * INDEX_COUNT) + nInd, Rectangle(Point(34, nYPos), Size(9, 9)));
+ return impGetOrCreateTargetBitmap((5 * INDEX_COUNT) + nInd, tools::Rectangle(Point(34, nYPos), Size(9, 9)));
}
case BitmapMarkerKind::Circ_11x11:
case BitmapMarkerKind::Customshape_11x11:
{
- return impGetOrCreateTargetBitmap((6 * INDEX_COUNT) + nInd, Rectangle(Point(43, nYPos), Size(11, 11)));
+ return impGetOrCreateTargetBitmap((6 * INDEX_COUNT) + nInd, tools::Rectangle(Point(43, nYPos), Size(11, 11)));
}
case BitmapMarkerKind::Elli_7x9:
{
- return impGetOrCreateTargetBitmap((7 * INDEX_COUNT) + nInd, Rectangle(Point(54, nYPos), Size(7, 9)));
+ return impGetOrCreateTargetBitmap((7 * INDEX_COUNT) + nInd, tools::Rectangle(Point(54, nYPos), Size(7, 9)));
}
case BitmapMarkerKind::Elli_9x11:
{
- return impGetOrCreateTargetBitmap((8 * INDEX_COUNT) + nInd, Rectangle(Point(61, nYPos), Size(9, 11)));
+ return impGetOrCreateTargetBitmap((8 * INDEX_COUNT) + nInd, tools::Rectangle(Point(61, nYPos), Size(9, 11)));
}
case BitmapMarkerKind::Elli_9x7:
{
- return impGetOrCreateTargetBitmap((9 * INDEX_COUNT) + nInd, Rectangle(Point(70, nYPos), Size(9, 7)));
+ return impGetOrCreateTargetBitmap((9 * INDEX_COUNT) + nInd, tools::Rectangle(Point(70, nYPos), Size(9, 7)));
}
case BitmapMarkerKind::Elli_11x9:
{
- return impGetOrCreateTargetBitmap((10 * INDEX_COUNT) + nInd, Rectangle(Point(79, nYPos), Size(11, 9)));
+ return impGetOrCreateTargetBitmap((10 * INDEX_COUNT) + nInd, tools::Rectangle(Point(79, nYPos), Size(11, 9)));
}
case BitmapMarkerKind::RectPlus_7x7:
{
- return impGetOrCreateTargetBitmap((11 * INDEX_COUNT) + nInd, Rectangle(Point(90, nYPos), Size(7, 7)));
+ return impGetOrCreateTargetBitmap((11 * INDEX_COUNT) + nInd, tools::Rectangle(Point(90, nYPos), Size(7, 7)));
}
case BitmapMarkerKind::RectPlus_9x9:
{
- return impGetOrCreateTargetBitmap((12 * INDEX_COUNT) + nInd, Rectangle(Point(97, nYPos), Size(9, 9)));
+ return impGetOrCreateTargetBitmap((12 * INDEX_COUNT) + nInd, tools::Rectangle(Point(97, nYPos), Size(9, 9)));
}
case BitmapMarkerKind::RectPlus_11x11:
{
- return impGetOrCreateTargetBitmap((13 * INDEX_COUNT) + nInd, Rectangle(Point(106, nYPos), Size(11, 11)));
+ return impGetOrCreateTargetBitmap((13 * INDEX_COUNT) + nInd, tools::Rectangle(Point(106, nYPos), Size(11, 11)));
}
case BitmapMarkerKind::Crosshair:
{
- return impGetOrCreateTargetBitmap((KIND_COUNT * INDEX_COUNT) + 0, Rectangle(Point(0, 68), Size(15, 15)));
+ return impGetOrCreateTargetBitmap((KIND_COUNT * INDEX_COUNT) + 0, tools::Rectangle(Point(0, 68), Size(15, 15)));
}
case BitmapMarkerKind::Glue:
{
- return impGetOrCreateTargetBitmap((KIND_COUNT * INDEX_COUNT) + 1, Rectangle(Point(15, 76), Size(9, 9)));
+ return impGetOrCreateTargetBitmap((KIND_COUNT * INDEX_COUNT) + 1, tools::Rectangle(Point(15, 76), Size(9, 9)));
}
case BitmapMarkerKind::Glue_Deselected:
{
- return impGetOrCreateTargetBitmap((KIND_COUNT * INDEX_COUNT) + 2, Rectangle(Point(15, 67), Size(9, 9)));
+ return impGetOrCreateTargetBitmap((KIND_COUNT * INDEX_COUNT) + 2, tools::Rectangle(Point(15, 67), Size(9, 9)));
}
case BitmapMarkerKind::Anchor: // AnchorTR for SW
case BitmapMarkerKind::AnchorTR:
{
- return impGetOrCreateTargetBitmap((KIND_COUNT * INDEX_COUNT) + 3, Rectangle(Point(24, 67), Size(24, 24)));
+ return impGetOrCreateTargetBitmap((KIND_COUNT * INDEX_COUNT) + 3, tools::Rectangle(Point(24, 67), Size(24, 24)));
}
// add AnchorPressed to be able to animate anchor control
case BitmapMarkerKind::AnchorPressed:
case BitmapMarkerKind::AnchorPressedTR:
{
- return impGetOrCreateTargetBitmap((KIND_COUNT * INDEX_COUNT) + 4, Rectangle(Point(48, 67), Size(24, 24)));
+ return impGetOrCreateTargetBitmap((KIND_COUNT * INDEX_COUNT) + 4, tools::Rectangle(Point(48, 67), Size(24, 24)));
}
}
}
@@ -1760,7 +1760,7 @@ Pointer ImpMeasureHdl::GetPointer() const
}
-ImpTextframeHdl::ImpTextframeHdl(const Rectangle& rRect) :
+ImpTextframeHdl::ImpTextframeHdl(const tools::Rectangle& rRect) :
SdrHdl(rRect.TopLeft(),SdrHdlKind::Move),
maRect(rRect)
{
@@ -2349,7 +2349,7 @@ BitmapEx SdrCropHdl::GetBitmapForHandle( const BitmapEx& rBitmap, int nSize )
default: break;
}
- Rectangle aSourceRect( Point( nX * (nPixelSize) + nOffset, nY * (nPixelSize)), Size(nPixelSize, nPixelSize) );
+ tools::Rectangle aSourceRect( Point( nX * (nPixelSize) + nOffset, nY * (nPixelSize)), Size(nPixelSize, nPixelSize) );
BitmapEx aRetval(rBitmap);
aRetval.Crop(aSourceRect);
diff --git a/svx/source/svdraw/svdhlpln.cxx b/svx/source/svdraw/svdhlpln.cxx
index 73bf9c148b09..622ae221b78d 100644
--- a/svx/source/svdraw/svdhlpln.cxx
+++ b/svx/source/svdraw/svdhlpln.cxx
@@ -54,9 +54,9 @@ bool SdrHelpLine::IsHit(const Point& rPnt, sal_uInt16 nTolLog, const OutputDevic
return false;
}
-Rectangle SdrHelpLine::GetBoundRect(const OutputDevice& rOut) const
+tools::Rectangle SdrHelpLine::GetBoundRect(const OutputDevice& rOut) const
{
- Rectangle aRet(aPos,aPos);
+ tools::Rectangle aRet(aPos,aPos);
Point aOfs(rOut.GetMapMode().GetOrigin());
Size aSiz(rOut.GetOutputSize());
switch (eKind) {
diff --git a/svx/source/svdraw/svdibrow.cxx b/svx/source/svdraw/svdibrow.cxx
index 41407b648f61..97100753fee4 100644
--- a/svx/source/svdraw/svdibrow.cxx
+++ b/svx/source/svdraw/svdibrow.cxx
@@ -340,12 +340,12 @@ OUString SdrItemBrowserControl::GetCellText(long _nRow, sal_uInt16 _nColId) cons
return sRet;
}
-void SdrItemBrowserControl::PaintField(OutputDevice& rDev, const Rectangle& rRect, sal_uInt16 nColumnId) const
+void SdrItemBrowserControl::PaintField(OutputDevice& rDev, const tools::Rectangle& rRect, sal_uInt16 nColumnId) const
{
if (nAktPaintRow<0 || static_cast<std::size_t>(nAktPaintRow)>=aList.size()) {
return;
}
- Rectangle aR(rRect);
+ tools::Rectangle aR(rRect);
aR.Bottom()++;
ImpItemListRow* pEntry=ImpGetEntry(nAktPaintRow);
if (pEntry->bComment)
@@ -429,10 +429,10 @@ void SdrItemBrowserControl::SetDirty()
aSetDirtyHdl.Call(*this);
}
-Rectangle SdrItemBrowserControl::GetFieldCharacterBounds(sal_Int32 /*_nRow*/,sal_Int32 /*_nColumnPos*/,sal_Int32 /*nIndex*/)
+tools::Rectangle SdrItemBrowserControl::GetFieldCharacterBounds(sal_Int32 /*_nRow*/,sal_Int32 /*_nColumnPos*/,sal_Int32 /*nIndex*/)
{
// no accessibility implementation required
- return Rectangle();
+ return tools::Rectangle();
}
sal_Int32 SdrItemBrowserControl::GetFieldIndexAtPoint(sal_Int32 /*_nRow*/,sal_Int32 /*_nColumnPos*/,const Point& /*_rPoint*/)
@@ -496,7 +496,7 @@ bool SdrItemBrowserControl::BeginChangeEntry(std::size_t nPos)
if (pEntry!=nullptr && !pEntry->bComment) {
SetMode(MYBROWSEMODE & BrowserMode(~BrowserMode::KEEPHIGHLIGHT));
pEditControl=VclPtr<ImpItemEdit>::Create(&GetDataWindow(),this,0);
- Rectangle aRect(GetFieldRectPixel(nPos, ITEMBROWSER_VALUECOL_ID, false));
+ tools::Rectangle aRect(GetFieldRectPixel(nPos, ITEMBROWSER_VALUECOL_ID, false));
aRect.Left()+=2; // little offset for the Edit, so it's exact to the pixel
aRect.Right()--;
pEditControl->SetPosSizePixel(aRect.TopLeft(),aRect.GetSize());
diff --git a/svx/source/svdraw/svdmark.cxx b/svx/source/svdraw/svdmark.cxx
index 7a76fd4d1401..7c4747ab0684 100644
--- a/svx/source/svdraw/svdmark.cxx
+++ b/svx/source/svdraw/svdmark.cxx
@@ -603,10 +603,10 @@ const OUString& SdrMarkList::GetPointMarkDescription(bool bGlue) const
return rName;
}
-bool SdrMarkList::TakeBoundRect(SdrPageView* pPV, Rectangle& rRect) const
+bool SdrMarkList::TakeBoundRect(SdrPageView* pPV, tools::Rectangle& rRect) const
{
bool bFnd(false);
- Rectangle aR;
+ tools::Rectangle aR;
for(size_t i = 0; i < GetMarkCount(); ++i)
{
@@ -634,7 +634,7 @@ bool SdrMarkList::TakeBoundRect(SdrPageView* pPV, Rectangle& rRect) const
return bFnd;
}
-bool SdrMarkList::TakeSnapRect(SdrPageView* pPV, Rectangle& rRect) const
+bool SdrMarkList::TakeSnapRect(SdrPageView* pPV, tools::Rectangle& rRect) const
{
bool bFnd(false);
@@ -646,7 +646,7 @@ bool SdrMarkList::TakeSnapRect(SdrPageView* pPV, Rectangle& rRect) const
{
if(pMark->GetMarkedSdrObj())
{
- Rectangle aR(pMark->GetMarkedSdrObj()->GetSnapRect());
+ tools::Rectangle aR(pMark->GetMarkedSdrObj()->GetSnapRect());
if(bFnd)
{
diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx
index 4d97d6613cb9..5d007aff7966 100644
--- a/svx/source/svdraw/svdmrkv.cxx
+++ b/svx/source/svdraw/svdmrkv.cxx
@@ -204,7 +204,7 @@ void SdrMarkView::ModelHasChanged()
if (comphelper::LibreOfficeKit::isActive() && GetMarkedObjectCount() > 0)
{
//TODO: Is MarkedObjRect valid at this point?
- Rectangle aSelection(GetMarkedObjRect());
+ tools::Rectangle aSelection(GetMarkedObjRect());
OString sSelection;
if (aSelection.IsEmpty())
sSelection = "EMPTY";
@@ -286,11 +286,11 @@ void SdrMarkView::BrkAction()
BrkMarkGluePoints();
}
-void SdrMarkView::TakeActionRect(Rectangle& rRect) const
+void SdrMarkView::TakeActionRect(tools::Rectangle& rRect) const
{
if(IsMarkObj() || IsMarkPoints() || IsMarkGluePoints())
{
- rRect = Rectangle(maDragStat.GetStart(), maDragStat.GetNow());
+ rRect = tools::Rectangle(maDragStat.GetStart(), maDragStat.GetNow());
}
else
{
@@ -363,7 +363,7 @@ bool SdrMarkView::EndMarkObj()
{
if(maDragStat.IsMinMoved())
{
- Rectangle aRect(maDragStat.GetStart(), maDragStat.GetNow());
+ tools::Rectangle aRect(maDragStat.GetStart(), maDragStat.GetNow());
aRect.Justify();
MarkObj(aRect, mpMarkObjOverlay->IsUnmarking());
bRetval = true;
@@ -427,7 +427,7 @@ bool SdrMarkView::EndMarkPoints()
{
if(maDragStat.IsMinMoved())
{
- Rectangle aRect(maDragStat.GetStart(), maDragStat.GetNow());
+ tools::Rectangle aRect(maDragStat.GetStart(), maDragStat.GetNow());
aRect.Justify();
MarkPoints(&aRect, mpMarkPointsOverlay->IsUnmarking());
@@ -490,7 +490,7 @@ void SdrMarkView::EndMarkGluePoints()
{
if(maDragStat.IsMinMoved())
{
- Rectangle aRect(maDragStat.GetStart(),maDragStat.GetNow());
+ tools::Rectangle aRect(maDragStat.GetStart(),maDragStat.GetNow());
aRect.Justify();
MarkGluePoints(&aRect, mpMarkGluePointsOverlay->IsUnmarking());
}
@@ -734,11 +734,11 @@ void SdrMarkView::SetMarkHandles(SfxViewShell* pOtherShell)
}
}
- Rectangle aRect(GetMarkedObjRect());
+ tools::Rectangle aRect(GetMarkedObjRect());
if (bTiledRendering)
{
- Rectangle aSelection(aRect);
+ tools::Rectangle aSelection(aRect);
OString sSelection;
if (aSelection.IsEmpty())
sSelection = "EMPTY";
@@ -1152,7 +1152,7 @@ void SdrMarkView::ForceRefToMarked()
{
case SdrDragMode::Rotate:
{
- Rectangle aR(GetMarkedObjRect());
+ tools::Rectangle aR(GetMarkedObjRect());
maRef1 = aR.Center();
break;
@@ -1192,7 +1192,7 @@ void SdrMarkView::ForceRefToMarked()
if (nTemp>nMinLen) nMinLen=nTemp;
}
- Rectangle aR(GetMarkedObjBoundRect());
+ tools::Rectangle aR(GetMarkedObjBoundRect());
Point aCenter(aR.Center());
long nMarkHgt=aR.GetHeight()-1;
long nHgt=nMarkHgt+nObjDst*2; // 20 pixels overlapping above and below
@@ -1226,7 +1226,7 @@ void SdrMarkView::ForceRefToMarked()
case SdrDragMode::Gradient:
case SdrDragMode::Crop:
{
- Rectangle aRect(GetMarkedObjBoundRect());
+ tools::Rectangle aRect(GetMarkedObjBoundRect());
maRef1 = aRect.TopLeft();
maRef2 = aRect.BottomRight();
break;
@@ -1540,10 +1540,10 @@ bool SdrMarkView::MarkNextObj(const Point& rPnt, short nTol, bool bPrev)
return pFndObj!=nullptr;
}
-void SdrMarkView::MarkObj(const Rectangle& rRect, bool bUnmark)
+void SdrMarkView::MarkObj(const tools::Rectangle& rRect, bool bUnmark)
{
bool bFnd=false;
- Rectangle aR(rRect);
+ tools::Rectangle aR(rRect);
SdrObjList* pObjList;
BrkAction();
SdrPageView* pPV = GetSdrPageView();
@@ -1551,11 +1551,11 @@ void SdrMarkView::MarkObj(const Rectangle& rRect, bool bUnmark)
if(pPV)
{
pObjList=pPV->GetObjList();
- Rectangle aFrm1(aR);
+ tools::Rectangle aFrm1(aR);
const size_t nObjCount = pObjList->GetObjCount();
for (size_t nO=0; nO<nObjCount; ++nO) {
SdrObject* pObj=pObjList->GetObj(nO);
- Rectangle aRect(pObj->GetCurrentBoundRect());
+ tools::Rectangle aRect(pObj->GetCurrentBoundRect());
if (aFrm1.IsInside(aRect)) {
if (!bUnmark) {
if (IsObjMarkable(pObj,pPV))
@@ -1635,7 +1635,7 @@ SdrObject* SdrMarkView::CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nT
const bool bOLE(dynamic_cast< const SdrOle2Obj* >(pObj) != nullptr);
const bool bTXT(dynamic_cast<const SdrTextObj*>( pObj) != nullptr && static_cast<SdrTextObj*>(pObj)->IsTextFrame());
SdrObject* pRet=nullptr;
- Rectangle aRect(pObj->GetCurrentBoundRect());
+ tools::Rectangle aRect(pObj->GetCurrentBoundRect());
// hack for calc grid sync
aRect += pObj->GetGridOffset();
sal_uInt16 nTol2(nTol);
@@ -1889,7 +1889,7 @@ bool SdrMarkView::PickMarkedObj(const Point& rPnt, SdrObject*& rpObj, SdrPageVie
SdrMark* pM=GetSdrMarkByIndex(nMarkNum);
SdrPageView* pPV=pM->GetPageView();
SdrObject* pObj=pM->GetMarkedSdrObj();
- Rectangle aRect(pObj->GetCurrentBoundRect());
+ tools::Rectangle aRect(pObj->GetCurrentBoundRect());
aRect.Left ()-=nTol;
aRect.Top ()-=nTol;
aRect.Right ()+=nTol;
@@ -1974,13 +1974,13 @@ void SdrMarkView::AdjustMarkHdl(SfxViewShell* pOtherShell)
SetMarkHandles(pOtherShell);
}
-Rectangle SdrMarkView::GetMarkedObjBoundRect() const
+tools::Rectangle SdrMarkView::GetMarkedObjBoundRect() const
{
- Rectangle aRect;
+ tools::Rectangle aRect;
for (size_t nm=0; nm<GetMarkedObjectCount(); ++nm) {
SdrMark* pM=GetSdrMarkByIndex(nm);
SdrObject* pO=pM->GetMarkedSdrObj();
- Rectangle aR1(pO->GetCurrentBoundRect());
+ tools::Rectangle aR1(pO->GetCurrentBoundRect());
// Ensure marked area includes the calc offset
// ( if applicable ) to sync to grid
aR1 += pO->GetGridOffset();
@@ -1996,23 +1996,23 @@ Point SdrMarkView::GetGridOffset() const
// calculate the area occupied by the union of each marked object
// ( synced to grid ) and compare to the same unsynced area to calculate
// the offset. Hopefully that's the sensible thing to do
- const Rectangle& aGroupSyncedRect = GetMarkedObjRect();
+ const tools::Rectangle& aGroupSyncedRect = GetMarkedObjRect();
aOffset = aGroupSyncedRect.TopLeft() - maMarkedObjRectNoOffset.TopLeft();
return aOffset;
}
-const Rectangle& SdrMarkView::GetMarkedObjRect() const
+const tools::Rectangle& SdrMarkView::GetMarkedObjRect() const
{
if (mbMarkedObjRectDirty) {
const_cast<SdrMarkView*>(this)->mbMarkedObjRectDirty=false;
- Rectangle aRect;
- Rectangle aRect2;
+ tools::Rectangle aRect;
+ tools::Rectangle aRect2;
for (size_t nm=0; nm<GetMarkedObjectCount(); ++nm) {
SdrMark* pM=GetSdrMarkByIndex(nm);
SdrObject* pO = pM->GetMarkedSdrObj();
if (!pO)
continue;
- Rectangle aR1(pO->GetSnapRect());
+ tools::Rectangle aR1(pO->GetSnapRect());
// apply calc offset to marked object rect
// ( necessary for handles to be displayed in
// correct position )
diff --git a/svx/source/svdraw/svdmrkv1.cxx b/svx/source/svdraw/svdmrkv1.cxx
index cd833e7e293e..8f5d5ca41359 100644
--- a/svx/source/svdraw/svdmrkv1.cxx
+++ b/svx/source/svdraw/svdmrkv1.cxx
@@ -206,7 +206,7 @@ bool SdrMarkView::MarkPoint(SdrHdl& rHdl, bool bUnmark)
return bRet;
}
-bool SdrMarkView::MarkPoints(const Rectangle* pRect, bool bUnmark)
+bool SdrMarkView::MarkPoints(const tools::Rectangle* pRect, bool bUnmark)
{
ForceUndirtyMrkPnt();
bool bChgd=false;
@@ -257,7 +257,7 @@ bool SdrMarkView::MarkNextPoint(const Point& /*rPnt*/, bool /*bPrev*/)
return false;
}
-const Rectangle& SdrMarkView::GetMarkedPointsRect() const
+const tools::Rectangle& SdrMarkView::GetMarkedPointsRect() const
{
ForceUndirtyMrkPnt();
if (mbMarkedPointsRectsDirty) ImpSetPointsRects();
@@ -280,17 +280,17 @@ void SdrMarkView::SetPlusHandlesAlwaysVisible(bool bOn)
void SdrMarkView::ImpSetPointsRects() const
{
- Rectangle aPnts;
- Rectangle aGlue;
+ tools::Rectangle aPnts;
+ tools::Rectangle aGlue;
const size_t nHdlAnz=maHdlList.GetHdlCount();
for (size_t nHdlNum=0; nHdlNum<nHdlAnz; ++nHdlNum) {
const SdrHdl* pHdl=maHdlList.GetHdl(nHdlNum);
SdrHdlKind eKind=pHdl->GetKind();
if ((eKind==SdrHdlKind::Poly && pHdl->IsSelected()) || eKind==SdrHdlKind::Glue) {
Point aPt(pHdl->GetPos());
- Rectangle& rR=eKind==SdrHdlKind::Glue ? aGlue : aPnts;
+ tools::Rectangle& rR=eKind==SdrHdlKind::Glue ? aGlue : aPnts;
if (rR.IsEmpty()) {
- rR=Rectangle(aPt,aPt);
+ rR=tools::Rectangle(aPt,aPt);
} else {
if (aPt.X()<rR.Left ()) rR.Left ()=aPt.X();
if (aPt.X()>rR.Right ()) rR.Right ()=aPt.X();
@@ -412,7 +412,7 @@ bool SdrMarkView::HasMarkedGluePoints() const
return bRet;
}
-bool SdrMarkView::MarkGluePoints(const Rectangle* pRect, bool bUnmark)
+bool SdrMarkView::MarkGluePoints(const tools::Rectangle* pRect, bool bUnmark)
{
if (!IsGluePointEditMode() && !bUnmark) return false;
ForceUndirtyMrkPnt();
@@ -561,7 +561,7 @@ bool SdrMarkView::MarkNextGluePoint(const Point& /*rPnt*/, bool /*bPrev*/)
return false;
}
-const Rectangle& SdrMarkView::GetMarkedGluePointsRect() const
+const tools::Rectangle& SdrMarkView::GetMarkedGluePointsRect() const
{
ForceUndirtyMrkPnt();
if (mbMarkedPointsRectsDirty) ImpSetPointsRects();
diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx
index f01c49107472..f0577a8b239e 100644
--- a/svx/source/svdraw/svdoashp.cxx
+++ b/svx/source/svdraw/svdoashp.cxx
@@ -562,7 +562,7 @@ double SdrObjCustomShape::GetExtraTextRotation( const bool bPreRotation ) const
return fExtraTextRotateAngle;
}
-bool SdrObjCustomShape::GetTextBounds( Rectangle& rTextBound ) const
+bool SdrObjCustomShape::GetTextBounds( tools::Rectangle& rTextBound ) const
{
bool bRet = false;
@@ -572,7 +572,7 @@ bool SdrObjCustomShape::GetTextBounds( Rectangle& rTextBound ) const
awt::Rectangle aR( xCustomShapeEngine->getTextBounds() );
if ( aR.Width > 1 && aR.Height > 1 )
{
- rTextBound = Rectangle( Point( aR.X, aR.Y ), Size( aR.Width, aR.Height ) );
+ rTextBound = tools::Rectangle( Point( aR.X, aR.Y ), Size( aR.Width, aR.Height ) );
bRet = true;
}
}
@@ -1407,7 +1407,7 @@ void SdrObjCustomShape::AdaptTextMinSize()
else
{
// recreate from CustomShape-specific TextBounds
- Rectangle aTextBound(maRect);
+ tools::Rectangle aTextBound(maRect);
if(GetTextBounds(aTextBound))
{
@@ -1427,7 +1427,7 @@ void SdrObjCustomShape::AdaptTextMinSize()
}
}
-void SdrObjCustomShape::NbcSetSnapRect( const Rectangle& rRect )
+void SdrObjCustomShape::NbcSetSnapRect( const tools::Rectangle& rRect )
{
maRect = rRect;
ImpJustifyRect(maRect);
@@ -1440,9 +1440,9 @@ void SdrObjCustomShape::NbcSetSnapRect( const Rectangle& rRect )
SetChanged();
}
-void SdrObjCustomShape::SetSnapRect( const Rectangle& rRect )
+void SdrObjCustomShape::SetSnapRect( const tools::Rectangle& rRect )
{
- Rectangle aBoundRect0;
+ tools::Rectangle aBoundRect0;
if ( pUserCall )
aBoundRect0 = GetLastBoundRect();
NbcSetSnapRect( rRect );
@@ -1450,7 +1450,7 @@ void SdrObjCustomShape::SetSnapRect( const Rectangle& rRect )
SendUserCall(SdrUserCallType::Resize,aBoundRect0);
}
-void SdrObjCustomShape::NbcSetLogicRect( const Rectangle& rRect )
+void SdrObjCustomShape::NbcSetLogicRect( const tools::Rectangle& rRect )
{
maRect = rRect;
ImpJustifyRect(maRect);
@@ -1462,9 +1462,9 @@ void SdrObjCustomShape::NbcSetLogicRect( const Rectangle& rRect )
SetChanged();
}
-void SdrObjCustomShape::SetLogicRect( const Rectangle& rRect )
+void SdrObjCustomShape::SetLogicRect( const tools::Rectangle& rRect )
{
- Rectangle aBoundRect0;
+ tools::Rectangle aBoundRect0;
if ( pUserCall )
aBoundRect0 = GetLastBoundRect();
NbcSetLogicRect(rRect);
@@ -1476,7 +1476,7 @@ void SdrObjCustomShape::Move( const Size& rSiz )
{
if ( rSiz.Width() || rSiz.Height() )
{
- Rectangle aBoundRect0;
+ tools::Rectangle aBoundRect0;
if ( pUserCall )
aBoundRect0 = GetLastBoundRect();
NbcMove(rSiz);
@@ -1510,7 +1510,7 @@ void SdrObjCustomShape::NbcMove( const Size& rSiz )
void SdrObjCustomShape::NbcResize( const Point& rRef, const Fraction& rxFact, const Fraction& ryFact )
{
// taking care of handles that should not been changed
- Rectangle aOld( maRect );
+ tools::Rectangle aOld( maRect );
std::vector< SdrCustomShapeInteraction > aInteractionHandles( GetInteractionHandles() );
SdrTextObj::NbcResize( rRef, rxFact, ryFact );
@@ -1750,7 +1750,7 @@ void SdrObjCustomShape::ImpCheckCustomGluePointsAreAdded()
if ( aGeo.nRotationAngle )
aPoly.Rotate( maRect.Center(), aGeo.nRotationAngle / 10 );
- Rectangle aBoundRect( aPoly.GetBoundRect() );
+ tools::Rectangle aBoundRect( aPoly.GetBoundRect() );
sal_Int32 nXDiff = aBoundRect.Left() - maRect.Left();
sal_Int32 nYDiff = aBoundRect.Top() - maRect.Top();
@@ -1907,13 +1907,13 @@ bool SdrObjCustomShape::beginSpecialDrag(SdrDragStat& rDrag) const
return true;
}
-void SdrObjCustomShape::DragResizeCustomShape( const Rectangle& rNewRect )
+void SdrObjCustomShape::DragResizeCustomShape( const tools::Rectangle& rNewRect )
{
- Rectangle aOld( maRect );
+ tools::Rectangle aOld( maRect );
bool bOldMirroredX( IsMirroredX() );
bool bOldMirroredY( IsMirroredY() );
- Rectangle aNewRect( rNewRect );
+ tools::Rectangle aNewRect( rNewRect );
aNewRect.Justify();
std::vector< SdrCustomShapeInteraction > aInteractionHandles( GetInteractionHandles() );
@@ -2087,7 +2087,7 @@ bool SdrObjCustomShape::applySpecialDrag(SdrDragStat& rDrag)
void SdrObjCustomShape::DragCreateObject( SdrDragStat& rStat )
{
- Rectangle aRect1;
+ tools::Rectangle aRect1;
rStat.TakeCreateRect( aRect1 );
std::vector< SdrCustomShapeInteraction > aInteractionHandles( GetInteractionHandles() );
@@ -2099,7 +2099,7 @@ void SdrObjCustomShape::DragCreateObject( SdrDragStat& rStat )
{
SetMirroredX( aRect1.Left() > aRect1.Right() );
- aRect1 = Rectangle( rStat.GetNow(), Size( nDefaultObjectSizeWidth, nDefaultObjectSizeHeight ) );
+ aRect1 = tools::Rectangle( rStat.GetNow(), Size( nDefaultObjectSizeWidth, nDefaultObjectSizeHeight ) );
// subtracting the horizontal difference of the latest handle from shape position
if ( !aInteractionHandles.empty() )
{
@@ -2200,7 +2200,7 @@ void SdrObjCustomShape::SetVerticalWriting( bool bVertical )
SdrTextVertAdjust eVert = static_cast<const SdrTextVertAdjustItem&>(rSet.Get(SDRATTR_TEXT_VERTADJUST)).GetValue();
// rescue object size
- Rectangle aObjectRect = GetSnapRect();
+ tools::Rectangle aObjectRect = GetSnapRect();
// prepare ItemSet to set exchanged width and height items
SfxItemSet aNewSet(*rSet.GetPool(),
@@ -2244,7 +2244,7 @@ void SdrObjCustomShape::SuggestTextFrameSize(Size aSuggestedTextFrameSize)
m_aSuggestedTextFrameSize = aSuggestedTextFrameSize;
}
-bool SdrObjCustomShape::AdjustTextFrameWidthAndHeight(Rectangle& rR, bool bHgt, bool bWdt) const
+bool SdrObjCustomShape::AdjustTextFrameWidthAndHeight(tools::Rectangle& rR, bool bHgt, bool bWdt) const
{
// Either we have text or the application has native text and suggested its size to us.
bool bHasText = HasText() || (m_aSuggestedTextFrameSize.Width() != 0 && m_aSuggestedTextFrameSize.Height() != 0);
@@ -2254,7 +2254,7 @@ bool SdrObjCustomShape::AdjustTextFrameWidthAndHeight(Rectangle& rR, bool bHgt,
bool bHgtGrow=bHgt && IsAutoGrowHeight();
if ( bWdtGrow || bHgtGrow )
{
- Rectangle aR0(rR);
+ tools::Rectangle aR0(rR);
long nHgt=0,nMinHgt=0,nMaxHgt=0;
long nWdt=0,nMinWdt=0,nMaxWdt=0;
Size aSiz(rR.GetSize()); aSiz.Width()--; aSiz.Height()--;
@@ -2397,16 +2397,16 @@ bool SdrObjCustomShape::AdjustTextFrameWidthAndHeight(Rectangle& rR, bool bHgt,
return false;
}
-Rectangle SdrObjCustomShape::ImpCalculateTextFrame( const bool bHgt, const bool bWdt )
+tools::Rectangle SdrObjCustomShape::ImpCalculateTextFrame( const bool bHgt, const bool bWdt )
{
- Rectangle aReturnValue;
+ tools::Rectangle aReturnValue;
- Rectangle aOldTextRect( maRect ); // <- initial text rectangle
+ tools::Rectangle aOldTextRect( maRect ); // <- initial text rectangle
- Rectangle aNewTextRect( maRect ); // <- new text rectangle returned from the custom shape renderer,
+ tools::Rectangle aNewTextRect( maRect ); // <- new text rectangle returned from the custom shape renderer,
GetTextBounds( aNewTextRect ); // it depends to the current logical shape size
- Rectangle aAdjustedTextRect( aNewTextRect ); // <- new text rectangle is being tested by AdjustTextFrameWidthAndHeight to ensure
+ tools::Rectangle aAdjustedTextRect( aNewTextRect ); // <- new text rectangle is being tested by AdjustTextFrameWidthAndHeight to ensure
if ( AdjustTextFrameWidthAndHeight( aAdjustedTextRect, bHgt, bWdt ) ) // that the new text rectangle is matching the current text size from the outliner
{
if (aAdjustedTextRect != aNewTextRect && aOldTextRect != aAdjustedTextRect &&
@@ -2430,7 +2430,7 @@ Rectangle SdrObjCustomShape::ImpCalculateTextFrame( const bool bHgt, const bool
bool SdrObjCustomShape::NbcAdjustTextFrameWidthAndHeight(bool bHgt, bool bWdt)
{
- Rectangle aNewTextRect = ImpCalculateTextFrame(bHgt, bWdt);
+ tools::Rectangle aNewTextRect = ImpCalculateTextFrame(bHgt, bWdt);
const bool bRet = !aNewTextRect.IsEmpty() && aNewTextRect != maRect;
if (bRet && !mbAdjustingTextFrameWidthAndHeight)
{
@@ -2464,11 +2464,11 @@ bool SdrObjCustomShape::NbcAdjustTextFrameWidthAndHeight(bool bHgt, bool bWdt)
bool SdrObjCustomShape::AdjustTextFrameWidthAndHeight()
{
- Rectangle aNewTextRect = ImpCalculateTextFrame( true/*bHgt*/, true/*bWdt*/ );
+ tools::Rectangle aNewTextRect = ImpCalculateTextFrame( true/*bHgt*/, true/*bWdt*/ );
bool bRet = !aNewTextRect.IsEmpty() && ( aNewTextRect != maRect );
if ( bRet )
{
- Rectangle aBoundRect0;
+ tools::Rectangle aBoundRect0;
if ( pUserCall )
aBoundRect0 = GetCurrentBoundRect();
@@ -2498,10 +2498,10 @@ bool SdrObjCustomShape::AdjustTextFrameWidthAndHeight()
}
return bRet;
}
-void SdrObjCustomShape::TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, Rectangle* pViewInit, Rectangle* pViewMin) const
+void SdrObjCustomShape::TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, tools::Rectangle* pViewInit, tools::Rectangle* pViewMin) const
{
Size aPaperMin,aPaperMax;
- Rectangle aViewInit;
+ tools::Rectangle aViewInit;
TakeTextAnchorRect( aViewInit );
if ( aGeo.nRotationAngle )
{
@@ -2593,7 +2593,7 @@ void SdrObjCustomShape::EndTextEdit( SdrOutliner& rOutl )
SdrTextObj::EndTextEdit( rOutl );
InvalidateRenderGeometry();
}
-void SdrObjCustomShape::TakeTextAnchorRect( Rectangle& rAnchorRect ) const
+void SdrObjCustomShape::TakeTextAnchorRect( tools::Rectangle& rAnchorRect ) const
{
if ( GetTextBounds( rAnchorRect ) )
{
@@ -2618,10 +2618,10 @@ void SdrObjCustomShape::TakeTextAnchorRect( Rectangle& rAnchorRect ) const
else
SdrTextObj::TakeTextAnchorRect( rAnchorRect );
}
-void SdrObjCustomShape::TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRect, bool bNoEditText,
- Rectangle* pAnchorRect, bool /*bLineWidth*/) const
+void SdrObjCustomShape::TakeTextRect( SdrOutliner& rOutliner, tools::Rectangle& rTextRect, bool bNoEditText,
+ tools::Rectangle* pAnchorRect, bool /*bLineWidth*/) const
{
- Rectangle aAnkRect; // Rect in which we anchor
+ tools::Rectangle aAnkRect; // Rect in which we anchor
TakeTextAnchorRect(aAnkRect);
SdrTextVertAdjust eVAdj=GetTextVerticalAdjust();
SdrTextHorzAdjust eHAdj=GetTextHorizontalAdjust();
@@ -2751,7 +2751,7 @@ void SdrObjCustomShape::TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRe
*pAnchorRect=aAnkRect;
// using rTextRect together with ContourFrame doesn't always work correctly
- rTextRect=Rectangle(aTextPos,aTextSiz);
+ rTextRect=tools::Rectangle(aTextPos,aTextSiz);
}
void SdrObjCustomShape::NbcSetOutlinerParaObject(OutlinerParaObject* pTextObject)
@@ -2871,7 +2871,7 @@ void SdrObjCustomShape::SetPage( SdrPage* pNewPage )
// invalidating rectangles by SetRectsDirty is not sufficient,
// AdjustTextFrameWidthAndHeight() also has to be made, both
// actions are done by NbcSetSnapRect
- Rectangle aTmp( maRect ); //creating temporary rectangle #i61108#
+ tools::Rectangle aTmp( maRect ); //creating temporary rectangle #i61108#
NbcSetSnapRect( aTmp );
}
}
@@ -2979,7 +2979,7 @@ void SdrObjCustomShape::TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix,
if( !aSize.Height() ) aSize.setHeight( 1 );
if( !aSize.Width() ) aSize.setWidth( 1 );
- Rectangle aBaseRect(aPoint, aSize);
+ tools::Rectangle aBaseRect(aPoint, aSize);
SetSnapRect(aBaseRect);
// shear?
@@ -3022,7 +3022,7 @@ bool SdrObjCustomShape::TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegf
double fShearX = (aGeo.nShearAngle / 100.0) * F_PI180;
// get aRect, this is the unrotated snaprect
- Rectangle aRectangle(maRect);
+ tools::Rectangle aRectangle(maRect);
bool bMirroredX = IsMirroredX();
bool bMirroredY = IsMirroredY();
@@ -3034,7 +3034,7 @@ bool SdrObjCustomShape::TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegf
if ( bMirroredX )
{
tools::Polygon aPol = Rect2Poly(maRect, aNewGeo);
- Rectangle aBoundRect( aPol.GetBoundRect() );
+ tools::Rectangle aBoundRect( aPol.GetBoundRect() );
Point aRef1( ( aBoundRect.Left() + aBoundRect.Right() ) >> 1, aBoundRect.Top() );
Point aRef2( aRef1.X(), aRef1.Y() + 1000 );
@@ -3056,7 +3056,7 @@ bool SdrObjCustomShape::TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegf
if ( bMirroredY )
{
tools::Polygon aPol( Rect2Poly( aRectangle, aNewGeo ) );
- Rectangle aBoundRect( aPol.GetBoundRect() );
+ tools::Rectangle aBoundRect( aPol.GetBoundRect() );
Point aRef1( aBoundRect.Left(), ( aBoundRect.Top() + aBoundRect.Bottom() ) >> 1 );
Point aRef2( aRef1.X() + 1000, aRef1.Y() );
diff --git a/svx/source/svdraw/svdoattr.cxx b/svx/source/svdraw/svdoattr.cxx
index 964bf6388d9c..1897e2194364 100644
--- a/svx/source/svdraw/svdoattr.cxx
+++ b/svx/source/svdraw/svdoattr.cxx
@@ -88,7 +88,7 @@ SdrAttrObj::~SdrAttrObj()
{
}
-const Rectangle& SdrAttrObj::GetSnapRect() const
+const tools::Rectangle& SdrAttrObj::GetSnapRect() const
{
if(bSnapRectDirty)
{
@@ -125,7 +125,7 @@ void SdrAttrObj::Notify(SfxBroadcaster& /*rBC*/, const SfxHint& rHint)
if(bDataChg)
{
- Rectangle aBoundRect = GetLastBoundRect();
+ tools::Rectangle aBoundRect = GetLastBoundRect();
SetBoundRectDirty();
SetRectsDirty(true);
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index 998158cbe68d..a275c9d2477a 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -145,7 +145,7 @@ SdrObjUserCall::~SdrObjUserCall()
{
}
-void SdrObjUserCall::Changed(const SdrObject& /*rObj*/, SdrUserCallType /*eType*/, const Rectangle& /*rOldBoundRect*/)
+void SdrObjUserCall::Changed(const SdrObject& /*rObj*/, SdrUserCallType /*eType*/, const tools::Rectangle& /*rOldBoundRect*/)
{
}
@@ -284,7 +284,7 @@ void SdrObject::ActionChanged() const
void SdrObject::SetBoundRectDirty()
{
- aOutRect = Rectangle();
+ aOutRect = tools::Rectangle();
}
@@ -826,7 +826,7 @@ void SdrObject::SetNavigationPosition (const sal_uInt32 nNewPosition)
// expensive and sometimes problematic (inside a bigger object change you will get
// non-useful BoundRects sometimes) I rename that method from GetBoundRect() to
// GetCurrentBoundRect().
-const Rectangle& SdrObject::GetCurrentBoundRect() const
+const tools::Rectangle& SdrObject::GetCurrentBoundRect() const
{
if(aOutRect.IsEmpty())
{
@@ -840,7 +840,7 @@ const Rectangle& SdrObject::GetCurrentBoundRect() const
// the first rectangle for repaints (old and new need to be used) without forcing
// a RecalcBoundRect (which may be problematical and expensive sometimes) I add here
// a new method for accessing the last BoundRect.
-const Rectangle& SdrObject::GetLastBoundRect() const
+const tools::Rectangle& SdrObject::GetLastBoundRect() const
{
return aOutRect;
}
@@ -864,7 +864,7 @@ void SdrObject::RecalcBoundRect()
if(!aRange.isEmpty())
{
- aOutRect = Rectangle(
+ aOutRect = tools::Rectangle(
static_cast<long>(floor(aRange.getMinX())),
static_cast<long>(floor(aRange.getMinY())),
static_cast<long>(ceil(aRange.getMaxX())),
@@ -1061,7 +1061,7 @@ OUString SdrObject::GetMetrStr(long nVal) const
basegfx::B2DPolyPolygon SdrObject::TakeXorPoly() const
{
basegfx::B2DPolyPolygon aRetval;
- const Rectangle aR(GetCurrentBoundRect());
+ const tools::Rectangle aR(GetCurrentBoundRect());
const basegfx::B2DRange aRange(aR.Left(), aR.Top(), aR.Right(), aR.Bottom());
aRetval.append(basegfx::tools::createPolygonFromRect(aRange));
@@ -1163,7 +1163,7 @@ sal_uInt32 SdrObject::GetHdlCount() const
SdrHdl* SdrObject::GetHdl(sal_uInt32 nHdlNum) const
{
SdrHdl* pH=nullptr;
- const Rectangle& rR=GetSnapRect();
+ const tools::Rectangle& rR=GetSnapRect();
switch (nHdlNum) {
case 0: pH=new SdrHdl(rR.TopLeft(), SdrHdlKind::UpperLeft); break;
case 1: pH=new SdrHdl(rR.TopCenter(), SdrHdlKind::Upper); break;
@@ -1204,10 +1204,10 @@ void SdrObject::addCropHandles(SdrHdlList& /*rTarget*/) const
// SdrGrafObj and SwVirtFlyDrawObj
}
-Rectangle SdrObject::ImpDragCalcRect(const SdrDragStat& rDrag) const
+tools::Rectangle SdrObject::ImpDragCalcRect(const SdrDragStat& rDrag) const
{
- Rectangle aTmpRect(GetSnapRect());
- Rectangle aRect(aTmpRect);
+ tools::Rectangle aTmpRect(GetSnapRect());
+ tools::Rectangle aRect(aTmpRect);
const SdrHdl* pHdl=rDrag.GetHdl();
SdrHdlKind eHdl=pHdl==nullptr ? SdrHdlKind::Move : pHdl->GetKind();
bool bEcke=(eHdl==SdrHdlKind::UpperLeft || eHdl==SdrHdlKind::UpperRight || eHdl==SdrHdlKind::LowerLeft || eHdl==SdrHdlKind::LowerRight);
@@ -1308,7 +1308,7 @@ bool SdrObject::beginSpecialDrag(SdrDragStat& rDrag) const
bool SdrObject::applySpecialDrag(SdrDragStat& rDrag)
{
- Rectangle aNewRect(ImpDragCalcRect(rDrag));
+ tools::Rectangle aNewRect(ImpDragCalcRect(rDrag));
if(aNewRect != GetSnapRect())
{
@@ -1334,7 +1334,7 @@ basegfx::B2DPolyPolygon SdrObject::getSpecialDragPoly(const SdrDragStat& /*rDrag
bool SdrObject::BegCreate(SdrDragStat& rStat)
{
rStat.SetOrtho4Possible();
- Rectangle aRect1(rStat.GetStart(), rStat.GetNow());
+ tools::Rectangle aRect1(rStat.GetStart(), rStat.GetNow());
aRect1.Justify();
rStat.SetActionRect(aRect1);
aOutRect = aRect1;
@@ -1369,7 +1369,7 @@ bool SdrObject::BckCreate(SdrDragStat& /*rStat*/)
basegfx::B2DPolyPolygon SdrObject::TakeCreatePoly(const SdrDragStat& rDrag) const
{
- Rectangle aRect1;
+ tools::Rectangle aRect1;
rDrag.TakeCreateRect(aRect1);
aRect1.Justify();
@@ -1416,7 +1416,7 @@ void SdrObject::NbcRotate(const Point& rRef, long nAngle, double sn, double cs)
{
SetGlueReallyAbsolute(true);
aOutRect.Move(-rRef.X(),-rRef.Y());
- Rectangle R(aOutRect);
+ tools::Rectangle R(aOutRect);
if (sn==1.0 && cs==0.0) { // 90deg
aOutRect.Left() =-R.Bottom();
aOutRect.Right() =-R.Top();
@@ -1444,7 +1444,7 @@ void SdrObject::NbcMirror(const Point& rRef1, const Point& rRef2)
{
SetGlueReallyAbsolute(true);
aOutRect.Move(-rRef1.X(),-rRef1.Y());
- Rectangle R(aOutRect);
+ tools::Rectangle R(aOutRect);
long dx=rRef2.X()-rRef1.X();
long dy=rRef2.Y()-rRef1.Y();
if (dx==0) { // vertical axis
@@ -1481,7 +1481,7 @@ void SdrObject::NbcShear(const Point& rRef, long nAngle, double tn, bool bVShear
void SdrObject::Move(const Size& rSiz)
{
if (rSiz.Width()!=0 || rSiz.Height()!=0) {
- Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
+ tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
NbcMove(rSiz);
SetChanged();
BroadcastObjectChange();
@@ -1503,7 +1503,7 @@ void SdrObject::Resize(const Point& rRef, const Fraction& xFact, const Fraction&
mpImpl->meRelativeHeightRelation = text::RelOrientation::PAGE_FRAME;
mpImpl->mnRelativeHeight.reset();
}
- Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
+ tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
NbcResize(rRef,xFact,yFact);
SetChanged();
BroadcastObjectChange();
@@ -1513,7 +1513,7 @@ void SdrObject::Resize(const Point& rRef, const Fraction& xFact, const Fraction&
void SdrObject::Crop(const Point& rRef, const Fraction& xFact, const Fraction& yFact)
{
- Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
+ tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
NbcCrop(rRef, xFact, yFact);
SetChanged();
BroadcastObjectChange();
@@ -1523,7 +1523,7 @@ void SdrObject::Crop(const Point& rRef, const Fraction& xFact, const Fraction& y
void SdrObject::Rotate(const Point& rRef, long nAngle, double sn, double cs)
{
if (nAngle!=0) {
- Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
+ tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
NbcRotate(rRef,nAngle,sn,cs);
SetChanged();
BroadcastObjectChange();
@@ -1533,7 +1533,7 @@ void SdrObject::Rotate(const Point& rRef, long nAngle, double sn, double cs)
void SdrObject::Mirror(const Point& rRef1, const Point& rRef2)
{
- Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
+ tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
NbcMirror(rRef1,rRef2);
SetChanged();
BroadcastObjectChange();
@@ -1543,7 +1543,7 @@ void SdrObject::Mirror(const Point& rRef1, const Point& rRef2)
void SdrObject::Shear(const Point& rRef, long nAngle, double tn, bool bVShear)
{
if (nAngle!=0) {
- Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
+ tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
NbcShear(rRef,nAngle,tn,bVShear);
SetChanged();
BroadcastObjectChange();
@@ -1561,7 +1561,7 @@ void SdrObject::NbcSetRelativePos(const Point& rPnt)
void SdrObject::SetRelativePos(const Point& rPnt)
{
if (rPnt!=GetRelativePos()) {
- Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
+ tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
NbcSetRelativePos(rPnt);
SetChanged();
BroadcastObjectChange();
@@ -1589,7 +1589,7 @@ void SdrObject::NbcSetAnchorPos(const Point& rPnt)
void SdrObject::SetAnchorPos(const Point& rPnt)
{
if (rPnt!=aAnchor) {
- Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
+ tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
NbcSetAnchorPos(rPnt);
SetChanged();
BroadcastObjectChange();
@@ -1606,43 +1606,43 @@ void SdrObject::RecalcSnapRect()
{
}
-const Rectangle& SdrObject::GetSnapRect() const
+const tools::Rectangle& SdrObject::GetSnapRect() const
{
return aOutRect;
}
-void SdrObject::NbcSetSnapRect(const Rectangle& rRect)
+void SdrObject::NbcSetSnapRect(const tools::Rectangle& rRect)
{
aOutRect=rRect;
}
-const Rectangle& SdrObject::GetLogicRect() const
+const tools::Rectangle& SdrObject::GetLogicRect() const
{
return GetSnapRect();
}
-void SdrObject::NbcSetLogicRect(const Rectangle& rRect)
+void SdrObject::NbcSetLogicRect(const tools::Rectangle& rRect)
{
NbcSetSnapRect(rRect);
}
-void SdrObject::AdjustToMaxRect( const Rectangle& rMaxRect, bool /* bShrinkOnly = false */ )
+void SdrObject::AdjustToMaxRect( const tools::Rectangle& rMaxRect, bool /* bShrinkOnly = false */ )
{
SetLogicRect( rMaxRect );
}
-void SdrObject::SetSnapRect(const Rectangle& rRect)
+void SdrObject::SetSnapRect(const tools::Rectangle& rRect)
{
- Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
+ tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
NbcSetSnapRect(rRect);
SetChanged();
BroadcastObjectChange();
SendUserCall(SdrUserCallType::Resize,aBoundRect0);
}
-void SdrObject::SetLogicRect(const Rectangle& rRect)
+void SdrObject::SetLogicRect(const tools::Rectangle& rRect)
{
- Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
+ tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
NbcSetLogicRect(rRect);
SetChanged();
BroadcastObjectChange();
@@ -1686,7 +1686,7 @@ Point SdrObject::GetPoint(sal_uInt32 /*i*/) const
void SdrObject::SetPoint(const Point& rPnt, sal_uInt32 i)
{
- Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
+ tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
NbcSetPoint(rPnt, i);
SetChanged();
BroadcastObjectChange();
@@ -1763,7 +1763,7 @@ void SdrObject::EndTextEdit(SdrOutliner& /*rOutl*/)
void SdrObject::SetOutlinerParaObject(OutlinerParaObject* pTextObject)
{
- Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
+ tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
NbcSetOutlinerParaObject(pTextObject);
SetChanged();
BroadcastObjectChange();
@@ -1787,7 +1787,7 @@ void SdrObject::NbcReformatText()
void SdrObject::ReformatText()
{
- Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
+ tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
NbcReformatText();
SetChanged();
BroadcastObjectChange();
@@ -1821,7 +1821,7 @@ Pointer SdrObject::GetMacroPointer(const SdrObjMacroHitRec&) const
return Pointer(PointerStyle::RefHand);
}
-void SdrObject::PaintMacro(OutputDevice& rOut, const Rectangle& , const SdrObjMacroHitRec& ) const
+void SdrObject::PaintMacro(OutputDevice& rOut, const tools::Rectangle& , const SdrObjMacroHitRec& ) const
{
const RasterOp eRop(rOut.GetRasterOp());
const basegfx::B2DPolyPolygon aPolyPolygon(TakeXorPoly());
@@ -1920,7 +1920,7 @@ SdrObjGeoData* SdrObject::GetGeoData() const
void SdrObject::SetGeoData(const SdrObjGeoData& rGeo)
{
- Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
+ tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
RestGeoData(rGeo);
SetChanged();
BroadcastObjectChange();
@@ -1987,7 +1987,7 @@ void SdrObject::SetMergedItemSetAndBroadcast(const SfxItemSet& rSet, bool bClear
void SdrObject::ApplyNotPersistAttr(const SfxItemSet& rAttr)
{
- Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
+ tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
NbcApplyNotPersistAttr(rAttr);
SetChanged();
BroadcastObjectChange();
@@ -1996,8 +1996,8 @@ void SdrObject::ApplyNotPersistAttr(const SfxItemSet& rAttr)
void SdrObject::NbcApplyNotPersistAttr(const SfxItemSet& rAttr)
{
- const Rectangle& rSnap=GetSnapRect();
- const Rectangle& rLogic=GetLogicRect();
+ const tools::Rectangle& rSnap=GetSnapRect();
+ const tools::Rectangle& rLogic=GetLogicRect();
Point aRef1(rSnap.Center());
Point aRef2(aRef1); aRef2.Y()++;
const SfxPoolItem *pPoolItem=nullptr;
@@ -2014,7 +2014,7 @@ void SdrObject::NbcApplyNotPersistAttr(const SfxItemSet& rAttr)
aRef2.Y()=static_cast<const SdrTransformRef2YItem*>(pPoolItem)->GetValue();
}
- Rectangle aNewSnap(rSnap);
+ tools::Rectangle aNewSnap(rSnap);
if (rAttr.GetItemState(SDRATTR_MOVEX,true,&pPoolItem)==SfxItemState::SET) {
long n=static_cast<const SdrMoveXItem*>(pPoolItem)->GetValue();
aNewSnap.Move(n,0);
@@ -2127,7 +2127,7 @@ void SdrObject::NbcApplyNotPersistAttr(const SfxItemSet& rAttr)
OUString aName=static_cast<const SfxStringItem*>(pPoolItem)->GetValue();
SetName(aName);
}
- Rectangle aNewLogic(rLogic);
+ tools::Rectangle aNewLogic(rLogic);
if (rAttr.GetItemState(SDRATTR_LOGICSIZEWIDTH,true,&pPoolItem)==SfxItemState::SET) {
long n=static_cast<const SdrLogicSizeWidthItem*>(pPoolItem)->GetValue();
aNewLogic.Right()=aNewLogic.Left()+n;
@@ -2160,8 +2160,8 @@ static void lcl_SetItem(SfxItemSet& rAttr, bool bMerge, const SfxPoolItem& rItem
void SdrObject::TakeNotPersistAttr(SfxItemSet& rAttr) const
{
- const Rectangle& rSnap=GetSnapRect();
- const Rectangle& rLogic=GetLogicRect();
+ const tools::Rectangle& rSnap=GetSnapRect();
+ const tools::Rectangle& rLogic=GetLogicRect();
lcl_SetItem(rAttr,false,SdrYesNoItem(SDRATTR_OBJMOVEPROTECT, IsMoveProtect()));
lcl_SetItem(rAttr,false,SdrYesNoItem(SDRATTR_OBJSIZEPROTECT, IsResizeProtect()));
lcl_SetItem(rAttr,false,SdrObjPrintableItem(IsPrintable()));
@@ -2208,7 +2208,7 @@ SfxStyleSheet* SdrObject::GetStyleSheet() const
void SdrObject::SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr)
{
- Rectangle aBoundRect0;
+ tools::Rectangle aBoundRect0;
if(pUserCall)
aBoundRect0 = GetLastBoundRect();
@@ -2239,7 +2239,7 @@ bool SdrObject::IsNode() const
SdrGluePoint SdrObject::GetVertexGluePoint(sal_uInt16 nPosNum) const
{
// #i41936# Use SnapRect for default GluePoints
- const Rectangle aR(GetSnapRect());
+ const tools::Rectangle aR(GetSnapRect());
Point aPt;
switch(nPosNum)
@@ -2259,7 +2259,7 @@ SdrGluePoint SdrObject::GetVertexGluePoint(sal_uInt16 nPosNum) const
SdrGluePoint SdrObject::GetCornerGluePoint(sal_uInt16 nPosNum) const
{
- Rectangle aR(GetCurrentBoundRect());
+ tools::Rectangle aR(GetCurrentBoundRect());
Point aPt;
switch (nPosNum) {
case 0 : aPt=aR.TopLeft(); break;
@@ -2622,7 +2622,7 @@ void SdrObject::SetInserted(bool bIns)
{
if (bIns!=IsInserted()) {
bInserted=bIns;
- Rectangle aBoundRect0(GetLastBoundRect());
+ tools::Rectangle aBoundRect0(GetLastBoundRect());
if (bIns) SendUserCall(SdrUserCallType::Inserted,aBoundRect0);
else SendUserCall(SdrUserCallType::Removed,aBoundRect0);
@@ -2731,7 +2731,7 @@ void SdrObject::SetUserCall(SdrObjUserCall* pUser)
}
-void SdrObject::SendUserCall(SdrUserCallType eUserCall, const Rectangle& rBoundRect) const
+void SdrObject::SendUserCall(SdrUserCallType eUserCall, const tools::Rectangle& rBoundRect) const
{
SdrObject* pGroup = nullptr;
@@ -2936,7 +2936,7 @@ void SdrObject::notifyShapePropertyChange( const svx::ShapeProperty _eProperty )
bool SdrObject::TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegfx::B2DPolyPolygon& /*rPolyPolygon*/) const
{
// any kind of SdrObject, just use SnapRect
- Rectangle aRectangle(GetSnapRect());
+ tools::Rectangle aRectangle(GetSnapRect());
// convert to transformation values
basegfx::B2DTuple aScale(aRectangle.GetWidth(), aRectangle.GetHeight());
@@ -3037,7 +3037,7 @@ void SdrObject::TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix, const ba
// build BaseRect
Point aPoint(FRound(aTranslate.getX()), FRound(aTranslate.getY()));
- Rectangle aBaseRect(aPoint, Size(FRound(aScale.getX()), FRound(aScale.getY())));
+ tools::Rectangle aBaseRect(aPoint, Size(FRound(aScale.getX()), FRound(aScale.getY())));
// set BaseRect
SetSnapRect(aBaseRect);
@@ -3070,7 +3070,7 @@ bool SdrObject::HasLineStyle() const
// might be resized
-void SdrObject::SetBLIPSizeRectangle( const Rectangle& aRect )
+void SdrObject::SetBLIPSizeRectangle( const tools::Rectangle& aRect )
{
maBLIPSizeRectangle = aRect;
}
@@ -3189,7 +3189,7 @@ SdrObject* SdrObjFactory::MakeNewObject(SdrInventor nInvent, sal_uInt16 nIdent,
}
SdrObject* SdrObjFactory::MakeNewObject(
- SdrInventor nInventor, sal_uInt16 nIdentifier, const Rectangle& rSnapRect, SdrPage* pPage )
+ SdrInventor nInventor, sal_uInt16 nIdentifier, const tools::Rectangle& rSnapRect, SdrPage* pPage )
{
SdrModel* pModel = pPage ? pPage->GetModel() : nullptr;
diff --git a/svx/source/svdraw/svdocapt.cxx b/svx/source/svdraw/svdocapt.cxx
index 65822737b2f6..0eb46c8bec69 100644
--- a/svx/source/svdraw/svdocapt.cxx
+++ b/svx/source/svdraw/svdocapt.cxx
@@ -91,10 +91,10 @@ public:
nLineLen =0;
bFitLineLen=true;
}
- void CalcEscPos(const Point& rTail, const Rectangle& rRect, Point& rPt, EscDir& rDir) const;
+ void CalcEscPos(const Point& rTail, const tools::Rectangle& rRect, Point& rPt, EscDir& rDir) const;
};
-void ImpCaptParams::CalcEscPos(const Point& rTailPt, const Rectangle& rRect, Point& rPt, EscDir& rDir) const
+void ImpCaptParams::CalcEscPos(const Point& rTailPt, const tools::Rectangle& rRect, Point& rPt, EscDir& rDir) const
{
Point aTl(rTailPt); // copy locally for performance reasons
long nX,nY;
@@ -199,7 +199,7 @@ SdrCaptionObj::SdrCaptionObj():
{
}
-SdrCaptionObj::SdrCaptionObj(const Rectangle& rRect, const Point& rTail):
+SdrCaptionObj::SdrCaptionObj(const tools::Rectangle& rRect, const Point& rTail):
SdrRectObj(OBJ_TEXT,rRect),
aTailPoly(3), // default size: 3 points = 2 lines
mbSpecialTextBoxShadow(false),
@@ -449,7 +449,7 @@ void SdrCaptionObj::ImpRecalcTail()
// tail end pos for SdrCaptionType::Type1. This sure was the simplest method
// to achieve this, at the cost of making a whole group of const methods
// of this object implicitly change the object's position.
-void SdrCaptionObj::ImpCalcTail1(const ImpCaptParams& rPara, tools::Polygon& rPoly, Rectangle& rRect)
+void SdrCaptionObj::ImpCalcTail1(const ImpCaptParams& rPara, tools::Polygon& rPoly, tools::Rectangle& rRect)
{
tools::Polygon aPol(2);
Point aTl(rPoly[0]);
@@ -475,7 +475,7 @@ void SdrCaptionObj::ImpCalcTail1(const ImpCaptParams& rPara, tools::Polygon& rPo
rPoly = aPol;
}
-void SdrCaptionObj::ImpCalcTail2(const ImpCaptParams& rPara, tools::Polygon& rPoly, Rectangle& rRect)
+void SdrCaptionObj::ImpCalcTail2(const ImpCaptParams& rPara, tools::Polygon& rPoly, tools::Rectangle& rRect)
{ // Gap/EscDir/EscPos/Angle
tools::Polygon aPol(2);
Point aTl(rPoly[0]);
@@ -492,7 +492,7 @@ void SdrCaptionObj::ImpCalcTail2(const ImpCaptParams& rPara, tools::Polygon& rPo
rPoly=aPol;
}
-void SdrCaptionObj::ImpCalcTail3(const ImpCaptParams& rPara, tools::Polygon& rPoly, Rectangle& rRect)
+void SdrCaptionObj::ImpCalcTail3(const ImpCaptParams& rPara, tools::Polygon& rPoly, tools::Rectangle& rRect)
{ // Gap/EscDir/EscPos/Angle/LineLen
tools::Polygon aPol(3);
Point aTl(rPoly[0]);
@@ -525,7 +525,7 @@ void SdrCaptionObj::ImpCalcTail3(const ImpCaptParams& rPara, tools::Polygon& rPo
rPoly=aPol;
}
-void SdrCaptionObj::ImpCalcTail(const ImpCaptParams& rPara, tools::Polygon& rPoly, Rectangle& rRect)
+void SdrCaptionObj::ImpCalcTail(const ImpCaptParams& rPara, tools::Polygon& rPoly, tools::Rectangle& rRect)
{
switch (rPara.eType) {
case SdrCaptionType::Type1: ImpCalcTail1(rPara,rPoly,rRect); break;
@@ -622,12 +622,12 @@ Point SdrCaptionObj::GetRelativePos() const
return aTailPoly.GetPoint(0)-aAnchor;
}
-const Rectangle& SdrCaptionObj::GetLogicRect() const
+const tools::Rectangle& SdrCaptionObj::GetLogicRect() const
{
return maRect;
}
-void SdrCaptionObj::NbcSetLogicRect(const Rectangle& rRect)
+void SdrCaptionObj::NbcSetLogicRect(const tools::Rectangle& rRect)
{
SdrRectObj::NbcSetLogicRect(rRect);
ImpRecalcTail();
@@ -641,7 +641,7 @@ const Point& SdrCaptionObj::GetTailPos() const
void SdrCaptionObj::SetTailPos(const Point& rPos)
{
if (aTailPoly.GetSize()==0 || aTailPoly[0]!=rPos) {
- Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
+ tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
NbcSetTailPos(rPos);
SetChanged();
BroadcastObjectChange();
@@ -786,7 +786,7 @@ void SdrCaptionObj::TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix, cons
// build BaseRect
Point aPoint(FRound(aTranslate.getX()), FRound(aTranslate.getY()));
- Rectangle aBaseRect(aPoint, Size(FRound(aScale.getX()), FRound(aScale.getY())));
+ tools::Rectangle aBaseRect(aPoint, Size(FRound(aScale.getX()), FRound(aScale.getY())));
// set BaseRect, but rescue TailPos over this call
const Point aTailPoint = GetTailPos();
diff --git a/svx/source/svdraw/svdocirc.cxx b/svx/source/svdraw/svdocirc.cxx
index f561e8220062..cce0f010e2b5 100644
--- a/svx/source/svdraw/svdocirc.cxx
+++ b/svx/source/svdraw/svdocirc.cxx
@@ -52,7 +52,7 @@
using namespace com::sun::star;
-Point GetAnglePnt(const Rectangle& rR, long nAngle)
+Point GetAnglePnt(const tools::Rectangle& rR, long nAngle)
{
Point aCenter(rR.Center());
long nWdt=rR.Right()-rR.Left();
@@ -113,7 +113,7 @@ SdrCircObj::SdrCircObj(SdrObjKind eNewKind)
bClosedObj=eNewKind!=OBJ_CARC;
}
-SdrCircObj::SdrCircObj(SdrObjKind eNewKind, const Rectangle& rRect):
+SdrCircObj::SdrCircObj(SdrObjKind eNewKind, const tools::Rectangle& rRect):
SdrRectObj(rRect)
{
nStartAngle=0;
@@ -122,7 +122,7 @@ SdrCircObj::SdrCircObj(SdrObjKind eNewKind, const Rectangle& rRect):
bClosedObj=eNewKind!=OBJ_CARC;
}
-SdrCircObj::SdrCircObj(SdrObjKind eNewKind, const Rectangle& rRect, long nNewStartWink, long nNewEndWink):
+SdrCircObj::SdrCircObj(SdrObjKind eNewKind, const tools::Rectangle& rRect, long nNewStartWink, long nNewEndWink):
SdrRectObj(rRect)
{
long nAngleDif=nNewEndWink-nNewStartWink;
@@ -201,7 +201,7 @@ bool SdrCircObj::PaintNeedsXPolyCirc() const
return bNeed;
}
-basegfx::B2DPolygon SdrCircObj::ImpCalcXPolyCirc(const SdrObjKind eCicrleKind, const Rectangle& rRect1, long nStart, long nEnd) const
+basegfx::B2DPolygon SdrCircObj::ImpCalcXPolyCirc(const SdrObjKind eCicrleKind, const tools::Rectangle& rRect1, long nStart, long nEnd) const
{
const basegfx::B2DRange aRange(rRect1.Left(), rRect1.Top(), rRect1.Right(), rRect1.Bottom());
basegfx::B2DPolygon aCircPolygon;
@@ -351,7 +351,7 @@ basegfx::B2DPolyPolygon SdrCircObj::TakeXorPoly() const
struct ImpCircUser : public SdrDragStatUserData
{
- Rectangle aR;
+ tools::Rectangle aR;
Point aCenter;
Point aP1;
Point aP2;
@@ -676,7 +676,7 @@ void SdrCircObj::ImpSetCreateParams(SdrDragStat& rStat)
bool SdrCircObj::BegCreate(SdrDragStat& rStat)
{
rStat.SetOrtho4Possible();
- Rectangle aRect1(rStat.GetStart(), rStat.GetNow());
+ tools::Rectangle aRect1(rStat.GetStart(), rStat.GetNow());
aRect1.Justify();
rStat.SetActionRect(aRect1);
maRect = aRect1;
@@ -945,7 +945,7 @@ void SdrCircObj::RestGeoData(const SdrObjGeoData& rGeo)
ImpSetCircInfoToAttr();
}
-void Union(Rectangle& rR, const Point& rP)
+void Union(tools::Rectangle& rR, const Point& rP)
{
if (rP.X()<rR.Left ()) rR.Left ()=rP.X();
if (rP.X()>rR.Right ()) rR.Right ()=rP.X();
@@ -953,7 +953,7 @@ void Union(Rectangle& rR, const Point& rP)
if (rP.Y()>rR.Bottom()) rR.Bottom()=rP.Y();
}
-void SdrCircObj::TakeUnrotatedSnapRect(Rectangle& rRect) const
+void SdrCircObj::TakeUnrotatedSnapRect(tools::Rectangle& rRect) const
{
rRect = maRect;
if (meCircleKind!=OBJ_CIRC) {
@@ -1015,10 +1015,10 @@ void SdrCircObj::RecalcSnapRect()
}
}
-void SdrCircObj::NbcSetSnapRect(const Rectangle& rRect)
+void SdrCircObj::NbcSetSnapRect(const tools::Rectangle& rRect)
{
if (aGeo.nRotationAngle!=0 || aGeo.nShearAngle!=0 || meCircleKind!=OBJ_CIRC) {
- Rectangle aSR0(GetSnapRect());
+ tools::Rectangle aSR0(GetSnapRect());
long nWdt0=aSR0.Right()-aSR0.Left();
long nHgt0=aSR0.Bottom()-aSR0.Top();
long nWdt1=rRect.Right()-rRect.Left();
diff --git a/svx/source/svdraw/svdoedge.cxx b/svx/source/svdraw/svdoedge.cxx
index 86a842841581..e7d04d1fe005 100644
--- a/svx/source/svdraw/svdoedge.cxx
+++ b/svx/source/svdraw/svdoedge.cxx
@@ -370,7 +370,7 @@ sal_uInt16 SdrEdgeObj::GetObjIdentifier() const
return sal_uInt16(OBJ_EDGE);
}
-const Rectangle& SdrEdgeObj::GetCurrentBoundRect() const
+const tools::Rectangle& SdrEdgeObj::GetCurrentBoundRect() const
{
if(bEdgeTrackDirty)
{
@@ -380,7 +380,7 @@ const Rectangle& SdrEdgeObj::GetCurrentBoundRect() const
return SdrTextObj::GetCurrentBoundRect();
}
-const Rectangle& SdrEdgeObj::GetSnapRect() const
+const tools::Rectangle& SdrEdgeObj::GetSnapRect() const
{
if(bEdgeTrackDirty)
{
@@ -395,7 +395,7 @@ void SdrEdgeObj::RecalcSnapRect()
maSnapRect=pEdgeTrack->GetBoundRect();
}
-void SdrEdgeObj::TakeUnrotatedSnapRect(Rectangle& rRect) const
+void SdrEdgeObj::TakeUnrotatedSnapRect(tools::Rectangle& rRect) const
{
rRect=GetSnapRect();
}
@@ -574,7 +574,7 @@ void SdrEdgeObj::ImpRecalcEdgeTrack()
mbSuppressed = false;
}
- Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetCurrentBoundRect();
+ tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetCurrentBoundRect();
SetRectsDirty();
*pEdgeTrack=ImpCalcEdgeTrack(*pEdgeTrack,aCon1,aCon2,&aEdgeInfo);
ImpSetEdgeInfoToAttr(); // copy values from aEdgeInfo into the pool
@@ -592,7 +592,7 @@ void SdrEdgeObj::ImpRecalcEdgeTrack()
SdrEscapeDirection SdrEdgeObj::ImpCalcEscAngle(SdrObject* pObj, const Point& rPt)
{
if (pObj==nullptr) return SdrEscapeDirection::ALL;
- Rectangle aR(pObj->GetSnapRect());
+ tools::Rectangle aR(pObj->GetSnapRect());
long dxl=rPt.X()-aR.Left();
long dyo=rPt.Y()-aR.Top();
long dxr=aR.Right()-rPt.X();
@@ -627,7 +627,7 @@ SdrEscapeDirection SdrEdgeObj::ImpCalcEscAngle(SdrObject* pObj, const Point& rPt
}
}
-XPolygon SdrEdgeObj::ImpCalcObjToCenter(const Point& rStPt, long nEscAngle, const Rectangle& rRect, const Point& rMeeting)
+XPolygon SdrEdgeObj::ImpCalcObjToCenter(const Point& rStPt, long nEscAngle, const tools::Rectangle& rRect, const Point& rMeeting)
{
XPolygon aXP;
aXP.Insert(XPOLY_APPEND,rStPt,PolyFlags::Normal);
@@ -691,10 +691,10 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const XPolygon& rTrack0, SdrObjConnection&
Point aPt1,aPt2;
SdrGluePoint aGP1,aGP2;
SdrEscapeDirection nEsc1=SdrEscapeDirection::ALL,nEsc2=SdrEscapeDirection::ALL;
- Rectangle aBoundRect1;
- Rectangle aBoundRect2;
- Rectangle aBewareRect1;
- Rectangle aBewareRect2;
+ tools::Rectangle aBoundRect1;
+ tools::Rectangle aBoundRect2;
+ tools::Rectangle aBewareRect1;
+ tools::Rectangle aBewareRect2;
// first, get the old corner points
if (rTrack0.GetPointCount()!=0) {
aPt1=rTrack0[0];
@@ -735,7 +735,7 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const XPolygon& rTrack0, SdrObjConnection&
aBewareRect1.Top()-=nV;
aBewareRect1.Bottom()+=nV;
} else {
- aBoundRect1=Rectangle(aPt1,aPt1);
+ aBoundRect1=tools::Rectangle(aPt1,aPt1);
aBoundRect1.Move(rCon1.aObjOfs.X(),rCon1.aObjOfs.Y());
aBewareRect1=aBoundRect1;
}
@@ -758,7 +758,7 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const XPolygon& rTrack0, SdrObjConnection&
aBewareRect2.Top()-=nV;
aBewareRect2.Bottom()+=nV;
} else {
- aBoundRect2=Rectangle(aPt2,aPt2);
+ aBoundRect2=tools::Rectangle(aPt2,aPt2);
aBoundRect2.Move(rCon2.aObjOfs.X(),rCon2.aObjOfs.Y());
aBewareRect2=aBoundRect2;
}
@@ -814,8 +814,8 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const XPolygon& rTrack0, SdrObjConnection&
return aBestXP;
}
-XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rectangle& rBoundRect1, const Rectangle& rBewareRect1,
- const Point& rPt2, long nAngle2, const Rectangle& rBoundRect2, const Rectangle& rBewareRect2,
+XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const tools::Rectangle& rBoundRect1, const tools::Rectangle& rBewareRect1,
+ const Point& rPt2, long nAngle2, const tools::Rectangle& rBoundRect2, const tools::Rectangle& rBewareRect2,
sal_uIntPtr* pnQuality, SdrEdgeInfoRec* pInfo) const
{
SdrEdgeKind eKind=static_cast<const SdrEdgeKindItem&>(GetObjectItem(SDRATTR_EDGEKIND)).GetValue();
@@ -842,10 +842,10 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec
}
Point aPt1(rPt1);
Point aPt2(rPt2);
- Rectangle aBoundRect1 (rBoundRect1 );
- Rectangle aBoundRect2 (rBoundRect2 );
- Rectangle aBewareRect1(rBewareRect1);
- Rectangle aBewareRect2(rBewareRect2);
+ tools::Rectangle aBoundRect1 (rBoundRect1 );
+ tools::Rectangle aBoundRect2 (rBoundRect2 );
+ tools::Rectangle aBewareRect1(rBewareRect1);
+ tools::Rectangle aBewareRect2(rBewareRect2);
Point aMeeting((aPt1.X()+aPt2.X()+1)/2,(aPt1.Y()+aPt2.Y()+1)/2);
if (eKind==SdrEdgeKind::OneLine) {
XPolygon aXP(2);
@@ -998,10 +998,10 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec
// normalization; be aR1 the one exiting to the right,
// be aR2 the one exiting to the left
- Rectangle aBewR1(bRts1 ? aBewareRect1 : aBewareRect2);
- Rectangle aBewR2(bRts1 ? aBewareRect2 : aBewareRect1);
- Rectangle aBndR1(bRts1 ? aBoundRect1 : aBoundRect2);
- Rectangle aBndR2(bRts1 ? aBoundRect2 : aBoundRect1);
+ tools::Rectangle aBewR1(bRts1 ? aBewareRect1 : aBewareRect2);
+ tools::Rectangle aBewR2(bRts1 ? aBewareRect2 : aBewareRect1);
+ tools::Rectangle aBndR1(bRts1 ? aBoundRect1 : aBoundRect2);
+ tools::Rectangle aBndR2(bRts1 ? aBoundRect2 : aBoundRect1);
if (aBewR1.Bottom()>aBewR2.Top() && aBewR1.Top()<aBewR2.Bottom()) {
// overlap on y axis; cases 2.1, 2.8, 2.9
if (aBewR1.Right()>aBewR2.Left()) {
@@ -1060,10 +1060,10 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec
}
}
} else if (bVer1) { // both horizontal
- Rectangle aBewR1(bUnt1 ? aBewareRect1 : aBewareRect2);
- Rectangle aBewR2(bUnt1 ? aBewareRect2 : aBewareRect1);
- Rectangle aBndR1(bUnt1 ? aBoundRect1 : aBoundRect2);
- Rectangle aBndR2(bUnt1 ? aBoundRect2 : aBoundRect1);
+ tools::Rectangle aBewR1(bUnt1 ? aBewareRect1 : aBewareRect2);
+ tools::Rectangle aBewR2(bUnt1 ? aBewareRect2 : aBewareRect1);
+ tools::Rectangle aBndR1(bUnt1 ? aBoundRect1 : aBoundRect2);
+ tools::Rectangle aBndR2(bUnt1 ? aBoundRect2 : aBoundRect1);
if (aBewR1.Right()>aBewR2.Left() && aBewR1.Left()<aBewR2.Right()) {
// overlap on y axis; cases 2.1, 2.8, 2.9
if (aBewR1.Bottom()>aBewR2.Top()) {
@@ -1171,8 +1171,8 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec
*/
// case 3.2
- Rectangle aTmpR1(aBewareRect1);
- Rectangle aTmpR2(aBewareRect2);
+ tools::Rectangle aTmpR1(aBewareRect1);
+ tools::Rectangle aTmpR2(aBewareRect2);
if (bBewareOverlap) {
// overlapping BewareRects: use BoundRects for checking for case 3.2
aTmpR1=aBoundRect1;
@@ -1590,7 +1590,7 @@ void SdrEdgeObj::Notify(SfxBroadcaster& rBC, const SfxHint& rHint)
(pSdrHint && pSdrHint->GetKind()==SdrHintKind::ObjectRemoved))
{
// broadcasting only, if on the same page
- Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetCurrentBoundRect();
+ tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetCurrentBoundRect();
ImpDirtyEdgeTrack();
// only redraw here, object hasn't actually changed
@@ -1691,7 +1691,7 @@ void SdrEdgeObj::SetEdgeTrackPath( const basegfx::B2DPolyPolygon& rPoly )
bEdgeTrackUserDefined = true;
// #i110629# also set aRect and maSnapeRect depending on pEdgeTrack
- const Rectangle aPolygonBounds(pEdgeTrack->GetBoundRect());
+ const tools::Rectangle aPolygonBounds(pEdgeTrack->GetBoundRect());
maRect = aPolygonBounds;
maSnapRect = aPolygonBounds;
}
@@ -2100,7 +2100,7 @@ bool SdrEdgeObj::ImpFindConnector(const Point& rPt, const SdrPageView& rPV, SdrO
sal_uInt16 nMarkHdSiz=rPV.GetView().GetMarkHdlSizePixel();
Size aHalfConSiz(nMarkHdSiz,nMarkHdSiz);
aHalfConSiz=pOut->PixelToLogic(aHalfConSiz);
- Rectangle aMouseRect(rPt,rPt);
+ tools::Rectangle aMouseRect(rPt,rPt);
aMouseRect.Left() -=aHalfConSiz.Width();
aMouseRect.Top() -=aHalfConSiz.Height();
aMouseRect.Right() +=aHalfConSiz.Width();
@@ -2119,7 +2119,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
pObj->IsNode())
{
- Rectangle aObjBound(pObj->GetCurrentBoundRect());
+ tools::Rectangle aObjBound(pObj->GetCurrentBoundRect());
if (aObjBound.IsOver(aMouseRect)) {
aTestCon.ResetVars();
bool bEdge=dynamic_cast<const SdrEdgeObj *>(pObj) != nullptr; // no BestCon for Edge
@@ -2194,7 +2194,7 @@ bool SdrEdgeObj::ImpFindConnector(const Point& rPt, const SdrPageView& rPV, SdrO
}
}
if (bFnd) {
- Rectangle aMouseRect2(rPt,rPt);
+ tools::Rectangle aMouseRect2(rPt,rPt);
aMouseRect.Left() -=nBoundHitTol;
aMouseRect.Top() -=nBoundHitTol;
aMouseRect.Right() +=nBoundHitTol;
@@ -2209,9 +2209,9 @@ bool SdrEdgeObj::ImpFindConnector(const Point& rPt, const SdrPageView& rPV, SdrO
return bFnd;
}
-void SdrEdgeObj::NbcSetSnapRect(const Rectangle& rRect)
+void SdrEdgeObj::NbcSetSnapRect(const tools::Rectangle& rRect)
{
- const Rectangle aOld(GetSnapRect());
+ const tools::Rectangle aOld(GetSnapRect());
if(aOld != rRect)
{
@@ -2499,7 +2499,7 @@ void SdrEdgeObj::SetTailPoint( bool bTail, const Point& rPt )
*/
void SdrEdgeObj::setGluePointIndex( bool bTail, sal_Int32 nIndex /* = -1 */ )
{
- Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetCurrentBoundRect();
+ tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetCurrentBoundRect();
SdrObjConnection& rConn1 = GetConnection( bTail );
diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx
index 526202639e90..62f73c21d8b9 100644
--- a/svx/source/svdraw/svdograf.cxx
+++ b/svx/source/svdraw/svdograf.cxx
@@ -350,7 +350,7 @@ SdrGrafObj::SdrGrafObj()
mbSupportTextIndentingOnLineWidthChange = false;
}
-SdrGrafObj::SdrGrafObj(const Graphic& rGrf, const Rectangle& rRect)
+SdrGrafObj::SdrGrafObj(const Graphic& rGrf, const tools::Rectangle& rRect)
: SdrRectObj ( rRect ),
pGraphicLink ( nullptr ),
bMirrored ( false )
@@ -878,7 +878,7 @@ basegfx::B2DPolyPolygon SdrGrafObj::TakeXorPoly() const
// take grown rectangle
const sal_Int32 nHalfLineWidth(ImpGetLineWdt() / 2);
- const Rectangle aGrownRect(
+ const tools::Rectangle aGrownRect(
maRect.Left() - nHalfLineWidth,
maRect.Top() - nHalfLineWidth,
maRect.Right() + nHalfLineWidth,
@@ -1027,7 +1027,7 @@ GDIMetaFile SdrGrafObj::getMetafileFromEmbeddedSvg() const
if(isEmbeddedSvg() && GetModel())
{
ScopedVclPtrInstance< VirtualDevice > pOut;
- const Rectangle aBoundRect(GetCurrentBoundRect());
+ const tools::Rectangle aBoundRect(GetCurrentBoundRect());
const MapMode aMap(GetModel()->GetScaleUnit(), Point(), GetModel()->GetScaleFraction(), GetModel()->GetScaleFraction());
pOut->EnableOutput(false);
@@ -1221,7 +1221,7 @@ void SdrGrafObj::ImpSetAttrToGrafInfo()
SetRectsDirty();
}
-void SdrGrafObj::AdjustToMaxRect( const Rectangle& rMaxRect, bool bShrinkOnly )
+void SdrGrafObj::AdjustToMaxRect( const tools::Rectangle& rMaxRect, bool bShrinkOnly )
{
Size aSize;
Size aMaxSize( rMaxRect.GetSize() );
@@ -1267,7 +1267,7 @@ void SdrGrafObj::AdjustToMaxRect( const Rectangle& rMaxRect, bool bShrinkOnly )
aPos.X() -= aSize.Width() / 2;
aPos.Y() -= aSize.Height() / 2;
- SetLogicRect( Rectangle( aPos, aSize ) );
+ SetLogicRect( tools::Rectangle( aPos, aSize ) );
}
}
diff --git a/svx/source/svdraw/svdogrp.cxx b/svx/source/svdraw/svdogrp.cxx
index 62a368220264..3ba147e89433 100644
--- a/svx/source/svdraw/svdogrp.cxx
+++ b/svx/source/svdraw/svdogrp.cxx
@@ -218,7 +218,7 @@ SdrObjList* SdrObjGroup::GetSubList() const
return pSub.get();
}
-const Rectangle& SdrObjGroup::GetCurrentBoundRect() const
+const tools::Rectangle& SdrObjGroup::GetCurrentBoundRect() const
{
// <aOutRect> has to contain the bounding rectangle
if ( pSub->GetObjCount()!=0 )
@@ -229,7 +229,7 @@ const Rectangle& SdrObjGroup::GetCurrentBoundRect() const
return aOutRect;
}
-const Rectangle& SdrObjGroup::GetSnapRect() const
+const tools::Rectangle& SdrObjGroup::GetSnapRect() const
{
// <aOutRect> has to contain the bounding rectangle
if ( pSub->GetObjCount()!=0 )
@@ -369,9 +369,9 @@ long SdrObjGroup::GetShearAngle(bool /*bVertical*/) const
}
-void SdrObjGroup::NbcSetSnapRect(const Rectangle& rRect)
+void SdrObjGroup::NbcSetSnapRect(const tools::Rectangle& rRect)
{
- Rectangle aOld(GetSnapRect());
+ tools::Rectangle aOld(GetSnapRect());
long nMulX=rRect.Right()-rRect.Left();
long nDivX=aOld.Right()-aOld.Left();
long nMulY=rRect.Bottom()-rRect.Top();
@@ -389,7 +389,7 @@ void SdrObjGroup::NbcSetSnapRect(const Rectangle& rRect)
}
-void SdrObjGroup::NbcSetLogicRect(const Rectangle& rRect)
+void SdrObjGroup::NbcSetLogicRect(const tools::Rectangle& rRect)
{
NbcSetSnapRect(rRect);
}
@@ -503,10 +503,10 @@ void SdrObjGroup::NbcSetAnchorPos(const Point& rPnt)
}
-void SdrObjGroup::SetSnapRect(const Rectangle& rRect)
+void SdrObjGroup::SetSnapRect(const tools::Rectangle& rRect)
{
- Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
- Rectangle aOld(GetSnapRect());
+ tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
+ tools::Rectangle aOld(GetSnapRect());
long nMulX=rRect.Right()-rRect.Left();
long nDivX=aOld.Right()-aOld.Left();
long nMulY=rRect.Bottom()-rRect.Top();
@@ -528,7 +528,7 @@ void SdrObjGroup::SetSnapRect(const Rectangle& rRect)
}
-void SdrObjGroup::SetLogicRect(const Rectangle& rRect)
+void SdrObjGroup::SetLogicRect(const tools::Rectangle& rRect)
{
SetSnapRect(rRect);
}
@@ -537,7 +537,7 @@ void SdrObjGroup::SetLogicRect(const Rectangle& rRect)
void SdrObjGroup::Move(const Size& rSiz)
{
if (rSiz.Width()!=0 || rSiz.Height()!=0) {
- Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
+ tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
MovePoint(aRefPoint,rSiz);
if (pSub->GetObjCount()!=0) {
// first move the connectors, then everything else
@@ -581,7 +581,7 @@ void SdrObjGroup::Resize(const Point& rRef, const Fraction& xFact, const Fractio
NbcMirrorGluePoints(aRef1,aRef2);
}
}
- Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
+ tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
ResizePoint(aRefPoint,rRef,xFact,yFact);
if (pSub->GetObjCount()!=0) {
// move the connectors first, everything else afterwards
@@ -611,7 +611,7 @@ void SdrObjGroup::Rotate(const Point& rRef, long nAngle, double sn, double cs)
{
if (nAngle!=0) {
SetGlueReallyAbsolute(true);
- Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
+ tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
RotatePoint(aRefPoint,rRef,sn,cs);
// move the connectors first, everything else afterwards
SdrObjList* pOL=pSub.get();
@@ -636,7 +636,7 @@ void SdrObjGroup::Rotate(const Point& rRef, long nAngle, double sn, double cs)
void SdrObjGroup::Mirror(const Point& rRef1, const Point& rRef2)
{
SetGlueReallyAbsolute(true);
- Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
+ tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
MirrorPoint(aRefPoint,rRef1,rRef2); // implementation missing in SvdEtc!
// move the connectors first, everything else afterwards
SdrObjList* pOL=pSub.get();
@@ -661,7 +661,7 @@ void SdrObjGroup::Shear(const Point& rRef, long nAngle, double tn, bool bVShear)
{
if (nAngle!=0) {
SetGlueReallyAbsolute(true);
- Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
+ tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
ShearPoint(aRefPoint,rRef,tn);
// move the connectors first, everything else afterwards
SdrObjList* pOL=pSub.get();
@@ -685,7 +685,7 @@ void SdrObjGroup::Shear(const Point& rRef, long nAngle, double tn, bool bVShear)
void SdrObjGroup::SetAnchorPos(const Point& rPnt)
{
- Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
+ tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
bool bChg=aAnchor!=rPnt;
aAnchor=rPnt;
Size aSiz(rPnt.X()-aAnchor.X(),rPnt.Y()-aAnchor.Y());
diff --git a/svx/source/svdraw/svdomeas.cxx b/svx/source/svdraw/svdomeas.cxx
index c29523910dd3..7f4654b211dd 100644
--- a/svx/source/svdraw/svdomeas.cxx
+++ b/svx/source/svdraw/svdomeas.cxx
@@ -634,7 +634,7 @@ void SdrMeasureObj::UndirtyText() const
}
}
-void SdrMeasureObj::TakeUnrotatedSnapRect(Rectangle& rRect) const
+void SdrMeasureObj::TakeUnrotatedSnapRect(tools::Rectangle& rRect) const
{
if (bTextDirty) UndirtyText();
ImpMeasureRec aRec;
@@ -719,7 +719,7 @@ void SdrMeasureObj::TakeUnrotatedSnapRect(Rectangle& rRect) const
}
RotatePoint(aTextPos,aPt1b,aMPol.nLineSin,aMPol.nLineCos);
aTextSize2.Width()++; aTextSize2.Height()++; // because of the Rect-Ctor's odd behavior
- rRect=Rectangle(aTextPos,aTextSize2);
+ rRect=tools::Rectangle(aTextPos,aTextSize2);
rRect.Justify();
const_cast<SdrMeasureObj*>(this)->maRect=rRect;
@@ -1294,20 +1294,20 @@ void SdrMeasureObj::NbcSetOutlinerParaObject(OutlinerParaObject* pTextObject)
SetTextDirty(); // recalculate text
}
-void SdrMeasureObj::TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRect, bool bNoEditText,
- Rectangle* pAnchorRect, bool bLineWidth ) const
+void SdrMeasureObj::TakeTextRect( SdrOutliner& rOutliner, tools::Rectangle& rTextRect, bool bNoEditText,
+ tools::Rectangle* pAnchorRect, bool bLineWidth ) const
{
if (bTextDirty) UndirtyText();
SdrTextObj::TakeTextRect( rOutliner, rTextRect, bNoEditText, pAnchorRect, bLineWidth );
}
-void SdrMeasureObj::TakeTextAnchorRect(Rectangle& rAnchorRect) const
+void SdrMeasureObj::TakeTextAnchorRect(tools::Rectangle& rAnchorRect) const
{
if (bTextDirty) UndirtyText();
SdrTextObj::TakeTextAnchorRect(rAnchorRect);
}
-void SdrMeasureObj::TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, Rectangle* pViewInit, Rectangle* pViewMin) const
+void SdrMeasureObj::TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, tools::Rectangle* pViewInit, tools::Rectangle* pViewMin) const
{
if (bTextDirty) UndirtyText();
SdrTextObj::TakeTextEditArea(pPaperMin,pPaperMax,pViewInit,pViewMin);
@@ -1469,7 +1469,7 @@ void SdrMeasureObj::TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix, cons
if(aNewPt1 != aPt1 || aNewPt2 != aPt2)
{
// set model values and broadcast
- Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
+ tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
aPt1 = aNewPt1;
aPt2 = aNewPt2;
diff --git a/svx/source/svdraw/svdomedia.cxx b/svx/source/svdraw/svdomedia.cxx
index 993ebd93b213..d80f5206ac17 100644
--- a/svx/source/svdraw/svdomedia.cxx
+++ b/svx/source/svdraw/svdomedia.cxx
@@ -82,7 +82,7 @@ SdrMediaObj::SdrMediaObj()
{
}
-SdrMediaObj::SdrMediaObj( const Rectangle& rRect )
+SdrMediaObj::SdrMediaObj( const tools::Rectangle& rRect )
: SdrRectObj( rRect )
, m_xImpl( new Impl )
{
@@ -182,7 +182,7 @@ const uno::Reference< graphic::XGraphic > SdrMediaObj::getSnapshot() const
return m_xImpl->m_xCachedSnapshot;
}
-void SdrMediaObj::AdjustToMaxRect( const Rectangle& rMaxRect, bool bShrinkOnly /* = false */ )
+void SdrMediaObj::AdjustToMaxRect( const tools::Rectangle& rMaxRect, bool bShrinkOnly /* = false */ )
{
Size aSize( Application::GetDefaultDevice()->PixelToLogic(
static_cast< sdr::contact::ViewContactOfSdrMediaObj& >( GetViewContact() ).getPreferredSize(),
@@ -224,7 +224,7 @@ void SdrMediaObj::AdjustToMaxRect( const Rectangle& rMaxRect, bool bShrinkOnly /
aPos.X() -= aSize.Width() / 2;
aPos.Y() -= aSize.Height() / 2;
- SetLogicRect( Rectangle( aPos, aSize ) );
+ SetLogicRect( tools::Rectangle( aPos, aSize ) );
}
}
diff --git a/svx/source/svdraw/svdoole2.cxx b/svx/source/svdraw/svdoole2.cxx
index 030cafcc8490..368417306bac 100644
--- a/svx/source/svdraw/svdoole2.cxx
+++ b/svx/source/svdraw/svdoole2.cxx
@@ -134,7 +134,7 @@ public:
void setWindow(const uno::Reference< awt::XWindow >& _xWindow);
private:
- Rectangle impl_getScaledRect_nothrow() const;
+ tools::Rectangle impl_getScaledRect_nothrow() const;
// XStateChangeListener
virtual void SAL_CALL changingState( const css::lang::EventObject& aEvent, ::sal_Int32 nOldState, ::sal_Int32 nNewState ) override;
virtual void SAL_CALL stateChanged( const css::lang::EventObject& aEvent, ::sal_Int32 nOldState, ::sal_Int32 nNewState ) override;
@@ -172,9 +172,9 @@ SdrLightEmbeddedClient_Impl::SdrLightEmbeddedClient_Impl( SdrOle2Obj* pObj )
: mpObj( pObj )
{
}
-Rectangle SdrLightEmbeddedClient_Impl::impl_getScaledRect_nothrow() const
+tools::Rectangle SdrLightEmbeddedClient_Impl::impl_getScaledRect_nothrow() const
{
- Rectangle aLogicRect( mpObj->GetLogicRect() );
+ tools::Rectangle aLogicRect( mpObj->GetLogicRect() );
// apply scaling to object area and convert to pixels
aLogicRect.SetSize( Size( Fraction( aLogicRect.GetWidth() ) * m_aScaleWidth,
Fraction( aLogicRect.GetHeight() ) * m_aScaleHeight ) );
@@ -236,7 +236,7 @@ void SAL_CALL SdrLightEmbeddedClient_Impl::notifyEvent( const document::EventObj
MapUnit aObjMapUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( mpObj->GetObjRef()->getMapUnit( mpObj->GetAspect() ) );
- Rectangle aVisArea;
+ tools::Rectangle aVisArea;
awt::Size aSz;
try
{
@@ -259,7 +259,7 @@ void SAL_CALL SdrLightEmbeddedClient_Impl::notifyEvent( const document::EventObj
aVisArea = OutputDevice::LogicToLogic( aVisArea, aObjMapUnit, aContainerMapUnit );
Size aScaledSize( static_cast< long >( m_aScaleWidth * Fraction( aVisArea.GetWidth() ) ),
static_cast< long >( m_aScaleHeight * Fraction( aVisArea.GetHeight() ) ) );
- Rectangle aLogicRect( mpObj->GetLogicRect() );
+ tools::Rectangle aLogicRect( mpObj->GetLogicRect() );
// react to the change if the difference is bigger than one pixel
Size aPixelDiff =
@@ -269,7 +269,7 @@ void SAL_CALL SdrLightEmbeddedClient_Impl::notifyEvent( const document::EventObj
aContainerMapUnit );
if( aPixelDiff.Width() || aPixelDiff.Height() )
{
- mpObj->SetLogicRect( Rectangle( aLogicRect.TopLeft(), aScaledSize ) );
+ mpObj->SetLogicRect( tools::Rectangle( aLogicRect.TopLeft(), aScaledSize ) );
mpObj->BroadcastObjectChange();
}
else
@@ -311,13 +311,13 @@ void SAL_CALL SdrLightEmbeddedClient_Impl::visibilityChanged( sal_Bool /*bVisibl
// TODO/LATER: when writer uses this implementation the code could be shared with SfxInPlaceClient_Impl
if ( mpObj )
{
- Rectangle aLogicRect( mpObj->GetLogicRect() );
+ tools::Rectangle aLogicRect( mpObj->GetLogicRect() );
Size aLogicSize( aLogicRect.GetWidth(), aLogicRect.GetHeight() );
if( mpObj->IsChart() )
{
//charts never should be stretched see #i84323# for example
- mpObj->SetLogicRect( Rectangle( aLogicRect.TopLeft(), aLogicSize ) );
+ mpObj->SetLogicRect( tools::Rectangle( aLogicRect.TopLeft(), aLogicSize ) );
mpObj->BroadcastObjectChange();
} // if( mpObj->IsChart() )
}
@@ -442,7 +442,7 @@ awt::Rectangle SAL_CALL SdrLightEmbeddedClient_Impl::getPlacement()
if ( !mpObj )
throw uno::RuntimeException();
- Rectangle aLogicRect = impl_getScaledRect_nothrow();
+ tools::Rectangle aLogicRect = impl_getScaledRect_nothrow();
MapUnit aContainerMapUnit( MapUnit::Map100thMM );
uno::Reference< embed::XVisualObject > xParentVis( mpObj->GetParentXModel(), uno::UNO_QUERY );
if ( xParentVis.is() )
@@ -475,8 +475,8 @@ void SAL_CALL SdrLightEmbeddedClient_Impl::changedPlacement( const awt::Rectangl
// check if the change is at least one pixel in size
awt::Rectangle aOldRect = getPlacement();
- Rectangle aNewPixelRect = VCLRectangle( aPosRect );
- Rectangle aOldPixelRect = VCLRectangle( aOldRect );
+ tools::Rectangle aNewPixelRect = VCLRectangle( aPosRect );
+ tools::Rectangle aOldPixelRect = VCLRectangle( aOldRect );
if ( aOldPixelRect == aNewPixelRect )
// nothing has changed
return;
@@ -487,8 +487,8 @@ void SAL_CALL SdrLightEmbeddedClient_Impl::changedPlacement( const awt::Rectangl
if ( xParentVis.is() )
aContainerMapUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( xParentVis->getMapUnit( mpObj->GetAspect() ) );
- Rectangle aNewLogicRect = Application::GetDefaultDevice()->PixelToLogic(aNewPixelRect,aContainerMapUnit);
- Rectangle aLogicRect = impl_getScaledRect_nothrow();
+ tools::Rectangle aNewLogicRect = Application::GetDefaultDevice()->PixelToLogic(aNewPixelRect,aContainerMapUnit);
+ tools::Rectangle aLogicRect = impl_getScaledRect_nothrow();
if ( aNewLogicRect != aLogicRect )
{
@@ -510,7 +510,7 @@ void SAL_CALL SdrLightEmbeddedClient_Impl::changedPlacement( const awt::Rectangl
aContainerMapUnit );
if( aPixelDiff.Width() || aPixelDiff.Height() )
{
- mpObj->SetLogicRect( Rectangle( aLogicRect.TopLeft(), aNewObjSize ) );
+ mpObj->SetLogicRect( tools::Rectangle( aLogicRect.TopLeft(), aNewObjSize ) );
mpObj->BroadcastObjectChange();
}
else
@@ -700,7 +700,7 @@ SdrOle2Obj::SdrOle2Obj( bool bFrame_ ) :
{
}
-SdrOle2Obj::SdrOle2Obj( const svt::EmbeddedObjectRef& rNewObjRef, const OUString& rNewObjName, const Rectangle& rNewRect) :
+SdrOle2Obj::SdrOle2Obj( const svt::EmbeddedObjectRef& rNewObjRef, const OUString& rNewObjName, const tools::Rectangle& rNewRect) :
SdrRectObj(rNewRect),
mpImpl(new SdrOle2ObjImpl(false/*bFrame_*/, rNewObjRef))
{
@@ -1644,7 +1644,7 @@ void SdrOle2Obj::ImpSetVisAreaSize()
catch( embed::NoVisualAreaSizeException& )
{}
- Rectangle aAcceptedVisArea;
+ tools::Rectangle aAcceptedVisArea;
aAcceptedVisArea.SetSize( Size( (long)( Fraction( long( aSz.Width ) ) * aScaleWidth ),
(long)( Fraction( long( aSz.Height ) ) * aScaleHeight ) ) );
if (aVisSize != aAcceptedVisArea.GetSize())
@@ -1680,7 +1680,7 @@ void SdrOle2Obj::ImpSetVisAreaSize()
{
if ( pClient )
{
- Rectangle aScaleRect(maRect.TopLeft(), aObjAreaSize);
+ tools::Rectangle aScaleRect(maRect.TopLeft(), aObjAreaSize);
pClient->SetObjAreaAndScale( aScaleRect, aScaleWidth, aScaleHeight);
}
else
@@ -1703,7 +1703,7 @@ void SdrOle2Obj::ImpSetVisAreaSize()
Point aBR( maRect.BottomRight() );
Point aTL2( OutputDevice::LogicToLogic( aTL, pModel->GetScaleUnit(), aMapUnit) );
Point aBR2( OutputDevice::LogicToLogic( aBR, pModel->GetScaleUnit(), aMapUnit) );
- Rectangle aNewRect( aTL2, aBR2 );
+ tools::Rectangle aNewRect( aTL2, aBR2 );
xVisualObject->setVisualAreaSize( GetAspect(), awt::Size( aNewRect.GetWidth(), aNewRect.GetHeight() ) );
}
}
@@ -1737,7 +1737,7 @@ void SdrOle2Obj::SetGeoData(const SdrObjGeoData& rGeo)
ImpSetVisAreaSize();
}
-void SdrOle2Obj::NbcSetSnapRect(const Rectangle& rRect)
+void SdrOle2Obj::NbcSetSnapRect(const tools::Rectangle& rRect)
{
SdrRectObj::NbcSetSnapRect(rRect);
@@ -1753,7 +1753,7 @@ void SdrOle2Obj::NbcSetSnapRect(const Rectangle& rRect)
}
}
-void SdrOle2Obj::NbcSetLogicRect(const Rectangle& rRect)
+void SdrOle2Obj::NbcSetLogicRect(const tools::Rectangle& rRect)
{
SdrRectObj::NbcSetLogicRect(rRect);
diff --git a/svx/source/svdraw/svdopage.cxx b/svx/source/svdraw/svdopage.cxx
index 02f2dfcbceaf..d1117caff580 100644
--- a/svx/source/svdraw/svdopage.cxx
+++ b/svx/source/svdraw/svdopage.cxx
@@ -74,7 +74,7 @@ SdrPageObj::SdrPageObj(SdrPage* pNewPage)
}
}
-SdrPageObj::SdrPageObj(const Rectangle& rRect, SdrPage* pNewPage)
+SdrPageObj::SdrPageObj(const tools::Rectangle& rRect, SdrPage* pNewPage)
: mpShownPage(pNewPage)
{
if(mpShownPage)
diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx
index 91a03fad70a3..595c004b531e 100644
--- a/svx/source/svdraw/svdopath.cxx
+++ b/svx/source/svdraw/svdopath.cxx
@@ -742,7 +742,7 @@ bool ImpPathForDragAndCreate::movePathDrag( SdrDragStat& rDrag ) const
if (bPnt1) rDrag.Now()=aNeuPos1;
if (bPnt2) rDrag.Now()=aNeuPos2;
}
- rDrag.SetActionRect(Rectangle(rDrag.GetNow(),rDrag.GetNow()));
+ rDrag.SetActionRect(tools::Rectangle(rDrag.GetNow(),rDrag.GetNow()));
// specially for IBM: Eliminate points if both adjoining lines form near 180 degrees angle anyway
if (!bControl && rDrag.GetView()!=nullptr && rDrag.GetView()->IsEliminatePolyPoints() &&
@@ -1694,11 +1694,11 @@ static bool lcl_ImpIsLine(const basegfx::B2DPolyPolygon& rPolyPolygon)
return (1L == rPolyPolygon.count() && 2L == rPolyPolygon.getB2DPolygon(0L).count());
}
-static Rectangle lcl_ImpGetBoundRect(const basegfx::B2DPolyPolygon& rPolyPolygon)
+static tools::Rectangle lcl_ImpGetBoundRect(const basegfx::B2DPolyPolygon& rPolyPolygon)
{
basegfx::B2DRange aRange(basegfx::tools::getRange(rPolyPolygon));
- return Rectangle(
+ return tools::Rectangle(
FRound(aRange.getMinX()), FRound(aRange.getMinY()),
FRound(aRange.getMaxX()), FRound(aRange.getMaxY()));
}
@@ -1720,7 +1720,7 @@ void SdrPathObj::ImpForceLineAngle()
aGeo.RecalcTan();
// for SdrTextObj, keep aRect up to date
- maRect = Rectangle(aPoint0, aPoint1);
+ maRect = tools::Rectangle(aPoint0, aPoint1);
maRect.Justify();
}
}
@@ -2415,7 +2415,7 @@ void SdrPathObj::NbcMirror(const Point& rRefPnt1, const Point& rRefPnt2)
SdrTextObj::NbcMirror(rRefPnt1,rRefPnt2);
}
-void SdrPathObj::TakeUnrotatedSnapRect(Rectangle& rRect) const
+void SdrPathObj::TakeUnrotatedSnapRect(tools::Rectangle& rRect) const
{
if(!aGeo.nRotationAngle)
{
@@ -2441,9 +2441,9 @@ void SdrPathObj::RecalcSnapRect()
}
}
-void SdrPathObj::NbcSetSnapRect(const Rectangle& rRect)
+void SdrPathObj::NbcSetSnapRect(const tools::Rectangle& rRect)
{
- Rectangle aOld(GetSnapRect());
+ tools::Rectangle aOld(GetSnapRect());
// Take RECT_EMPTY into account when calculating scale factors
long nMulX = (RECT_EMPTY == rRect.Right()) ? 0 : rRect.Right() - rRect.Left();
@@ -2810,7 +2810,7 @@ void SdrPathObj::SetPathPoly(const basegfx::B2DPolyPolygon& rPathPoly)
{
if(GetPathPoly() != rPathPoly)
{
- Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
+ tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
NbcSetPathPoly(rPathPoly);
SetChanged();
BroadcastObjectChange();
@@ -2820,7 +2820,7 @@ void SdrPathObj::SetPathPoly(const basegfx::B2DPolyPolygon& rPathPoly)
void SdrPathObj::ToggleClosed()
{
- Rectangle aBoundRect0;
+ tools::Rectangle aBoundRect0;
if(pUserCall != nullptr)
aBoundRect0 = GetLastBoundRect();
ImpSetClosed(!IsClosed()); // set new ObjKind
diff --git a/svx/source/svdraw/svdorect.cxx b/svx/source/svdraw/svdorect.cxx
index 8e07df00e16c..52b706497f8e 100644
--- a/svx/source/svdraw/svdorect.cxx
+++ b/svx/source/svdraw/svdorect.cxx
@@ -68,7 +68,7 @@ SdrRectObj::SdrRectObj()
bClosedObj=true;
}
-SdrRectObj::SdrRectObj(const Rectangle& rRect)
+SdrRectObj::SdrRectObj(const tools::Rectangle& rRect)
: SdrTextObj(rRect),
mpXPoly(nullptr)
{
@@ -85,7 +85,7 @@ SdrRectObj::SdrRectObj(SdrObjKind eNewTextKind)
bClosedObj=true;
}
-SdrRectObj::SdrRectObj(SdrObjKind eNewTextKind, const Rectangle& rRect)
+SdrRectObj::SdrRectObj(SdrObjKind eNewTextKind, const tools::Rectangle& rRect)
: SdrTextObj(eNewTextKind,rRect),
mpXPoly(nullptr)
{
@@ -119,7 +119,7 @@ void SdrRectObj::SetXPolyDirty()
mpXPoly.reset();
}
-XPolygon SdrRectObj::ImpCalcXPoly(const Rectangle& rRect1, long nRad1) const
+XPolygon SdrRectObj::ImpCalcXPoly(const tools::Rectangle& rRect1, long nRad1) const
{
XPolygon aXPoly(rRect1,nRad1,nRad1);
const sal_uInt16 nPointAnz(aXPoly.GetPointCount());
@@ -194,7 +194,7 @@ sal_uInt16 SdrRectObj::GetObjIdentifier() const
else return sal_uInt16(OBJ_RECT);
}
-void SdrRectObj::TakeUnrotatedSnapRect(Rectangle& rRect) const
+void SdrRectObj::TakeUnrotatedSnapRect(tools::Rectangle& rRect) const
{
rRect = maRect;
if (aGeo.nShearAngle!=0)
@@ -293,13 +293,13 @@ void SdrRectObj::RecalcSnapRect()
}
}
-void SdrRectObj::NbcSetSnapRect(const Rectangle& rRect)
+void SdrRectObj::NbcSetSnapRect(const tools::Rectangle& rRect)
{
SdrTextObj::NbcSetSnapRect(rRect);
SetXPolyDirty();
}
-void SdrRectObj::NbcSetLogicRect(const Rectangle& rRect)
+void SdrRectObj::NbcSetLogicRect(const tools::Rectangle& rRect)
{
SdrTextObj::NbcSetLogicRect(rRect);
SetXPolyDirty();
@@ -467,7 +467,7 @@ OUString SdrRectObj::getSpecialDragComment(const SdrDragStat& rDrag) const
basegfx::B2DPolyPolygon SdrRectObj::TakeCreatePoly(const SdrDragStat& rDrag) const
{
- Rectangle aRect1;
+ tools::Rectangle aRect1;
rDrag.TakeCreateRect(aRect1);
aRect1.Justify();
diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx
index 25b8d527ae63..abbdb1117585 100644
--- a/svx/source/svdraw/svdotext.cxx
+++ b/svx/source/svdraw/svdotext.cxx
@@ -103,7 +103,7 @@ SdrTextObj::SdrTextObj()
mbInDownScale = false;
}
-SdrTextObj::SdrTextObj(const Rectangle& rNewRect)
+SdrTextObj::SdrTextObj(const tools::Rectangle& rNewRect)
: SdrAttrObj(),
maRect(rNewRect),
mpText(nullptr),
@@ -149,7 +149,7 @@ SdrTextObj::SdrTextObj(SdrObjKind eNewTextKind)
mbSupportTextIndentingOnLineWidthChange = true;
}
-SdrTextObj::SdrTextObj(SdrObjKind eNewTextKind, const Rectangle& rNewRect)
+SdrTextObj::SdrTextObj(SdrObjKind eNewTextKind, const tools::Rectangle& rNewRect)
: SdrAttrObj(),
maRect(rNewRect),
mpText(nullptr),
@@ -204,7 +204,7 @@ void SdrTextObj::FitFrameToTextSize()
aNewSize.Width()++; // because of possible rounding errors
aNewSize.Width()+=GetTextLeftDistance()+GetTextRightDistance();
aNewSize.Height()+=GetTextUpperDistance()+GetTextLowerDistance();
- Rectangle aNewRect(maRect);
+ tools::Rectangle aNewRect(maRect);
aNewRect.SetSize(aNewSize);
ImpJustifyRect(aNewRect);
if (aNewRect!=maRect) {
@@ -229,7 +229,7 @@ void SdrTextObj::NbcSetText(const OUString& rStr)
void SdrTextObj::SetText(const OUString& rStr)
{
- Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
+ tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
NbcSetText(rStr);
SetChanged();
BroadcastObjectChange();
@@ -252,7 +252,7 @@ void SdrTextObj::NbcSetText(SvStream& rInput, const OUString& rBaseURL, sal_uInt
void SdrTextObj::SetText(SvStream& rInput, const OUString& rBaseURL, sal_uInt16 eFormat)
{
- Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
+ tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
NbcSetText(rInput,rBaseURL,eFormat);
SetChanged();
BroadcastObjectChange();
@@ -397,7 +397,7 @@ SdrTextVertAdjust SdrTextObj::GetTextVerticalAdjust(const SfxItemSet& rSet) cons
return eRet;
} // defaults: TOP for text frame, CENTER for captions of drawing objects
-void SdrTextObj::ImpJustifyRect(Rectangle& rRect)
+void SdrTextObj::ImpJustifyRect(tools::Rectangle& rRect)
{
if (!rRect.IsEmpty()) {
rRect.Justify();
@@ -581,7 +581,7 @@ void SdrTextObj::AdaptTextMinSize()
SetObjectItemSet(aSet);
}
-void SdrTextObj::ImpSetContourPolygon( SdrOutliner& rOutliner, Rectangle& rAnchorRect, bool bLineWidth ) const
+void SdrTextObj::ImpSetContourPolygon( SdrOutliner& rOutliner, tools::Rectangle& rAnchorRect, bool bLineWidth ) const
{
basegfx::B2DPolyPolygon aXorPolyPolygon(TakeXorPoly());
basegfx::B2DPolyPolygon* pContourPolyPolygon = nullptr;
@@ -639,18 +639,18 @@ void SdrTextObj::ImpSetContourPolygon( SdrOutliner& rOutliner, Rectangle& rAncho
delete pContourPolyPolygon;
}
-void SdrTextObj::TakeUnrotatedSnapRect(Rectangle& rRect) const
+void SdrTextObj::TakeUnrotatedSnapRect(tools::Rectangle& rRect) const
{
rRect=maRect;
}
-void SdrTextObj::TakeTextAnchorRect(Rectangle& rAnchorRect) const
+void SdrTextObj::TakeTextAnchorRect(tools::Rectangle& rAnchorRect) const
{
long nLeftDist=GetTextLeftDistance();
long nRightDist=GetTextRightDistance();
long nUpperDist=GetTextUpperDistance();
long nLowerDist=GetTextLowerDistance();
- Rectangle aAnkRect(maRect); // the rectangle in which we anchor
+ tools::Rectangle aAnkRect(maRect); // the rectangle in which we anchor
bool bFrame=IsTextFrame();
if (!bFrame) {
TakeUnrotatedSnapRect(aAnkRect);
@@ -679,10 +679,10 @@ void SdrTextObj::TakeTextAnchorRect(Rectangle& rAnchorRect) const
rAnchorRect=aAnkRect;
}
-void SdrTextObj::TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRect, bool bNoEditText,
- Rectangle* pAnchorRect, bool bLineWidth ) const
+void SdrTextObj::TakeTextRect( SdrOutliner& rOutliner, tools::Rectangle& rTextRect, bool bNoEditText,
+ tools::Rectangle* pAnchorRect, bool bLineWidth ) const
{
- Rectangle aAnkRect; // the rectangle in which we anchor
+ tools::Rectangle aAnkRect; // the rectangle in which we anchor
TakeTextAnchorRect(aAnkRect);
SdrTextVertAdjust eVAdj=GetTextVerticalAdjust();
SdrTextHorzAdjust eHAdj=GetTextHorizontalAdjust();
@@ -846,7 +846,7 @@ void SdrTextObj::TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRect, boo
*pAnchorRect=aAnkRect;
// rTextRect might not be correct in some cases at ContourFrame
- rTextRect=Rectangle(aTextPos,aTextSiz);
+ rTextRect=tools::Rectangle(aTextPos,aTextSiz);
if (bContourFrame)
rTextRect=aAnkRect;
}
@@ -1126,8 +1126,8 @@ basegfx::B2DPolyPolygon SdrTextObj::TakeContour() const
// in every case
SdrOutliner& rOutliner=ImpGetDrawOutliner();
- Rectangle aAnchor2;
- Rectangle aR;
+ tools::Rectangle aAnchor2;
+ tools::Rectangle aR;
TakeTextRect(rOutliner,aR,false,&aAnchor2);
rOutliner.Clear();
bool bFitToSize(IsFitToSize());
@@ -1233,9 +1233,9 @@ SdrOutliner& SdrTextObj::ImpGetDrawOutliner() const
// Extracted from Paint()
void SdrTextObj::ImpSetupDrawOutlinerForPaint( bool bContourFrame,
SdrOutliner& rOutliner,
- Rectangle& rTextRect,
- Rectangle& rAnchorRect,
- Rectangle& rPaintRect,
+ tools::Rectangle& rTextRect,
+ tools::Rectangle& rAnchorRect,
+ tools::Rectangle& rPaintRect,
Fraction& rFitXKorreg ) const
{
if (!bContourFrame)
@@ -1337,16 +1337,16 @@ void SdrTextObj::ImpAutoFitText( SdrOutliner& rOutliner, const Size& rTextSize,
std::min(sal_uInt16(100),nMinStretchY));
}
-void SdrTextObj::SetupOutlinerFormatting( SdrOutliner& rOutl, Rectangle& rPaintRect ) const
+void SdrTextObj::SetupOutlinerFormatting( SdrOutliner& rOutl, tools::Rectangle& rPaintRect ) const
{
ImpInitDrawOutliner( rOutl );
UpdateOutlinerFormatting( rOutl, rPaintRect );
}
-void SdrTextObj::UpdateOutlinerFormatting( SdrOutliner& rOutl, Rectangle& rPaintRect ) const
+void SdrTextObj::UpdateOutlinerFormatting( SdrOutliner& rOutl, tools::Rectangle& rPaintRect ) const
{
- Rectangle aTextRect;
- Rectangle aAnchorRect;
+ tools::Rectangle aTextRect;
+ tools::Rectangle aAnchorRect;
Fraction aFitXKorreg(1,1);
bool bContourFrame=IsContourTextFrame();
@@ -1441,7 +1441,7 @@ void SdrTextObj::ReformatText()
{
if(GetOutlinerParaObject())
{
- Rectangle aBoundRect0;
+ tools::Rectangle aBoundRect0;
if (pUserCall!=nullptr)
aBoundRect0=GetLastBoundRect();
@@ -1484,7 +1484,7 @@ SdrFitToSizeType SdrTextObj::GetFitToSize() const
return eType;
}
-const Rectangle& SdrTextObj::GetGeoRect() const
+const tools::Rectangle& SdrTextObj::GetGeoRect() const
{
return maRect;
}
@@ -1549,7 +1549,7 @@ void SdrTextObj::SetVerticalWriting(bool bVertical)
SdrTextVertAdjust eVert = static_cast<const SdrTextVertAdjustItem&>(rSet.Get(SDRATTR_TEXT_VERTADJUST)).GetValue();
// rescue object size
- Rectangle aObjectRect = GetSnapRect();
+ tools::Rectangle aObjectRect = GetSnapRect();
// prepare ItemSet to set exchanged width and height items
SfxItemSet aNewSet(*rSet.GetPool(),
@@ -1609,7 +1609,7 @@ bool SdrTextObj::TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegfx::B2DP
double fShearX = (aGeo.nShearAngle / 100.0) * F_PI180;
// get aRect, this is the unrotated snaprect
- Rectangle aRectangle(maRect);
+ tools::Rectangle aRectangle(maRect);
// fill other values
basegfx::B2DTuple aScale(aRectangle.GetWidth(), aRectangle.GetHeight());
@@ -1726,7 +1726,7 @@ void SdrTextObj::TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix, const b
// build and set BaseRect (use scale)
Point aPoint = Point();
Size aSize(FRound(aScale.getX()), FRound(aScale.getY()));
- Rectangle aBaseRect(aPoint, aSize);
+ tools::Rectangle aBaseRect(aPoint, aSize);
SetSnapRect(aBaseRect);
// flip?
@@ -1851,13 +1851,13 @@ SdrTextAniDirection SdrTextObj::GetTextAniDirection() const
// Get necessary data for text scroll animation. ATM base it on a Text-Metafile and a
// painting rectangle. Rotation is excluded from the returned values.
GDIMetaFile* SdrTextObj::GetTextScrollMetaFileAndRectangle(
- Rectangle& rScrollRectangle, Rectangle& rPaintRectangle)
+ tools::Rectangle& rScrollRectangle, tools::Rectangle& rPaintRectangle)
{
GDIMetaFile* pRetval = nullptr;
SdrOutliner& rOutliner = ImpGetDrawOutliner();
- Rectangle aTextRect;
- Rectangle aAnchorRect;
- Rectangle aPaintRect;
+ tools::Rectangle aTextRect;
+ tools::Rectangle aAnchorRect;
+ tools::Rectangle aPaintRect;
Fraction aFitXKorreg(1,1);
bool bContourFrame(IsContourTextFrame());
@@ -1868,7 +1868,7 @@ GDIMetaFile* SdrTextObj::GetTextScrollMetaFileAndRectangle(
ImpSetupDrawOutlinerForPaint( bContourFrame, rOutliner, aTextRect, aAnchorRect, aPaintRect, aFitXKorreg );
aGeo.nRotationAngle = nAngle;
- Rectangle aScrollFrameRect(aPaintRect);
+ tools::Rectangle aScrollFrameRect(aPaintRect);
const SfxItemSet& rSet = GetObjectItemSet();
SdrTextAniDirection eDirection = static_cast<const SdrTextAniDirectionItem&>(rSet.Get(SDRATTR_TEXT_ANIDIRECTION)).GetValue();
diff --git a/svx/source/svdraw/svdotxat.cxx b/svx/source/svdraw/svdotxat.cxx
index 8c6b575df6c4..cf29c117594b 100644
--- a/svx/source/svdraw/svdotxat.cxx
+++ b/svx/source/svdraw/svdotxat.cxx
@@ -56,7 +56,7 @@ const short PADDING_LENGTH_FOR_STYLE_FAMILY = 5;
const sal_Char PADDING_CHARACTER_FOR_STYLE_FAMILY = ' ';
}
-bool SdrTextObj::AdjustTextFrameWidthAndHeight( Rectangle& rR, bool bHgt, bool bWdt ) const
+bool SdrTextObj::AdjustTextFrameWidthAndHeight( tools::Rectangle& rR, bool bHgt, bool bWdt ) const
{
if (!bTextFrame)
// Not a text frame. Bail out.
@@ -87,7 +87,7 @@ bool SdrTextObj::AdjustTextFrameWidthAndHeight( Rectangle& rR, bool bHgt, bool b
bool bHScroll = bScroll && (eAniDir == SdrTextAniDirection::Left || eAniDir == SdrTextAniDirection::Right);
bool bVScroll = bScroll && (eAniDir == SdrTextAniDirection::Up || eAniDir == SdrTextAniDirection::Down);
- Rectangle aOldRect = rR;
+ tools::Rectangle aOldRect = rR;
long nHgt = 0, nMinHgt = 0, nMaxHgt = 0;
long nWdt = 0, nMinWdt = 0, nMaxWdt = 0;
@@ -275,10 +275,10 @@ bool SdrTextObj::NbcAdjustTextFrameWidthAndHeight(bool bHgt, bool bWdt)
bool SdrTextObj::AdjustTextFrameWidthAndHeight()
{
- Rectangle aNeuRect(maRect);
+ tools::Rectangle aNeuRect(maRect);
bool bRet=AdjustTextFrameWidthAndHeight(aNeuRect);
if (bRet) {
- Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
+ tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
maRect = aNeuRect;
SetRectsDirty();
if (dynamic_cast<const SdrRectObj *>(this) != nullptr) { // this is a hack
diff --git a/svx/source/svdraw/svdotxdr.cxx b/svx/source/svdraw/svdotxdr.cxx
index 93b0fad4aac1..4c020a82bfdf 100644
--- a/svx/source/svdraw/svdotxdr.cxx
+++ b/svx/source/svdraw/svdotxdr.cxx
@@ -68,9 +68,9 @@ bool SdrTextObj::hasSpecialDrag() const
return true;
}
-Rectangle SdrTextObj::ImpDragCalcRect(const SdrDragStat& rDrag) const
+tools::Rectangle SdrTextObj::ImpDragCalcRect(const SdrDragStat& rDrag) const
{
- Rectangle aTmpRect(maRect);
+ tools::Rectangle aTmpRect(maRect);
const SdrHdl* pHdl=rDrag.GetHdl();
SdrHdlKind eHdl=pHdl==nullptr ? SdrHdlKind::Move : pHdl->GetKind();
bool bEcke=(eHdl==SdrHdlKind::UpperLeft || eHdl==SdrHdlKind::UpperRight || eHdl==SdrHdlKind::LowerLeft || eHdl==SdrHdlKind::LowerRight);
@@ -147,7 +147,7 @@ Rectangle SdrTextObj::ImpDragCalcRect(const SdrDragStat& rDrag) const
bool SdrTextObj::applySpecialDrag(SdrDragStat& rDrag)
{
- Rectangle aNewRect(ImpDragCalcRect(rDrag));
+ tools::Rectangle aNewRect(ImpDragCalcRect(rDrag));
if(aNewRect.TopLeft() != maRect.TopLeft() && (aGeo.nRotationAngle || aGeo.nShearAngle))
{
@@ -183,7 +183,7 @@ OUString SdrTextObj::getSpecialDragComment(const SdrDragStat& /*rDrag*/) const
bool SdrTextObj::BegCreate(SdrDragStat& rStat)
{
rStat.SetOrtho4Possible();
- Rectangle aRect1(rStat.GetStart(), rStat.GetNow());
+ tools::Rectangle aRect1(rStat.GetStart(), rStat.GetNow());
aRect1.Justify();
rStat.SetActionRect(aRect1);
maRect = aRect1;
@@ -192,7 +192,7 @@ bool SdrTextObj::BegCreate(SdrDragStat& rStat)
bool SdrTextObj::MovCreate(SdrDragStat& rStat)
{
- Rectangle aRect1;
+ tools::Rectangle aRect1;
rStat.TakeCreateRect(aRect1);
ImpJustifyRect(aRect1);
rStat.SetActionRect(aRect1);
@@ -230,7 +230,7 @@ bool SdrTextObj::BckCreate(SdrDragStat& /*rStat*/)
basegfx::B2DPolyPolygon SdrTextObj::TakeCreatePoly(const SdrDragStat& rDrag) const
{
- Rectangle aRect1;
+ tools::Rectangle aRect1;
rDrag.TakeCreateRect(aRect1);
aRect1.Justify();
diff --git a/svx/source/svdraw/svdotxed.cxx b/svx/source/svdraw/svdotxed.cxx
index 5368dc0c0e17..35b34a36c1de 100644
--- a/svx/source/svdraw/svdotxed.cxx
+++ b/svx/source/svdraw/svdotxed.cxx
@@ -102,8 +102,8 @@ bool SdrTextObj::BegTextEdit(SdrOutliner& rOutl)
}
if (bFitToSize)
{
- Rectangle aAnchorRect;
- Rectangle aTextRect;
+ tools::Rectangle aAnchorRect;
+ tools::Rectangle aTextRect;
TakeTextRect(rOutl, aTextRect, false,
&aAnchorRect);
Fraction aFitXKorreg(1,1);
@@ -134,7 +134,7 @@ void ImpUpdateOutlParamsForOverflow(SdrOutliner *pOutl, SdrTextObj *pTextObj)
// Code from ImpSetTextEditParams
Size aPaperMin;
Size aPaperMax;
- Rectangle aEditArea;
+ tools::Rectangle aEditArea;
pTextObj->TakeTextEditArea(&aPaperMin,&aPaperMax,&aEditArea,nullptr);
pOutl->SetMinAutoPaperSize(aPaperMin);
@@ -142,11 +142,11 @@ void ImpUpdateOutlParamsForOverflow(SdrOutliner *pOutl, SdrTextObj *pTextObj)
pOutl->SetPaperSize(Size());
}
-void SdrTextObj::TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, Rectangle* pViewInit, Rectangle* pViewMin) const
+void SdrTextObj::TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, tools::Rectangle* pViewInit, tools::Rectangle* pViewMin) const
{
bool bFitToSize(IsFitToSize());
Size aPaperMin,aPaperMax;
- Rectangle aViewInit;
+ tools::Rectangle aViewInit;
TakeTextAnchorRect(aViewInit);
if (aGeo.nRotationAngle!=0) {
Point aCenter(aViewInit.Center());
@@ -383,14 +383,14 @@ void SdrTextObj::ImpSetTextEditParams() const
if (bUpdMerk) pEdtOutl->SetUpdateMode(false);
Size aPaperMin;
Size aPaperMax;
- Rectangle aEditArea;
+ tools::Rectangle aEditArea;
TakeTextEditArea(&aPaperMin,&aPaperMax,&aEditArea,nullptr);
bool bContourFrame=IsContourTextFrame();
pEdtOutl->SetMinAutoPaperSize(aPaperMin);
pEdtOutl->SetMaxAutoPaperSize(aPaperMax);
pEdtOutl->SetPaperSize(Size());
if (bContourFrame) {
- Rectangle aAnchorRect;
+ tools::Rectangle aAnchorRect;
TakeTextAnchorRect(aAnchorRect);
ImpSetContourPolygon(*pEdtOutl,aAnchorRect, true);
}
diff --git a/svx/source/svdraw/svdotxtr.cxx b/svx/source/svdraw/svdotxtr.cxx
index 01c5a79225a9..995e4cd0469f 100644
--- a/svx/source/svdraw/svdotxtr.cxx
+++ b/svx/source/svdraw/svdotxtr.cxx
@@ -40,12 +40,12 @@
using namespace com::sun::star;
-void SdrTextObj::NbcSetSnapRect(const Rectangle& rRect)
+void SdrTextObj::NbcSetSnapRect(const tools::Rectangle& rRect)
{
if (aGeo.nRotationAngle!=0 || aGeo.nShearAngle!=0)
{
// Either the rotation or shear angle exists.
- Rectangle aSR0(GetSnapRect());
+ tools::Rectangle aSR0(GetSnapRect());
long nWdt0=aSR0.Right()-aSR0.Left();
long nHgt0=aSR0.Bottom()-aSR0.Top();
long nWdt1=rRect.Right()-rRect.Left();
@@ -67,12 +67,12 @@ void SdrTextObj::NbcSetSnapRect(const Rectangle& rRect)
}
}
-const Rectangle& SdrTextObj::GetLogicRect() const
+const tools::Rectangle& SdrTextObj::GetLogicRect() const
{
return maRect;
}
-void SdrTextObj::NbcSetLogicRect(const Rectangle& rRect)
+void SdrTextObj::NbcSetLogicRect(const tools::Rectangle& rRect)
{
maRect = rRect;
ImpJustifyRect(maRect);
diff --git a/svx/source/svdraw/svdovirt.cxx b/svx/source/svdraw/svdovirt.cxx
index f277a14adca8..00ee676799b3 100644
--- a/svx/source/svdraw/svdovirt.cxx
+++ b/svx/source/svdraw/svdovirt.cxx
@@ -108,14 +108,14 @@ SdrObjList* SdrVirtObj::GetSubList() const
return rRefObj.GetSubList();
}
-const Rectangle& SdrVirtObj::GetCurrentBoundRect() const
+const tools::Rectangle& SdrVirtObj::GetCurrentBoundRect() const
{
const_cast<SdrVirtObj*>(this)->aOutRect=rRefObj.GetCurrentBoundRect(); // TODO: Optimize this.
const_cast<SdrVirtObj*>(this)->aOutRect+=aAnchor;
return aOutRect;
}
-const Rectangle& SdrVirtObj::GetLastBoundRect() const
+const tools::Rectangle& SdrVirtObj::GetLastBoundRect() const
{
const_cast<SdrVirtObj*>(this)->aOutRect=rRefObj.GetLastBoundRect(); // TODO: Optimize this.
const_cast<SdrVirtObj*>(this)->aOutRect+=aAnchor;
@@ -368,7 +368,7 @@ void SdrVirtObj::NbcShear(const Point& rRef, long nAngle, double tn, bool bVShea
void SdrVirtObj::Move(const Size& rSiz)
{
if (rSiz.Width()!=0 || rSiz.Height()!=0) {
- Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
+ tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
NbcMove(rSiz);
SetChanged();
BroadcastObjectChange();
@@ -379,7 +379,7 @@ void SdrVirtObj::Move(const Size& rSiz)
void SdrVirtObj::Resize(const Point& rRef, const Fraction& xFact, const Fraction& yFact, bool bUnsetRelative)
{
if (xFact.GetNumerator()!=xFact.GetDenominator() || yFact.GetNumerator()!=yFact.GetDenominator()) {
- Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
+ tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
rRefObj.Resize(rRef-aAnchor,xFact,yFact, bUnsetRelative);
SetRectsDirty();
SendUserCall(SdrUserCallType::Resize,aBoundRect0);
@@ -389,7 +389,7 @@ void SdrVirtObj::Resize(const Point& rRef, const Fraction& xFact, const Fraction
void SdrVirtObj::Rotate(const Point& rRef, long nAngle, double sn, double cs)
{
if (nAngle!=0) {
- Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
+ tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
rRefObj.Rotate(rRef-aAnchor,nAngle,sn,cs);
SetRectsDirty();
SendUserCall(SdrUserCallType::Resize,aBoundRect0);
@@ -398,7 +398,7 @@ void SdrVirtObj::Rotate(const Point& rRef, long nAngle, double sn, double cs)
void SdrVirtObj::Mirror(const Point& rRef1, const Point& rRef2)
{
- Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
+ tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
rRefObj.Mirror(rRef1-aAnchor,rRef2-aAnchor);
SetRectsDirty();
SendUserCall(SdrUserCallType::Resize,aBoundRect0);
@@ -407,7 +407,7 @@ void SdrVirtObj::Mirror(const Point& rRef1, const Point& rRef2)
void SdrVirtObj::Shear(const Point& rRef, long nAngle, double tn, bool bVShear)
{
if (nAngle!=0) {
- Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
+ tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
rRefObj.Shear(rRef-aAnchor,nAngle,tn,bVShear);
SetRectsDirty();
SendUserCall(SdrUserCallType::Resize,aBoundRect0);
@@ -421,18 +421,18 @@ void SdrVirtObj::RecalcSnapRect()
aSnapRect+=aAnchor;
}
-const Rectangle& SdrVirtObj::GetSnapRect() const
+const tools::Rectangle& SdrVirtObj::GetSnapRect() const
{
const_cast<SdrVirtObj*>(this)->aSnapRect=rRefObj.GetSnapRect();
const_cast<SdrVirtObj*>(this)->aSnapRect+=aAnchor;
return aSnapRect;
}
-void SdrVirtObj::SetSnapRect(const Rectangle& rRect)
+void SdrVirtObj::SetSnapRect(const tools::Rectangle& rRect)
{
{
- Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
- Rectangle aR(rRect);
+ tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
+ tools::Rectangle aR(rRect);
aR-=aAnchor;
rRefObj.SetSnapRect(aR);
SetRectsDirty();
@@ -440,35 +440,35 @@ void SdrVirtObj::SetSnapRect(const Rectangle& rRect)
}
}
-void SdrVirtObj::NbcSetSnapRect(const Rectangle& rRect)
+void SdrVirtObj::NbcSetSnapRect(const tools::Rectangle& rRect)
{
- Rectangle aR(rRect);
+ tools::Rectangle aR(rRect);
aR-=aAnchor;
SetRectsDirty();
rRefObj.NbcSetSnapRect(aR);
}
-const Rectangle& SdrVirtObj::GetLogicRect() const
+const tools::Rectangle& SdrVirtObj::GetLogicRect() const
{
const_cast<SdrVirtObj*>(this)->aSnapRect=rRefObj.GetLogicRect(); // An abuse of aSnapRect!
const_cast<SdrVirtObj*>(this)->aSnapRect+=aAnchor; // If there's trouble, we need another Rectangle Member (or a Heap).
return aSnapRect;
}
-void SdrVirtObj::SetLogicRect(const Rectangle& rRect)
+void SdrVirtObj::SetLogicRect(const tools::Rectangle& rRect)
{
- Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
- Rectangle aR(rRect);
+ tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
+ tools::Rectangle aR(rRect);
aR-=aAnchor;
rRefObj.SetLogicRect(aR);
SetRectsDirty();
SendUserCall(SdrUserCallType::Resize,aBoundRect0);
}
-void SdrVirtObj::NbcSetLogicRect(const Rectangle& rRect)
+void SdrVirtObj::NbcSetLogicRect(const tools::Rectangle& rRect)
{
- Rectangle aR(rRect);
+ tools::Rectangle aR(rRect);
aR-=aAnchor;
SetRectsDirty();
rRefObj.NbcSetLogicRect(aR);
@@ -546,7 +546,7 @@ SdrObjGeoData* SdrVirtObj::GetGeoData() const
void SdrVirtObj::SetGeoData(const SdrObjGeoData& rGeo)
{
- Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
+ tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
rRefObj.SetGeoData(rGeo);
SetRectsDirty();
SendUserCall(SdrUserCallType::Resize,aBoundRect0);
@@ -579,7 +579,7 @@ Pointer SdrVirtObj::GetMacroPointer(const SdrObjMacroHitRec& rRec) const
return rRefObj.GetMacroPointer(rRec); // TODO: positioning offset
}
-void SdrVirtObj::PaintMacro(OutputDevice& rOut, const Rectangle& rDirtyRect, const SdrObjMacroHitRec& rRec) const
+void SdrVirtObj::PaintMacro(OutputDevice& rOut, const tools::Rectangle& rDirtyRect, const SdrObjMacroHitRec& rRec) const
{
rRefObj.PaintMacro(rOut,rDirtyRect,rRec); // TODO: positioning offset
}
diff --git a/svx/source/svdraw/svdpage.cxx b/svx/source/svdraw/svdpage.cxx
index 3e48ddc21cac..6a287d67eedb 100644
--- a/svx/source/svdraw/svdpage.cxx
+++ b/svx/source/svdraw/svdpage.cxx
@@ -294,7 +294,7 @@ void SdrObjList::RecalcObjOrdNums()
void SdrObjList::RecalcRects()
{
- aOutRect=Rectangle();
+ aOutRect=tools::Rectangle();
aSnapRect=aOutRect;
const size_t nCount = GetObjCount();
for (size_t i=0; i<nCount; ++i) {
@@ -592,7 +592,7 @@ SdrObject* SdrObjList::SetObjectOrdNum(size_t nOldObjNum, size_t nNewObjNum)
return pObj;
}
-const Rectangle& SdrObjList::GetAllObjSnapRect() const
+const tools::Rectangle& SdrObjList::GetAllObjSnapRect() const
{
if (bRectsDirty) {
const_cast<SdrObjList*>(this)->RecalcRects();
@@ -601,7 +601,7 @@ const Rectangle& SdrObjList::GetAllObjSnapRect() const
return aSnapRect;
}
-const Rectangle& SdrObjList::GetAllObjBoundRect() const
+const tools::Rectangle& SdrObjList::GetAllObjBoundRect() const
{
// #i106183# for deep group hierarchies like in chart2, the invalidates
// through the hierarchy are not correct; use a 2nd hint for the needed
@@ -1615,7 +1615,7 @@ void SdrPage::TRG_ImpMasterPageRemoved(const SdrPage& rRemovedPage)
}
}
-const SdrPageGridFrameList* SdrPage::GetGridFrameList(const SdrPageView* /*pPV*/, const Rectangle* /*pRect*/) const
+const SdrPageGridFrameList* SdrPage::GetGridFrameList(const SdrPageView* /*pPV*/, const tools::Rectangle* /*pRect*/) const
{
return nullptr;
}
diff --git a/svx/source/svdraw/svdpagv.cxx b/svx/source/svdraw/svdpagv.cxx
index 544bf48ca788..c3f35eb16f94 100644
--- a/svx/source/svdraw/svdpagv.cxx
+++ b/svx/source/svdraw/svdpagv.cxx
@@ -237,17 +237,17 @@ void SdrPageView::Hide()
}
}
-Rectangle SdrPageView::GetPageRect() const
+tools::Rectangle SdrPageView::GetPageRect() const
{
- if (GetPage()==nullptr) return Rectangle();
- return Rectangle(Point(),Size(GetPage()->GetWdt()+1,GetPage()->GetHgt()+1));
+ if (GetPage()==nullptr) return tools::Rectangle();
+ return tools::Rectangle(Point(),Size(GetPage()->GetWdt()+1,GetPage()->GetHgt()+1));
}
void SdrPageView::InvalidateAllWin()
{
if(IsVisible() && GetPage())
{
- Rectangle aRect(Point(0,0),Size(GetPage()->GetWdt()+1,GetPage()->GetHgt()+1));
+ tools::Rectangle aRect(Point(0,0),Size(GetPage()->GetWdt()+1,GetPage()->GetHgt()+1));
aRect.Union(GetPage()->GetAllObjBoundRect());
GetView().InvalidateAllWin(aRect);
}
@@ -308,7 +308,7 @@ void SdrPageView::setPreparedPageWindow(SdrPageWindow* pKnownTarget)
void SdrPageView::DrawLayer(SdrLayerID nID, OutputDevice* pGivenTarget,
sdr::contact::ViewObjectContactRedirector* pRedirector,
- const Rectangle& rRect, basegfx::B2IRectangle const*const pPageFrame)
+ const tools::Rectangle& rRect, basegfx::B2IRectangle const*const pPageFrame)
{
if(GetPage())
{
@@ -405,7 +405,7 @@ void SdrPageView::SetDesignMode( bool _bDesignMode ) const
}
-void SdrPageView::DrawPageViewGrid(OutputDevice& rOut, const Rectangle& rRect, Color aColor)
+void SdrPageView::DrawPageViewGrid(OutputDevice& rOut, const tools::Rectangle& rRect, Color aColor)
{
if (GetPage()==nullptr)
return;
@@ -555,7 +555,7 @@ void SdrPageView::DrawPageViewGrid(OutputDevice& rOut, const Rectangle& rRect, C
{
// draw
rOut.DrawGrid(
- Rectangle( xFinOrg + (a * nx2) + nPointOffset, yBigOrg, x2, y2 ),
+ tools::Rectangle( xFinOrg + (a * nx2) + nPointOffset, yBigOrg, x2, y2 ),
Size( nx1, ny1 ), nGridFlags );
// do a step
@@ -580,7 +580,7 @@ void SdrPageView::DrawPageViewGrid(OutputDevice& rOut, const Rectangle& rRect, C
{
// draw
rOut.DrawGrid(
- Rectangle( xBigOrg, yFinOrg + (a * ny2) + nPointOffset, x2, y2 ),
+ tools::Rectangle( xBigOrg, yFinOrg + (a * ny2) + nPointOffset, x2, y2 ),
Size( nx1, ny1 ), nGridFlags );
// do a step
@@ -703,7 +703,7 @@ void SdrPageView::ImpInvalidateHelpLineArea(sal_uInt16 nNum) const
if(pCandidate->OutputToWindow())
{
OutputDevice& rOutDev = pCandidate->GetOutputDevice();
- Rectangle aR(rHL.GetBoundRect(rOutDev));
+ tools::Rectangle aR(rHL.GetBoundRect(rOutDev));
Size aSiz(rOutDev.PixelToLogic(Size(1,1)));
aR.Left() -= aSiz.Width();
aR.Right() += aSiz.Width();
diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx
index bd019285fc13..2164abba3d71 100644
--- a/svx/source/svdraw/svdpntv.cxx
+++ b/svx/source/svdraw/svdpntv.cxx
@@ -332,7 +332,7 @@ void SdrPaintView::BrkAction()
{
}
-void SdrPaintView::TakeActionRect(Rectangle&) const
+void SdrPaintView::TakeActionRect(tools::Rectangle&) const
{
}
@@ -917,7 +917,7 @@ void SdrPaintView::InvalidateAllWin()
}
}
-void SdrPaintView::InvalidateAllWin(const Rectangle& rRect)
+void SdrPaintView::InvalidateAllWin(const tools::Rectangle& rRect)
{
const sal_uInt32 nWindowCount(PaintWindowCount());
@@ -928,11 +928,11 @@ void SdrPaintView::InvalidateAllWin(const Rectangle& rRect)
if(pPaintWindow->OutputToWindow())
{
OutputDevice& rOutDev = pPaintWindow->GetOutputDevice();
- Rectangle aRect(rRect);
+ tools::Rectangle aRect(rRect);
Point aOrg(rOutDev.GetMapMode().GetOrigin());
aOrg.X()=-aOrg.X(); aOrg.Y()=-aOrg.Y();
- Rectangle aOutRect(aOrg, rOutDev.GetOutputSize());
+ 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())
@@ -949,7 +949,7 @@ void SdrPaintView::InvalidateOneWin(vcl::Window& rWin)
rWin.Invalidate(InvalidateFlags::NoErase);
}
-void SdrPaintView::InvalidateOneWin(vcl::Window& rWin, const Rectangle& rRect)
+void SdrPaintView::InvalidateOneWin(vcl::Window& rWin, const tools::Rectangle& rRect)
{
// do not erase background, that causes flicker (!)
rWin.Invalidate(rRect, InvalidateFlags::NoErase);
@@ -1117,7 +1117,7 @@ void SdrPaintView::ShowItemBrowser(bool bShow)
}
#endif
-void SdrPaintView::MakeVisible(const Rectangle& rRect, vcl::Window& rWin)
+void SdrPaintView::MakeVisible(const tools::Rectangle& rRect, vcl::Window& rWin)
{
MapMode aMap(rWin.GetMapMode());
Size aActualSize(rWin.GetOutputSize());
diff --git a/svx/source/svdraw/svdsnpv.cxx b/svx/source/svdraw/svdsnpv.cxx
index 7b7feab8ee3e..4923e7de66d3 100644
--- a/svx/source/svdraw/svdsnpv.cxx
+++ b/svx/source/svdraw/svdsnpv.cxx
@@ -240,10 +240,10 @@ void SdrSnapView::BrkAction()
SdrPaintView::BrkAction();
}
-void SdrSnapView::TakeActionRect(Rectangle& rRect) const
+void SdrSnapView::TakeActionRect(tools::Rectangle& rRect) const
{
if (IsSetPageOrg() || IsDragHelpLine()) {
- rRect=Rectangle(maDragStat.GetNow(),maDragStat.GetNow());
+ rRect=tools::Rectangle(maDragStat.GetNow(),maDragStat.GetNow());
} else {
SdrPaintView::TakeActionRect(rRect);
}
@@ -328,7 +328,7 @@ SdrSnap SdrSnapView::SnapPos(Point& rPnt, const SdrPageView* pPV) const
while (aIter.IsMore() && (nMaxPointSnapCount>0 || nMaxFrameSnapCount>0)) {
SdrObject* pO=aIter.Next();
- Rectangle aRect(pO->GetCurrentBoundRect());
+ tools::Rectangle aRect(pO->GetCurrentBoundRect());
aRect.Left ()-=mx;
aRect.Right ()+=mx;
aRect.Top ()-=my;
@@ -350,8 +350,8 @@ SdrSnap SdrSnapView::SnapPos(Point& rPnt, const SdrPageView* pPV) const
}
}
if (bOFrmSnap && nMaxFrameSnapCount>0) {
- Rectangle aLog(pO->GetSnapRect());
- Rectangle aR1(aLog);
+ tools::Rectangle aLog(pO->GetSnapRect());
+ tools::Rectangle aR1(aLog);
aR1.Left ()-=mx;
aR1.Right ()+=mx;
aR1.Top ()-=my;
diff --git a/svx/source/svdraw/svdtrans.cxx b/svx/source/svdraw/svdtrans.cxx
index f79beadd465e..ff598139f19f 100644
--- a/svx/source/svdraw/svdtrans.cxx
+++ b/svx/source/svdraw/svdtrans.cxx
@@ -32,7 +32,7 @@ void MoveXPoly(XPolygon& rPoly, const Size& S)
rPoly.Move(S.Width(),S.Height());
}
-void ResizeRect(Rectangle& rRect, const Point& rRef, const Fraction& rxFact, const Fraction& ryFact)
+void ResizeRect(tools::Rectangle& rRect, const Point& rRef, const Fraction& rxFact, const Fraction& ryFact)
{
Fraction aXFact(rxFact);
Fraction aYFact(ryFact);
@@ -268,7 +268,7 @@ double CrookSlantXPoint(Point& rPnt, Point* pC1, Point* pC2, const Point& rCente
double CrookStretchXPoint(Point& rPnt, Point* pC1, Point* pC2, const Point& rCenter,
const Point& rRad, double& rSin, double& rCos, bool bVert,
- const Rectangle& rRefRect)
+ const tools::Rectangle& rRefRect)
{
long y0=rPnt.Y();
CrookSlantXPoint(rPnt,pC1,pC2,rCenter,rRad,rSin,rCos,bVert);
@@ -331,7 +331,7 @@ void CrookSlantPoly(XPolygon& rPoly, const Point& rCenter, const Point& rRad, bo
}
}
-void CrookStretchPoly(XPolygon& rPoly, const Point& rCenter, const Point& rRad, bool bVert, const Rectangle& rRefRect)
+void CrookStretchPoly(XPolygon& rPoly, const Point& rCenter, const Point& rRad, bool bVert, const tools::Rectangle& rRefRect)
{
double nSin,nCos;
sal_uInt16 nPointAnz=rPoly.GetPointCount();
@@ -371,7 +371,7 @@ void CrookSlantPoly(XPolyPolygon& rPoly, const Point& rCenter, const Point& rRad
}
}
-void CrookStretchPoly(XPolyPolygon& rPoly, const Point& rCenter, const Point& rRad, bool bVert, const Rectangle& rRefRect)
+void CrookStretchPoly(XPolyPolygon& rPoly, const Point& rCenter, const Point& rRad, bool bVert, const tools::Rectangle& rRefRect)
{
sal_uInt16 nPolyCount=rPoly.Count();
for (sal_uInt16 nPolyNum=0; nPolyNum<nPolyCount; nPolyNum++) {
@@ -467,7 +467,7 @@ void GeoStat::RecalcTan()
}
-tools::Polygon Rect2Poly(const Rectangle& rRect, const GeoStat& rGeo)
+tools::Polygon Rect2Poly(const tools::Rectangle& rRect, const GeoStat& rGeo)
{
tools::Polygon aPol(5);
aPol[0]=rRect.TopLeft();
@@ -480,7 +480,7 @@ tools::Polygon Rect2Poly(const Rectangle& rRect, const GeoStat& rGeo)
return aPol;
}
-void Poly2Rect(const tools::Polygon& rPol, Rectangle& rRect, GeoStat& rGeo)
+void Poly2Rect(const tools::Polygon& rPol, tools::Rectangle& rRect, GeoStat& rGeo)
{
rGeo.nRotationAngle=GetAngle(rPol[1]-rPol[0]);
rGeo.nRotationAngle=NormAngle360(rGeo.nRotationAngle);
@@ -518,7 +518,7 @@ void Poly2Rect(const tools::Polygon& rPol, Rectangle& rRect, GeoStat& rGeo)
Point aRU(aPt0);
aRU.X()+=nWdt;
aRU.Y()+=nHgt;
- rRect=Rectangle(aPt0,aRU);
+ rRect=tools::Rectangle(aPt0,aRU);
}
diff --git a/svx/source/svdraw/svdundo.cxx b/svx/source/svdraw/svdundo.cxx
index f04dc32b2b35..b411e935c88e 100644
--- a/svx/source/svdraw/svdundo.cxx
+++ b/svx/source/svdraw/svdundo.cxx
@@ -380,7 +380,7 @@ void SdrUndoAttrObj::Undo()
// losing the geometry size info for the object when it is
// laid out again from AdjustTextFrameWidthAndHeight(). This makes
// rescuing the size of the object necessary.
- const Rectangle aSnapRect = pObj->GetSnapRect();
+ const tools::Rectangle aSnapRect = pObj->GetSnapRect();
if(pUndoSet)
{
@@ -457,7 +457,7 @@ void SdrUndoAttrObj::Redo()
sdr::properties::ItemChangeBroadcaster aItemChange(*pObj);
- const Rectangle aSnapRect = pObj->GetSnapRect();
+ const tools::Rectangle aSnapRect = pObj->GetSnapRect();
if(pRedoSet)
{
diff --git a/svx/source/svdraw/svdview.cxx b/svx/source/svdraw/svdview.cxx
index 2ee34fcdb07e..5f957e81f37c 100644
--- a/svx/source/svdraw/svdview.cxx
+++ b/svx/source/svdraw/svdview.cxx
@@ -116,7 +116,7 @@ SdrDropMarkerOverlay::SdrDropMarkerOverlay(const SdrView& rView, const SdrObject
rObject.TakeXorPoly());
}
-SdrDropMarkerOverlay::SdrDropMarkerOverlay(const SdrView& rView, const Rectangle& rRectangle)
+SdrDropMarkerOverlay::SdrDropMarkerOverlay(const SdrView& rView, const tools::Rectangle& rRectangle)
{
basegfx::B2DPolygon aB2DPolygon;
@@ -454,8 +454,8 @@ SdrHitKind SdrView::PickAnything(const Point& rLogicPos, SdrViewEvent& rVEvt) co
if (bTEHit)
{
- Rectangle aTextRect;
- Rectangle aAnchor;
+ tools::Rectangle aTextRect;
+ tools::Rectangle aAnchor;
SdrOutliner* pOutliner = &pTextObj->ImpGetDrawOutliner();
if( pTextObj->GetModel() )
pOutliner = &pTextObj->GetModel()->GetHitTestOutliner();
@@ -499,7 +499,7 @@ SdrHitKind SdrView::PickAnything(const Point& rLogicPos, SdrViewEvent& rVEvt) co
(IsTextTool() || (IsEditMode() && IsQuickTextEditMode())) && pHitObj->HasTextEdit())
{
// Around the TextEditArea there's a border to select without going into text edit mode.
- Rectangle aBoundRect(pHitObj->GetCurrentBoundRect());
+ tools::Rectangle aBoundRect(pHitObj->GetCurrentBoundRect());
// Force to SnapRect when Fontwork
if( dynamic_cast<const SdrTextObj*>( pHitObj) != nullptr && static_cast<SdrTextObj*>(pHitObj)->IsFontwork())
@@ -1370,7 +1370,7 @@ void SdrView::UnmarkAll()
else UnmarkAllObj();
}
-const Rectangle& SdrView::GetMarkedRect() const
+const tools::Rectangle& SdrView::GetMarkedRect() const
{
if (IsGluePointEditMode() && HasMarkedGluePoints()) {
return GetMarkedGluePointsRect();
diff --git a/svx/source/svdraw/svdxcgv.cxx b/svx/source/svdraw/svdxcgv.cxx
index ba333fdd4395..0692f647ff66 100644
--- a/svx/source/svdraw/svdxcgv.cxx
+++ b/svx/source/svdraw/svdxcgv.cxx
@@ -138,7 +138,7 @@ bool SdrExchangeView::Paste(const OUString& rStr, const Point& rPos, SdrObjList*
if (!ImpGetPasteLayer(pLst,nLayer)) return false;
bool bUnmark = (nOptions & (SdrInsertFlags::DONTMARK|SdrInsertFlags::ADDMARK))==SdrInsertFlags::NONE && !IsTextEdit();
if (bUnmark) UnmarkAllObj();
- Rectangle aTextRect(0,0,500,500);
+ tools::Rectangle aTextRect(0,0,500,500);
SdrPage* pPage=pLst->GetPage();
if (pPage!=nullptr) {
aTextRect.SetSize(pPage->GetSize());
@@ -175,7 +175,7 @@ bool SdrExchangeView::Paste(SvStream& rInput, const OUString& rBaseURL, sal_uInt
if (!ImpGetPasteLayer(pLst,nLayer)) return false;
bool bUnmark=(nOptions&(SdrInsertFlags::DONTMARK|SdrInsertFlags::ADDMARK))==SdrInsertFlags::NONE && !IsTextEdit();
if (bUnmark) UnmarkAllObj();
- Rectangle aTextRect(0,0,500,500);
+ tools::Rectangle aTextRect(0,0,500,500);
SdrPage* pPage=pLst->GetPage();
if (pPage!=nullptr) {
aTextRect.SetSize(pPage->GetSize());
@@ -281,7 +281,7 @@ bool SdrExchangeView::Paste(
const SdrPage* pSrcPg=pSrcMod->GetPage(nPg);
// Use SnapRect, not BoundRect here
- Rectangle aR=pSrcPg->GetAllObjSnapRect();
+ tools::Rectangle aR=pSrcPg->GetAllObjSnapRect();
if (bResize)
ResizeRect(aR,aPt0,aXResize,aYResize);
@@ -417,7 +417,7 @@ void SdrExchangeView::ImpPasteObject(SdrObject* pObj, SdrObjList& rLst, const Po
long xs=nSizX;
long ys=nSizY;
Point aPos(rCenter.X()-xs/2,rCenter.Y()-ys/2);
- Rectangle aR(aPos.X(),aPos.Y(),aPos.X()+xs,aPos.Y()+ys);
+ tools::Rectangle aR(aPos.X(),aPos.Y(),aPos.X()+xs,aPos.Y()+ys);
pObj->SetLogicRect(aR);
rLst.InsertObject(pObj, SAL_MAX_SIZE);
@@ -525,7 +525,7 @@ GDIMetaFile SdrExchangeView::GetMarkedObjMetaFile(bool bNoVDevIfOneMtfMarked) co
if( AreObjectsMarked() )
{
- Rectangle aBound( GetMarkedObjBoundRect() );
+ tools::Rectangle aBound( GetMarkedObjBoundRect() );
Size aBoundSize( aBound.GetWidth(), aBound.GetHeight() );
MapMode aMap( mpModel->GetScaleUnit(), Point(), mpModel->GetScaleFraction(), mpModel->GetScaleFraction() );
@@ -632,7 +632,7 @@ Graphic SdrExchangeView::GetObjGraphic( const SdrModel* pModel, const SdrObject*
{
ScopedVclPtrInstance< VirtualDevice > pOut;
GDIMetaFile aMtf;
- const Rectangle aBoundRect( pObj->GetCurrentBoundRect() );
+ const tools::Rectangle aBoundRect( pObj->GetCurrentBoundRect() );
const MapMode aMap( pModel->GetScaleUnit(),
Point(),
pModel->GetScaleFraction(),