summaryrefslogtreecommitdiff
path: root/i18npool
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-04-20 17:17:31 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-04-20 17:25:43 +0200
commitb347e5da870d8a4fa8e6e093165fea7dc21dae79 (patch)
tree5f22eb3d0987dd3d33652c60ea25273fc714fc3f /i18npool
parent07b4791dc8d0a8b1144f6c619b7aa6f7af8bb5de (diff)
loplugin:salbool: Automatic rewrite of sal_False/True
Change-Id: I3f7f71f05db09219f0de3ec14bdb56bd16fb0c8d
Diffstat (limited to 'i18npool')
-rw-r--r--i18npool/source/breakiterator/breakiteratorImpl.cxx18
-rw-r--r--i18npool/source/calendar/calendar_gregorian.cxx2
-rw-r--r--i18npool/source/characterclassification/cclass_unicode.cxx2
-rw-r--r--i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx4
-rw-r--r--i18npool/source/indexentry/indexentrysupplier.cxx2
-rw-r--r--i18npool/source/indexentry/indexentrysupplier_common.cxx2
-rw-r--r--i18npool/source/inputchecker/inputsequencechecker.cxx4
-rw-r--r--i18npool/source/inputchecker/inputsequencechecker_hi.cxx4
-rw-r--r--i18npool/source/inputchecker/inputsequencechecker_th.cxx6
-rw-r--r--i18npool/source/nativenumber/nativenumbersupplier.cxx6
-rw-r--r--i18npool/source/numberformatcode/numberformatcode.cxx2
-rw-r--r--i18npool/source/search/textsearch.cxx4
-rw-r--r--i18npool/source/textconversion/textconversion_ko.cxx2
-rw-r--r--i18npool/source/textconversion/textconversion_zh.cxx2
-rw-r--r--i18npool/source/transliteration/textToPronounce_zh.cxx2
-rw-r--r--i18npool/source/transliteration/transliterationImpl.cxx6
16 files changed, 34 insertions, 34 deletions
diff --git a/i18npool/source/breakiterator/breakiteratorImpl.cxx b/i18npool/source/breakiterator/breakiteratorImpl.cxx
index ac7a861296d4..7fa79cf62696 100644
--- a/i18npool/source/breakiterator/breakiteratorImpl.cxx
+++ b/i18npool/source/breakiterator/breakiteratorImpl.cxx
@@ -112,7 +112,7 @@ Boundary SAL_CALL BreakIteratorImpl::nextWord( const OUString& Text, sal_Int32 n
if( nStartPos >= len )
result.startPos = result.endPos = len;
else {
- result = LBI->getWordBoundary(Text, nStartPos, rLocale, rWordType, sal_True);
+ result = LBI->getWordBoundary(Text, nStartPos, rLocale, rWordType, true);
// i88041: avoid startPos goes back to nStartPos when switching between Latin and CJK scripts
if (result.startPos < nStartPos) result.startPos = nStartPos;
}
@@ -172,9 +172,9 @@ Boundary SAL_CALL BreakIteratorImpl::getWordBoundary( const OUString& Text, sal_
} else {
if (next != prev) {
if (next == nPos && next != len)
- bDirection = sal_True;
+ bDirection = true;
else if (prev == nPos && prev != 0)
- bDirection = sal_False;
+ bDirection = false;
else
nPos = bDirection ? next : prev;
}
@@ -189,13 +189,13 @@ sal_Bool SAL_CALL BreakIteratorImpl::isBeginWord( const OUString& Text, sal_Int3
{
sal_Int32 len = Text.getLength();
- if (nPos < 0 || nPos >= len) return sal_False;
+ if (nPos < 0 || nPos >= len) return false;
sal_Int32 tmp = skipSpace(Text, nPos, len, rWordType, true);
- if (tmp != nPos) return sal_False;
+ if (tmp != nPos) return false;
- result = getWordBoundary(Text, nPos, rLocale, rWordType, sal_True);
+ result = getWordBoundary(Text, nPos, rLocale, rWordType, true);
return result.startPos == nPos;
}
@@ -205,13 +205,13 @@ sal_Bool SAL_CALL BreakIteratorImpl::isEndWord( const OUString& Text, sal_Int32
{
sal_Int32 len = Text.getLength();
- if (nPos <= 0 || nPos > len) return sal_False;
+ if (nPos <= 0 || nPos > len) return false;
sal_Int32 tmp = skipSpace(Text, nPos, len, rWordType, false);
- if (tmp != nPos) return sal_False;
+ if (tmp != nPos) return false;
- result = getWordBoundary(Text, nPos, rLocale, rWordType, sal_False);
+ result = getWordBoundary(Text, nPos, rLocale, rWordType, false);
return result.endPos == nPos;
}
diff --git a/i18npool/source/calendar/calendar_gregorian.cxx b/i18npool/source/calendar/calendar_gregorian.cxx
index ba8428cd6474..5e24deebd877 100644
--- a/i18npool/source/calendar/calendar_gregorian.cxx
+++ b/i18npool/source/calendar/calendar_gregorian.cxx
@@ -827,7 +827,7 @@ Calendar_gregorian::isValid() throw(RuntimeException, std::exception)
// compare only with fields that are set and reset fieldSet[]
if (tmp & (1 << fieldIndex)) {
if (fieldSetValue[fieldIndex] != fieldValue[fieldIndex])
- return sal_False;
+ return false;
}
}
}
diff --git a/i18npool/source/characterclassification/cclass_unicode.cxx b/i18npool/source/characterclassification/cclass_unicode.cxx
index 3864fba13eaf..e9e9612f65f7 100644
--- a/i18npool/source/characterclassification/cclass_unicode.cxx
+++ b/i18npool/source/characterclassification/cclass_unicode.cxx
@@ -94,7 +94,7 @@ cclass_Unicode::toTitle( const OUString& Text, sal_Int32 nPos, sal_Int32 nCount,
sal_Unicode* out = pStr->buffer;
Reference< BreakIteratorImpl > xBrk(new BreakIteratorImpl(m_xContext));
Boundary bdy = xBrk->getWordBoundary(Text, nPos, rLocale,
- WordType::ANYWORD_IGNOREWHITESPACES, sal_True);
+ WordType::ANYWORD_IGNOREWHITESPACES, true);
for (sal_Int32 i = nPos; i < nCount + nPos; i++, out++) {
if (i >= bdy.endPos)
bdy = xBrk->nextWord(Text, bdy.endPos, rLocale,
diff --git a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
index dfec9cfe0deb..f0c76e4da59f 100644
--- a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
+++ b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
@@ -1034,8 +1034,8 @@ sal_Bool DefaultNumberingProvider::hasNumberingType( const OUString& rNumberingI
{
for(sal_Int16 i = 0; i < nSupported_NumberingTypes; i++)
if(rNumberingIdentifier.equals(makeNumberingIdentifier(i)))
- return sal_True;
- return sal_False;
+ return true;
+ return false;
}
OUString DefaultNumberingProvider::getNumberingIdentifier( sal_Int16 nNumberingType )
diff --git a/i18npool/source/indexentry/indexentrysupplier.cxx b/i18npool/source/indexentry/indexentrysupplier.cxx
index f2d1ec4cae94..71a61bac8a12 100644
--- a/i18npool/source/indexentry/indexentrysupplier.cxx
+++ b/i18npool/source/indexentry/indexentrysupplier.cxx
@@ -51,7 +51,7 @@ sal_Bool SAL_CALL IndexEntrySupplier::loadAlgorithm( const Locale& rLocale, cons
return xIES->loadAlgorithm(rLocale, SortAlgorithm, collatorOptions);
}
}
- return sal_False;
+ return false;
}
sal_Bool SAL_CALL IndexEntrySupplier::usePhoneticEntry( const Locale& rLocale ) throw (RuntimeException, std::exception)
diff --git a/i18npool/source/indexentry/indexentrysupplier_common.cxx b/i18npool/source/indexentry/indexentrysupplier_common.cxx
index 0c32c0027f48..74009b97e843 100644
--- a/i18npool/source/indexentry/indexentrysupplier_common.cxx
+++ b/i18npool/source/indexentry/indexentrysupplier_common.cxx
@@ -67,7 +67,7 @@ sal_Bool SAL_CALL IndexEntrySupplier_Common::loadAlgorithm( const lang::Locale&
collator->loadCollatorAlgorithm(rAlgorithm, rLocale, collatorOptions);
aLocale = rLocale;
aAlgorithm = rAlgorithm;
- return sal_True;
+ return true;
}
OUString SAL_CALL IndexEntrySupplier_Common::getIndexKey( const OUString& rIndexEntry,
diff --git a/i18npool/source/inputchecker/inputsequencechecker.cxx b/i18npool/source/inputchecker/inputsequencechecker.cxx
index 148e256d042c..b1e71c125910 100644
--- a/i18npool/source/inputchecker/inputsequencechecker.cxx
+++ b/i18npool/source/inputchecker/inputsequencechecker.cxx
@@ -54,14 +54,14 @@ InputSequenceCheckerImpl::checkInputSequence(const OUString& Text, sal_Int32 nSt
sal_Unicode inputChar, sal_Int16 inputCheckMode) throw(RuntimeException, std::exception)
{
if (inputCheckMode == InputSequenceCheckMode::PASSTHROUGH)
- return sal_True;
+ return true;
sal_Char* language = getLanguageByScripType(Text[nStartPos], inputChar);
if (language)
return getInputSequenceChecker(language)->checkInputSequence(Text, nStartPos, inputChar, inputCheckMode);
else
- return sal_True; // not a checkable languages.
+ return true; // not a checkable languages.
}
sal_Int32 SAL_CALL
diff --git a/i18npool/source/inputchecker/inputsequencechecker_hi.cxx b/i18npool/source/inputchecker/inputsequencechecker_hi.cxx
index 26537a04dd88..dc457d13b105 100644
--- a/i18npool/source/inputchecker/inputsequencechecker_hi.cxx
+++ b/i18npool/source/inputchecker/inputsequencechecker_hi.cxx
@@ -100,8 +100,8 @@ static const sal_uInt16 dev_cell_check[14][14] = {
};
sal_Bool DEV_Composible[2][2] = {
-/* Mode 0 */ {sal_True, sal_True }, // PASSTHROUGH = 0
-/* Mode 1 */ {sal_False, sal_True} // STRICT = 1
+/* Mode 0 */ {true, true }, // PASSTHROUGH = 0
+/* Mode 1 */ {false, true} // STRICT = 1
};
#define getCharType(x) \
diff --git a/i18npool/source/inputchecker/inputsequencechecker_th.cxx b/i18npool/source/inputchecker/inputsequencechecker_th.cxx
index 81535d29a40a..55022a882891 100644
--- a/i18npool/source/inputchecker/inputsequencechecker_th.cxx
+++ b/i18npool/source/inputchecker/inputsequencechecker_th.cxx
@@ -57,9 +57,9 @@ sal_Char TAC_celltype_inputcheck[17][17] = {
sal_Bool TAC_Composible[3][5] = {
/* 'A', 'C', 'S', 'R', 'X' */
-/* Mode 0 */ {sal_True, sal_True, sal_True, sal_True, sal_True}, // PASSTHROUGH = 0
-/* Mode 1 */ {sal_True, sal_True, sal_True, sal_False, sal_True}, // BASIC = 1
-/* Mode 2 */ {sal_True, sal_True, sal_False, sal_False, sal_True} // STRICT = 2
+/* Mode 0 */ {true, true, true, true, true}, // PASSTHROUGH = 0
+/* Mode 1 */ {true, true, true, false, true}, // BASIC = 1
+/* Mode 2 */ {true, true, false, false, true} // STRICT = 2
};
static bool SAL_CALL check(sal_Unicode ch1, sal_Unicode ch2, sal_Int16 inputCheckMode)
diff --git a/i18npool/source/nativenumber/nativenumbersupplier.cxx b/i18npool/source/nativenumber/nativenumbersupplier.cxx
index 94b5a78c3f42..2d7b254acf4a 100644
--- a/i18npool/source/nativenumber/nativenumbersupplier.cxx
+++ b/i18npool/source/nativenumber/nativenumbersupplier.cxx
@@ -663,12 +663,12 @@ sal_Bool SAL_CALL NativeNumberSupplierService::isValidNatNum( const Locale& rLoc
switch (nNativeNumberMode) {
case NativeNumberMode::NATNUM0: // Ascii
case NativeNumberMode::NATNUM3: // Char, FullWidth
- return sal_True;
+ return true;
case NativeNumberMode::NATNUM1: // Char, Lower
return (langnum >= 0);
case NativeNumberMode::NATNUM2: // Char, Upper
if (langnum == 4) // Hebrew numbering
- return sal_True;
+ return true;
case NativeNumberMode::NATNUM4: // Text, Lower, Long
case NativeNumberMode::NATNUM5: // Text, Upper, Long
case NativeNumberMode::NATNUM6: // Text, FullWidth
@@ -680,7 +680,7 @@ sal_Bool SAL_CALL NativeNumberSupplierService::isValidNatNum( const Locale& rLoc
case NativeNumberMode::NATNUM11: // Text, Hangul, Short
return (langnum == 3); // Korean numbering
}
- return sal_False;
+ return false;
}
NativeNumberXmlAttributes SAL_CALL NativeNumberSupplierService::convertToXmlAttributes( const Locale& rLocale, sal_Int16 nNativeNumberMode ) throw (RuntimeException, std::exception)
diff --git a/i18npool/source/numberformatcode/numberformatcode.cxx b/i18npool/source/numberformatcode/numberformatcode.cxx
index 4a5e14782cef..97852dd778cc 100644
--- a/i18npool/source/numberformatcode/numberformatcode.cxx
+++ b/i18npool/source/numberformatcode/numberformatcode.cxx
@@ -56,7 +56,7 @@ NumberFormatCodeMapper::getDefault( sal_Int16 formatType, sal_Int16 formatUsage,
aFormatSeq[i].formatName,
aFormatSeq[i].formatKey,
aFormatSeq[i].formatIndex,
- sal_True);
+ true);
return anumberFormatCode;
}
}
diff --git a/i18npool/source/search/textsearch.cxx b/i18npool/source/search/textsearch.cxx
index 060450947998..07cceb039868 100644
--- a/i18npool/source/search/textsearch.cxx
+++ b/i18npool/source/search/textsearch.cxx
@@ -1052,7 +1052,7 @@ SearchResult TextSearch::ApproxSrchFrwrd( const OUString& searchStr,
Boundary aWBnd = xBreak->getWordBoundary( searchStr, startPos,
aSrchPara.Locale,
- WordType::ANYWORD_IGNOREWHITESPACES, sal_True );
+ WordType::ANYWORD_IGNOREWHITESPACES, true );
do
{
@@ -1097,7 +1097,7 @@ SearchResult TextSearch::ApproxSrchBkwrd( const OUString& searchStr,
Boundary aWBnd = xBreak->getWordBoundary( searchStr, startPos,
aSrchPara.Locale,
- WordType::ANYWORD_IGNOREWHITESPACES, sal_True );
+ WordType::ANYWORD_IGNOREWHITESPACES, true );
do
{
diff --git a/i18npool/source/textconversion/textconversion_ko.cxx b/i18npool/source/textconversion/textconversion_ko.cxx
index 4276628a2331..caef6cc78ffb 100644
--- a/i18npool/source/textconversion/textconversion_ko.cxx
+++ b/i18npool/source/textconversion/textconversion_ko.cxx
@@ -352,7 +352,7 @@ sal_Bool SAL_CALL
TextConversion_ko::interactiveConversion( const Locale& /*rLocale*/, sal_Int16 /*nTextConversionType*/, sal_Int32 /*nTextConversionOptions*/ )
throw( RuntimeException, IllegalArgumentException, NoSupportException, std::exception )
{
- return sal_True;
+ return true;
}
} } } }
diff --git a/i18npool/source/textconversion/textconversion_zh.cxx b/i18npool/source/textconversion/textconversion_zh.cxx
index 05f7be58f38d..0482df603879 100644
--- a/i18npool/source/textconversion/textconversion_zh.cxx
+++ b/i18npool/source/textconversion/textconversion_zh.cxx
@@ -329,7 +329,7 @@ sal_Bool SAL_CALL
TextConversion_zh::interactiveConversion( const Locale& /*rLocale*/, sal_Int16 /*nTextConversionType*/, sal_Int32 /*nTextConversionOptions*/ )
throw( RuntimeException, IllegalArgumentException, NoSupportException, std::exception )
{
- return sal_False;
+ return false;
}
} } } }
diff --git a/i18npool/source/transliteration/textToPronounce_zh.cxx b/i18npool/source/transliteration/textToPronounce_zh.cxx
index 526b1fa30d73..d9f80f4a17f1 100644
--- a/i18npool/source/transliteration/textToPronounce_zh.cxx
+++ b/i18npool/source/transliteration/textToPronounce_zh.cxx
@@ -109,7 +109,7 @@ TextToPronounce_zh::equals( const OUString & str1, sal_Int32 pos1, sal_Int32 nCo
const sal_Unicode *pron2 = getPronounce(*s2++);
if (pron1 != pron2) {
nMatch1 = nMatch2 = i;
- return sal_False;
+ return false;
}
}
nMatch1 = nMatch2 = realCount;
diff --git a/i18npool/source/transliteration/transliterationImpl.cxx b/i18npool/source/transliteration/transliterationImpl.cxx
index 1ce966004f6e..f9b58aed7637 100644
--- a/i18npool/source/transliteration/transliterationImpl.cxx
+++ b/i18npool/source/transliteration/transliterationImpl.cxx
@@ -479,7 +479,7 @@ TransliterationImpl::equals(
// return number of matched code points so far
nMatch1 = (i < offset1.getLength()) ? offset1[i] : i;
nMatch2 = (i < offset2.getLength()) ? offset2[i] : i;
- return sal_False;
+ return false;
}
}
// i==nLen
@@ -487,11 +487,11 @@ TransliterationImpl::equals(
// return number of matched code points so far
nMatch1 = (i <= offset1.getLength()) ? offset1[i-1] + 1 : i;
nMatch2 = (i <= offset2.getLength()) ? offset2[i-1] + 1 : i;
- return sal_False;
+ return false;
} else {
nMatch1 = nCount1;
nMatch2 = nCount2;
- return sal_True;
+ return true;
}
}