[Libreoffice-commits] core.git: svx/source

Linus Behrens linus at thebehrens.net
Fri May 1 09:54:19 PDT 2015


 svx/source/svdraw/svdmodel.cxx |   76 ++++++++++++++++++++---------------------
 svx/source/svdraw/svdogrp.cxx  |   76 ++++++++++++++++++++---------------------
 2 files changed, 76 insertions(+), 76 deletions(-)

New commits:
commit 48231d12738d62c5dfe9ff8beaae3c2e328a15e7
Author: Linus Behrens <linus at thebehrens.net>
Date:   Thu Apr 23 16:12:55 2015 +0200

    Replaced nAnz, nObjAnz with nCount, nObjCount respectively
    
    Change-Id: I4a479828650a3015670561cf391befa3da731bae
    Reviewed-on: https://gerrit.libreoffice.org/15494
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx
index 3d485bc..65754a6 100644
--- a/svx/source/svdraw/svdmodel.cxx
+++ b/svx/source/svdraw/svdmodel.cxx
@@ -326,10 +326,10 @@ void SdrModel::SetReadOnly(bool bYes)
 
 
 
-void SdrModel::SetMaxUndoActionCount(sal_uIntPtr nAnz)
+void SdrModel::SetMaxUndoActionCount(sal_uIntPtr nCount)
 {
-    if (nAnz<1) nAnz=1;
-    nMaxUndoCount=nAnz;
+    if (nCount<1) nCount=1;
+    nMaxUndoCount=nCount;
     if (pUndoStack!=NULL) {
         while (pUndoStack->size()>nMaxUndoCount) {
             delete pUndoStack->back();
@@ -671,8 +671,8 @@ void SdrModel::ClearModel(bool bCalledFromDestructor)
 
     sal_Int32 i;
     // delete all drawing pages
-    sal_Int32 nAnz=GetPageCount();
-    for (i=nAnz-1; i>=0; i--)
+    sal_Int32 nCount=GetPageCount();
+    for (i=nCount-1; i>=0; i--)
     {
         DeletePage( (sal_uInt16)i );
     }
@@ -680,8 +680,8 @@ void SdrModel::ClearModel(bool bCalledFromDestructor)
     PageListChanged();
 
     // delete all Masterpages
-    nAnz=GetMasterPageCount();
-    for(i=nAnz-1; i>=0; i--)
+    nCount=GetMasterPageCount();
+    for(i=nCount-1; i>=0; i--)
     {
         DeleteMasterPage( (sal_uInt16)i );
     }
@@ -835,13 +835,13 @@ void SdrModel::ImpReformatAllTextObjects()
     if( isLocked() )
         return;
 
-    sal_uInt16 nAnz=GetMasterPageCount();
+    sal_uInt16 nCount=GetMasterPageCount();
     sal_uInt16 nNum;
-    for (nNum=0; nNum<nAnz; nNum++) {
+    for (nNum=0; nNum<nCount; nNum++) {
         GetMasterPage(nNum)->ReformatAllTextObjects();
     }
-    nAnz=GetPageCount();
-    for (nNum=0; nNum<nAnz; nNum++) {
+    nCount=GetPageCount();
+    for (nNum=0; nNum<nCount; nNum++) {
         GetPage(nNum)->ReformatAllTextObjects();
     }
 }
@@ -855,14 +855,14 @@ void SdrModel::ImpReformatAllEdgeObjects()
     if( isLocked() )
         return;
 
-    sal_uInt16 nAnz=GetMasterPageCount();
+    sal_uInt16 nCount=GetMasterPageCount();
     sal_uInt16 nNum;
-    for (nNum=0; nNum<nAnz; nNum++)
+    for (nNum=0; nNum<nCount; nNum++)
     {
         GetMasterPage(nNum)->ReformatAllEdgeObjects();
     }
-    nAnz=GetPageCount();
-    for (nNum=0; nNum<nAnz; nNum++)
+    nCount=GetPageCount();
+    for (nNum=0; nNum<nCount; nNum++)
     {
         GetPage(nNum)->ReformatAllEdgeObjects();
     }
@@ -910,13 +910,13 @@ SdrModel::GetDocumentStream( OUString const& rURL,
 // convert template attributes from the string into "hard" attributes
 void SdrModel::BurnInStyleSheetAttributes()
 {
-    sal_uInt16 nAnz=GetMasterPageCount();
+    sal_uInt16 nCount=GetMasterPageCount();
     sal_uInt16 nNum;
-    for (nNum=0; nNum<nAnz; nNum++) {
+    for (nNum=0; nNum<nCount; nNum++) {
         GetMasterPage(nNum)->BurnInStyleSheetAttributes();
     }
-    nAnz=GetPageCount();
-    for (nNum=0; nNum<nAnz; nNum++) {
+    nCount=GetPageCount();
+    for (nNum=0; nNum<nCount; nNum++) {
         GetPage(nNum)->BurnInStyleSheetAttributes();
     }
 }
@@ -1252,9 +1252,9 @@ void SdrModel::TakeMetricStr(long nVal, OUString& rStr, bool bNoUnitChars, sal_I
     if(nKomma < 0)
     {
         // negative nKomma (decimal point) means: add zeros
-        sal_Int32 nAnz(-nKomma);
+        sal_Int32 nCount(-nKomma);
 
-        for(sal_Int32 i=0; i<nAnz; i++)
+        for(sal_Int32 i=0; i<nCount; i++)
             aBuf.append('0');
 
         nKomma = 0;
@@ -1265,12 +1265,12 @@ void SdrModel::TakeMetricStr(long nVal, OUString& rStr, bool bNoUnitChars, sal_I
     if (nKomma > 0 && aBuf.getLength() <= nKomma)
     {
         // if necessary, add zeros before the decimal point
-        sal_Int32 nAnz = nKomma - aBuf.getLength();
+        sal_Int32 nCount = nKomma - aBuf.getLength();
 
-        if(nAnz >= 0 && LocaleDataWrapper::isNumLeadingZero())
-            nAnz++;
+        if(nCount >= 0 && LocaleDataWrapper::isNumLeadingZero())
+            nCount++;
 
-        for(sal_Int32 i=0; i<nAnz; i++)
+        for(sal_Int32 i=0; i<nCount; i++)
             aBuf.insert(0, '0');
     }
 
@@ -1336,12 +1336,12 @@ void SdrModel::TakeAngleStr(long nAngle, OUString& rStr, bool bNoDegChar)
 
     SvtSysLocale aSysLoc;
     const LocaleDataWrapper& rLoc = aSysLoc.GetLocaleData();
-    sal_Int32 nAnz = 2;
+    sal_Int32 nCount = 2;
 
     if(LocaleDataWrapper::isNumLeadingZero())
-        nAnz++;
+        nCount++;
 
-    while(aBuf.getLength() < nAnz)
+    while(aBuf.getLength() < nCount)
         aBuf.insert(0, '0');
 
     aBuf.insert(aBuf.getLength()-2, rLoc.getNumDecimalSep()[0]);
@@ -1392,9 +1392,9 @@ void SdrModel::RecalcPageNums(bool bMaster)
 {
     if(bMaster)
     {
-        sal_uInt16 nAnz=sal_uInt16(maMaPag.size());
+        sal_uInt16 nCount=sal_uInt16(maMaPag.size());
         sal_uInt16 i;
-        for (i=0; i<nAnz; i++) {
+        for (i=0; i<nCount; i++) {
             SdrPage* pPg=maMaPag[i];
             pPg->SetPageNum(i);
         }
@@ -1402,9 +1402,9 @@ void SdrModel::RecalcPageNums(bool bMaster)
     }
     else
     {
-        sal_uInt16 nAnz=sal_uInt16(maPages.size());
+        sal_uInt16 nCount=sal_uInt16(maPages.size());
         sal_uInt16 i;
-        for (i=0; i<nAnz; i++) {
+        for (i=0; i<nCount; i++) {
             SdrPage* pPg=maPages[i];
             pPg->SetPageNum(i);
         }
@@ -1414,14 +1414,14 @@ void SdrModel::RecalcPageNums(bool bMaster)
 
 void SdrModel::InsertPage(SdrPage* pPage, sal_uInt16 nPos)
 {
-    sal_uInt16 nAnz=GetPageCount();
-    if (nPos>nAnz) nPos=nAnz;
+    sal_uInt16 nCount=GetPageCount();
+    if (nPos>nCount) nPos=nCount;
     maPages.insert(maPages.begin()+nPos,pPage);
     PageListChanged();
     pPage->SetInserted(true);
     pPage->SetPageNum(nPos);
     pPage->SetModel(this);
-    if (nPos<nAnz) bPagNumsDirty=true;
+    if (nPos<nCount) bPagNumsDirty=true;
     SetChanged();
     SdrHint aHint(HINT_PAGEORDERCHG);
     aHint.SetPage(pPage);
@@ -1465,14 +1465,14 @@ void SdrModel::MovePage(sal_uInt16 nPgNum, sal_uInt16 nNewPos)
 
 void SdrModel::InsertMasterPage(SdrPage* pPage, sal_uInt16 nPos)
 {
-    sal_uInt16 nAnz=GetMasterPageCount();
-    if (nPos>nAnz) nPos=nAnz;
+    sal_uInt16 nCount=GetMasterPageCount();
+    if (nPos>nCount) nPos=nCount;
     maMaPag.insert(maMaPag.begin()+nPos,pPage);
     MasterPageListChanged();
     pPage->SetInserted(true);
     pPage->SetPageNum(nPos);
     pPage->SetModel(this);
-    if (nPos<nAnz) {
+    if (nPos<nCount) {
         bMPgNumsDirty=true;
     }
     SetChanged();
diff --git a/svx/source/svdraw/svdogrp.cxx b/svx/source/svdraw/svdogrp.cxx
index 3cab76f..7fb0065 100644
--- a/svx/source/svdraw/svdogrp.cxx
+++ b/svx/source/svdraw/svdogrp.cxx
@@ -89,8 +89,8 @@ void SdrObjGroup::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const
 {
     rInfo.bNoContortion=false;
     SdrObjList* pOL=pSub;
-    const size_t nObjAnz = pOL->GetObjCount();
-    for (size_t i=0; i<nObjAnz; ++i) {
+    const size_t nObjCount = pOL->GetObjCount();
+    for (size_t i=0; i<nObjCount; ++i) {
         SdrObject* pObj=pOL->GetObj(i);
         SdrObjTransformInfoRec aInfo;
         pObj->TakeObjInfo(aInfo);
@@ -115,7 +115,7 @@ void SdrObjGroup::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const
         if (!aInfo.bCanConvToPathLineToArea) rInfo.bCanConvToPathLineToArea=false;
         if (!aInfo.bCanConvToPolyLineToArea) rInfo.bCanConvToPolyLineToArea=false;
     }
-    if (nObjAnz==0) {
+    if (nObjCount==0) {
         rInfo.bRotateFreeAllowed=false;
         rInfo.bRotate90Allowed  =false;
         rInfo.bMirrorFreeAllowed=false;
@@ -127,7 +127,7 @@ void SdrObjGroup::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const
         rInfo.bEdgeRadiusAllowed=false;
         rInfo.bNoContortion     =true;
     }
-    if(nObjAnz != 1)
+    if(nObjCount != 1)
     {
         // only allowed if single object selected
         rInfo.bTransparenceAllowed = false;
@@ -153,8 +153,8 @@ SdrLayerID SdrObjGroup::GetLayer() const
     bool b1st = true;
     SdrLayerID nLay=SdrLayerID(SdrObject::GetLayer());
     SdrObjList* pOL=pSub;
-    const size_t nObjAnz = pOL->GetObjCount();
-    for (size_t i=0; i<nObjAnz; ++i) {
+    const size_t nObjCount = pOL->GetObjCount();
+    for (size_t i=0; i<nObjCount; ++i) {
         SdrLayerID nLay1=pOL->GetObj(i)->GetLayer();
         if (b1st) { nLay=nLay1; b1st = false; }
         else if (nLay1!=nLay) return 0;
@@ -167,8 +167,8 @@ void SdrObjGroup::NbcSetLayer(SdrLayerID nLayer)
 {
     SdrObject::NbcSetLayer(nLayer);
     SdrObjList* pOL=pSub;
-    const size_t nObjAnz = pOL->GetObjCount();
-    for (size_t i=0; i<nObjAnz; ++i) {
+    const size_t nObjCount = pOL->GetObjCount();
+    for (size_t i=0; i<nObjCount; ++i) {
         pOL->GetObj(i)->NbcSetLayer(nLayer);
     }
 }
@@ -425,8 +425,8 @@ void SdrObjGroup::NbcMove(const Size& rSiz)
     MovePoint(aRefPoint,rSiz);
     if (pSub->GetObjCount()!=0) {
         SdrObjList* pOL=pSub;
-        const size_t nObjAnz = pOL->GetObjCount();
-        for (size_t i=0; i<nObjAnz; ++i) {
+        const size_t nObjCount = pOL->GetObjCount();
+        for (size_t i=0; i<nObjCount; ++i) {
             SdrObject* pObj=pOL->GetObj(i);
             pObj->NbcMove(rSiz);
         }
@@ -457,8 +457,8 @@ void SdrObjGroup::NbcResize(const Point& rRef, const Fraction& xFact, const Frac
     ResizePoint(aRefPoint,rRef,xFact,yFact);
     if (pSub->GetObjCount()!=0) {
         SdrObjList* pOL=pSub;
-        const size_t nObjAnz = pOL->GetObjCount();
-        for (size_t i=0; i<nObjAnz; ++i) {
+        const size_t nObjCount = pOL->GetObjCount();
+        for (size_t i=0; i<nObjCount; ++i) {
             SdrObject* pObj=pOL->GetObj(i);
             pObj->NbcResize(rRef,xFact,yFact);
         }
@@ -474,8 +474,8 @@ void SdrObjGroup::NbcRotate(const Point& rRef, long nAngle, double sn, double cs
     SetGlueReallyAbsolute(true);
     RotatePoint(aRefPoint,rRef,sn,cs);
     SdrObjList* pOL=pSub;
-    const size_t nObjAnz = pOL->GetObjCount();
-    for (size_t i=0; i<nObjAnz; ++i) {
+    const size_t nObjCount = pOL->GetObjCount();
+    for (size_t i=0; i<nObjCount; ++i) {
         SdrObject* pObj=pOL->GetObj(i);
         pObj->NbcRotate(rRef,nAngle,sn,cs);
     }
@@ -489,8 +489,8 @@ void SdrObjGroup::NbcMirror(const Point& rRef1, const Point& rRef2)
     SetGlueReallyAbsolute(true);
     MirrorPoint(aRefPoint,rRef1,rRef2); // implementation missing in SvdEtc!
     SdrObjList* pOL=pSub;
-    const size_t nObjAnz = pOL->GetObjCount();
-    for (size_t i=0; i<nObjAnz; ++i) {
+    const size_t nObjCount = pOL->GetObjCount();
+    for (size_t i=0; i<nObjCount; ++i) {
         SdrObject* pObj=pOL->GetObj(i);
         pObj->NbcMirror(rRef1,rRef2);
     }
@@ -504,8 +504,8 @@ void SdrObjGroup::NbcShear(const Point& rRef, long nAngle, double tn, bool bVShe
     SetGlueReallyAbsolute(true);
     ShearPoint(aRefPoint,rRef,tn);
     SdrObjList* pOL=pSub;
-    const size_t nObjAnz = pOL->GetObjCount();
-    for (size_t i=0; i<nObjAnz; ++i) {
+    const size_t nObjCount = pOL->GetObjCount();
+    for (size_t i=0; i<nObjCount; ++i) {
         SdrObject* pObj=pOL->GetObj(i);
         pObj->NbcShear(rRef,nAngle,tn,bVShear);
     }
@@ -520,8 +520,8 @@ void SdrObjGroup::NbcSetAnchorPos(const Point& rPnt)
     Size aSiz(rPnt.X()-aAnchor.X(),rPnt.Y()-aAnchor.Y());
     MovePoint(aRefPoint,aSiz);
     SdrObjList* pOL=pSub;
-    const size_t nObjAnz=pOL->GetObjCount();
-    for (size_t i=0; i<nObjAnz; ++i) {
+    const size_t nObjCount=pOL->GetObjCount();
+    for (size_t i=0; i<nObjCount; ++i) {
         SdrObject* pObj=pOL->GetObj(i);
         pObj->NbcSetAnchorPos(rPnt);
     }
@@ -567,12 +567,12 @@ void SdrObjGroup::Move(const Size& rSiz)
         if (pSub->GetObjCount()!=0) {
             // first move the connectors, then everything else
             SdrObjList* pOL=pSub;
-            const size_t nObjAnz = pOL->GetObjCount();
-            for (size_t i=0; i<nObjAnz; ++i) {
+            const size_t nObjCount = pOL->GetObjCount();
+            for (size_t i=0; i<nObjCount; ++i) {
                 SdrObject* pObj=pOL->GetObj(i);
                 if (pObj->IsEdgeObj()) pObj->Move(rSiz);
             }
-            for (size_t i=0; i<nObjAnz; ++i) {
+            for (size_t i=0; i<nObjCount; ++i) {
                 SdrObject* pObj=pOL->GetObj(i);
                 if (!pObj->IsEdgeObj()) pObj->Move(rSiz);
             }
@@ -611,12 +611,12 @@ void SdrObjGroup::Resize(const Point& rRef, const Fraction& xFact, const Fractio
         if (pSub->GetObjCount()!=0) {
             // move the connectors first, everything else afterwards
             SdrObjList* pOL=pSub;
-            const size_t nObjAnz = pOL->GetObjCount();
-            for (size_t i=0; i<nObjAnz; ++i) {
+            const size_t nObjCount = pOL->GetObjCount();
+            for (size_t i=0; i<nObjCount; ++i) {
                 SdrObject* pObj=pOL->GetObj(i);
                 if (pObj->IsEdgeObj()) pObj->Resize(rRef,xFact,yFact,bUnsetRelative);
             }
-            for (size_t i=0; i<nObjAnz; ++i) {
+            for (size_t i=0; i<nObjCount; ++i) {
                 SdrObject* pObj=pOL->GetObj(i);
                 if (!pObj->IsEdgeObj()) pObj->Resize(rRef,xFact,yFact,bUnsetRelative);
             }
@@ -640,12 +640,12 @@ void SdrObjGroup::Rotate(const Point& rRef, long nAngle, double sn, double cs)
         RotatePoint(aRefPoint,rRef,sn,cs);
         // move the connectors first, everything else afterwards
         SdrObjList* pOL=pSub;
-        const size_t nObjAnz = pOL->GetObjCount();
-        for (size_t i=0; i<nObjAnz; ++i) {
+        const size_t nObjCount = pOL->GetObjCount();
+        for (size_t i=0; i<nObjCount; ++i) {
             SdrObject* pObj=pOL->GetObj(i);
             if (pObj->IsEdgeObj()) pObj->Rotate(rRef,nAngle,sn,cs);
         }
-        for (size_t i=0; i<nObjAnz; ++i) {
+        for (size_t i=0; i<nObjCount; ++i) {
             SdrObject* pObj=pOL->GetObj(i);
             if (!pObj->IsEdgeObj()) pObj->Rotate(rRef,nAngle,sn,cs);
         }
@@ -665,12 +665,12 @@ void SdrObjGroup::Mirror(const Point& rRef1, const Point& rRef2)
     MirrorPoint(aRefPoint,rRef1,rRef2); // implementation missing in SvdEtc!
     // move the connectors first, everything else afterwards
     SdrObjList* pOL=pSub;
-    const size_t nObjAnz = pOL->GetObjCount();
-    for (size_t i=0; i<nObjAnz; ++i) {
+    const size_t nObjCount = pOL->GetObjCount();
+    for (size_t i=0; i<nObjCount; ++i) {
         SdrObject* pObj=pOL->GetObj(i);
         if (pObj->IsEdgeObj()) pObj->Mirror(rRef1,rRef2);
     }
-    for (size_t i=0; i<nObjAnz; ++i) {
+    for (size_t i=0; i<nObjCount; ++i) {
         SdrObject* pObj=pOL->GetObj(i);
         if (!pObj->IsEdgeObj()) pObj->Mirror(rRef1,rRef2);
     }
@@ -690,12 +690,12 @@ void SdrObjGroup::Shear(const Point& rRef, long nAngle, double tn, bool bVShear)
         ShearPoint(aRefPoint,rRef,tn);
         // move the connectors first, everything else afterwards
         SdrObjList* pOL=pSub;
-        const size_t nObjAnz = pOL->GetObjCount();
-        for (size_t i=0; i<nObjAnz; ++i) {
+        const size_t nObjCount = pOL->GetObjCount();
+        for (size_t i=0; i<nObjCount; ++i) {
             SdrObject* pObj=pOL->GetObj(i);
             if (pObj->IsEdgeObj()) pObj->Shear(rRef,nAngle,tn,bVShear);
         }
-        for (size_t i=0; i<nObjAnz; ++i) {
+        for (size_t i=0; i<nObjCount; ++i) {
             SdrObject* pObj=pOL->GetObj(i);
             if (!pObj->IsEdgeObj()) pObj->Shear(rRef,nAngle,tn,bVShear);
         }
@@ -717,12 +717,12 @@ void SdrObjGroup::SetAnchorPos(const Point& rPnt)
     MovePoint(aRefPoint,aSiz);
     // move the connectors first, everything else afterwards
     SdrObjList* pOL=pSub;
-    const size_t nObjAnz = pOL->GetObjCount();
-    for (size_t i=0; i<nObjAnz; ++i) {
+    const size_t nObjCount = pOL->GetObjCount();
+    for (size_t i=0; i<nObjCount; ++i) {
         SdrObject* pObj=pOL->GetObj(i);
         if (pObj->IsEdgeObj()) pObj->SetAnchorPos(rPnt);
     }
-    for (size_t i=0; i<nObjAnz; ++i) {
+    for (size_t i=0; i<nObjCount; ++i) {
         SdrObject* pObj = pOL->GetObj(i);
         if (!pObj->IsEdgeObj()) pObj->SetAnchorPos(rPnt);
     }


More information about the Libreoffice-commits mailing list