From c2fdf096b40f87436b3ee74a1cdeb014cb5a7bbf Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 3 Aug 2017 15:42:08 +0200 Subject: rename Anz->Cnt in svl Change-Id: Ibe9ad8c1bfbb336ee1f02edf0f619220cfcee375 Reviewed-on: https://gerrit.libreoffice.org/40744 Tested-by: Jenkins Reviewed-by: Noel Grandin --- svl/source/numbers/zforfind.cxx | 14 +-- svl/source/numbers/zforfind.hxx | 2 +- svl/source/numbers/zforlist.cxx | 12 +-- svl/source/numbers/zformat.cxx | 216 ++++++++++++++++++++-------------------- svl/source/numbers/zforscan.cxx | 10 +- svl/source/numbers/zforscan.hxx | 2 +- 6 files changed, 128 insertions(+), 128 deletions(-) (limited to 'svl') diff --git a/svl/source/numbers/zforfind.cxx b/svl/source/numbers/zforfind.cxx index 2a0143812b5a..cc4f160ee1d0 100644 --- a/svl/source/numbers/zforfind.cxx +++ b/svl/source/numbers/zforfind.cxx @@ -890,7 +890,7 @@ inline bool ImpSvNumberInputScan::GetNextNumber( sal_uInt16& i, sal_uInt16& j ) bool ImpSvNumberInputScan::GetTimeRef( double& fOutNumber, sal_uInt16 nIndex, // j-value of the first numeric time part of input, default 0 - sal_uInt16 nAnz ) // count of numeric time parts + sal_uInt16 nCnt ) // count of numeric time parts { bool bRet = true; sal_uInt16 nHour; @@ -899,11 +899,11 @@ bool ImpSvNumberInputScan::GetTimeRef( double& fOutNumber, double fSecond100 = 0.0; sal_uInt16 nStartIndex = nIndex; - if (nDecPos == 2 && (nAnz == 3 || nAnz == 2)) // 20:45.5 or 45.5 + if (nDecPos == 2 && (nCnt == 3 || nCnt == 2)) // 20:45.5 or 45.5 { nHour = 0; } - else if (nIndex - nStartIndex < nAnz) + else if (nIndex - nStartIndex < nCnt) { nHour = (sal_uInt16) sStrArray[nNums[nIndex++]].toInt32(); } @@ -913,19 +913,19 @@ bool ImpSvNumberInputScan::GetTimeRef( double& fOutNumber, bRet = false; SAL_WARN( "svl.numbers", "ImpSvNumberInputScan::GetTimeRef: bad number index"); } - if (nDecPos == 2 && nAnz == 2) // 45.5 + if (nDecPos == 2 && nCnt == 2) // 45.5 { nMinute = 0; } - else if (nIndex - nStartIndex < nAnz) + else if (nIndex - nStartIndex < nCnt) { nMinute = (sal_uInt16) sStrArray[nNums[nIndex++]].toInt32(); } - if (nIndex - nStartIndex < nAnz) + if (nIndex - nStartIndex < nCnt) { nSecond = (sal_uInt16) sStrArray[nNums[nIndex++]].toInt32(); } - if (nIndex - nStartIndex < nAnz) + if (nIndex - nStartIndex < nCnt) { fSecond100 = StringToDouble( sStrArray[nNums[nIndex]], true ); } diff --git a/svl/source/numbers/zforfind.hxx b/svl/source/numbers/zforfind.hxx index a969b5d5de6a..0ea6c18d03bb 100644 --- a/svl/source/numbers/zforfind.hxx +++ b/svl/source/numbers/zforfind.hxx @@ -329,7 +329,7 @@ private: */ bool GetTimeRef( double& fOutNumber, // result as double sal_uInt16 nIndex, // Index of hour in input - sal_uInt16 nAnz ); // Count of time substrings in input + sal_uInt16 nCnt ); // Count of time substrings in input sal_uInt16 ImplGetDay ( sal_uInt16 nIndex ); // Day input, 0 if no match sal_uInt16 ImplGetMonth( sal_uInt16 nIndex ); // Month input, zero based return, NumberOfMonths if no match sal_uInt16 ImplGetYear ( sal_uInt16 nIndex ); // Year input, 0 if no match diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx index ad7069e62832..bd6346a3ee39 100644 --- a/svl/source/numbers/zforlist.cxx +++ b/svl/source/numbers/zforlist.cxx @@ -1938,19 +1938,19 @@ void SvNumberFormatter::GetFormatSpecialInfo(sal_uInt32 nFormat, bool& bThousand, bool& IsRed, sal_uInt16& nPrecision, - sal_uInt16& nAnzLeading) + sal_uInt16& nLeadingCnt) { SvNumberformat* pFormat = GetFormatEntry( nFormat ); if (pFormat) pFormat->GetFormatSpecialInfo(bThousand, IsRed, - nPrecision, nAnzLeading); + nPrecision, nLeadingCnt); else { bThousand = false; IsRed = false; nPrecision = pFormatScanner->GetStandardPrec(); - nAnzLeading = 0; + nLeadingCnt = 0; } } @@ -2003,7 +2003,7 @@ OUString SvNumberFormatter::GetFormatDecimalSep( sal_uInt32 nFormat ) const sal_uInt32 SvNumberFormatter::GetFormatSpecialInfo( const OUString& rFormatString, bool& bThousand, bool& IsRed, sal_uInt16& nPrecision, - sal_uInt16& nAnzLeading, LanguageType eLnge ) + sal_uInt16& nLeadingCnt, LanguageType eLnge ) { if (eLnge == LANGUAGE_DONTKNOW) @@ -2018,14 +2018,14 @@ sal_uInt32 SvNumberFormatter::GetFormatSpecialInfo( const OUString& rFormatStrin pStringScanner, nCheckPos, eLnge )); if ( nCheckPos == 0 ) { - pFormat->GetFormatSpecialInfo( bThousand, IsRed, nPrecision, nAnzLeading ); + pFormat->GetFormatSpecialInfo( bThousand, IsRed, nPrecision, nLeadingCnt ); } else { bThousand = false; IsRed = false; nPrecision = pFormatScanner->GetStandardPrec(); - nAnzLeading = 0; + nLeadingCnt = 0; } return nCheckPos; } diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx index 314ab233168d..49c1ee0c1e3f 100644 --- a/svl/source/numbers/zformat.cxx +++ b/svl/source/numbers/zformat.cxx @@ -121,9 +121,9 @@ static long GetPrecExp( double fAbsVal ) * SvNumberformatInfo * */ -void ImpSvNumberformatInfo::Copy( const ImpSvNumberformatInfo& rNumFor, sal_uInt16 nAnz ) +void ImpSvNumberformatInfo::Copy( const ImpSvNumberformatInfo& rNumFor, sal_uInt16 nCnt ) { - for (sal_uInt16 i = 0; i < nAnz; ++i) + for (sal_uInt16 i = 0; i < nCnt; ++i) { sStrArray[i] = rNumFor.sStrArray[i]; nTypeArray[i] = rNumFor.nTypeArray[i]; @@ -282,13 +282,13 @@ ImpSvNumFor::~ImpSvNumFor() { } -void ImpSvNumFor::Enlarge(sal_uInt16 nAnz) +void ImpSvNumFor::Enlarge(sal_uInt16 nCnt) { - if ( nStringsCnt != nAnz ) + if ( nStringsCnt != nCnt ) { - nStringsCnt = nAnz; - aI.nTypeArray.resize(nAnz); - aI.sStrArray.resize(nAnz); + nStringsCnt = nCnt; + aI.nTypeArray.resize(nCnt); + aI.sStrArray.resize(nCnt); } } @@ -837,8 +837,8 @@ SvNumberformat::SvNumberformat(OUString& rString, if (!bCancel) { double fNumber; - sal_Int32 nAnzChars = ImpGetNumber(sBuff, nPos, sStr); - if (nAnzChars > 0) + sal_Int32 nCntChars = ImpGetNumber(sBuff, nPos, sStr); + if (nCntChars > 0) { short F_Type = css::util::NumberFormat::UNDEFINED; if (!pISc->IsNumberFormat(sStr, F_Type, fNumber, nullptr) || @@ -846,8 +846,8 @@ SvNumberformat::SvNumberformat(OUString& rString, F_Type != css::util::NumberFormat::SCIENTIFIC) ) { fNumber = 0.0; - nPos = nPos - nAnzChars; - sBuff.remove(nPos, nAnzChars); + nPos = nPos - nCntChars; + sBuff.remove(nPos, nCntChars); sBuff.insert(nPos, '0'); nPos++; } @@ -1070,8 +1070,8 @@ SvNumberformat::SvNumberformat(OUString& rString, sStr = sInsertCalendar + sStr; } sal_Int32 nStrPos = pSc->ScanFormat( sStr); - sal_uInt16 nAnz = pSc->GetResultStringsCnt(); - if (nAnz == 0) // error + sal_uInt16 nCnt = pSc->GetResultStringsCnt(); + if (nCnt == 0) // error { nStrPos = 1; } @@ -1127,8 +1127,8 @@ SvNumberformat::SvNumberformat(OUString& rString, nIndex = 3; } } - NumFor[nIndex].Enlarge(nAnz); - pSc->CopyInfo(&(NumFor[nIndex].Info()), nAnz); + NumFor[nIndex].Enlarge(nCnt); + pSc->CopyInfo(&(NumFor[nIndex].Info()), nCnt); // type check if (nIndex == 0) { @@ -1199,11 +1199,11 @@ SvNumberformat::SvNumberformat(OUString& rString, OUString aAdd( pSc->GetStandardName() ); if ( !pSc->ScanFormat( aAdd ) ) { - sal_uInt16 nAnz = pSc->GetResultStringsCnt(); - if ( nAnz ) + sal_uInt16 nCnt = pSc->GetResultStringsCnt(); + if ( nCnt ) { - NumFor[0].Enlarge(nAnz); - pSc->CopyInfo( &(NumFor[0].Info()), nAnz ); + NumFor[0].Enlarge(nCnt); + pSc->CopyInfo( &(NumFor[0].Info()), nCnt ); sBuff.append(aAdd); } } @@ -1219,11 +1219,11 @@ SvNumberformat::SvNumberformat(OUString& rString, OUString aAdd( pSc->GetStandardName() ); if ( !pSc->ScanFormat( aAdd ) ) { - sal_uInt16 nAnz = pSc->GetResultStringsCnt(); - if ( nAnz ) + sal_uInt16 nCnt = pSc->GetResultStringsCnt(); + if ( nCnt ) { - NumFor[nIndex].Enlarge(nAnz); - pSc->CopyInfo( &(NumFor[nIndex].Info()), nAnz ); + NumFor[nIndex].Enlarge(nCnt); + pSc->CopyInfo( &(NumFor[nIndex].Info()), nCnt ); sBuff.append(";"); sBuff.append(aAdd); } @@ -1237,11 +1237,11 @@ SvNumberformat::SvNumberformat(OUString& rString, OUString aAdd( pSc->GetStandardName() ); if ( !pSc->ScanFormat( aAdd ) ) { - sal_uInt16 nAnz = pSc->GetResultStringsCnt(); - if ( nAnz ) + sal_uInt16 nCnt = pSc->GetResultStringsCnt(); + if ( nCnt ) { - NumFor[nIndex].Enlarge(nAnz); - pSc->CopyInfo( &(NumFor[nIndex].Info()), nAnz ); + NumFor[nIndex].Enlarge(nCnt); + pSc->CopyInfo( &(NumFor[nIndex].Info()), nCnt ); sBuff.append(";"); sBuff.append(aAdd); } @@ -2052,8 +2052,8 @@ void SvNumberformat::GetOutputString(const OUString& sString, const ImpSvNumberformatInfo& rInfo = NumFor[nIx].Info(); if (rInfo.eScannedType == css::util::NumberFormat::TEXT) { - const sal_uInt16 nAnz = NumFor[nIx].GetCount(); - for (sal_uInt16 i = 0; i < nAnz; i++) + const sal_uInt16 nCnt = NumFor[nIx].GetCount(); + for (sal_uInt16 i = 0; i < nCnt; i++) { switch (rInfo.nTypeArray[i]) { @@ -2104,33 +2104,33 @@ void lcl_GetOutputStringScientific(double fNumber, sal_uInt16 nCharCount, nPrec, rFormatter.GetNumDecimalSep()[0], true ); } -OUString lcl_GetDenominatorString(const ImpSvNumberformatInfo &rInfo, sal_uInt16 nAnz) +OUString lcl_GetDenominatorString(const ImpSvNumberformatInfo &rInfo, sal_uInt16 nCnt) { sal_uInt16 i; OUStringBuffer aDenominatorString; - for( i = 0; i < nAnz; i++ ) + for( i = 0; i < nCnt; i++ ) { if( rInfo.nTypeArray[i] == NF_SYMBOLTYPE_FRAC ) { - while ( ( ++i < nAnz ) && rInfo.nTypeArray[i] != NF_SYMBOLTYPE_FRAC_FDIV + while ( ( ++i < nCnt ) && rInfo.nTypeArray[i] != NF_SYMBOLTYPE_FRAC_FDIV && rInfo.nTypeArray[i] != NF_SYMBOLTYPE_DIGIT ); - for( ; i < nAnz; i++ ) + for( ; i < nCnt; i++ ) { if( rInfo.nTypeArray[i] == NF_SYMBOLTYPE_FRAC_FDIV || rInfo.nTypeArray[i] == NF_SYMBOLTYPE_DIGIT ) aDenominatorString.append( rInfo.sStrArray[i] ); else - i = nAnz; + i = nCnt; } } } return aDenominatorString.makeStringAndClear(); } -OUString lcl_GetNumeratorString(const ImpSvNumberformatInfo &rInfo, sal_uInt16 nAnz) +OUString lcl_GetNumeratorString(const ImpSvNumberformatInfo &rInfo, sal_uInt16 nCnt) { sal_Int16 i; OUStringBuffer aNumeratorString; - for( i = 0; i < nAnz; i++ ) + for( i = 0; i < nCnt; i++ ) { if( rInfo.nTypeArray[i] == NF_SYMBOLTYPE_FRAC ) { @@ -2138,17 +2138,17 @@ OUString lcl_GetNumeratorString(const ImpSvNumberformatInfo &rInfo, sal_uInt16 n { aNumeratorString.insert( 0, rInfo.sStrArray[i] ); } - i = nAnz; + i = nCnt; } } return aNumeratorString.makeStringAndClear(); } -OUString lcl_GetFractionIntegerString(const ImpSvNumberformatInfo &rInfo, sal_uInt16 nAnz) +OUString lcl_GetFractionIntegerString(const ImpSvNumberformatInfo &rInfo, sal_uInt16 nCnt) { sal_Int16 i; OUStringBuffer aIntegerString; - for( i = 0; i < nAnz; i++ ) + for( i = 0; i < nCnt; i++ ) { if( rInfo.nTypeArray[i] == NF_SYMBOLTYPE_FRACBLANK ) { @@ -2157,16 +2157,16 @@ OUString lcl_GetFractionIntegerString(const ImpSvNumberformatInfo &rInfo, sal_uI { aIntegerString.insert( 0, rInfo.sStrArray[i] ); } - i = nAnz; + i = nCnt; } } return aIntegerString.makeStringAndClear(); } -OUString lcl_GetIntegerFractionDelimiterString(const ImpSvNumberformatInfo &rInfo, sal_uInt16 nAnz) +OUString lcl_GetIntegerFractionDelimiterString(const ImpSvNumberformatInfo &rInfo, sal_uInt16 nCnt) { sal_Int16 i; - for( i = 0; i < nAnz; i++ ) + for( i = 0; i < nCnt; i++ ) { if( rInfo.nTypeArray[i] == NF_SYMBOLTYPE_FRACBLANK ) { @@ -2181,22 +2181,22 @@ OUString lcl_GetIntegerFractionDelimiterString(const ImpSvNumberformatInfo &rInf OUString SvNumberformat::GetDenominatorString( sal_uInt16 nNumFor ) const { const ImpSvNumberformatInfo& rInfo = NumFor[nNumFor].Info(); - sal_uInt16 nAnz = NumFor[nNumFor].GetCount(); - return lcl_GetDenominatorString( rInfo, nAnz ); + sal_uInt16 nCnt = NumFor[nNumFor].GetCount(); + return lcl_GetDenominatorString( rInfo, nCnt ); } OUString SvNumberformat::GetNumeratorString( sal_uInt16 nNumFor ) const { const ImpSvNumberformatInfo& rInfo = NumFor[nNumFor].Info(); - sal_uInt16 nAnz = NumFor[nNumFor].GetCount(); - return lcl_GetNumeratorString( rInfo, nAnz ); + sal_uInt16 nCnt = NumFor[nNumFor].GetCount(); + return lcl_GetNumeratorString( rInfo, nCnt ); } OUString SvNumberformat::GetIntegerFractionDelimiterString( sal_uInt16 nNumFor ) const { const ImpSvNumberformatInfo& rInfo = NumFor[nNumFor].Info(); - sal_uInt16 nAnz = NumFor[nNumFor].GetCount(); - return lcl_GetIntegerFractionDelimiterString( rInfo, nAnz ); + sal_uInt16 nCnt = NumFor[nNumFor].GetCount(); + return lcl_GetIntegerFractionDelimiterString( rInfo, nCnt ); } bool SvNumberformat::GetOutputString(double fNumber, sal_uInt16 nCharCount, OUString& rOutString) const @@ -2373,12 +2373,12 @@ bool SvNumberformat::GetOutputString(double fNumber, } *ppColor = NumFor[nIx].GetColor(); const ImpSvNumberformatInfo& rInfo = NumFor[nIx].Info(); - const sal_uInt16 nAnz = NumFor[nIx].GetCount(); - if (nAnz == 0 && rInfo.eScannedType == css::util::NumberFormat::EMPTY) + const sal_uInt16 nCnt = NumFor[nIx].GetCount(); + if (nCnt == 0 && rInfo.eScannedType == css::util::NumberFormat::EMPTY) { return false; // Empty => nothing } - else if (nAnz == 0) // Else Standard Format + else if (nCnt == 0) // Else Standard Format { ImpGetOutputStandard(fNumber, sBuff); OutString = sBuff.makeStringAndClear(); @@ -2388,7 +2388,7 @@ bool SvNumberformat::GetOutputString(double fNumber, { case css::util::NumberFormat::TEXT: case css::util::NumberFormat::DEFINED: - for (sal_uInt16 i = 0; i < nAnz; i++) + for (sal_uInt16 i = 0; i < nCnt; i++) { switch (rInfo.nTypeArray[i]) { @@ -2451,7 +2451,7 @@ bool SvNumberformat::ImpGetScientificOutput(double fNumber, bool bSign = false; const ImpSvNumberformatInfo& rInfo = NumFor[nIx].Info(); - const sal_uInt16 nAnz = NumFor[nIx].GetCount(); + const sal_uInt16 nCnt = NumFor[nIx].GetCount(); if (fNumber < 0) { @@ -2530,7 +2530,7 @@ bool SvNumberformat::ImpGetScientificOutput(double fNumber, } } - sal_uInt16 j = nAnz-1; // Last symbol + sal_uInt16 j = nCnt-1; // Last symbol sal_Int32 k; // Position in ExpStr sal_Int32 nZeros = 0; // Erase leading zeros @@ -2675,12 +2675,12 @@ bool SvNumberformat::ImpGetFractionOutput(double fNumber, { bool bRes = false; const ImpSvNumberformatInfo& rInfo = NumFor[nIx].Info(); - const sal_uInt16 nAnz = NumFor[nIx].GetCount(); + const sal_uInt16 nCnt = NumFor[nIx].GetCount(); OUStringBuffer sStr, sFrac, sDiv; // Strings, value for Integral part Numerator and denominator bool bSign = ( (fNumber < 0) && (nIx == 0) ); // sign Not in the ones at the end - const OUString sIntegerFormat = lcl_GetFractionIntegerString(rInfo, nAnz); - const OUString sNumeratorFormat = lcl_GetNumeratorString(rInfo, nAnz); - const OUString sDenominatorFormat = lcl_GetDenominatorString(rInfo, nAnz); + const OUString sIntegerFormat = lcl_GetFractionIntegerString(rInfo, nCnt); + const OUString sNumeratorFormat = lcl_GetNumeratorString(rInfo, nCnt); + const OUString sDenominatorFormat = lcl_GetDenominatorString(rInfo, nCnt); sal_uInt64 nFrac = 0, nDiv = 1; double fNum = floor(fNumber); // Integral part @@ -2734,7 +2734,7 @@ bool SvNumberformat::ImpGetFractionOutput(double fNumber, sDiv = ImpIntToString( nIx, nDiv ); } - sal_uInt16 j = nAnz-1; // Last symbol -> backwards + sal_uInt16 j = nCnt-1; // Last symbol -> backwards sal_Int32 k; // Denominator bRes |= ImpNumberFill(sDiv, fNumber, k, j, nIx, NF_SYMBOLTYPE_FRAC, true); @@ -2960,8 +2960,8 @@ bool SvNumberformat::ImpGetTimeOutput(double fNumber, } } } - const sal_uInt16 nAnz = NumFor[nIx].GetCount(); - for (sal_uInt16 i = 0; i < nAnz; i++) + const sal_uInt16 nCnt = NumFor[nIx].GetCount(); + for (sal_uInt16 i = 0; i < nCnt; i++) { sal_Int32 nLen; switch (rInfo.nTypeArray[i]) @@ -3176,9 +3176,9 @@ bool SvNumberformat::ImpIsOtherCalendar( const ImpSvNumFor& rNumFor ) const return false; } const ImpSvNumberformatInfo& rInfo = rNumFor.Info(); - const sal_uInt16 nAnz = rNumFor.GetCount(); + const sal_uInt16 nCnt = rNumFor.GetCount(); sal_uInt16 i; - for ( i = 0; i < nAnz; i++ ) + for ( i = 0; i < nCnt; i++ ) { switch ( rInfo.nTypeArray[i] ) { @@ -3278,8 +3278,8 @@ bool SvNumberformat::ImpSwitchToSpecifiedCalendar( OUString& rOrgCalendar, const ImpSvNumFor& rNumFor ) const { const ImpSvNumberformatInfo& rInfo = rNumFor.Info(); - const sal_uInt16 nAnz = rNumFor.GetCount(); - for ( sal_uInt16 i = 0; i < nAnz; i++ ) + const sal_uInt16 nCnt = rNumFor.GetCount(); + for ( sal_uInt16 i = 0; i < nCnt; i++ ) { if ( rInfo.nTypeArray[i] == NF_SYMBOLTYPE_CALENDAR ) { @@ -3350,8 +3350,8 @@ bool SvNumberformat::ImpIsIso8601( const ImpSvNumFor& rNumFor ) const }; State eState = eNone; auto & rTypeArray = rNumFor.Info().nTypeArray; - sal_uInt16 nAnz = rNumFor.GetCount(); - for (sal_uInt16 i=0; i < nAnz && !bIsIso && eState != eNotIso; ++i) + sal_uInt16 nCnt = rNumFor.GetCount(); + for (sal_uInt16 i=0; i < nCnt && !bIsIso && eState != eNotIso; ++i) { switch ( rTypeArray[i] ) { @@ -3425,8 +3425,8 @@ bool SvNumberformat::ImpIsIso8601( const ImpSvNumFor& rNumFor ) const static bool lcl_hasEra( const ImpSvNumFor& rNumFor ) { const ImpSvNumberformatInfo& rInfo = rNumFor.Info(); - const sal_uInt16 nAnz = rNumFor.GetCount(); - for ( sal_uInt16 i = 0; i < nAnz; i++ ) + const sal_uInt16 nCnt = rNumFor.GetCount(); + for ( sal_uInt16 i = 0; i < nCnt; i++ ) { switch ( rInfo.nTypeArray[i] ) { @@ -3471,11 +3471,11 @@ bool SvNumberformat::ImpGetDateOutput(double fNumber, bOtherCalendar = false; } const ImpSvNumberformatInfo& rInfo = NumFor[nIx].Info(); - const sal_uInt16 nAnz = NumFor[nIx].GetCount(); + const sal_uInt16 nCnt = NumFor[nIx].GetCount(); sal_Int16 nNatNum = NumFor[nIx].GetNatNum().GetNatNum(); OUString aYear; - for (sal_uInt16 i = 0; i < nAnz; i++) + for (sal_uInt16 i = 0; i < nCnt; i++) { switch (rInfo.nTypeArray[i]) { @@ -3776,10 +3776,10 @@ bool SvNumberformat::ImpGetDateTimeOutput(double fNumber, } } } - const sal_uInt16 nAnz = NumFor[nIx].GetCount(); + const sal_uInt16 nCnt = NumFor[nIx].GetCount(); sal_Int32 nLen; OUString aYear; - for (sal_uInt16 i = 0; i < nAnz; i++) + for (sal_uInt16 i = 0; i < nCnt; i++) { switch (rInfo.nTypeArray[i]) { @@ -4550,12 +4550,12 @@ bool SvNumberformat::ImpNumberFill( OUStringBuffer& sBuff, // number string void SvNumberformat::GetFormatSpecialInfo(bool& bThousand, bool& IsRed, sal_uInt16& nPrecision, - sal_uInt16& nAnzLeading) const + sal_uInt16& nLeadingCnt) const { // as before: take info from nNumFor=0 for whole format (for dialog etc.) short nDummyType; - GetNumForInfo( 0, nDummyType, bThousand, nPrecision, nAnzLeading ); + GetNumForInfo( 0, nDummyType, bThousand, nPrecision, nLeadingCnt ); // "negative in red" is only useful for the whole format @@ -4565,7 +4565,7 @@ void SvNumberformat::GetFormatSpecialInfo(bool& bThousand, } void SvNumberformat::GetNumForInfo( sal_uInt16 nNumFor, short& rScannedType, - bool& bThousand, sal_uInt16& nPrecision, sal_uInt16& nAnzLeading ) const + bool& bThousand, sal_uInt16& nPrecision, sal_uInt16& nLeadingCnt ) const { // take info from a specified sub-format (for XML export) @@ -4587,15 +4587,15 @@ void SvNumberformat::GetNumForInfo( sal_uInt16 nNumFor, short& rScannedType, if (bStandard && rInfo.eScannedType == css::util::NumberFormat::NUMBER) { // StandardFormat - nAnzLeading = 1; + nLeadingCnt = 1; } else { - nAnzLeading = 0; + nLeadingCnt = 0; bool bStop = false; sal_uInt16 i = 0; - const sal_uInt16 nAnz = NumFor[nNumFor].GetCount(); - while (!bStop && i < nAnz) + const sal_uInt16 nCnt = NumFor[nNumFor].GetCount(); + while (!bStop && i < nCnt) { short nType = rInfo.nTypeArray[i]; if ( nType == NF_SYMBOLTYPE_DIGIT) @@ -4607,7 +4607,7 @@ void SvNumberformat::GetNumForInfo( sal_uInt16 nNumFor, short& rScannedType, } while ( *p++ == '0' ) { - nAnzLeading++; + nLeadingCnt++; } } else if (nType == NF_SYMBOLTYPE_DECSEP @@ -4628,14 +4628,14 @@ const OUString* SvNumberformat::GetNumForString( sal_uInt16 nNumFor, sal_uInt16 { return nullptr; } - sal_uInt16 nAnz = NumFor[nNumFor].GetCount(); - if ( !nAnz ) + sal_uInt16 nCnt = NumFor[nNumFor].GetCount(); + if ( !nCnt ) { return nullptr; } if ( nPos == 0xFFFF ) { - nPos = nAnz - 1; + nPos = nCnt - 1; if ( bString ) { // Backwards short const * pType = NumFor[nNumFor].Info().nTypeArray.data() + nPos; @@ -4651,7 +4651,7 @@ const OUString* SvNumberformat::GetNumForString( sal_uInt16 nNumFor, sal_uInt16 } } } - else if ( nPos > nAnz - 1 ) + else if ( nPos > nCnt - 1 ) { return nullptr; } @@ -4659,13 +4659,13 @@ const OUString* SvNumberformat::GetNumForString( sal_uInt16 nNumFor, sal_uInt16 { // vorwaerts short const * pType = NumFor[nNumFor].Info().nTypeArray.data() + nPos; - while ( nPos < nAnz && (*pType != NF_SYMBOLTYPE_STRING) && + while ( nPos < nCnt && (*pType != NF_SYMBOLTYPE_STRING) && (*pType != NF_SYMBOLTYPE_CURRENCY) ) { pType++; nPos++; } - if ( nPos >= nAnz || ((*pType != NF_SYMBOLTYPE_STRING) && + if ( nPos >= nCnt || ((*pType != NF_SYMBOLTYPE_STRING) && (*pType != NF_SYMBOLTYPE_CURRENCY)) ) { return nullptr; @@ -4680,16 +4680,16 @@ short SvNumberformat::GetNumForType( sal_uInt16 nNumFor, sal_uInt16 nPos ) const { return 0; } - sal_uInt16 nAnz = NumFor[nNumFor].GetCount(); - if ( !nAnz ) + sal_uInt16 nCnt = NumFor[nNumFor].GetCount(); + if ( !nCnt ) { return 0; } if ( nPos == 0xFFFF ) { - nPos = nAnz - 1; + nPos = nCnt - 1; } - else if ( nPos > nAnz - 1 ) + else if ( nPos > nCnt - 1 ) { return 0; } @@ -4711,19 +4711,19 @@ bool SvNumberformat::IsNegativeWithoutSign() const bool SvNumberformat::IsNegativeInBracket() const { - sal_uInt16 nAnz = NumFor[1].GetCount(); - if (!nAnz) + sal_uInt16 nCnt = NumFor[1].GetCount(); + if (!nCnt) { return false; } auto& tmp = NumFor[1].Info().sStrArray; - return tmp[0] == "(" && tmp[nAnz-1] == ")"; + return tmp[0] == "(" && tmp[nCnt-1] == ")"; } bool SvNumberformat::HasPositiveBracketPlaceholder() const { - sal_uInt16 nAnz = NumFor[0].GetCount(); - return NumFor[0].Info().sStrArray[nAnz-1] == "_)"; + sal_uInt16 nCnt = NumFor[0].GetCount(); + return NumFor[0].Info().sStrArray[nCnt-1] == "_)"; } DateOrder SvNumberformat::GetDateOrder() const @@ -4731,8 +4731,8 @@ DateOrder SvNumberformat::GetDateOrder() const if ( (eType & css::util::NumberFormat::DATE) == css::util::NumberFormat::DATE ) { auto& rTypeArray = NumFor[0].Info().nTypeArray; - sal_uInt16 nAnz = NumFor[0].GetCount(); - for ( sal_uInt16 j=0; j= nStringsCnt ) { return -1; // error @@ -1515,7 +1515,7 @@ int ImpSvNumberformatScan::FinalScanGetCalendar( sal_Int32& nPos, sal_uInt16& i, nPos = nPos + sStrArray[i].getLength(); rStr += sStrArray[i]; nTypeArray[i] = NF_SYMBOLTYPE_EMPTY; - rAnzResStrings--; + rResultStringsCnt--; i++; } if ( rStr.getLength() && i < nStringsCnt && @@ -3102,12 +3102,12 @@ sal_Int32 ImpSvNumberformatScan::ScanFormat( OUString& rString ) return res; // res = control position; res = 0 => Format ok } -void ImpSvNumberformatScan::CopyInfo(ImpSvNumberformatInfo* pInfo, sal_uInt16 nAnz) +void ImpSvNumberformatScan::CopyInfo(ImpSvNumberformatInfo* pInfo, sal_uInt16 nCnt) { size_t i,j; j = 0; i = 0; - while (i < nAnz && j < NF_MAX_FORMAT_SYMBOLS) + while (i < nCnt && j < NF_MAX_FORMAT_SYMBOLS) { if (nTypeArray[j] != NF_SYMBOLTYPE_EMPTY) { diff --git a/svl/source/numbers/zforscan.hxx b/svl/source/numbers/zforscan.hxx index 3a0a384fff6a..c5e9d8549349 100644 --- a/svl/source/numbers/zforscan.hxx +++ b/svl/source/numbers/zforscan.hxx @@ -50,7 +50,7 @@ public: sal_Int32 ScanFormat( OUString& rString ); // Call scan analysis void CopyInfo(ImpSvNumberformatInfo* pInfo, - sal_uInt16 nAnz); // Copies the FormatInfo + sal_uInt16 nCnt); // Copies the FormatInfo sal_uInt16 GetResultStringsCnt() const { return nResultStringsCnt; } const CharClass& GetChrCls() const { return *pFormatter->GetCharClass(); } -- cgit