Kaydet (Commit) 7e5980cc authored tarafından Miklos Vajna's avatar Miklos Vajna

svx: nPntAnz -> nPointCount

Change-Id: I2a4c7ef9d33db1c34a4ab338f70f800b30083f4f
üst a7b7c64a
...@@ -180,7 +180,7 @@ public: ...@@ -180,7 +180,7 @@ public:
// all polygons. Default=500. // all polygons. Default=500.
// NoDragPolys is (temporarily) activated, if one of the limits // NoDragPolys is (temporarily) activated, if one of the limits
// is exceeded. // is exceeded.
void SetDragXorPointLimit(sal_uIntPtr nPntAnz) { nDragXorPointLimit=nPntAnz; } void SetDragXorPointLimit(sal_uIntPtr nPointCount) { nDragXorPointLimit=nPointCount; }
sal_uIntPtr GetDragXorPointLimit() const { return nDragXorPointLimit; } sal_uIntPtr GetDragXorPointLimit() const { return nDragXorPointLimit; }
void SetSolidDragging(bool bOn); void SetSolidDragging(bool bOn);
......
...@@ -3108,8 +3108,8 @@ bool SdrObjCustomShape::TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegf ...@@ -3108,8 +3108,8 @@ bool SdrObjCustomShape::TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegf
Point aRef1( ( aBoundRect.Left() + aBoundRect.Right() ) >> 1, aBoundRect.Top() ); Point aRef1( ( aBoundRect.Left() + aBoundRect.Right() ) >> 1, aBoundRect.Top() );
Point aRef2( aRef1.X(), aRef1.Y() + 1000 ); Point aRef2( aRef1.X(), aRef1.Y() + 1000 );
sal_uInt16 i; sal_uInt16 i;
sal_uInt16 nPntAnz=aPol.GetSize(); sal_uInt16 nPointCount=aPol.GetSize();
for (i=0; i<nPntAnz; i++) for (i=0; i<nPointCount; i++)
{ {
MirrorPoint(aPol[i],aRef1,aRef2); MirrorPoint(aPol[i],aRef1,aRef2);
} }
...@@ -3130,8 +3130,8 @@ bool SdrObjCustomShape::TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegf ...@@ -3130,8 +3130,8 @@ bool SdrObjCustomShape::TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegf
Point aRef1( aBoundRect.Left(), ( aBoundRect.Top() + aBoundRect.Bottom() ) >> 1 ); Point aRef1( aBoundRect.Left(), ( aBoundRect.Top() + aBoundRect.Bottom() ) >> 1 );
Point aRef2( aRef1.X() + 1000, aRef1.Y() ); Point aRef2( aRef1.X() + 1000, aRef1.Y() );
sal_uInt16 i; sal_uInt16 i;
sal_uInt16 nPntAnz=aPol.GetSize(); sal_uInt16 nPointCount=aPol.GetSize();
for (i=0; i<nPntAnz; i++) for (i=0; i<nPointCount; i++)
{ {
MirrorPoint(aPol[i],aRef1,aRef2); MirrorPoint(aPol[i],aRef1,aRef2);
} }
......
...@@ -569,16 +569,16 @@ OUString SdrCircObj::getSpecialDragComment(const SdrDragStat& rDrag) const ...@@ -569,16 +569,16 @@ OUString SdrCircObj::getSpecialDragComment(const SdrDragStat& rDrag) const
OUString aStr; OUString aStr;
ImpTakeDescriptionStr(STR_ViewCreateObj, aStr); ImpTakeDescriptionStr(STR_ViewCreateObj, aStr);
OUStringBuffer aBuf(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()); const ImpCircUser* pU = static_cast<const ImpCircUser*>(rDrag.GetUser());
sal_Int32 nAngle; sal_Int32 nAngle;
aBuf.appendAscii(" ("); aBuf.appendAscii(" (");
if(3 == nPntAnz) if(3 == nPointCount)
{ {
nAngle = pU->nStart; nAngle = pU->nStart;
} }
......
This diff is collapsed.
...@@ -80,7 +80,7 @@ struct ImpSdrPathDragData : public SdrDragStatUserData ...@@ -80,7 +80,7 @@ struct ImpSdrPathDragData : public SdrDragStatUserData
bool bClosed; // closed object? bool bClosed; // closed object?
sal_uInt16 nPoly; // number of the polygon in the PolyPolygon sal_uInt16 nPoly; // number of the polygon in the PolyPolygon
sal_uInt16 nPnt; // number of point in the above polygon 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 sal_uInt16 nPntMax; // maximum index
bool bBegPnt; // dragged point is first point of a Polyline bool bBegPnt; // dragged point is first point of a Polyline
bool bEndPnt; // dragged point is finishing 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 ...@@ -119,7 +119,7 @@ ImpSdrPathDragData::ImpSdrPathDragData(const SdrPathObj& rPO, const SdrHdl& rHdl
, bClosed(false) , bClosed(false)
, nPoly(0) , nPoly(0)
, nPnt(0) , nPnt(0)
, nPntAnz(0) , nPointCount(0)
, nPntMax(0) , nPntMax(0)
, bBegPnt(false) , bBegPnt(false)
, bEndPnt(false) , bEndPnt(false)
...@@ -171,14 +171,14 @@ ImpSdrPathDragData::ImpSdrPathDragData(const SdrPathObj& rPO, const SdrHdl& rHdl ...@@ -171,14 +171,14 @@ ImpSdrPathDragData::ImpSdrPathDragData(const SdrPathObj& rPO, const SdrHdl& rHdl
nPoly=(sal_uInt16)rHdl.GetPolyNum(); // number of the polygon in the PolyPolygon nPoly=(sal_uInt16)rHdl.GetPolyNum(); // number of the polygon in the PolyPolygon
nPnt=(sal_uInt16)rHdl.GetPointNum(); // number of points in the above polygon nPnt=(sal_uInt16)rHdl.GetPointNum(); // number of points in the above polygon
const XPolygon aTmpXP(rPO.GetPathPoly().getB2DPolygon(nPoly)); const XPolygon aTmpXP(rPO.GetPathPoly().getB2DPolygon(nPoly));
nPntAnz=aTmpXP.GetPointCount(); // number of point of the polygon nPointCount=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 if (nPointCount==0 || (bClosed && nPointCount==1)) return; // minimum of 1 points for Lines, minimum of 2 points for Polygon
nPntMax=nPntAnz-1; // maximum index nPntMax=nPointCount-1; // maximum index
bBegPnt=!bClosed && nPnt==0; // dragged point is first point of a Polyline bBegPnt=!bClosed && nPnt==0; // dragged point is first point of a Polyline
bEndPnt=!bClosed && nPnt==nPntMax; // dragged point is finishing 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 if (bClosed && nPointCount<=3) { // if polygon is only a line
bBegPnt=(nPntAnz<3) || nPnt==0; bBegPnt=(nPointCount<3) || nPnt==0;
bEndPnt=(nPntAnz<3) || nPnt==nPntMax-1; bEndPnt=(nPointCount<3) || nPnt==nPntMax-1;
} }
nPrevPnt=nPnt; // index of previous point nPrevPnt=nPnt; // index of previous point
nNextPnt=nPnt; // index of next point nNextPnt=nPnt; // index of next point
...@@ -685,11 +685,11 @@ bool ImpPathForDragAndCreate::movePathDrag( SdrDragStat& rDrag ) const ...@@ -685,11 +685,11 @@ bool ImpPathForDragAndCreate::movePathDrag( SdrDragStat& rDrag ) const
sal_uInt16 nPnt1=0xFFFF,nPnt2=0xFFFF; // its neighboring points sal_uInt16 nPnt1=0xFFFF,nPnt2=0xFFFF; // its neighboring points
Point aNeuPos1,aNeuPos2; // new alternative for aPos Point aNeuPos1,aNeuPos2; // new alternative for aPos
bool bPnt1 = false, bPnt2 = false; // are these valid alternatives? 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 (!bBegPnt) nPnt1=nPrevPnt;
if (!bEndPnt) nPnt2=nNextPnt; 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; nPnt1=nPrevPnt;
nPnt2=nNextPnt; nPnt2=nNextPnt;
} }
...@@ -1049,11 +1049,11 @@ OUString ImpPathForDragAndCreate::getSpecialDragComment(const SdrDragStat& rDrag ...@@ -1049,11 +1049,11 @@ OUString ImpPathForDragAndCreate::getSpecialDragComment(const SdrDragStat& rDrag
{ {
sal_uInt16 nPntNum((sal_uInt16)pHdl->GetPointNum()); sal_uInt16 nPntNum((sal_uInt16)pHdl->GetPointNum());
const XPolygon& rXPoly = aPathPolygon[(sal_uInt16)rDrag.GetHdl()->GetPolyNum()]; 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)); bool bClose(IsClosed(meObjectKind));
if(bClose) if(bClose)
nPntAnz--; nPointCount--;
if(pHdl->IsPlusHdl()) if(pHdl->IsPlusHdl())
{ {
...@@ -1077,14 +1077,14 @@ OUString ImpPathForDragAndCreate::getSpecialDragComment(const SdrDragStat& rDrag ...@@ -1077,14 +1077,14 @@ OUString ImpPathForDragAndCreate::getSpecialDragComment(const SdrDragStat& rDrag
mrSdrPathObject.GetModel()->TakeAngleStr(nAngle, aMetr); mrSdrPathObject.GetModel()->TakeAngleStr(nAngle, aMetr);
aStr += 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 bIsClosed(IsClosed(meObjectKind));
bool bPt1(nPntNum > 0); bool bPt1(nPntNum > 0);
bool bPt2(nPntNum < nPntMax); bool bPt2(nPntNum < nPntMax);
if(bIsClosed && nPntAnz > 2) if(bIsClosed && nPointCount > 2)
{ {
bPt1 = true; bPt1 = true;
bPt2 = true; bPt2 = true;
...@@ -1176,7 +1176,7 @@ basegfx::B2DPolyPolygon ImpPathForDragAndCreate::getSpecialDragPoly(const SdrDra ...@@ -1176,7 +1176,7 @@ basegfx::B2DPolyPolygon ImpPathForDragAndCreate::getSpecialDragPoly(const SdrDra
} }
// copy certain data locally to use less code and have faster access times // copy certain data locally to use less code and have faster access times
bool bClosed =mpSdrPathDragData->bClosed ; // closed object? 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 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 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 bool bEndPnt =mpSdrPathDragData->bEndPnt ; // dragged point is the last point of a Polyline
...@@ -1249,7 +1249,7 @@ basegfx::B2DPolyPolygon ImpPathForDragAndCreate::getSpecialDragPoly(const SdrDra ...@@ -1249,7 +1249,7 @@ basegfx::B2DPolyPolygon ImpPathForDragAndCreate::getSpecialDragPoly(const SdrDra
if (bEndPnt) aXPoly.Remove(aXPoly.GetPointCount()-1,1); 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 (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(); sal_uInt16 a=aXPoly.GetPointCount();
aXPoly[a-2]=aXPoly[2]; aXPoly.SetFlags(a-2,aXPoly.GetFlags(2)); aXPoly[a-2]=aXPoly[2]; aXPoly.SetFlags(a-2,aXPoly.GetFlags(2));
aXPoly[a-1]=aXPoly[3]; aXPoly.SetFlags(a-1,aXPoly.GetFlags(3)); aXPoly[a-1]=aXPoly[3]; aXPoly.SetFlags(a-1,aXPoly.GetFlags(3));
......
...@@ -258,8 +258,8 @@ void SdrTextObj::NbcMirror(const Point& rRef1, const Point& rRef2) ...@@ -258,8 +258,8 @@ void SdrTextObj::NbcMirror(const Point& rRef1, const Point& rRef2)
} }
Polygon aPol(Rect2Poly(maRect,aGeo)); Polygon aPol(Rect2Poly(maRect,aGeo));
sal_uInt16 i; sal_uInt16 i;
sal_uInt16 nPntAnz=aPol.GetSize(); sal_uInt16 nPointCount=aPol.GetSize();
for (i=0; i<nPntAnz; i++) { for (i=0; i<nPointCount; i++) {
MirrorPoint(aPol[i],rRef1,rRef2); MirrorPoint(aPol[i],rRef1,rRef2);
} }
// turn polygon and move it a little // turn polygon and move it a little
......
...@@ -1761,8 +1761,8 @@ awt::Point SAL_CALL SvxCustomShape::getPosition() throw(uno::RuntimeException, s ...@@ -1761,8 +1761,8 @@ awt::Point SAL_CALL SvxCustomShape::getPosition() throw(uno::RuntimeException, s
Point aRef1( ( aBoundRect.Left() + aBoundRect.Right() ) >> 1, aBoundRect.Top() ); Point aRef1( ( aBoundRect.Left() + aBoundRect.Right() ) >> 1, aBoundRect.Top() );
Point aRef2( aRef1.X(), aRef1.Y() + 1000 ); Point aRef2( aRef1.X(), aRef1.Y() + 1000 );
sal_uInt16 i; sal_uInt16 i;
sal_uInt16 nPntAnz=aPol.GetSize(); sal_uInt16 nPointCount=aPol.GetSize();
for (i=0; i<nPntAnz; i++) for (i=0; i<nPointCount; i++)
{ {
MirrorPoint(aPol[i],aRef1,aRef2); MirrorPoint(aPol[i],aRef1,aRef2);
} }
...@@ -1783,8 +1783,8 @@ awt::Point SAL_CALL SvxCustomShape::getPosition() throw(uno::RuntimeException, s ...@@ -1783,8 +1783,8 @@ awt::Point SAL_CALL SvxCustomShape::getPosition() throw(uno::RuntimeException, s
Point aRef1( aBoundRect.Left(), ( aBoundRect.Top() + aBoundRect.Bottom() ) >> 1 ); Point aRef1( aBoundRect.Left(), ( aBoundRect.Top() + aBoundRect.Bottom() ) >> 1 );
Point aRef2( aRef1.X() + 1000, aRef1.Y() ); Point aRef2( aRef1.X() + 1000, aRef1.Y() );
sal_uInt16 i; sal_uInt16 i;
sal_uInt16 nPntAnz=aPol.GetSize(); sal_uInt16 nPointCount=aPol.GetSize();
for (i=0; i<nPntAnz; i++) for (i=0; i<nPointCount; i++)
{ {
MirrorPoint(aPol[i],aRef1,aRef2); MirrorPoint(aPol[i],aRef1,aRef2);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment