[Libreoffice-commits] core.git: include/svx svx/source
Miklos Vajna
vmiklos at collabora.co.uk
Mon Jan 11 00:10:09 PST 2016
include/svx/svddrag.hxx | 10 +++++-----
svx/source/engine3d/scene3d.cxx | 2 +-
svx/source/svdraw/svdcrtv.cxx | 6 +++---
svx/source/svdraw/svddrag.cxx | 2 +-
svx/source/svdraw/svdoashp.cxx | 2 +-
svx/source/svdraw/svdobj.cxx | 2 +-
svx/source/svdraw/svdocapt.cxx | 2 +-
svx/source/svdraw/svdocirc.cxx | 26 +++++++++++++-------------
svx/source/svdraw/svdoedge.cxx | 2 +-
svx/source/svdraw/svdomeas.cxx | 2 +-
svx/source/svdraw/svdopath.cxx | 4 ++--
svx/source/svdraw/svdotxdr.cxx | 2 +-
svx/source/table/svdotable.cxx | 2 +-
13 files changed, 32 insertions(+), 32 deletions(-)
New commits:
commit 8fd9020b2b5ae1024dbf866cd84cf28258aba232
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Mon Jan 11 09:09:14 2016 +0100
svx: SdrDragStat::GetPointAnz() -> GetPointCount()
Change-Id: Ib8728408a81c655c36b46a8483970c38e9a40bc4
diff --git a/include/svx/svddrag.hxx b/include/svx/svddrag.hxx
index ac2a978..ab285bd 100644
--- a/include/svx/svddrag.hxx
+++ b/include/svx/svddrag.hxx
@@ -84,14 +84,14 @@ public:
SdrPageView* GetPageView() const { return pPageView; }
void SetPageView(SdrPageView* pPV) { pPageView=pPV; }
const Point& GetPoint(sal_uIntPtr nNum) const { return *aPnts[nNum]; }
- sal_uIntPtr GetPointAnz() const { return aPnts.size(); }
+ sal_uIntPtr GetPointCount() const { return aPnts.size(); }
const Point& GetStart() const { return GetPoint(0); }
Point& Start() { return Pnt(0); }
- const Point& GetPrev() const { return GetPoint(GetPointAnz()-(GetPointAnz()>=2 ? 2:1)); }
- Point& Prev() { return Pnt(GetPointAnz()-(GetPointAnz()>=2 ? 2:1)); }
+ const Point& GetPrev() const { return GetPoint(GetPointCount()-(GetPointCount()>=2 ? 2:1)); }
+ Point& Prev() { return Pnt(GetPointCount()-(GetPointCount()>=2 ? 2:1)); }
const Point& GetPos0() const { return aPos0; }
- const Point& GetNow() const { return GetPoint(GetPointAnz()-1); }
- Point& Now() { return Pnt(GetPointAnz()-1); }
+ const Point& GetNow() const { return GetPoint(GetPointCount()-1); }
+ Point& Now() { return Pnt(GetPointCount()-1); }
const Point& GetRealNow() const { return aRealNow; }
Point& RealNow() { return aRealNow; }
const Point& GetRef1() const { return aRef1; }
diff --git a/svx/source/engine3d/scene3d.cxx b/svx/source/engine3d/scene3d.cxx
index 2d07749..53d35ac 100644
--- a/svx/source/engine3d/scene3d.cxx
+++ b/svx/source/engine3d/scene3d.cxx
@@ -702,7 +702,7 @@ bool E3dScene::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd)
aRect1.Justify();
NbcSetSnapRect(aRect1);
SetRectsDirty();
- return (eCmd==SDRCREATE_FORCEEND || rStat.GetPointAnz()>=2);
+ return (eCmd==SDRCREATE_FORCEEND || rStat.GetPointCount()>=2);
}
bool E3dScene::BckCreate(SdrDragStat& /*rStat*/)
diff --git a/svx/source/svdraw/svdcrtv.cxx b/svx/source/svdraw/svdcrtv.cxx
index d9140bf..0e4719f 100644
--- a/svx/source/svdraw/svdcrtv.cxx
+++ b/svx/source/svdraw/svdcrtv.cxx
@@ -601,7 +601,7 @@ bool SdrCreateView::EndCreateObj(SdrCreateCmd eCmd)
if (pAktCreate!=nullptr)
{
- sal_uIntPtr nCount=maDragStat.GetPointAnz();
+ sal_uIntPtr nCount=maDragStat.GetPointCount();
if (nCount<=1 && eCmd==SDRCREATE_FORCEEND)
{
@@ -710,7 +710,7 @@ void SdrCreateView::BckCreateObj()
{
if (pAktCreate!=nullptr)
{
- if (maDragStat.GetPointAnz()<=2 )
+ if (maDragStat.GetPointCount()<=2 )
{
BrkCreateObj();
}
@@ -791,7 +791,7 @@ void SdrCreateView::ShowCreateObj(/*OutputDevice* pOut, sal_Bool bFull*/)
if(pCircObj && OBJ_CIRC != pCircObj->GetObjIdentifier())
{
// #i103058# Allow SolidDragging with four points
- if(maDragStat.GetPointAnz() < 4)
+ if(maDragStat.GetPointCount() < 4)
{
bUseSolidDragging = false;
}
diff --git a/svx/source/svdraw/svddrag.cxx b/svx/source/svdraw/svddrag.cxx
index 91cd2d1..411cc91 100644
--- a/svx/source/svdraw/svddrag.cxx
+++ b/svx/source/svdraw/svddrag.cxx
@@ -127,7 +127,7 @@ Fraction SdrDragStat::GetYFact() const
void SdrDragStat::TakeCreateRect(Rectangle& rRect) const
{
rRect=Rectangle(GetStart(),GetNow());
- if (GetPointAnz()>=2) {
+ if (GetPointCount()>=2) {
Point aBtmRgt(GetPoint(1));
rRect.Right()=aBtmRgt.X();
rRect.Bottom()=aBtmRgt.Y();
diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx
index 6304c47..e69eaa4 100644
--- a/svx/source/svdraw/svdoashp.cxx
+++ b/svx/source/svdraw/svdoashp.cxx
@@ -2211,7 +2211,7 @@ bool SdrObjCustomShape::EndCreate( SdrDragStat& rStat, SdrCreateCmd eCmd )
AdaptTextMinSize();
SetRectsDirty();
- return ( eCmd == SDRCREATE_FORCEEND || rStat.GetPointAnz() >= 2 );
+ return ( eCmd == SDRCREATE_FORCEEND || rStat.GetPointCount() >= 2 );
}
basegfx::B2DPolyPolygon SdrObjCustomShape::TakeCreatePoly(const SdrDragStat& /*rDrag*/) const
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index b48665d..8f84295 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -1372,7 +1372,7 @@ bool SdrObject::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd)
rStat.TakeCreateRect(aOutRect);
aOutRect.Justify();
- return (eCmd==SDRCREATE_FORCEEND || rStat.GetPointAnz()>=2);
+ return (eCmd==SDRCREATE_FORCEEND || rStat.GetPointCount()>=2);
}
void SdrObject::BrkCreate(SdrDragStat& /*rStat*/)
diff --git a/svx/source/svdraw/svdocapt.cxx b/svx/source/svdraw/svdocapt.cxx
index fc3b0f0..b23d0e9 100644
--- a/svx/source/svdraw/svdocapt.cxx
+++ b/svx/source/svdraw/svdocapt.cxx
@@ -577,7 +577,7 @@ bool SdrCaptionObj::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd)
maRect.SetPos(rStat.GetNow());
ImpCalcTail(aPara,aTailPoly,maRect);
SetRectsDirty();
- return (eCmd==SDRCREATE_FORCEEND || rStat.GetPointAnz()>=2);
+ return (eCmd==SDRCREATE_FORCEEND || rStat.GetPointCount()>=2);
}
bool SdrCaptionObj::BckCreate(SdrDragStat& /*rStat*/)
diff --git a/svx/source/svdraw/svdocirc.cxx b/svx/source/svdraw/svdocirc.cxx
index 318d140..9db6936 100644
--- a/svx/source/svdraw/svdocirc.cxx
+++ b/svx/source/svdraw/svdocirc.cxx
@@ -563,7 +563,7 @@ OUString SdrCircObj::getSpecialDragComment(const SdrDragStat& rDrag) const
OUString aStr;
ImpTakeDescriptionStr(STR_ViewCreateObj, aStr);
OUStringBuffer aBuf(aStr);
- const sal_uInt32 nPointCount(rDrag.GetPointAnz());
+ const sal_uInt32 nPointCount(rDrag.GetPointCount());
if(OBJ_CIRC != meCircleKind && nPointCount > 2)
{
@@ -623,7 +623,7 @@ void ImpCircUser::SetCreateParams(SdrDragStat& rStat)
nMaxRad=((nWdt>nHgt ? nWdt : nHgt)+1) /2;
nStart=0;
nEnd=36000;
- if (rStat.GetPointAnz()>2) {
+ if (rStat.GetPointCount()>2) {
Point aP(rStat.GetPoint(2)-aCenter);
if (nWdt==0) aP.X()=0;
if (nHgt==0) aP.Y()=0;
@@ -646,7 +646,7 @@ void ImpCircUser::SetCreateParams(SdrDragStat& rStat)
nEnd=nStart;
aP2=aP1;
} else aP1=aCenter;
- if (rStat.GetPointAnz()>3) {
+ if (rStat.GetPointCount()>3) {
Point aP(rStat.GetPoint(3)-aCenter);
if (nWdt>=nHgt) {
aP.Y()=BigMulDiv(aP.Y(),nWdt,nHgt);
@@ -703,7 +703,7 @@ bool SdrCircObj::MovCreate(SdrDragStat& rStat)
// #i103058# push current angle settings to ItemSet to
// allow FullDrag visualisation
- if(rStat.GetPointAnz() >= 4)
+ if(rStat.GetPointCount() >= 4)
{
ImpSetCircInfoToAttr();
}
@@ -716,17 +716,17 @@ bool SdrCircObj::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd)
ImpSetCreateParams(rStat);
ImpCircUser* pU=static_cast<ImpCircUser*>(rStat.GetUser());
bool bRet = false;
- if (eCmd==SDRCREATE_FORCEEND && rStat.GetPointAnz()<4) meCircleKind=OBJ_CIRC;
+ if (eCmd==SDRCREATE_FORCEEND && rStat.GetPointCount()<4) meCircleKind=OBJ_CIRC;
if (meCircleKind==OBJ_CIRC) {
- bRet=rStat.GetPointAnz()>=2;
+ bRet=rStat.GetPointCount()>=2;
if (bRet) {
maRect = pU->aR;
ImpJustifyRect(maRect);
}
} else {
- rStat.SetNoSnap(rStat.GetPointAnz()>=2);
- rStat.SetOrtho4Possible(rStat.GetPointAnz()<2);
- bRet=rStat.GetPointAnz()>=4;
+ rStat.SetNoSnap(rStat.GetPointCount()>=2);
+ rStat.SetOrtho4Possible(rStat.GetPointCount()<2);
+ bRet=rStat.GetPointCount()>=4;
if (bRet) {
maRect = pU->aR;
ImpJustifyRect(maRect);
@@ -754,8 +754,8 @@ void SdrCircObj::BrkCreate(SdrDragStat& rStat)
bool SdrCircObj::BckCreate(SdrDragStat& rStat)
{
- rStat.SetNoSnap(rStat.GetPointAnz()>=3);
- rStat.SetOrtho4Possible(rStat.GetPointAnz()<3);
+ rStat.SetNoSnap(rStat.GetPointCount()>=3);
+ rStat.SetOrtho4Possible(rStat.GetPointCount()<3);
return meCircleKind!=OBJ_CIRC;
}
@@ -763,12 +763,12 @@ basegfx::B2DPolyPolygon SdrCircObj::TakeCreatePoly(const SdrDragStat& rDrag) con
{
const ImpCircUser* pU = static_cast<const ImpCircUser*>(rDrag.GetUser());
- if(rDrag.GetPointAnz() < 4L)
+ if(rDrag.GetPointCount() < 4L)
{
// force to OBJ_CIRC to get full visualisation
basegfx::B2DPolyPolygon aRetval(ImpCalcXPolyCirc(OBJ_CIRC, pU->aR, pU->nStart, pU->nEnd));
- if(3L == rDrag.GetPointAnz())
+ if(3L == rDrag.GetPointCount())
{
// add edge to first point on ellipse
basegfx::B2DPolygon aNew;
diff --git a/svx/source/svdraw/svdoedge.cxx b/svx/source/svdraw/svdoedge.cxx
index b2865b6..c2e0e71 100644
--- a/svx/source/svdraw/svdoedge.cxx
+++ b/svx/source/svdraw/svdoedge.cxx
@@ -2054,7 +2054,7 @@ bool SdrEdgeObj::MovCreate(SdrDragStat& rDragStat)
bool SdrEdgeObj::EndCreate(SdrDragStat& rDragStat, SdrCreateCmd eCmd)
{
- bool bOk=(eCmd==SDRCREATE_FORCEEND || rDragStat.GetPointAnz()>=2);
+ bool bOk=(eCmd==SDRCREATE_FORCEEND || rDragStat.GetPointCount()>=2);
if (bOk) {
ConnectToNode(true,aCon1.pObj);
ConnectToNode(false,aCon2.pObj);
diff --git a/svx/source/svdraw/svdomeas.cxx b/svx/source/svdraw/svdomeas.cxx
index 4fdeeef..9b2fbd2 100644
--- a/svx/source/svdraw/svdomeas.cxx
+++ b/svx/source/svdraw/svdomeas.cxx
@@ -996,7 +996,7 @@ bool SdrMeasureObj::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd)
{
SetTextDirty();
SetRectsDirty();
- return (eCmd==SDRCREATE_FORCEEND || rStat.GetPointAnz()>=2);
+ return (eCmd==SDRCREATE_FORCEEND || rStat.GetPointCount()>=2);
}
bool SdrMeasureObj::BckCreate(SdrDragStat& /*rStat*/)
diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx
index 42a0edb..88e8eed 100644
--- a/svx/source/svdraw/svdopath.cxx
+++ b/svx/source/svdraw/svdopath.cxx
@@ -1411,7 +1411,7 @@ bool ImpPathForDragAndCreate::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd)
sal_uInt16 nActPoint=rXPoly.GetPointCount()-1;
rXPoly[nActPoint]=rStat.Now();
if (!pU->bMixedCreate && pU->eStartKind==OBJ_LINE) {
- if (rStat.GetPointAnz()>=2) eCmd=SDRCREATE_FORCEEND;
+ if (rStat.GetPointCount()>=2) eCmd=SDRCREATE_FORCEEND;
bRet = eCmd==SDRCREATE_FORCEEND;
if (bRet) {
mbCreating = false;
@@ -1422,7 +1422,7 @@ bool ImpPathForDragAndCreate::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd)
}
if (!pU->bMixedCreate && IsFreeHand(pU->eStartKind)) {
- if (rStat.GetPointAnz()>=2) eCmd=SDRCREATE_FORCEEND;
+ if (rStat.GetPointCount()>=2) eCmd=SDRCREATE_FORCEEND;
bRet=eCmd==SDRCREATE_FORCEEND;
if (bRet) {
mbCreating=false;
diff --git a/svx/source/svdraw/svdotxdr.cxx b/svx/source/svdraw/svdotxdr.cxx
index 0044530..70993e6 100644
--- a/svx/source/svdraw/svdotxdr.cxx
+++ b/svx/source/svdraw/svdotxdr.cxx
@@ -217,7 +217,7 @@ bool SdrTextObj::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd)
if (dynamic_cast<const SdrRectObj *>(this) != nullptr) {
static_cast<SdrRectObj*>(this)->SetXPolyDirty();
}
- return (eCmd==SDRCREATE_FORCEEND || rStat.GetPointAnz()>=2);
+ return (eCmd==SDRCREATE_FORCEEND || rStat.GetPointCount()>=2);
}
void SdrTextObj::BrkCreate(SdrDragStat& /*rStat*/)
diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx
index 15bbb7f..4f575d7 100644
--- a/svx/source/table/svdotable.cxx
+++ b/svx/source/table/svdotable.cxx
@@ -2402,7 +2402,7 @@ bool SdrTableObj::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd)
{
rStat.TakeCreateRect(maRect);
ImpJustifyRect(maRect);
- return (eCmd==SDRCREATE_FORCEEND || rStat.GetPointAnz()>=2);
+ return (eCmd==SDRCREATE_FORCEEND || rStat.GetPointCount()>=2);
}
void SdrTableObj::BrkCreate(SdrDragStat& /*rStat*/)
More information about the Libreoffice-commits
mailing list