summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-02-03 10:20:59 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-02-03 10:37:45 +0100
commitdc146752b2fe11b3523299462a806c3c374ee0fa (patch)
tree584641a5e7540be286dc3c65081486f910072958 /svx
parentc406c90289baa12663a382c7ed664f2cf93b75ab (diff)
svx: can now do nAnz -> nCount without name clashes
Change-Id: Ifc884a44008de0a34c056348321e5344ab2cb1f1
Diffstat (limited to 'svx')
-rw-r--r--svx/source/svdraw/svdedtv2.cxx50
-rw-r--r--svx/source/svdraw/svdetc.cxx64
2 files changed, 57 insertions, 57 deletions
diff --git a/svx/source/svdraw/svdedtv2.cxx b/svx/source/svdraw/svdedtv2.cxx
index fcee2e48be85..3c9d41cbecfa 100644
--- a/svx/source/svdraw/svdedtv2.cxx
+++ b/svx/source/svdraw/svdedtv2.cxx
@@ -63,8 +63,8 @@ void SdrEditView::ObjOrderChanged(SdrObject* /*pObj*/, sal_uIntPtr /*nOldPos*/,
void SdrEditView::MovMarkedToTop()
{
- const size_t nAnz=GetMarkedObjectCount();
- if (nAnz!=0)
+ const size_t nCount=GetMarkedObjectCount();
+ if (nCount!=0)
{
const bool bUndo = IsUndoEnabled();
@@ -72,14 +72,14 @@ void SdrEditView::MovMarkedToTop()
BegUndo(ImpGetResStr(STR_EditMovToTop),GetDescriptionOfMarkedObjects(),SDRREPFUNC_OBJ_MOVTOTOP);
SortMarkedObjects();
- for (size_t nm=0; nm<nAnz; ++nm)
+ for (size_t nm=0; nm<nCount; ++nm)
{ // All Ordnums have to be correct!
GetMarkedObjectByIndex(nm)->GetOrdNum();
}
bool bChg=false;
SdrObjList* pOL0=nullptr;
size_t nNewPos=0;
- for (size_t nm=nAnz; nm>0;)
+ for (size_t nm=nCount; nm>0;)
{
--nm;
SdrMark* pM=GetSdrMarkByIndex(nm);
@@ -150,8 +150,8 @@ void SdrEditView::MovMarkedToTop()
void SdrEditView::MovMarkedToBtm()
{
- const size_t nAnz=GetMarkedObjectCount();
- if (nAnz!=0)
+ const size_t nCount=GetMarkedObjectCount();
+ if (nCount!=0)
{
const bool bUndo = IsUndoEnabled();
@@ -159,7 +159,7 @@ void SdrEditView::MovMarkedToBtm()
BegUndo(ImpGetResStr(STR_EditMovToBtm),GetDescriptionOfMarkedObjects(),SDRREPFUNC_OBJ_MOVTOBTM);
SortMarkedObjects();
- for (size_t nm=0; nm<nAnz; ++nm)
+ for (size_t nm=0; nm<nCount; ++nm)
{ // All Ordnums have to be correct!
GetMarkedObjectByIndex(nm)->GetOrdNum();
}
@@ -167,7 +167,7 @@ void SdrEditView::MovMarkedToBtm()
bool bChg=false;
SdrObjList* pOL0=nullptr;
size_t nNewPos=0;
- for (size_t nm=0; nm<nAnz; ++nm)
+ for (size_t nm=0; nm<nCount; ++nm)
{
SdrMark* pM=GetSdrMarkByIndex(nm);
SdrObject* pObj=pM->GetMarkedSdrObj();
@@ -245,8 +245,8 @@ void SdrEditView::PutMarkedToTop()
void SdrEditView::PutMarkedInFrontOfObj(const SdrObject* pRefObj)
{
- const size_t nAnz=GetMarkedObjectCount();
- if (nAnz!=0)
+ const size_t nCount=GetMarkedObjectCount();
+ if (nCount!=0)
{
const bool bUndo = IsUndoEnabled();
if( bUndo )
@@ -272,14 +272,14 @@ void SdrEditView::PutMarkedInFrontOfObj(const SdrObject* pRefObj)
SortMarkedObjects();
}
}
- for (size_t nm=0; nm<nAnz; ++nm)
+ for (size_t nm=0; nm<nCount; ++nm)
{ // All Ordnums have to be correct!
GetMarkedObjectByIndex(nm)->GetOrdNum();
}
bool bChg=false;
SdrObjList* pOL0=nullptr;
size_t nNewPos=0;
- for (size_t nm=nAnz; nm>0;)
+ for (size_t nm=nCount; nm>0;)
{
--nm;
SdrMark* pM=GetSdrMarkByIndex(nm);
@@ -346,8 +346,8 @@ void SdrEditView::PutMarkedToBtm()
void SdrEditView::PutMarkedBehindObj(const SdrObject* pRefObj)
{
- const size_t nAnz=GetMarkedObjectCount();
- if (nAnz!=0)
+ const size_t nCount=GetMarkedObjectCount();
+ if (nCount!=0)
{
const bool bUndo = IsUndoEnabled();
@@ -373,13 +373,13 @@ void SdrEditView::PutMarkedBehindObj(const SdrObject* pRefObj)
SortMarkedObjects();
}
}
- for (size_t nm=0; nm<nAnz; ++nm) { // All Ordnums have to be correct!
+ for (size_t nm=0; nm<nCount; ++nm) { // All Ordnums have to be correct!
GetMarkedObjectByIndex(nm)->GetOrdNum();
}
bool bChg=false;
SdrObjList* pOL0=nullptr;
size_t nNewPos=0;
- for (size_t nm=0; nm<nAnz; ++nm) {
+ for (size_t nm=0; nm<nCount; ++nm) {
SdrMark* pM=GetSdrMarkByIndex(nm);
SdrObject* pObj=pM->GetMarkedSdrObj();
if (pObj!=pRefObj) {
@@ -477,10 +477,10 @@ void SdrEditView::ReverseOrderOfMarked()
void SdrEditView::ImpCheckToTopBtmPossible()
{
- const size_t nAnz=GetMarkedObjectCount();
- if (nAnz==0)
+ const size_t nCount=GetMarkedObjectCount();
+ if (nCount==0)
return;
- if (nAnz==1)
+ if (nCount==1)
{ // special-casing for single selection
SdrObject* pObj=GetMarkedObjectByIndex(0);
SdrObjList* pOL=pObj->GetObjList();
@@ -503,7 +503,7 @@ void SdrEditView::ImpCheckToTopBtmPossible()
} else { // multiple selection
SdrObjList* pOL0=nullptr;
size_t nPos0 = 0;
- for (size_t nm = 0; !bToBtmPossible && nm<nAnz; ++nm) { // check 'send to background'
+ for (size_t nm = 0; !bToBtmPossible && nm<nCount; ++nm) { // check 'send to background'
SdrObject* pObj=GetMarkedObjectByIndex(nm);
SdrObjList* pOL=pObj->GetObjList();
if (pOL!=pOL0) {
@@ -517,7 +517,7 @@ void SdrEditView::ImpCheckToTopBtmPossible()
pOL0=nullptr;
nPos0 = SAL_MAX_SIZE;
- for (size_t nm=nAnz; !bToTopPossible && nm>0; ) { // check 'bring to front'
+ for (size_t nm=nCount; !bToTopPossible && nm>0; ) { // check 'bring to front'
--nm;
SdrObject* pObj=GetMarkedObjectByIndex(nm);
SdrObjList* pOL=pObj->GetObjList();
@@ -1796,13 +1796,13 @@ void SdrEditView::GroupMarked(const SdrObject* pUserGrp)
if (pGrp!=nullptr)
{
aNewMark.InsertEntry(SdrMark(pGrp,pPV));
- const size_t nAnz=pDstLst->GetObjCount();
+ const size_t nCount=pDstLst->GetObjCount();
SdrInsertReason aReason(SDRREASON_VIEWCALL);
pAktLst->InsertObject(pGrp,nInsPos,&aReason);
if( bUndo )
{
AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoNewObject(*pGrp,true)); // no recalculation!
- for (size_t no=0; no<nAnz; ++no)
+ for (size_t no=0; no<nCount; ++no)
{
AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoInsertObject(*pDstLst->GetObj(no)));
}
@@ -2019,9 +2019,9 @@ void SdrEditView::DoImportMarkedMtf(SvdProgressInfo *pProgrInfo)
SortMarkedObjects();
SdrMarkList aForTheDescription;
SdrMarkList aNewMarked;
- const size_t nAnz=GetMarkedObjectCount();
+ const size_t nCount=GetMarkedObjectCount();
- for (size_t nm=nAnz; nm>0;)
+ for (size_t nm=nCount; nm>0;)
{ // create Undo objects for all new objects
// check for cancellation between the metafiles
if( pProgrInfo != nullptr )
diff --git a/svx/source/svdraw/svdetc.cxx b/svx/source/svdraw/svdetc.cxx
index 424b1ef789c4..90c3383825b3 100644
--- a/svx/source/svdraw/svdetc.cxx
+++ b/svx/source/svdraw/svdetc.cxx
@@ -263,8 +263,8 @@ void SdrLinkList::Clear()
unsigned SdrLinkList::FindEntry(const Link<SdrObjFactory*,void>& rLink) const
{
- unsigned nAnz=GetLinkCount();
- for (unsigned i=0; i<nAnz; i++) {
+ unsigned nCount=GetLinkCount();
+ for (unsigned i=0; i<nCount; i++) {
if (GetLink(i)==rLink) return i;
}
return 0xFFFF;
@@ -357,7 +357,7 @@ bool GetDraftFillColor(const SfxItemSet& rSet, Color& rCol)
const sal_uInt32 nMaxSteps(8L);
const sal_uInt32 nXStep((nWidth > nMaxSteps) ? nWidth / nMaxSteps : 1L);
const sal_uInt32 nYStep((nHeight > nMaxSteps) ? nHeight / nMaxSteps : 1L);
- sal_uInt32 nAnz(0L);
+ sal_uInt32 nCount(0L);
for(sal_uInt32 nY(0L); nY < nHeight; nY += nYStep)
{
@@ -368,13 +368,13 @@ bool GetDraftFillColor(const SfxItemSet& rSet, Color& rCol)
nRt += rCol2.GetRed();
nGn += rCol2.GetGreen();
nBl += rCol2.GetBlue();
- nAnz++;
+ nCount++;
}
}
- nRt /= nAnz;
- nGn /= nAnz;
- nBl /= nAnz;
+ nRt /= nCount;
+ nGn /= nCount;
+ nBl /= nCount;
rCol = Color(sal_uInt8(nRt), sal_uInt8(nGn), sal_uInt8(nBl));
@@ -493,13 +493,13 @@ sal_uInt16* RemoveWhichRange(const sal_uInt16* pOldWhichTable, sal_uInt16 nRange
// [b..e] [b..e] [b..e] Cases 1,3,2: doesn't matter, delete, doesn't matter + Ranges
// [b........e] [b........e] Cases 4,5 : shrink range | in
// [b......................e] Case 6 : splitting + pOldWhichTable
- sal_uInt16 nAnz=0;
- while (pOldWhichTable[nAnz]!=0) nAnz++;
- nAnz++; // nAnz should now be an odd number (0 for end of array)
- DBG_ASSERT((nAnz&1)==1,"RemoveWhichRange: WhichTable doesn't have an odd number of entries.");
- sal_uInt16 nAlloc=nAnz;
+ sal_uInt16 nCount=0;
+ while (pOldWhichTable[nCount]!=0) nCount++;
+ nCount++; // nCount should now be an odd number (0 for end of array)
+ DBG_ASSERT((nCount&1)==1,"RemoveWhichRange: WhichTable doesn't have an odd number of entries.");
+ sal_uInt16 nAlloc=nCount;
// check necessary size of new array
- sal_uInt16 nNum=nAnz-1;
+ sal_uInt16 nNum=nCount-1;
while (nNum!=0) {
nNum-=2;
sal_uInt16 nBeg=pOldWhichTable[nNum];
@@ -530,16 +530,16 @@ sal_uInt16* RemoveWhichRange(const sal_uInt16* pOldWhichTable, sal_uInt16 nRange
else nCase=6;
switch (nCase) {
case 3: {
- unsigned nTailBytes=(nAnz-(nNum+2))*sizeof(sal_uInt16);
+ unsigned nTailBytes=(nCount-(nNum+2))*sizeof(sal_uInt16);
memcpy(&pNewWhichTable[nNum],&pNewWhichTable[nNum+2],nTailBytes);
- nAnz-=2; // remember: array is now smaller
+ nCount-=2; // remember: array is now smaller
} break;
case 4: pNewWhichTable[nNum+1]=nRangeBeg-1; break;
case 5: pNewWhichTable[nNum]=nRangeEnd+1; break;
case 6: {
- unsigned nTailBytes=(nAnz-(nNum+2))*sizeof(sal_uInt16);
+ unsigned nTailBytes=(nCount-(nNum+2))*sizeof(sal_uInt16);
memcpy(&pNewWhichTable[nNum+4],&pNewWhichTable[nNum+2],nTailBytes);
- nAnz+=2; // remember:array is now larger
+ nCount+=2; // remember:array is now larger
pNewWhichTable[nNum+2]=nRangeEnd+1;
pNewWhichTable[nNum+3]=pNewWhichTable[nNum+1];
pNewWhichTable[nNum+1]=nRangeBeg-1;
@@ -567,44 +567,44 @@ SvdProgressInfo::SvdProgressInfo( const Link<void*,bool>&_rLink )
m_nCurInsert = 0;
}
-void SvdProgressInfo::Init( sal_uIntPtr _nSumActionCount, sal_uIntPtr _nObjCount )
+void SvdProgressInfo::Init( sal_uIntPtr nSumActionCount, sal_uIntPtr nObjCount )
{
- m_nSumActionCount = _nSumActionCount;
- m_nObjCount = _nObjCount;
+ m_nSumActionCount = nSumActionCount;
+ m_nObjCount = nObjCount;
}
-bool SvdProgressInfo::ReportActions( sal_uIntPtr nAnzActions )
+bool SvdProgressInfo::ReportActions( sal_uIntPtr nActionCount )
{
- m_nSumCurAction += nAnzActions;
- m_nCurAction += nAnzActions;
+ m_nSumCurAction += nActionCount;
+ m_nCurAction += nActionCount;
if(m_nCurAction > m_nActionCount)
m_nCurAction = m_nActionCount;
return maLink.Call(nullptr);
}
-void SvdProgressInfo::ReportInserts( sal_uIntPtr nAnzInserts )
+void SvdProgressInfo::ReportInserts( sal_uIntPtr nInsertCount )
{
- m_nSumCurAction += nAnzInserts;
- m_nCurInsert += nAnzInserts;
+ m_nSumCurAction += nInsertCount;
+ m_nCurInsert += nInsertCount;
maLink.Call(nullptr);
}
-void SvdProgressInfo::ReportRescales( sal_uIntPtr nAnzRescales )
+void SvdProgressInfo::ReportRescales( sal_uIntPtr nRescaleCount )
{
- m_nSumCurAction += nAnzRescales;
+ m_nSumCurAction += nRescaleCount;
maLink.Call(nullptr);
}
-void SvdProgressInfo::SetActionCount( sal_uIntPtr _nActionCount )
+void SvdProgressInfo::SetActionCount( sal_uIntPtr nActionCount )
{
- m_nActionCount = _nActionCount;
+ m_nActionCount = nActionCount;
}
-void SvdProgressInfo::SetInsertCount( sal_uIntPtr _nInsertCount )
+void SvdProgressInfo::SetInsertCount( sal_uIntPtr nInsertCount )
{
- m_nInsertCount = _nInsertCount;
+ m_nInsertCount = nInsertCount;
}
void SvdProgressInfo::SetNextObject()