diff options
author | Benjamin Ni <benjaminniri@hotmail.com> | 2015-09-25 11:41:53 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2015-11-02 23:40:57 +0100 |
commit | be729e772196f33543e21cb9bac21add87726b20 (patch) | |
tree | f2150f458e2b07f8924b4702d37c09c8dd52215a /i18npool | |
parent | 6ccf68622e51c1b727dd042c1c1a71b5d1fd6a12 (diff) |
tdf#94269: Replace "n" prefix for bool variables with "b"
Change-Id: I178545792c7354a362658ac7ef8b1d4cf0865797
Signed-off-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'i18npool')
3 files changed, 30 insertions, 30 deletions
diff --git a/i18npool/source/breakiterator/breakiterator_unicode.cxx b/i18npool/source/breakiterator/breakiterator_unicode.cxx index 10a445214c41..64202b66d624 100644 --- a/i18npool/source/breakiterator/breakiterator_unicode.cxx +++ b/i18npool/source/breakiterator/breakiterator_unicode.cxx @@ -79,7 +79,7 @@ class OOoRuleBasedBreakIterator : public RuleBasedBreakIterator void SAL_CALL BreakIterator_Unicode::loadICUBreakIterator(const css::lang::Locale& rLocale, sal_Int16 rBreakType, sal_Int16 nWordType, const sal_Char *rule, const OUString& rText) throw(uno::RuntimeException) { - bool newBreak = false; + bool bNewBreak = false; UErrorCode status = U_ZERO_ERROR; sal_Int16 breakType = 0; switch (rBreakType) { @@ -178,13 +178,13 @@ void SAL_CALL BreakIterator_Unicode::loadICUBreakIterator(const css::lang::Local } if (icuBI->aBreakIterator) { icuBI->maLocale=rLocale; - newBreak=true; + bNewBreak=true; } else { throw uno::RuntimeException(); } } - if (newBreak || icuBI->aICUText.pData != rText.pData) + if (bNewBreak || icuBI->aICUText.pData != rText.pData) { // UChar != sal_Unicode in MinGW const UChar *pText = reinterpret_cast<const UChar *>(rText.getStr()); diff --git a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx index 78008ee842fe..04975ffb57c1 100644 --- a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx +++ b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx @@ -566,7 +566,7 @@ DefaultNumberingProvider::makeNumberingString( const Sequence<beans::PropertyVal sal_Int16 natNum = 0; sal_Int16 tableSize = 0; const sal_Unicode *table = NULL; // initialize to avoid compiler warning - bool recycleSymbol = false; + bool bRecycleSymbol = false; Locale locale; OUString prefix; @@ -705,42 +705,42 @@ DefaultNumberingProvider::makeNumberingString( const Sequence<beans::PropertyVal case AIU_FULLWIDTH_JA: table = table_AIUFullWidth_ja_JP; tableSize = SAL_N_ELEMENTS(table_AIUFullWidth_ja_JP); - recycleSymbol = true; + bRecycleSymbol = true; break; case AIU_HALFWIDTH_JA: table = table_AIUHalfWidth_ja_JP; tableSize = SAL_N_ELEMENTS(table_AIUHalfWidth_ja_JP); - recycleSymbol = true; + bRecycleSymbol = true; break; case IROHA_FULLWIDTH_JA: table = table_IROHAFullWidth_ja_JP; tableSize = SAL_N_ELEMENTS(table_IROHAFullWidth_ja_JP); - recycleSymbol = true; + bRecycleSymbol = true; break; case IROHA_HALFWIDTH_JA: table = table_IROHAHalfWidth_ja_JP; tableSize = SAL_N_ELEMENTS(table_IROHAHalfWidth_ja_JP); - recycleSymbol = true; + bRecycleSymbol = true; break; case HANGUL_JAMO_KO: table = table_HangulJamo_ko; tableSize = SAL_N_ELEMENTS(table_HangulJamo_ko); - recycleSymbol = true; + bRecycleSymbol = true; break; case HANGUL_SYLLABLE_KO: table = table_HangulSyllable_ko; tableSize = SAL_N_ELEMENTS(table_HangulSyllable_ko); - recycleSymbol = true; + bRecycleSymbol = true; break; case HANGUL_CIRCLED_JAMO_KO: table = table_HangulCircledJamo_ko; tableSize = SAL_N_ELEMENTS(table_HangulCircledJamo_ko); - recycleSymbol = true; + bRecycleSymbol = true; break; case HANGUL_CIRCLED_SYLLABLE_KO: table = table_HangulCircledSyllable_ko; tableSize = SAL_N_ELEMENTS(table_HangulCircledSyllable_ko); - recycleSymbol = true; + bRecycleSymbol = true; break; case CHARS_ARABIC: lcl_formatChars(table_Alphabet_ar, SAL_N_ELEMENTS(table_Alphabet_ar), number - 1, result); @@ -861,7 +861,7 @@ DefaultNumberingProvider::makeNumberingString( const Sequence<beans::PropertyVal uno::Reference<NativeNumberSupplierService> xNatNum(new NativeNumberSupplierService); result += xNatNum->getNativeNumberString(OUString::number( number ), locale, natNum); } else if (tableSize) { - if ( number > tableSize && !recycleSymbol) + if ( number > tableSize && !bRecycleSymbol) result += OUString::number( number); else result += OUString(&table[--number % tableSize], 1); diff --git a/i18npool/source/nativenumber/nativenumbersupplier.cxx b/i18npool/source/nativenumber/nativenumbersupplier.cxx index b8e74a307f6a..aadc58dde2c6 100644 --- a/i18npool/source/nativenumber/nativenumbersupplier.cxx +++ b/i18npool/source/nativenumber/nativenumbersupplier.cxx @@ -95,23 +95,23 @@ bool SAL_CALL AsciiToNative_numberMaker(const sal_Unicode *str, sal_Int32 begin, if ( len <= number->multiplierExponent[number->exponentCount-1] ) { if (number->multiplierExponent[number->exponentCount-1] > 1) { sal_Int16 i; - bool notZero = false; + bool bNotZero = false; for (i = 0; i < len; i++, begin++) { - if (notZero || str[begin] != NUMBER_ZERO) { + if (bNotZero || str[begin] != NUMBER_ZERO) { dst[count] = numberChar[str[begin] - NUMBER_ZERO]; if (useOffset) offset[count] = begin + startPos; count++; - notZero = true; + bNotZero = true; } } - if (notZero && multiChar > 0) { + if (bNotZero && multiChar > 0) { dst[count] = multiChar; if (useOffset) offset[count] = begin + startPos; count++; } - return notZero; + return bNotZero; } else if (str[begin] != NUMBER_ZERO) { if (!(number->numberFlag & (multiChar_index < 0 ? 0 : NUMBER_OMIT_ONE_CHECK(multiChar_index))) || str[begin] != NUMBER_ONE) { dst[count] = numberChar[str[begin] - NUMBER_ZERO]; @@ -133,18 +133,18 @@ bool SAL_CALL AsciiToNative_numberMaker(const sal_Unicode *str, sal_Int32 begin, } return str[begin] != NUMBER_ZERO; } else { - bool printPower = false; + bool bPrintPower = false; // sal_Int16 last = 0; for (sal_Int16 i = 1; i <= number->exponentCount; i++) { sal_Int32 tmp = len - (i == number->exponentCount ? 0 : number->multiplierExponent[i]); if (tmp > 0) { - printPower |= AsciiToNative_numberMaker(str, begin, tmp, dst, count, + bPrintPower |= AsciiToNative_numberMaker(str, begin, tmp, dst, count, (i == number->exponentCount ? -1 : i), offset, useOffset, startPos, number, numberChar); begin += tmp; len -= tmp; } } - if (printPower) { + if (bPrintPower) { if (count > 0 && number->multiplierExponent[number->exponentCount-1] == 1 && dst[count-1] == numberChar[0]) count--; @@ -155,7 +155,7 @@ bool SAL_CALL AsciiToNative_numberMaker(const sal_Unicode *str, sal_Int32 begin, count++; } } - return printPower; + return bPrintPower; } } @@ -179,12 +179,12 @@ OUString SAL_CALL AsciiToNative( const OUString& inStr, sal_Int32 startPos, sal_ if (useOffset) offset.realloc( nCount * 2 ); - bool doDecimal = false; + bool bDoDecimal = false; for (i = 0; i <= nCount; i++) { if (i < nCount && isNumber(str[i])) { - if (doDecimal) { + if (bDoDecimal) { newStr[count] = numberChar[str[i] - NUMBER_ZERO]; if (useOffset) offset[count] = i + startPos; @@ -196,17 +196,17 @@ OUString SAL_CALL AsciiToNative( const OUString& inStr, sal_Int32 startPos, sal_ if (len > 0) { if (i < nCount-1 && isSeparator(str[i]) && isNumber(str[i+1])) continue; // skip comma inside number string - bool notZero = false; + bool bNotZero = false; for (sal_Int32 begin = 0, end = len % number->multiplierExponent[0]; end <= len; begin = end, end += number->multiplierExponent[0]) { if (end == 0) continue; sal_Int32 _count = count; - notZero |= AsciiToNative_numberMaker(srcStr.get(), begin, end - begin, newStr.get(), count, + bNotZero |= AsciiToNative_numberMaker(srcStr.get(), begin, end - begin, newStr.get(), count, end == len ? -1 : 0, offset, useOffset, i - len + startPos, number, numberChar); if (count > 0 && number->multiplierExponent[number->exponentCount-1] == 1 && newStr[count-1] == numberChar[0]) count--; - if (notZero && _count == count) { + if (bNotZero && _count == count) { if (end != len) { newStr[count] = number->multiplierChar[0]; if (useOffset) @@ -215,7 +215,7 @@ OUString SAL_CALL AsciiToNative( const OUString& inStr, sal_Int32 startPos, sal_ } } } - if (! notZero && ! (number->numberFlag & NUMBER_OMIT_ONLY_ZERO)) { + if (! bNotZero && ! (number->numberFlag & NUMBER_OMIT_ONLY_ZERO)) { newStr[count] = numberChar[0]; if (useOffset) offset[count] = i - len + startPos; @@ -224,8 +224,8 @@ OUString SAL_CALL AsciiToNative( const OUString& inStr, sal_Int32 startPos, sal_ len = 0; } if (i < nCount) { - doDecimal = (!doDecimal && i < nCount-1 && isDecimal(str[i]) && isNumber(str[i+1])); - if (doDecimal) + bDoDecimal = (!bDoDecimal && i < nCount-1 && isDecimal(str[i]) && isNumber(str[i+1])); + if (bDoDecimal) newStr[count] = (DecimalChar[number->number] ? DecimalChar[number->number] : str[i]); else if (i < nCount-1 && isMinus(str[i]) && isNumber(str[i+1])) newStr[count] = (MinusChar[number->number] ? MinusChar[number->number] : str[i]); |