[Libreoffice-commits] core.git: include/svx svx/source
Miklos Vajna
vmiklos at collabora.co.uk
Fri Apr 17 01:03:53 PDT 2015
include/svx/svddrgv.hxx | 2
svx/source/svdraw/svdoashp.cxx | 8 +--
svx/source/svdraw/svdocirc.cxx | 6 +-
svx/source/svdraw/svdoedge.cxx | 88 ++++++++++++++++++++--------------------
svx/source/svdraw/svdopath.cxx | 34 +++++++--------
svx/source/svdraw/svdotxtr.cxx | 4 -
svx/source/unodraw/unoshap2.cxx | 8 +--
7 files changed, 75 insertions(+), 75 deletions(-)
New commits:
commit 7e5980ccf39b54240524f059a65497b766af91cc
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Fri Apr 17 09:13:11 2015 +0200
svx: nPntAnz -> nPointCount
Change-Id: I2a4c7ef9d33db1c34a4ab338f70f800b30083f4f
diff --git a/include/svx/svddrgv.hxx b/include/svx/svddrgv.hxx
index c7269ae..1aae1fb 100644
--- a/include/svx/svddrgv.hxx
+++ b/include/svx/svddrgv.hxx
@@ -180,7 +180,7 @@ public:
// all polygons. Default=500.
// NoDragPolys is (temporarily) activated, if one of the limits
// is exceeded.
- void SetDragXorPointLimit(sal_uIntPtr nPntAnz) { nDragXorPointLimit=nPntAnz; }
+ void SetDragXorPointLimit(sal_uIntPtr nPointCount) { nDragXorPointLimit=nPointCount; }
sal_uIntPtr GetDragXorPointLimit() const { return nDragXorPointLimit; }
void SetSolidDragging(bool bOn);
diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx
index 238166b..9b06946 100644
--- a/svx/source/svdraw/svdoashp.cxx
+++ b/svx/source/svdraw/svdoashp.cxx
@@ -3108,8 +3108,8 @@ bool SdrObjCustomShape::TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegf
Point aRef1( ( aBoundRect.Left() + aBoundRect.Right() ) >> 1, aBoundRect.Top() );
Point aRef2( aRef1.X(), aRef1.Y() + 1000 );
sal_uInt16 i;
- sal_uInt16 nPntAnz=aPol.GetSize();
- for (i=0; i<nPntAnz; i++)
+ sal_uInt16 nPointCount=aPol.GetSize();
+ for (i=0; i<nPointCount; i++)
{
MirrorPoint(aPol[i],aRef1,aRef2);
}
@@ -3130,8 +3130,8 @@ bool SdrObjCustomShape::TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegf
Point aRef1( aBoundRect.Left(), ( aBoundRect.Top() + aBoundRect.Bottom() ) >> 1 );
Point aRef2( aRef1.X() + 1000, aRef1.Y() );
sal_uInt16 i;
- sal_uInt16 nPntAnz=aPol.GetSize();
- for (i=0; i<nPntAnz; i++)
+ sal_uInt16 nPointCount=aPol.GetSize();
+ for (i=0; i<nPointCount; i++)
{
MirrorPoint(aPol[i],aRef1,aRef2);
}
diff --git a/svx/source/svdraw/svdocirc.cxx b/svx/source/svdraw/svdocirc.cxx
index e62175d..08c41d7 100644
--- a/svx/source/svdraw/svdocirc.cxx
+++ b/svx/source/svdraw/svdocirc.cxx
@@ -569,16 +569,16 @@ OUString SdrCircObj::getSpecialDragComment(const SdrDragStat& rDrag) const
OUString aStr;
ImpTakeDescriptionStr(STR_ViewCreateObj, aStr);
OUStringBuffer aBuf(aStr);
- const sal_uInt32 nPntAnz(rDrag.GetPointAnz());
+ const sal_uInt32 nPointCount(rDrag.GetPointAnz());
- if(OBJ_CIRC != meCircleKind && nPntAnz > 2)
+ if(OBJ_CIRC != meCircleKind && nPointCount > 2)
{
const ImpCircUser* pU = static_cast<const ImpCircUser*>(rDrag.GetUser());
sal_Int32 nAngle;
aBuf.appendAscii(" (");
- if(3 == nPntAnz)
+ if(3 == nPointCount)
{
nAngle = pU->nStart;
}
diff --git a/svx/source/svdraw/svdoedge.cxx b/svx/source/svdraw/svdoedge.cxx
index 27f4763..48cc722 100644
--- a/svx/source/svdraw/svdoedge.cxx
+++ b/svx/source/svdraw/svdoedge.cxx
@@ -413,18 +413,18 @@ bool SdrEdgeObj::IsNode() const
SdrGluePoint SdrEdgeObj::GetVertexGluePoint(sal_uInt16 nNum) const
{
Point aPt;
- sal_uInt16 nPntAnz=pEdgeTrack->GetPointCount();
- if (nPntAnz>0)
+ sal_uInt16 nPointCount=pEdgeTrack->GetPointCount();
+ if (nPointCount>0)
{
Point aOfs = GetSnapRect().Center();
if (nNum==2 && GetConnectedNode(true)==NULL) aPt=(*pEdgeTrack)[0];
- else if (nNum==3 && GetConnectedNode(false)==NULL) aPt=(*pEdgeTrack)[nPntAnz-1];
+ else if (nNum==3 && GetConnectedNode(false)==NULL) aPt=(*pEdgeTrack)[nPointCount-1];
else {
- if ((nPntAnz & 1) ==1) {
- aPt=(*pEdgeTrack)[nPntAnz/2];
+ if ((nPointCount & 1) ==1) {
+ aPt=(*pEdgeTrack)[nPointCount/2];
} else {
- Point aPt1((*pEdgeTrack)[nPntAnz/2-1]);
- Point aPt2((*pEdgeTrack)[nPntAnz/2]);
+ Point aPt1((*pEdgeTrack)[nPointCount/2-1]);
+ Point aPt2((*pEdgeTrack)[nPointCount/2]);
aPt1+=aPt2;
aPt1.X()/=2;
aPt1.Y()/=2;
@@ -1266,16 +1266,16 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec
nNum--;
aXP1.Insert(XPOLY_APPEND,aXP2[nNum],XPOLY_NORMAL);
}
- sal_uInt16 nPntAnz=aXP1.GetPointCount();
+ sal_uInt16 nPointCount=aXP1.GetPointCount();
char cForm=0;
if (bInfo || pnQuality!=NULL) {
cForm='?';
- if (nPntAnz==2) cForm='I';
- else if (nPntAnz==3) cForm='L';
- else if (nPntAnz==4) { // Z or U
+ if (nPointCount==2) cForm='I';
+ else if (nPointCount==3) cForm='L';
+ else if (nPointCount==4) { // Z or U
if (nAngle1==nAngle2) cForm='U';
else cForm='Z';
- } else if (nPntAnz==6) { // S or C or ...
+ } else if (nPointCount==6) { // S or C or ...
if (nAngle1!=nAngle2) {
// For type S, line 2 has the same direction as line 4.
// For type C, the opposite is true.
@@ -1315,7 +1315,7 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec
sal_uIntPtr nQual0=nQual; // prevent overruns
bool bOverflow = false;
Point aPt0(aXP1[0]);
- for (sal_uInt16 nPntNum=1; nPntNum<nPntAnz; nPntNum++) {
+ for (sal_uInt16 nPntNum=1; nPntNum<nPointCount; nPntNum++) {
Point aPt1b(aXP1[nPntNum]);
nQual+=std::abs(aPt1b.X()-aPt0.X())+std::abs(aPt1b.Y()-aPt0.Y());
if (nQual<nQual0) bOverflow = true;
@@ -1323,7 +1323,7 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec
aPt0=aPt1b;
}
- sal_uInt16 nTmp=nPntAnz;
+ sal_uInt16 nTmp=nPointCount;
if (cForm=='Z') {
nTmp=2; // Z shape with good quality (nTmp=2 instead of 4)
sal_uIntPtr n1=std::abs(aXP1[1].X()-aXP1[0].X())+std::abs(aXP1[1].Y()-aXP1[0].Y());
@@ -1344,9 +1344,9 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec
nQual+=(sal_uIntPtr)nTmp*0x01000000;
if (nQual<nQual0 || nTmp>15) bOverflow = true;
}
- if (nPntAnz>=2) { // check exit angle again
+ if (nPointCount>=2) { // check exit angle again
Point aP1(aXP1[1]); aP1-=aXP1[0];
- Point aP2(aXP1[nPntAnz-2]); aP2-=aXP1[nPntAnz-1];
+ Point aP2(aXP1[nPointCount-2]); aP2-=aXP1[nPointCount-1];
long nAng1=0; if (aP1.X()<0) nAng1=18000; if (aP1.Y()>0) nAng1=27000;
if (aP1.Y()<0) nAng1=9000; if (aP1.X()!=0 && aP1.Y()!=0) nAng1=1; // slant?!
long nAng2=0; if (aP2.X()<0) nAng2=18000; if (aP2.Y()>0) nAng2=27000;
@@ -1361,14 +1361,14 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec
aBewareRect1=rBewareRect1;
aBewareRect2=rBewareRect2;
- for (sal_uInt16 i=0; i<nPntAnz; i++) {
+ for (sal_uInt16 i=0; i<nPointCount; i++) {
Point aPt1b(aXP1[i]);
bool b1=aPt1b.X()>aBewareRect1.Left() && aPt1b.X()<aBewareRect1.Right() &&
aPt1b.Y()>aBewareRect1.Top() && aPt1b.Y()<aBewareRect1.Bottom();
bool b2=aPt1b.X()>aBewareRect2.Left() && aPt1b.X()<aBewareRect2.Right() &&
aPt1b.Y()>aBewareRect2.Top() && aPt1b.Y()<aBewareRect2.Bottom();
sal_uInt16 nInt0=nIntersections;
- if (i==0 || i==nPntAnz-1) {
+ if (i==0 || i==nPointCount-1) {
if (b1 && b2) nIntersections++;
} else {
if (b1) nIntersections++;
@@ -1394,7 +1394,7 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec
}
aPt0=aPt1b;
}
- if (nPntAnz<=1) nIntersections++;
+ if (nPointCount<=1) nIntersections++;
nQual0=nQual;
nQual+=(sal_uIntPtr)nIntersections*0x10000000;
if (nQual<nQual0 || nIntersections>15) bOverflow = true;
@@ -1455,37 +1455,37 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec
}
}
// make the connector a bezier curve, if appropriate
- if (eKind==SDREDGE_BEZIER && nPntAnz>2) {
+ if (eKind==SDREDGE_BEZIER && nPointCount>2) {
Point* pPt1=&aXP1[0];
Point* pPt2=&aXP1[1];
- Point* pPt3=&aXP1[nPntAnz-2];
- Point* pPt4=&aXP1[nPntAnz-1];
+ Point* pPt3=&aXP1[nPointCount-2];
+ Point* pPt4=&aXP1[nPointCount-1];
long dx1=pPt2->X()-pPt1->X();
long dy1=pPt2->Y()-pPt1->Y();
long dx2=pPt3->X()-pPt4->X();
long dy2=pPt3->Y()-pPt4->Y();
- if (cForm=='L') { // nPntAnz==3
+ if (cForm=='L') { // nPointCount==3
aXP1.SetFlags(1,XPOLY_CONTROL);
Point aPt3(*pPt2);
aXP1.Insert(2,aPt3,XPOLY_CONTROL);
- nPntAnz=aXP1.GetPointCount();
+ nPointCount=aXP1.GetPointCount();
pPt2=&aXP1[1];
- pPt3=&aXP1[nPntAnz-2];
+ pPt3=&aXP1[nPointCount-2];
pPt2->X()-=dx1/3;
pPt2->Y()-=dy1/3;
pPt3->X()-=dx2/3;
pPt3->Y()-=dy2/3;
- } else if (nPntAnz>=4 && nPntAnz<=6) { // Z or U or ...
+ } else if (nPointCount>=4 && nPointCount<=6) { // Z or U or ...
// To all others, the end points of the original lines become control
- // points for now. Thus, we need to do some more work for nPntAnz>4!
+ // points for now. Thus, we need to do some more work for nPointCount>4!
aXP1.SetFlags(1,XPOLY_CONTROL);
- aXP1.SetFlags(nPntAnz-2,XPOLY_CONTROL);
+ aXP1.SetFlags(nPointCount-2,XPOLY_CONTROL);
// distance x1.5
pPt2->X()+=dx1/2;
pPt2->Y()+=dy1/2;
pPt3->X()+=dx2/2;
pPt3->Y()+=dy2/2;
- if (nPntAnz==5) {
+ if (nPointCount==5) {
// add a control point before and after center
Point aCenter(aXP1[2]);
long dx1b=aCenter.X()-aXP1[1].X();
@@ -1502,7 +1502,7 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec
aXP1[4].X()-=dx2b/2;
aXP1[4].Y()-=dy2b/2;
}
- if (nPntAnz==6) {
+ if (nPointCount==6) {
Point aPt1b(aXP1[2]);
Point aPt2b(aXP1[3]);
aXP1.Insert(2,aPt1b,XPOLY_CONTROL);
@@ -1719,20 +1719,20 @@ sal_uInt32 SdrEdgeObj::GetHdlCount() const
{
SdrEdgeKind eKind=static_cast<const SdrEdgeKindItem&>(GetObjectItem(SDRATTR_EDGEKIND)).GetValue();
sal_uInt32 nHdlAnz(0L);
- sal_uInt32 nPntAnz(pEdgeTrack->GetPointCount());
+ sal_uInt32 nPointCount(pEdgeTrack->GetPointCount());
- if(nPntAnz)
+ if(nPointCount)
{
nHdlAnz = 2L;
- if ((eKind==SDREDGE_ORTHOLINES || eKind==SDREDGE_BEZIER) && nPntAnz >= 4L)
+ if ((eKind==SDREDGE_ORTHOLINES || eKind==SDREDGE_BEZIER) && nPointCount >= 4L)
{
sal_uInt32 nO1(aEdgeInfo.nObj1Lines > 0L ? aEdgeInfo.nObj1Lines - 1L : 0L);
sal_uInt32 nO2(aEdgeInfo.nObj2Lines > 0L ? aEdgeInfo.nObj2Lines - 1L : 0L);
sal_uInt32 nM(aEdgeInfo.nMiddleLine != 0xFFFF ? 1L : 0L);
nHdlAnz += nO1 + nO2 + nM;
}
- else if (eKind==SDREDGE_THREELINES && nPntAnz == 4L)
+ else if (eKind==SDREDGE_THREELINES && nPointCount == 4L)
{
if(GetConnectedNode(true))
nHdlAnz++;
@@ -1748,13 +1748,13 @@ sal_uInt32 SdrEdgeObj::GetHdlCount() const
SdrHdl* SdrEdgeObj::GetHdl(sal_uInt32 nHdlNum) const
{
SdrHdl* pHdl=NULL;
- sal_uInt32 nPntAnz(pEdgeTrack->GetPointCount());
- if (nPntAnz!=0) {
+ sal_uInt32 nPointCount(pEdgeTrack->GetPointCount());
+ if (nPointCount!=0) {
if (nHdlNum==0) {
pHdl=new ImpEdgeHdl((*pEdgeTrack)[0],HDL_POLY);
if (aCon1.pObj!=NULL && aCon1.bBestVertex) pHdl->Set1PixMore(true);
} else if (nHdlNum==1) {
- pHdl=new ImpEdgeHdl((*pEdgeTrack)[sal_uInt16(nPntAnz-1)],HDL_POLY);
+ pHdl=new ImpEdgeHdl((*pEdgeTrack)[sal_uInt16(nPointCount-1)],HDL_POLY);
if (aCon2.pObj!=NULL && aCon2.bBestVertex) pHdl->Set1PixMore(true);
} else {
SdrEdgeKind eKind=static_cast<const SdrEdgeKindItem&>(GetObjectItem(SDRATTR_EDGEKIND)).GetValue();
@@ -1772,7 +1772,7 @@ SdrHdl* SdrEdgeObj::GetHdl(sal_uInt32 nHdlNum) const
} else {
nNum=nNum-nO1;
if (nNum<nO2) {
- nPt=nPntAnz-3-nNum;
+ nPt=nPointCount-3-nNum;
if (nNum==0) static_cast<ImpEdgeHdl*>(pHdl)->SetLineCode(OBJ2LINE2);
if (nNum==1) static_cast<ImpEdgeHdl*>(pHdl)->SetLineCode(OBJ2LINE3);
} else {
@@ -2298,8 +2298,8 @@ void SdrEdgeObj::NbcRotate(const Point& rRef, long nAngle, double sn, double cs)
if(!bCon2 && pEdgeTrack)
{
- sal_uInt16 nPntAnz = pEdgeTrack->GetPointCount();
- RotatePoint((*pEdgeTrack)[sal_uInt16(nPntAnz-1)],rRef,sn,cs);
+ sal_uInt16 nPointCount = pEdgeTrack->GetPointCount();
+ RotatePoint((*pEdgeTrack)[sal_uInt16(nPointCount-1)],rRef,sn,cs);
ImpDirtyEdgeTrack();
}
}
@@ -2329,8 +2329,8 @@ void SdrEdgeObj::NbcMirror(const Point& rRef1, const Point& rRef2)
if(!bCon2 && pEdgeTrack)
{
- sal_uInt16 nPntAnz = pEdgeTrack->GetPointCount();
- MirrorPoint((*pEdgeTrack)[sal_uInt16(nPntAnz-1)],rRef1,rRef2);
+ sal_uInt16 nPointCount = pEdgeTrack->GetPointCount();
+ MirrorPoint((*pEdgeTrack)[sal_uInt16(nPointCount-1)],rRef1,rRef2);
ImpDirtyEdgeTrack();
}
}
@@ -2360,8 +2360,8 @@ void SdrEdgeObj::NbcShear(const Point& rRef, long nAngle, double tn, bool bVShea
if(!bCon2 && pEdgeTrack)
{
- sal_uInt16 nPntAnz = pEdgeTrack->GetPointCount();
- ShearPoint((*pEdgeTrack)[sal_uInt16(nPntAnz-1)],rRef,tn,bVShear);
+ sal_uInt16 nPointCount = pEdgeTrack->GetPointCount();
+ ShearPoint((*pEdgeTrack)[sal_uInt16(nPointCount-1)],rRef,tn,bVShear);
ImpDirtyEdgeTrack();
}
}
diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx
index efd6a03f..44d92d5 100644
--- a/svx/source/svdraw/svdopath.cxx
+++ b/svx/source/svdraw/svdopath.cxx
@@ -80,7 +80,7 @@ struct ImpSdrPathDragData : public SdrDragStatUserData
bool bClosed; // closed object?
sal_uInt16 nPoly; // number of the polygon in the PolyPolygon
sal_uInt16 nPnt; // number of point in the above polygon
- sal_uInt16 nPntAnz; // number of points of the polygon
+ sal_uInt16 nPointCount; // number of points of the polygon
sal_uInt16 nPntMax; // maximum index
bool bBegPnt; // dragged point is first point of a Polyline
bool bEndPnt; // dragged point is finishing point of a Polyline
@@ -119,7 +119,7 @@ ImpSdrPathDragData::ImpSdrPathDragData(const SdrPathObj& rPO, const SdrHdl& rHdl
, bClosed(false)
, nPoly(0)
, nPnt(0)
- , nPntAnz(0)
+ , nPointCount(0)
, nPntMax(0)
, bBegPnt(false)
, bEndPnt(false)
@@ -171,14 +171,14 @@ ImpSdrPathDragData::ImpSdrPathDragData(const SdrPathObj& rPO, const SdrHdl& rHdl
nPoly=(sal_uInt16)rHdl.GetPolyNum(); // number of the polygon in the PolyPolygon
nPnt=(sal_uInt16)rHdl.GetPointNum(); // number of points in the above polygon
const XPolygon aTmpXP(rPO.GetPathPoly().getB2DPolygon(nPoly));
- nPntAnz=aTmpXP.GetPointCount(); // number of point of the polygon
- if (nPntAnz==0 || (bClosed && nPntAnz==1)) return; // minimum of 1 points for Lines, minimum of 2 points for Polygon
- nPntMax=nPntAnz-1; // maximum index
+ nPointCount=aTmpXP.GetPointCount(); // number of point of the polygon
+ if (nPointCount==0 || (bClosed && nPointCount==1)) return; // minimum of 1 points for Lines, minimum of 2 points for Polygon
+ nPntMax=nPointCount-1; // maximum index
bBegPnt=!bClosed && nPnt==0; // dragged point is first point of a Polyline
bEndPnt=!bClosed && nPnt==nPntMax; // dragged point is finishing point of a Polyline
- if (bClosed && nPntAnz<=3) { // if polygon is only a line
- bBegPnt=(nPntAnz<3) || nPnt==0;
- bEndPnt=(nPntAnz<3) || nPnt==nPntMax-1;
+ if (bClosed && nPointCount<=3) { // if polygon is only a line
+ bBegPnt=(nPointCount<3) || nPnt==0;
+ bEndPnt=(nPointCount<3) || nPnt==nPntMax-1;
}
nPrevPnt=nPnt; // index of previous point
nNextPnt=nPnt; // index of next point
@@ -685,11 +685,11 @@ bool ImpPathForDragAndCreate::movePathDrag( SdrDragStat& rDrag ) const
sal_uInt16 nPnt1=0xFFFF,nPnt2=0xFFFF; // its neighboring points
Point aNeuPos1,aNeuPos2; // new alternative for aPos
bool bPnt1 = false, bPnt2 = false; // are these valid alternatives?
- if (!bClosed && mpSdrPathDragData->nPntAnz>=2) { // minimum of 2 points for lines
+ if (!bClosed && mpSdrPathDragData->nPointCount>=2) { // minimum of 2 points for lines
if (!bBegPnt) nPnt1=nPrevPnt;
if (!bEndPnt) nPnt2=nNextPnt;
}
- if (bClosed && mpSdrPathDragData->nPntAnz>=3) { // minimum of 3 points for polygon
+ if (bClosed && mpSdrPathDragData->nPointCount>=3) { // minimum of 3 points for polygon
nPnt1=nPrevPnt;
nPnt2=nNextPnt;
}
@@ -1049,11 +1049,11 @@ OUString ImpPathForDragAndCreate::getSpecialDragComment(const SdrDragStat& rDrag
{
sal_uInt16 nPntNum((sal_uInt16)pHdl->GetPointNum());
const XPolygon& rXPoly = aPathPolygon[(sal_uInt16)rDrag.GetHdl()->GetPolyNum()];
- sal_uInt16 nPntAnz((sal_uInt16)rXPoly.GetPointCount());
+ sal_uInt16 nPointCount((sal_uInt16)rXPoly.GetPointCount());
bool bClose(IsClosed(meObjectKind));
if(bClose)
- nPntAnz--;
+ nPointCount--;
if(pHdl->IsPlusHdl())
{
@@ -1077,14 +1077,14 @@ OUString ImpPathForDragAndCreate::getSpecialDragComment(const SdrDragStat& rDrag
mrSdrPathObject.GetModel()->TakeAngleStr(nAngle, aMetr);
aStr += aMetr;
}
- else if(nPntAnz > 1)
+ else if(nPointCount > 1)
{
- sal_uInt16 nPntMax(nPntAnz - 1);
+ sal_uInt16 nPntMax(nPointCount - 1);
bool bIsClosed(IsClosed(meObjectKind));
bool bPt1(nPntNum > 0);
bool bPt2(nPntNum < nPntMax);
- if(bIsClosed && nPntAnz > 2)
+ if(bIsClosed && nPointCount > 2)
{
bPt1 = true;
bPt2 = true;
@@ -1176,7 +1176,7 @@ basegfx::B2DPolyPolygon ImpPathForDragAndCreate::getSpecialDragPoly(const SdrDra
}
// copy certain data locally to use less code and have faster access times
bool bClosed =mpSdrPathDragData->bClosed ; // closed object?
- sal_uInt16 nPntAnz =mpSdrPathDragData->nPntAnz ; // number of points
+ sal_uInt16 nPointCount = mpSdrPathDragData->nPointCount; // number of points
sal_uInt16 nPnt =mpSdrPathDragData->nPnt ; // number of points in the polygon
bool bBegPnt =mpSdrPathDragData->bBegPnt ; // dragged point is the first point of a Polyline
bool bEndPnt =mpSdrPathDragData->bEndPnt ; // dragged point is the last point of a Polyline
@@ -1249,7 +1249,7 @@ basegfx::B2DPolyPolygon ImpPathForDragAndCreate::getSpecialDragPoly(const SdrDra
if (bEndPnt) aXPoly.Remove(aXPoly.GetPointCount()-1,1);
}
if (bClosed) { // "pear problem": 2 lines, 1 curve, everything smoothed, a point between both lines is dragged
- if (aXPoly.GetPointCount()>nPntAnz && aXPoly.IsControl(1)) {
+ if (aXPoly.GetPointCount()>nPointCount && aXPoly.IsControl(1)) {
sal_uInt16 a=aXPoly.GetPointCount();
aXPoly[a-2]=aXPoly[2]; aXPoly.SetFlags(a-2,aXPoly.GetFlags(2));
aXPoly[a-1]=aXPoly[3]; aXPoly.SetFlags(a-1,aXPoly.GetFlags(3));
diff --git a/svx/source/svdraw/svdotxtr.cxx b/svx/source/svdraw/svdotxtr.cxx
index a2be884..fca3331 100644
--- a/svx/source/svdraw/svdotxtr.cxx
+++ b/svx/source/svdraw/svdotxtr.cxx
@@ -258,8 +258,8 @@ void SdrTextObj::NbcMirror(const Point& rRef1, const Point& rRef2)
}
Polygon aPol(Rect2Poly(maRect,aGeo));
sal_uInt16 i;
- sal_uInt16 nPntAnz=aPol.GetSize();
- for (i=0; i<nPntAnz; i++) {
+ sal_uInt16 nPointCount=aPol.GetSize();
+ for (i=0; i<nPointCount; i++) {
MirrorPoint(aPol[i],rRef1,rRef2);
}
// turn polygon and move it a little
diff --git a/svx/source/unodraw/unoshap2.cxx b/svx/source/unodraw/unoshap2.cxx
index 8b86a69..07c4f6c 100644
--- a/svx/source/unodraw/unoshap2.cxx
+++ b/svx/source/unodraw/unoshap2.cxx
@@ -1761,8 +1761,8 @@ awt::Point SAL_CALL SvxCustomShape::getPosition() throw(uno::RuntimeException, s
Point aRef1( ( aBoundRect.Left() + aBoundRect.Right() ) >> 1, aBoundRect.Top() );
Point aRef2( aRef1.X(), aRef1.Y() + 1000 );
sal_uInt16 i;
- sal_uInt16 nPntAnz=aPol.GetSize();
- for (i=0; i<nPntAnz; i++)
+ sal_uInt16 nPointCount=aPol.GetSize();
+ for (i=0; i<nPointCount; i++)
{
MirrorPoint(aPol[i],aRef1,aRef2);
}
@@ -1783,8 +1783,8 @@ awt::Point SAL_CALL SvxCustomShape::getPosition() throw(uno::RuntimeException, s
Point aRef1( aBoundRect.Left(), ( aBoundRect.Top() + aBoundRect.Bottom() ) >> 1 );
Point aRef2( aRef1.X() + 1000, aRef1.Y() );
sal_uInt16 i;
- sal_uInt16 nPntAnz=aPol.GetSize();
- for (i=0; i<nPntAnz; i++)
+ sal_uInt16 nPointCount=aPol.GetSize();
+ for (i=0; i<nPointCount; i++)
{
MirrorPoint(aPol[i],aRef1,aRef2);
}
More information about the Libreoffice-commits
mailing list