[Libreoffice-commits] core.git: 2 commits - sc/source sd/source

Noel Grandin noel.grandin at collabora.co.uk
Fri Aug 4 06:49:12 UTC 2017


 sc/source/core/tool/autoform.cxx          |    6 +--
 sc/source/core/tool/interpr1.cxx          |   54 +++++++++++++++---------------
 sc/source/filter/excel/excform.cxx        |   26 +++++++-------
 sc/source/filter/excel/tokstack.cxx       |   14 +++----
 sc/source/filter/inc/lotform.hxx          |    2 -
 sc/source/filter/lotus/lotform.cxx        |   52 ++++++++++++++--------------
 sc/source/filter/starcalc/scflt.cxx       |   32 ++++++++---------
 sc/source/ui/view/viewfun7.cxx            |    4 +-
 sd/source/core/sdiocmpt.cxx               |    4 +-
 sd/source/filter/ppt/pptin.cxx            |   10 ++---
 sd/source/ui/animations/motionpathtag.cxx |    4 +-
 sd/source/ui/func/futext.cxx              |    4 +-
 sd/source/ui/view/drviews2.cxx            |    6 +--
 sd/source/ui/view/sdview2.cxx             |    6 +--
 14 files changed, 112 insertions(+), 112 deletions(-)

New commits:
commit 2213bd610f6522b8fea7ae2af7e973e29dbe25b6
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Thu Aug 3 15:39:01 2017 +0200

    rename Anz->Cnt in sd
    
    Change-Id: If03e1e2e896ca7cd5783263b487eb313d80140c0
    Reviewed-on: https://gerrit.libreoffice.org/40743
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/sd/source/core/sdiocmpt.cxx b/sd/source/core/sdiocmpt.cxx
index 68b3fa8df94e..d1103f5d7485 100644
--- a/sd/source/core/sdiocmpt.cxx
+++ b/sd/source/core/sdiocmpt.cxx
@@ -70,8 +70,8 @@ void old_SdrDownCompat::CloseSubRecord()
 
     if(nMode == StreamMode::READ)
     {
-        sal_uInt32 nReadAnz(nAktPos - nSubRecPos);
-        if(nReadAnz != nSubRecSiz)
+        sal_uInt32 nReadCnt(nAktPos - nSubRecPos);
+        if(nReadCnt != nSubRecSiz)
         {
             rStream.Seek(nSubRecPos + nSubRecSiz);
         }
diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index d2b0d7ceb0d5..7bec40a94c6c 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -573,9 +573,9 @@ bool ImplSdPPTImport::Import()
 
     sal_uInt32 nImportedPages = 0;
     {
-        sal_uInt16          nMasterAnz = GetPageCount( PPT_MASTERPAGE );
+        sal_uInt16          nMasterCnt = GetPageCount( PPT_MASTERPAGE );
 
-        for ( sal_uInt16 nMasterNum = 0; nMasterNum < nMasterAnz; nMasterNum++ )
+        for ( sal_uInt16 nMasterNum = 0; nMasterNum < nMasterCnt; nMasterNum++ )
         {
             SetPageNum( nMasterNum, PPT_MASTERPAGE );
             SdPage* pPage = static_cast<SdPage*>(MakeBlancPage( true ));
@@ -911,10 +911,10 @@ bool ImplSdPPTImport::Import()
         pHandoutPage->SetPageKind( PageKind::Handout );
         pSdrModel->InsertPage( pHandoutPage );
 
-        sal_uInt16 nPageAnz = GetPageCount();
-        if ( nPageAnz )
+        sal_uInt16 nPageCnt = GetPageCount();
+        if ( nPageCnt )
         {
-            for ( sal_uInt16 nPage = 0; nPage < nPageAnz; nPage++ )
+            for ( sal_uInt16 nPage = 0; nPage < nPageCnt; nPage++ )
             {
                 mePresChange = PRESCHANGE_SEMIAUTO;
                 SetPageNum( nPage );
diff --git a/sd/source/ui/animations/motionpathtag.cxx b/sd/source/ui/animations/motionpathtag.cxx
index 90301c946242..7468dd549a22 100644
--- a/sd/source/ui/animations/motionpathtag.cxx
+++ b/sd/source/ui/animations/motionpathtag.cxx
@@ -920,8 +920,8 @@ void MotionPathTag::addCustomHandles( SdrHdlList& rHandlerList )
 
                     if( mrView.IsPlusHandlesAlwaysVisible() || bSelected )
                     {
-                        sal_uInt32 nPlusAnz=mpPathObj->GetPlusHdlCount(*pSmartHdl);
-                        for (sal_uInt32 nPlusNum=0; nPlusNum<nPlusAnz; nPlusNum++)
+                        sal_uInt32 nPlusHdlCnt=mpPathObj->GetPlusHdlCount(*pSmartHdl);
+                        for (sal_uInt32 nPlusNum=0; nPlusNum<nPlusHdlCnt; nPlusNum++)
                         {
                             SdrHdl* pPlusHdl = mpPathObj->GetPlusHdl(*pSmartHdl,nPlusNum);
                             if (pPlusHdl!=nullptr)
diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx
index 5e2d82e1331e..1d65dd5d8fca 100644
--- a/sd/source/ui/func/futext.cxx
+++ b/sd/source/ui/func/futext.cxx
@@ -1017,10 +1017,10 @@ void FuText::SetInEditMode(const MouseEvent& rMEvt, bool bQuickDrag)
         if (!GetTextObj()->GetOutlinerParaObject() && mpView->GetTextEditOutliner())
         {
             ::Outliner* pOutl = mpView->GetTextEditOutliner();
-            sal_Int32 nParaAnz = pOutl->GetParagraphCount();
+            sal_Int32 nParagraphCnt = pOutl->GetParagraphCount();
             Paragraph* p1stPara = pOutl->GetParagraph( 0 );
 
-            if (nParaAnz==1 && p1stPara)
+            if (nParagraphCnt==1 && p1stPara)
             {
                 // with only one paragraph
                 if (pOutl->GetText(p1stPara).isEmpty())
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index 0cb862c35122..21a5253bd4e2 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -2356,11 +2356,11 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
             {
                 WaitObject aWait( GetActiveWindow() );
                 const SdrMarkList& rMarkList = mpDrawView->GetMarkedObjectList();
-                const size_t nAnz=rMarkList.GetMarkCount();
+                const size_t nCnt=rMarkList.GetMarkCount();
 
                 // determine the sum of meta objects of all selected meta files
                 sal_uLong nCount = 0;
-                for(size_t nm=0; nm<nAnz; ++nm)
+                for(size_t nm=0; nm<nCnt; ++nm)
                 {
                     SdrMark*     pM=rMarkList.GetMark(nm);
                     SdrObject*   pObj=pM->GetMarkedSdrObj();
@@ -2396,7 +2396,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
                     SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
                     if( pFact )
                     {
-                        ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateBreakDlg(GetActiveWindow(), mpDrawView, GetDocSh(), nCount, static_cast<sal_uLong>(nAnz) ));
+                        ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateBreakDlg(GetActiveWindow(), mpDrawView, GetDocSh(), nCount, static_cast<sal_uLong>(nCnt) ));
                         if( pDlg )
                         {
                             pDlg->Execute();
diff --git a/sd/source/ui/view/sdview2.cxx b/sd/source/ui/view/sdview2.cxx
index 81ddb27a7a36..ad13321ba146 100644
--- a/sd/source/ui/view/sdview2.cxx
+++ b/sd/source/ui/view/sdview2.cxx
@@ -392,9 +392,9 @@ void View::DragFinished( sal_Int8 nDropAction )
         if( bUndo )
             BegUndo();
 
-        const size_t nAnz = mpDragSrcMarkList->GetMarkCount();
+        const size_t nCnt = mpDragSrcMarkList->GetMarkCount();
 
-        for( size_t nm = nAnz; nm>0; )
+        for( size_t nm = nCnt; nm>0; )
         {
             --nm;
             SdrMark* pM=mpDragSrcMarkList->GetMark(nm);
@@ -404,7 +404,7 @@ void View::DragFinished( sal_Int8 nDropAction )
 
         mpDragSrcMarkList->GetMark(0)->GetMarkedSdrObj()->GetOrdNum();
 
-        for (size_t nm = nAnz; nm>0;)
+        for (size_t nm = nCnt; nm>0;)
         {
             --nm;
             SdrMark* pM=mpDragSrcMarkList->GetMark(nm);
commit 77f854f13033eeff3147dae1c5ffbfaf4eec93c1
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Thu Aug 3 15:22:17 2017 +0200

    rename Anz->Cnt in sc
    
    Change-Id: I33e367223574b614dfee262942b57f727dc6d680
    Reviewed-on: https://gerrit.libreoffice.org/40742
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/sc/source/core/tool/autoform.cxx b/sc/source/core/tool/autoform.cxx
index 874321b9becd..e0a97f78e5bd 100644
--- a/sc/source/core/tool/autoform.cxx
+++ b/sc/source/core/tool/autoform.cxx
@@ -1050,10 +1050,10 @@ void ScAutoFormat::Load()
                 m_aVersions.Load( rStream, nVal );        // Item-Versionen
 
                 ScAutoFormatData* pData;
-                sal_uInt16 nAnz = 0;
-                rStream.ReadUInt16( nAnz );
+                sal_uInt16 nCnt = 0;
+                rStream.ReadUInt16( nCnt );
                 bRet = (rStream.GetError() == ERRCODE_NONE);
-                for (sal_uInt16 i=0; bRet && (i < nAnz); i++)
+                for (sal_uInt16 i=0; bRet && (i < nCnt); i++)
                 {
                     pData = new ScAutoFormatData();
                     bRet = pData->Load(rStream, m_aVersions);
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index d0cf16fd3cb1..60df984f637f 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -8510,17 +8510,17 @@ void ScInterpreter::ScFind()
     sal_uInt8 nParamCount = GetByte();
     if ( MustHaveParamCount( nParamCount, 2, 3 ) )
     {
-        sal_Int32 nAnz;
+        sal_Int32 nCnt;
         if (nParamCount == 3)
-            nAnz = GetDouble();
+            nCnt = GetDouble();
         else
-            nAnz = 1;
+            nCnt = 1;
         OUString sStr = GetString().getString();
-        if (nAnz < 1 || nAnz > sStr.getLength())
+        if (nCnt < 1 || nCnt > sStr.getLength())
             PushNoValue();
         else
         {
-            sal_Int32 nPos = sStr.indexOf(GetString().getString(), nAnz - 1);
+            sal_Int32 nPos = sStr.indexOf(GetString().getString(), nCnt - 1);
             if (nPos == -1)
                 PushNoValue();
             else
@@ -8727,15 +8727,15 @@ void ScInterpreter::ScMidB()
 {
     if ( MustHaveParamCount( GetByte(), 3 ) )
     {
-        double fAnz    = GetStringPositionArgument();
+        double fCnt    = GetStringPositionArgument();
         double fAnfang = GetStringPositionArgument();
         OUString aStr = GetString().getString();
-        if (fAnfang < 1.0 || fAnz < 0.0)
+        if (fAnfang < 1.0 || fCnt < 0.0)
             PushIllegalArgument();
         else
         {
 
-            aStr = lcl_LeftB(aStr, (sal_Int32)fAnfang + (sal_Int32)fAnz - 1);
+            aStr = lcl_LeftB(aStr, (sal_Int32)fAnfang + (sal_Int32)fCnt - 1);
             sal_Int32 nCnt = getLengthB(aStr) - (sal_Int32)fAnfang + 1;
             aStr = lcl_RightB(aStr, nCnt>0 ? nCnt:0);
             PushString(aStr);
@@ -8831,21 +8831,21 @@ void ScInterpreter::ScSearch()
     sal_uInt8 nParamCount = GetByte();
     if ( MustHaveParamCount( nParamCount, 2, 3 ) )
     {
-        double fAnz;
+        double fCnt;
         if (nParamCount == 3)
         {
-            fAnz = GetStringPositionArgument();
-            if( fAnz < 1 )
+            fCnt = GetStringPositionArgument();
+            if( fCnt < 1 )
             {
                 PushIllegalArgument();
                 return;
             }
         }
         else
-            fAnz = 1.0;
+            fCnt = 1.0;
         OUString sStr = GetString().getString();
         OUString SearchStr = GetString().getString();
-        sal_Int32 nPos = fAnz - 1;
+        sal_Int32 nPos = fCnt - 1;
         sal_Int32 nEndPos = sStr.getLength();
         if( nPos >= nEndPos )
             PushNoValue();
@@ -8867,14 +8867,14 @@ void ScInterpreter::ScMid()
 {
     if ( MustHaveParamCount( GetByte(), 3 ) )
     {
-        double fAnz    = GetStringPositionArgument();
+        double fCnt    = GetStringPositionArgument();
         double fAnfang = GetStringPositionArgument();
         OUString aStr = GetString().getString();
-        if (fAnfang < 1.0 || fAnz < 0.0)
+        if (fAnfang < 1.0 || fCnt < 0.0)
             PushIllegalArgument();
         else
         {
-            sal_Int32 nCharacters = std::min<sal_Int32>(static_cast<sal_Int32>(fAnz), aStr.getLength() - fAnfang + 1);
+            sal_Int32 nCharacters = std::min<sal_Int32>(static_cast<sal_Int32>(fCnt), aStr.getLength() - fAnfang + 1);
             OUString sRes;
             if (nCharacters > 0)
                 sRes = aStr.copy(static_cast<sal_Int32>(fAnfang-1), nCharacters);
@@ -8961,20 +8961,20 @@ void ScInterpreter::ScSubstitute()
     sal_uInt8 nParamCount = GetByte();
     if ( MustHaveParamCount( nParamCount, 3, 4 ) )
     {
-        sal_Int32 nAnz;
+        sal_Int32 nCnt;
         if (nParamCount == 4)
         {
-            double fAnz = GetStringPositionArgument();
-            if( fAnz < 1 )
+            double fCnt = GetStringPositionArgument();
+            if( fCnt < 1 )
             {
                 PushIllegalArgument();
                 return;
             }
             else
-                nAnz = (sal_Int32) fAnz;
+                nCnt = (sal_Int32) fCnt;
         }
         else
-            nAnz = 0;
+            nCnt = 0;
         OUString sNewStr = GetString().getString();
         OUString sOldStr = GetString().getString();
         OUString sStr    = GetString().getString();
@@ -8988,7 +8988,7 @@ void ScInterpreter::ScSubstitute()
             if (nPos != -1)
             {
                 nCount++;
-                if( !nAnz || nCount == nAnz )
+                if( !nCnt || nCount == nCnt )
                 {
                     sStr = sStr.replaceAt(nPos,nOldLen, "");
                     if ( CheckStringResultLen( sStr, sNewStr ) )
@@ -9013,20 +9013,20 @@ void ScInterpreter::ScRept()
 {
     if ( MustHaveParamCount( GetByte(), 2 ) )
     {
-        double fAnz = GetStringPositionArgument();
+        double fCnt = GetStringPositionArgument();
         OUString aStr = GetString().getString();
-        if ( fAnz < 0.0 )
+        if ( fCnt < 0.0 )
             PushIllegalArgument();
-        else if ( fAnz * aStr.getLength() > SAL_MAX_UINT16 )
+        else if ( fCnt * aStr.getLength() > SAL_MAX_UINT16 )
         {
             PushError( FormulaError::StringOverflow );
         }
-        else if ( fAnz == 0.0 )
+        else if ( fCnt == 0.0 )
             PushString( EMPTY_OUSTRING );
         else
         {
             const sal_Int32 nLen = aStr.getLength();
-            sal_Int32 n = (sal_Int32) fAnz;
+            sal_Int32 n = (sal_Int32) fCnt;
             OUStringBuffer aRes(n*nLen);
             while( n-- )
                 aRes.append(aStr);
diff --git a/sc/source/filter/excel/excform.cxx b/sc/source/filter/excel/excform.cxx
index eff0af3325cd..a7c5c94f9dc7 100644
--- a/sc/source/filter/excel/excform.cxx
+++ b/sc/source/filter/excel/excform.cxx
@@ -1544,7 +1544,7 @@ void ExcelToSc::GetAbsRefs( ScRangeList& rRangeList, XclImpStream& rStrm, std::s
     rStrm.Seek( nEndPos );
 }
 
-void ExcelToSc::DoMulArgs( DefTokenId eId, sal_uInt8 nAnz )
+void ExcelToSc::DoMulArgs( DefTokenId eId, sal_uInt8 nCnt )
 {
     TokenId                 eParam[ 256 ];
     sal_Int32                   nLauf;
@@ -1552,18 +1552,18 @@ void ExcelToSc::DoMulArgs( DefTokenId eId, sal_uInt8 nAnz )
     if( eId == ocCeil || eId == ocFloor )
     {
         aStack << aPool.Store( 1.0 );   // default, because not present in Excel
-        nAnz++;
+        nCnt++;
     }
 
-    for( nLauf = 0; aStack.HasMoreTokens() && (nLauf < nAnz); nLauf++ )
+    for( nLauf = 0; aStack.HasMoreTokens() && (nLauf < nCnt); nLauf++ )
         aStack >> eParam[ nLauf ];
     // #i70925# reduce parameter count, if no more tokens available on token stack
-    if( nLauf < nAnz )
-        nAnz = static_cast< sal_uInt8 >( nLauf );
+    if( nLauf < nCnt )
+        nCnt = static_cast< sal_uInt8 >( nLauf );
 
-    if( nAnz > 0 && eId == ocExternal )
+    if( nCnt > 0 && eId == ocExternal )
     {
-        TokenId             n = eParam[ nAnz - 1 ];
+        TokenId             n = eParam[ nCnt - 1 ];
 //##### ADJUST STUPIDITY FOR BASIC-FUNCS!
         if( const OUString* pExt = aPool.GetExternal( n ) )
         {
@@ -1571,7 +1571,7 @@ void ExcelToSc::DoMulArgs( DefTokenId eId, sal_uInt8 nAnz )
                 aPool << pFuncInfo->meOpCode;
             else
                 aPool << n;
-            nAnz--;
+            nCnt--;
         }
         else
             aPool << eId;
@@ -1581,22 +1581,22 @@ void ExcelToSc::DoMulArgs( DefTokenId eId, sal_uInt8 nAnz )
 
     aPool << ocOpen;
 
-    if( nAnz > 0 )
+    if( nCnt > 0 )
     {
-        // attention: 0 = last parameter, nAnz-1 = first parameter
+        // attention: 0 = last parameter, nCnt-1 = first parameter
         sal_Int16 nSkipEnd = -1;    // skip all parameters <= nSkipEnd
 
-        sal_Int16 nLast = nAnz - 1;
+        sal_Int16 nLast = nCnt - 1;
 
         // functions for which parameters have to be skipped
-        if( eId == ocPercentrank && nAnz == 3 )
+        if( eId == ocPercentrank && nCnt == 3 )
             nSkipEnd = 0;       // skip last parameter if necessary
 
         // Joost special cases
         else if( eId == ocIf )
         {
             sal_uInt16          nNullParam = 0;
-            for( nLauf = 0 ; nLauf < nAnz ; nLauf++ )
+            for( nLauf = 0 ; nLauf < nCnt ; nLauf++ )
             {
                 if( aPool.IsSingleOp( eParam[ nLauf ], ocMissing ) )
                 {
diff --git a/sc/source/filter/excel/tokstack.cxx b/sc/source/filter/excel/tokstack.cxx
index daf638e41fa8..9ffbd7c8c892 100644
--- a/sc/source/filter/excel/tokstack.cxx
+++ b/sc/source/filter/excel/tokstack.cxx
@@ -347,22 +347,22 @@ bool TokenPool::GetElementRek( const sal_uInt16 nId )
     }
 
     bool bRet = true;
-    sal_uInt16      nAnz = pSize[ nId ];
+    sal_uInt16      nCnt = pSize[ nId ];
     sal_uInt16 nFirstId = pElement[ nId ];
     if (nFirstId >= nP_Id)
     {
         SAL_WARN("sc.filter", "TokenPool::GetElementRek: nFirstId >= nP_Id");
-        nAnz = 0;
+        nCnt = 0;
         bRet = false;
     }
-    sal_uInt16* pAkt = nAnz ? &pP_Id[ nFirstId ] : nullptr;
-    if (nAnz > nP_Id - nFirstId)
+    sal_uInt16* pAkt = nCnt ? &pP_Id[ nFirstId ] : nullptr;
+    if (nCnt > nP_Id - nFirstId)
     {
-        SAL_WARN("sc.filter", "TokenPool::GetElementRek: nAnz > nP_Id - nFirstId");
-        nAnz = nP_Id - nFirstId;
+        SAL_WARN("sc.filter", "TokenPool::GetElementRek: nCnt > nP_Id - nFirstId");
+        nCnt = nP_Id - nFirstId;
         bRet = false;
     }
-    for( ; nAnz > 0 ; nAnz--, pAkt++ )
+    for( ; nCnt > 0 ; nCnt--, pAkt++ )
     {
         assert(pAkt);
         if( *pAkt < nScTokenOff )
diff --git a/sc/source/filter/inc/lotform.hxx b/sc/source/filter/inc/lotform.hxx
index c407358146f4..87bbe97890fb 100644
--- a/sc/source/filter/inc/lotform.hxx
+++ b/sc/source/filter/inc/lotform.hxx
@@ -71,7 +71,7 @@ private:
     static DefTokenId   IndexToToken( sal_uInt8 );
     static FUNC_TYPE    IndexToTypeWK123( sal_uInt8 );
     static DefTokenId   IndexToTokenWK123( sal_uInt8 );
-    void                DoFunc( DefTokenId eOc, sal_uInt8 nAnz, const sal_Char* pExtName );
+    void                DoFunc( DefTokenId eOc, sal_uInt8 nCnt, const sal_Char* pExtName );
     void                LotusRelToScRel(sal_uInt16 nCol, sal_uInt16 nRow, ScSingleRefData& rSRD);
     bool                bWK3;       // alternative Code translation for < WK1
     bool                bWK123;     // alternative for 123
diff --git a/sc/source/filter/lotus/lotform.cxx b/sc/source/filter/lotus/lotform.cxx
index d3c886656145..fae9c9a3d841 100644
--- a/sc/source/filter/lotus/lotform.cxx
+++ b/sc/source/filter/lotus/lotform.cxx
@@ -35,7 +35,7 @@ static const sal_Char*      GetAddInName( const sal_uInt8 nIndex );
 
 static DefTokenId           lcl_KnownAddIn(const OString& rTest);
 
-void LotusToSc::DoFunc( DefTokenId eOc, sal_uInt8 nAnz, const sal_Char* pExtString )
+void LotusToSc::DoFunc( DefTokenId eOc, sal_uInt8 nCnt, const sal_Char* pExtString )
 {
     TokenId                     eParam[ 256 ];
     sal_Int32                       nLauf;
@@ -43,7 +43,7 @@ void LotusToSc::DoFunc( DefTokenId eOc, sal_uInt8 nAnz, const sal_Char* pExtStri
 
     bool                        bAddIn = false;
 
-    SAL_WARN_IF( nAnz > 128, "sc", "-LotusToSc::DoFunc(): Too many (128)!" );
+    SAL_WARN_IF( nCnt > 128, "sc", "-LotusToSc::DoFunc(): Too many (128)!" );
 
     if( eOc == ocNoName )
     {
@@ -77,14 +77,14 @@ void LotusToSc::DoFunc( DefTokenId eOc, sal_uInt8 nAnz, const sal_Char* pExtStri
         }
     }
 
-    for( nLauf = 0 ; nLauf < nAnz ; nLauf++ )
+    for( nLauf = 0 ; nLauf < nCnt ; nLauf++ )
         aStack >> eParam[ nLauf ];
 
     // special cases...
     switch( eOc )
     {
         case ocIndex:
-            SAL_WARN_IF( nAnz < 2, "sc", "+LotusToSc::DoFunc(): ocIndex needs at least 2 parameters!" );
+            SAL_WARN_IF( nCnt < 2, "sc", "+LotusToSc::DoFunc(): ocIndex needs at least 2 parameters!" );
             nMerk0 = eParam[ 0 ];
             eParam[ 0 ] = eParam[ 1 ];
             eParam[ 1 ] = nMerk0;
@@ -93,7 +93,7 @@ void LotusToSc::DoFunc( DefTokenId eOc, sal_uInt8 nAnz, const sal_Char* pExtStri
             break;
         case ocIRR:
         {
-            SAL_WARN_IF( nAnz != 2, "sc", "+LotusToSc::DoFunc(): ocIRR needs 2 parameters!" );
+            SAL_WARN_IF( nCnt != 2, "sc", "+LotusToSc::DoFunc(): ocIRR needs 2 parameters!" );
             nMerk0 = eParam[ 0 ];
             eParam[ 0 ] = eParam[ 1 ];
             eParam[ 1 ] = nMerk0;
@@ -107,8 +107,8 @@ void LotusToSc::DoFunc( DefTokenId eOc, sal_uInt8 nAnz, const sal_Char* pExtStri
             break;
         case ocChoose:
         {// 1. Parameter ++
-            if (nAnz >= 1)
-                IncToken( eParam[ nAnz - 1 ] );
+            if (nCnt >= 1)
+                IncToken( eParam[ nCnt - 1 ] );
         }
             break;
         case ocFind:
@@ -121,16 +121,16 @@ void LotusToSc::DoFunc( DefTokenId eOc, sal_uInt8 nAnz, const sal_Char* pExtStri
         case ocMid:
         case ocReplace:
         {// 2. Parameter ++
-            if (nAnz >= 2)
-                IncToken( eParam[ nAnz - 2 ] );
+            if (nCnt >= 2)
+                IncToken( eParam[ nCnt - 2 ] );
         }
             break;
         case ocRate:
         {
             // new quantity = 4!
-            SAL_WARN_IF( nAnz != 3, "sc",
+            SAL_WARN_IF( nCnt != 3, "sc",
                 "*LotusToSc::DoFunc(): ZINS() needs 3 parameters!" );
-            nAnz = 4;
+            nCnt = 4;
             eParam[ 3 ] = eParam[ 0 ];  // 3. -> 1.
             eParam[ 0 ] = eParam[ 2 ];  // 1. -> 4.
             NegToken( eParam[ 1 ] );    // 2. -> -2. (+ 2. -> 3.)
@@ -139,9 +139,9 @@ void LotusToSc::DoFunc( DefTokenId eOc, sal_uInt8 nAnz, const sal_Char* pExtStri
             break;
         case ocNper:
         {
-            SAL_WARN_IF( nAnz != 3, "sc",
+            SAL_WARN_IF( nCnt != 3, "sc",
                 "*LotusToSc::DoFunc(): TERM() or CTERM() need 3 parameters!" );
-            nAnz = 4;
+            nCnt = 4;
             if ( OString(pExtString) == "TERM" )
             {
                 // @TERM(pmt,int,fv) -> NPER(int,-pmt,pv=0,fv)
@@ -165,11 +165,11 @@ void LotusToSc::DoFunc( DefTokenId eOc, sal_uInt8 nAnz, const sal_Char* pExtStri
         case ocRoundDown:
         {
             // omit optional 3rd parameter
-            if ( nAnz == 3 )
+            if ( nCnt == 3 )
             {
                 eParam[ 0 ] = eParam[ 1 ];
                 eParam[ 1 ] = eParam[ 2 ];
-                nAnz = 2;
+                nCnt = 2;
             }
 
         }
@@ -182,16 +182,16 @@ void LotusToSc::DoFunc( DefTokenId eOc, sal_uInt8 nAnz, const sal_Char* pExtStri
 
     aPool << ocOpen;
 
-    if( nAnz > 0 )
+    if( nCnt > 0 )
     {
-            // ATTENTION: 0 is the last parameter, nAnz-1 the first one
+            // ATTENTION: 0 is the last parameter, nCnt-1 the first one
 
-        sal_Int16 nLast = nAnz - 1;
+        sal_Int16 nLast = nCnt - 1;
 
         if( eOc == ocPMT )
         {   // special case ocPMT, ignore (negate?) last parameter!
             // additionally: 1. -> 3., 3. -> 2., 2. -> 1.
-            SAL_WARN_IF( nAnz != 3, "sc",
+            SAL_WARN_IF( nCnt != 3, "sc",
                 "+LotusToSc::DoFunc(): ocPMT needs 3 parameters!" );
             aPool << eParam[ 1 ] << ocSep << eParam[ 0 ] << ocSep
                 << ocNegSub << eParam[ 2 ];
@@ -371,7 +371,7 @@ typedef DefTokenId ( FuncType2 ) ( sal_uInt8 );
 void LotusToSc::Convert( const ScTokenArray*& rpErg, sal_Int32& rRest )
 {
     sal_uInt8               nOc;
-    sal_uInt8               nAnz;
+    sal_uInt8               nCnt;
     sal_uInt8               nRelBits;
     sal_uInt16              nStrLen;
     sal_uInt16              nRngIndex;
@@ -446,8 +446,8 @@ void LotusToSc::Convert( const ScTokenArray*& rpErg, sal_Int32& rRest )
             case FT_FuncFix3:   DoFunc( eOc, 3, pExtName ); break;
             case FT_FuncFix4:   DoFunc( eOc, 4, pExtName ); break;
                 case FT_FuncVar:
-                Read( nAnz );
-                DoFunc( eOc, nAnz, pExtName );
+                Read( nCnt );
+                DoFunc( eOc, nCnt, pExtName );
                 break;
             case FT_Neg:
                 aPool << ocOpen << ocNegSub << aStack << ocClose;
@@ -589,7 +589,7 @@ void LotusToSc::Convert( const ScTokenArray*& rpErg, sal_Int32& rRest )
                 break;
             case FT_Splfunc:
             {
-                Read( nAnz );
+                Read( nCnt );
                 Read( nStrLen );
 
                 const size_t nMaxEntries = aIn.remainingSize();
@@ -604,13 +604,13 @@ void LotusToSc::Convert( const ScTokenArray*& rpErg, sal_Int32& rRest )
                         aIn.ReadBytes(p.get(), nStrLen);
                         p[ nStrLen ] = 0x00;
 
-                        DoFunc( ocNoName, nAnz, p.get() );
+                        DoFunc( ocNoName, nCnt, p.get() );
                     }
                     else
-                        DoFunc( ocNoName, nAnz, nullptr );
+                        DoFunc( ocNoName, nCnt, nullptr );
                 }
                 else
-                    DoFunc( ocNoName, nAnz, nullptr );
+                    DoFunc( ocNoName, nCnt, nullptr );
             }
                 break;
             case FT_Const10Float:
diff --git a/sc/source/filter/starcalc/scflt.cxx b/sc/source/filter/starcalc/scflt.cxx
index 66b8876897c9..32ef75272141 100644
--- a/sc/source/filter/starcalc/scflt.cxx
+++ b/sc/source/filter/starcalc/scflt.cxx
@@ -409,9 +409,9 @@ Sc10FontCollection::Sc10FontCollection(SvStream& rStream)
     rStream.ReadUInt16( ID );
     if (ID == FontID)
     {
-        sal_uInt16 nAnz(0);
-        rStream.ReadUInt16( nAnz );
-        for (sal_uInt16 i=0; (i < nAnz) && (nError == ERRCODE_NONE); i++)
+        sal_uInt16 nCnt(0);
+        rStream.ReadUInt16( nCnt );
+        for (sal_uInt16 i=0; (i < nCnt) && (nError == ERRCODE_NONE); i++)
         {
             nError = insert_new<Sc10FontData>( this, rStream);
         }
@@ -450,9 +450,9 @@ Sc10NameCollection::Sc10NameCollection(SvStream& rStream) :
     rStream.ReadUInt16( ID );
     if (ID == NameID)
     {
-        sal_uInt16 nAnz;
-        rStream.ReadUInt16( nAnz );
-        for (sal_uInt16 i=0; (i < nAnz) && (nError == ERRCODE_NONE); i++)
+        sal_uInt16 nCnt;
+        rStream.ReadUInt16( nCnt );
+        for (sal_uInt16 i=0; (i < nCnt) && (nError == ERRCODE_NONE); i++)
         {
             nError = insert_new<Sc10NameData>( this, rStream);
         }
@@ -500,9 +500,9 @@ Sc10PatternCollection::Sc10PatternCollection(SvStream& rStream)
     rStream.ReadUInt16( ID );
     if (ID == PatternID)
     {
-        sal_uInt16 nAnz;
-        rStream.ReadUInt16( nAnz );
-        for (sal_uInt16 i=0; (i < nAnz) && (nError == ERRCODE_NONE); i++)
+        sal_uInt16 nCnt;
+        rStream.ReadUInt16( nCnt );
+        for (sal_uInt16 i=0; (i < nCnt) && (nError == ERRCODE_NONE); i++)
         {
             nError = insert_new<Sc10PatternData>( this, rStream);
         }
@@ -560,9 +560,9 @@ Sc10DataBaseCollection::Sc10DataBaseCollection(SvStream& rStream)
     if (ID == DataBaseID)
     {
         lcl_ReadFixedString( rStream, ActName, sizeof(ActName));
-        sal_uInt16 nAnz;
-        rStream.ReadUInt16( nAnz );
-        for (sal_uInt16 i=0; (i < nAnz) && (nError == ERRCODE_NONE); i++)
+        sal_uInt16 nCnt;
+        rStream.ReadUInt16( nCnt );
+        for (sal_uInt16 i=0; (i < nCnt) && (nError == ERRCODE_NONE); i++)
         {
             nError = insert_new<Sc10DataBaseData>( this, rStream);
         }
@@ -2305,17 +2305,17 @@ void Sc10Import::LoadObjects()
         return;
     if (ID == ObjectID)
     {
-        sal_uInt16 nAnz;
-        rStream.ReadUInt16( nAnz );
+        sal_uInt16 nCnt;
+        rStream.ReadUInt16( nCnt );
         sal_Char Reserved[32];
         rStream.ReadBytes(Reserved, sizeof(Reserved));
         nError = rStream.GetError();
-        if ((nAnz > 0) && (nError == ERRCODE_NONE))
+        if ((nCnt > 0) && (nError == ERRCODE_NONE))
         {
             sal_uInt8 ObjectType;
             Sc10GraphHeader GraphHeader;
             bool IsOleObject = false; // TODO: this is only a band-aid
-            for (sal_uInt16 i = 0; (i < nAnz) && (nError == ERRCODE_NONE) && !rStream.IsEof() && !IsOleObject; i++)
+            for (sal_uInt16 i = 0; (i < nCnt) && (nError == ERRCODE_NONE) && !rStream.IsEof() && !IsOleObject; i++)
             {
                 rStream.ReadUChar( ObjectType );
                 lcl_ReadGraphHeader(rStream, GraphHeader);
diff --git a/sc/source/ui/view/viewfun7.cxx b/sc/source/ui/view/viewfun7.cxx
index f7d6c350e164..3695ce2653ac 100644
--- a/sc/source/ui/view/viewfun7.cxx
+++ b/sc/source/ui/view/viewfun7.cxx
@@ -148,8 +148,8 @@ void ScViewFunc::PasteDraw( const Point& rLogicPos, SdrModel* pModel,
 
             SdrMarkList aMark = pDragEditView->GetMarkedObjectList();
             aMark.ForceSort();
-            const size_t nMarkAnz=aMark.GetMarkCount();
-            for (size_t nm=0; nm<nMarkAnz; ++nm) {
+            const size_t nMarkCnt=aMark.GetMarkCount();
+            for (size_t nm=0; nm<nMarkCnt; ++nm) {
                 const SdrMark* pM=aMark.GetMark(nm);
                 const SdrObject* pObj=pM->GetMarkedSdrObj();
 


More information about the Libreoffice-commits mailing list