summaryrefslogtreecommitdiff
path: root/linguistic
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-03-31 14:35:18 +0200
committerNoel Grandin <noel@peralex.com>2014-04-01 07:38:08 +0200
commitcb66ea3604ea441ddd03df706bb30e6063fb9a52 (patch)
tree6bda45549881a9456da3141f832f63378d7b4b35 /linguistic
parent95d7ebd22dd20da5a7a26000494b553944fc23ee (diff)
linguistic: sal_Bool->bool
Change-Id: Ie2366b25a1f81a5b25142e8b9a727bcc2f585c14
Diffstat (limited to 'linguistic')
-rw-r--r--linguistic/source/convdic.cxx2
-rw-r--r--linguistic/source/lngprophelp.cxx64
-rw-r--r--linguistic/source/misc.cxx62
-rw-r--r--linguistic/source/misc2.cxx4
-rw-r--r--linguistic/source/spelldsp.cxx6
-rw-r--r--linguistic/source/spelldta.cxx12
6 files changed, 75 insertions, 75 deletions
diff --git a/linguistic/source/convdic.cxx b/linguistic/source/convdic.cxx
index 3e909c7d5136..0d2feb5e85b2 100644
--- a/linguistic/source/convdic.cxx
+++ b/linguistic/source/convdic.cxx
@@ -189,7 +189,7 @@ ConvDic::ConvDic(
if( !rMainURL.isEmpty() )
{
- sal_Bool bExists = sal_False;
+ bool bExists = false;
bIsReadonly = IsReadOnly( rMainURL, &bExists );
if( !bExists ) // new empty dictionary
diff --git a/linguistic/source/lngprophelp.cxx b/linguistic/source/lngprophelp.cxx
index d11b9e687c4f..ce5a6ef6e5ed 100644
--- a/linguistic/source/lngprophelp.cxx
+++ b/linguistic/source/lngprophelp.cxx
@@ -114,8 +114,8 @@ void PropertyChgHelper::AddPropNames( const char *pNewNames[], sal_Int32 nCount
void PropertyChgHelper::SetDefaultValues()
{
- bResIsIgnoreControlCharacters = bIsIgnoreControlCharacters = sal_True;
- bResIsUseDictionaryList = bIsUseDictionaryList = sal_True;
+ bResIsIgnoreControlCharacters = bIsIgnoreControlCharacters = true;
+ bResIsUseDictionaryList = bIsUseDictionaryList = true;
}
@@ -127,7 +127,7 @@ void PropertyChgHelper::GetCurrentValues()
const OUString *pPropName = GetPropNames().getConstArray();
for (sal_Int32 i = 0; i < nLen; ++i)
{
- sal_Bool *pbVal = NULL,
+ bool *pbVal = NULL,
*pbResVal = NULL;
if ( pPropName[i] == UPN_IS_IGNORE_CONTROL_CHARACTERS )
@@ -164,7 +164,7 @@ void PropertyChgHelper::SetTmpPropVals( const PropertyValues &rPropVals )
const PropertyValue *pVal = rPropVals.getConstArray();
for (sal_Int32 i = 0; i < nLen; ++i)
{
- sal_Bool *pbResVal = NULL;
+ bool *pbResVal = NULL;
switch (pVal[i].Handle)
{
case UPH_IS_IGNORE_CONTROL_CHARACTERS :
@@ -181,18 +181,18 @@ void PropertyChgHelper::SetTmpPropVals( const PropertyValues &rPropVals )
}
-sal_Bool PropertyChgHelper::propertyChange_Impl( const PropertyChangeEvent& rEvt )
+bool PropertyChgHelper::propertyChange_Impl( const PropertyChangeEvent& rEvt )
{
- sal_Bool bRes = sal_False;
+ bool bRes = false;
if (GetPropSet().is() && rEvt.Source == GetPropSet())
{
sal_Int16 nLngSvcFlags = (nEvtFlags & AE_HYPHENATOR) ?
LinguServiceEventFlags::HYPHENATE_AGAIN : 0;
- sal_Bool bSCWA = sal_False, // SPELL_CORRECT_WORDS_AGAIN ?
- bSWWA = sal_False; // SPELL_WRONG_WORDS_AGAIN ?
+ bool bSCWA = false, // SPELL_CORRECT_WORDS_AGAIN ?
+ bSWWA = false; // SPELL_WRONG_WORDS_AGAIN ?
- sal_Bool *pbVal = NULL;
+ bool *pbVal = NULL;
switch (rEvt.PropertyHandle)
{
case UPH_IS_IGNORE_CONTROL_CHARACTERS :
@@ -204,12 +204,12 @@ sal_Bool PropertyChgHelper::propertyChange_Impl( const PropertyChangeEvent& rEvt
case UPH_IS_USE_DICTIONARY_LIST :
{
pbVal = &bIsUseDictionaryList;
- bSCWA = bSWWA = sal_True;
+ bSCWA = bSWWA = true;
break;
}
default:
{
- bRes = sal_False;
+ bRes = false;
}
}
if (pbVal)
@@ -218,7 +218,7 @@ sal_Bool PropertyChgHelper::propertyChange_Impl( const PropertyChangeEvent& rEvt
bRes = 0 != pbVal; // sth changed?
if (bRes)
{
- sal_Bool bSpellEvts = (nEvtFlags & AE_SPELLCHECKER) ? sal_True : sal_False;
+ bool bSpellEvts = (nEvtFlags & AE_SPELLCHECKER);
if (bSCWA && bSpellEvts)
nLngSvcFlags |= LinguServiceEventFlags::SPELL_CORRECT_WORDS_AGAIN;
if (bSWWA && bSpellEvts)
@@ -390,9 +390,9 @@ void PropertyHelper_Spell::SetDefaultValues()
{
PropertyChgHelper::SetDefaultValues();
- bResIsSpellUpperCase = bIsSpellUpperCase = sal_False;
- bResIsSpellWithDigits = bIsSpellWithDigits = sal_False;
- bResIsSpellCapitalization = bIsSpellCapitalization = sal_True;
+ bResIsSpellUpperCase = bIsSpellUpperCase = false;
+ bResIsSpellWithDigits = bIsSpellWithDigits = false;
+ bResIsSpellCapitalization = bIsSpellCapitalization = true;
}
@@ -406,7 +406,7 @@ void PropertyHelper_Spell::GetCurrentValues()
const OUString *pPropName = GetPropNames().getConstArray();
for (sal_Int32 i = 0; i < nLen; ++i)
{
- sal_Bool *pbVal = NULL,
+ bool *pbVal = NULL,
*pbResVal = NULL;
if ( pPropName[i] == UPN_IS_SPELL_UPPER_CASE )
@@ -435,36 +435,36 @@ void PropertyHelper_Spell::GetCurrentValues()
}
-sal_Bool PropertyHelper_Spell::propertyChange_Impl( const PropertyChangeEvent& rEvt )
+bool PropertyHelper_Spell::propertyChange_Impl( const PropertyChangeEvent& rEvt )
{
- sal_Bool bRes = PropertyChgHelper::propertyChange_Impl( rEvt );
+ bool bRes = PropertyChgHelper::propertyChange_Impl( rEvt );
if (!bRes && GetPropSet().is() && rEvt.Source == GetPropSet())
{
- sal_Bool bSCWA = sal_False, // SPELL_CORRECT_WORDS_AGAIN ?
- bSWWA = sal_False; // SPELL_WRONG_WORDS_AGAIN ?
+ bool bSCWA = false, // SPELL_CORRECT_WORDS_AGAIN ?
+ bSWWA = false; // SPELL_WRONG_WORDS_AGAIN ?
- sal_Bool *pbVal = NULL;
+ bool *pbVal = NULL;
switch (rEvt.PropertyHandle)
{
case UPH_IS_SPELL_UPPER_CASE :
{
pbVal = &bIsSpellUpperCase;
- bSCWA = sal_False == *pbVal; // sal_False->sal_True change?
+ bSCWA = ! *pbVal; // sal_False->sal_True change?
bSWWA = !bSCWA; // sal_True->sal_False change?
break;
}
case UPH_IS_SPELL_WITH_DIGITS :
{
pbVal = &bIsSpellWithDigits;
- bSCWA = sal_False == *pbVal; // sal_False->sal_True change?
+ bSCWA = ! *pbVal; // sal_False->sal_True change?
bSWWA = !bSCWA; // sal_True->sal_False change?
break;
}
case UPH_IS_SPELL_CAPITALIZATION :
{
pbVal = &bIsSpellCapitalization;
- bSCWA = sal_False == *pbVal; // sal_False->sal_True change?
+ bSCWA = ! *pbVal; // sal_False->sal_True change?
bSWWA = !bSCWA; // sal_True->sal_False change?
break;
}
@@ -526,7 +526,7 @@ void PropertyHelper_Spell::SetTmpPropVals( const PropertyValues &rPropVals )
}
else
{
- sal_Bool *pbResVal = NULL;
+ bool *pbResVal = NULL;
switch (pVal[i].Handle)
{
case UPH_IS_SPELL_UPPER_CASE : pbResVal = &bResIsSpellUpperCase; break;
@@ -621,9 +621,9 @@ void PropertyHelper_Hyphen::GetCurrentValues()
}
-sal_Bool PropertyHelper_Hyphen::propertyChange_Impl( const PropertyChangeEvent& rEvt )
+bool PropertyHelper_Hyphen::propertyChange_Impl( const PropertyChangeEvent& rEvt )
{
- sal_Bool bRes = PropertyChgHelper::propertyChange_Impl( rEvt );
+ bool bRes = PropertyChgHelper::propertyChange_Impl( rEvt );
if (!bRes && GetPropSet().is() && rEvt.Source == GetPropSet())
{
@@ -817,22 +817,22 @@ void PropertyHelper_Spelling::SetTmpPropVals( const com::sun::star::beans::Prope
pInst->SetTmpPropVals( rPropVals );
}
-sal_Bool PropertyHelper_Spelling::IsSpellUpperCase() const
+bool PropertyHelper_Spelling::IsSpellUpperCase() const
{
return pInst->IsSpellUpperCase();
}
-sal_Bool PropertyHelper_Spelling::IsSpellWithDigits() const
+bool PropertyHelper_Spelling::IsSpellWithDigits() const
{
return pInst->IsSpellWithDigits();
}
-sal_Bool PropertyHelper_Spelling::IsSpellCapitalization() const
+bool PropertyHelper_Spelling::IsSpellCapitalization() const
{
return pInst->IsSpellCapitalization();
}
-sal_Bool PropertyHelper_Spelling::addLinguServiceEventListener(
+bool PropertyHelper_Spelling::addLinguServiceEventListener(
const ::com::sun::star::uno::Reference<
::com::sun::star::linguistic2::XLinguServiceEventListener >& rxListener )
throw(::com::sun::star::uno::RuntimeException)
@@ -840,7 +840,7 @@ sal_Bool PropertyHelper_Spelling::addLinguServiceEventListener(
return pInst->addLinguServiceEventListener( rxListener );
}
-sal_Bool PropertyHelper_Spelling::removeLinguServiceEventListener(
+bool PropertyHelper_Spelling::removeLinguServiceEventListener(
const ::com::sun::star::uno::Reference<
::com::sun::star::linguistic2::XLinguServiceEventListener >& rxListener )
throw(::com::sun::star::uno::RuntimeException)
diff --git a/linguistic/source/misc.cxx b/linguistic/source/misc.cxx
index b56b0cb9987e..c1cede4fceae 100644
--- a/linguistic/source/misc.cxx
+++ b/linguistic/source/misc.cxx
@@ -203,10 +203,10 @@ sal_Int32 LevDistance( const OUString &rTxt1, const OUString &rTxt2 )
return nDist;
}
-sal_Bool IsUseDicList( const PropertyValues &rProperties,
+bool IsUseDicList( const PropertyValues &rProperties,
const uno::Reference< XPropertySet > &rxProp )
{
- sal_Bool bRes = sal_True;
+ bool bRes = true;
sal_Int32 nLen = rProperties.getLength();
const PropertyValue *pVal = rProperties.getConstArray();
@@ -230,10 +230,10 @@ sal_Bool IsUseDicList( const PropertyValues &rProperties,
return bRes;
}
-sal_Bool IsIgnoreControlChars( const PropertyValues &rProperties,
+bool IsIgnoreControlChars( const PropertyValues &rProperties,
const uno::Reference< XPropertySet > &rxProp )
{
- sal_Bool bRes = sal_True;
+ bool bRes = true;
sal_Int32 nLen = rProperties.getLength();
const PropertyValue *pVal = rProperties.getConstArray();
@@ -257,9 +257,9 @@ sal_Bool IsIgnoreControlChars( const PropertyValues &rProperties,
return bRes;
}
-static sal_Bool lcl_HasHyphInfo( const uno::Reference<XDictionaryEntry> &xEntry )
+static bool lcl_HasHyphInfo( const uno::Reference<XDictionaryEntry> &xEntry )
{
- sal_Bool bRes = sal_False;
+ bool bRes = false;
if (xEntry.is())
{
// there has to be (at least one) '=' or '[' denoting a hyphenation position
@@ -275,7 +275,7 @@ static sal_Bool lcl_HasHyphInfo( const uno::Reference<XDictionaryEntry> &xEntry
uno::Reference< XDictionaryEntry > SearchDicList(
const uno::Reference< XSearchableDictionaryList > &xDicList,
const OUString &rWord, sal_Int16 nLanguage,
- sal_Bool bSearchPosDics, sal_Bool bSearchSpellEntry )
+ bool bSearchPosDics, bool bSearchSpellEntry )
{
MutexGuard aGuard( GetLinguMutex() );
@@ -320,12 +320,12 @@ uno::Reference< XDictionaryEntry > SearchDicList(
return xEntry;
}
-sal_Bool SaveDictionaries( const uno::Reference< XSearchableDictionaryList > &xDicList )
+bool SaveDictionaries( const uno::Reference< XSearchableDictionaryList > &xDicList )
{
if (!xDicList.is())
- return sal_True;
+ return true;
- sal_Bool bRet = sal_True;
+ bool bRet = true;
Sequence< uno::Reference< XDictionary > > aDics( xDicList->getDictionaries() );
const uno::Reference< XDictionary > *pDic = aDics.getConstArray();
@@ -343,7 +343,7 @@ sal_Bool SaveDictionaries( const uno::Reference< XSearchableDictionaryList > &xD
}
catch(uno::Exception &)
{
- bRet = sal_False;
+ bRet = false;
}
}
@@ -352,9 +352,9 @@ sal_Bool SaveDictionaries( const uno::Reference< XSearchableDictionaryList > &xD
sal_uInt8 AddEntryToDic(
uno::Reference< XDictionary > &rxDic,
- const OUString &rWord, sal_Bool bIsNeg,
+ const OUString &rWord, bool bIsNeg,
const OUString &rRplcTxt, sal_Int16 /* nRplcLang */,
- sal_Bool bStripDot )
+ bool bStripDot )
{
if (!rxDic.is())
return DIC_ERR_NOT_EXISTS;
@@ -370,7 +370,7 @@ sal_uInt8 AddEntryToDic(
aTmp = aTmp.copy( 0, nLen - 1 );
}
}
- sal_Bool bAddOk = rxDic->add( aTmp, bIsNeg, rRplcTxt );
+ bool bAddOk = rxDic->add( aTmp, bIsNeg, rRplcTxt );
sal_uInt8 nRes = DIC_ERR_NONE;
if (!bAddOk)
@@ -406,10 +406,10 @@ uno::Sequence< sal_Int16 >
return aLangs;
}
-sal_Bool IsReadOnly( const OUString &rURL, sal_Bool *pbExist )
+bool IsReadOnly( const OUString &rURL, bool *pbExist )
{
- sal_Bool bRes = sal_False;
- sal_Bool bExists = sal_False;
+ bool bRes = false;
+ bool bExists = false;
if (!rURL.isEmpty())
{
@@ -427,7 +427,7 @@ sal_Bool IsReadOnly( const OUString &rURL, sal_Bool *pbExist )
}
catch (Exception &)
{
- bRes = sal_True;
+ bRes = true;
}
}
@@ -436,10 +436,10 @@ sal_Bool IsReadOnly( const OUString &rURL, sal_Bool *pbExist )
return bRes;
}
-static sal_Bool GetAltSpelling( sal_Int16 &rnChgPos, sal_Int16 &rnChgLen, OUString &rRplc,
+static bool GetAltSpelling( sal_Int16 &rnChgPos, sal_Int16 &rnChgLen, OUString &rRplc,
uno::Reference< XHyphenatedWord > &rxHyphWord )
{
- sal_Bool bRes = rxHyphWord->isAlternativeSpelling();
+ bool bRes = rxHyphWord->isAlternativeSpelling();
if (bRes)
{
OUString aWord( rxHyphWord->getWord() ),
@@ -495,7 +495,7 @@ static sal_Int16 GetOrigWordPos( const OUString &rOrigWord, sal_Int16 nPos )
while (nPos >= 0 && i++ < nLen)
{
sal_Unicode cChar = rOrigWord[i];
- sal_Bool bSkip = IsHyphen( cChar ) || IsControlChar( cChar );
+ bool bSkip = IsHyphen( cChar ) || IsControlChar( cChar );
if (!bSkip)
--nPos;
}
@@ -512,7 +512,7 @@ sal_Int32 GetPosInWordToCheck( const OUString &rTxt, sal_Int32 nPos )
for (sal_Int32 i = 0; i < nPos; ++i)
{
sal_Unicode cChar = rTxt[i];
- sal_Bool bSkip = IsHyphen( cChar ) || IsControlChar( cChar );
+ bool bSkip = IsHyphen( cChar ) || IsControlChar( cChar );
if (!bSkip)
++nRes;
}
@@ -530,7 +530,7 @@ uno::Reference< XHyphenatedWord > RebuildHyphensAndControlChars(
sal_Int16 nChgPos = 0,
nChgLen = 0;
OUString aRplc;
- sal_Bool bAltSpelling = GetAltSpelling( nChgPos, nChgLen, aRplc, rxHyphWord );
+ bool bAltSpelling = GetAltSpelling( nChgPos, nChgLen, aRplc, rxHyphWord );
#if OSL_DEBUG_LEVEL > 1
OUString aWord( rxHyphWord->getWord() );
#endif
@@ -597,7 +597,7 @@ osl::Mutex & lcl_GetCharClassMutex()
return aMutex;
}
-sal_Bool IsUpper( const OUString &rText, sal_Int32 nPos, sal_Int32 nLen, sal_Int16 nLanguage )
+bool IsUpper( const OUString &rText, sal_Int32 nPos, sal_Int32 nLen, sal_Int16 nLanguage )
{
MutexGuard aGuard( lcl_GetCharClassMutex() );
@@ -682,7 +682,7 @@ static const sal_uInt32 the_aDigitZeroes [] =
0x0001D7CE //1D7FF ; Decimal # Nd [50] MATHEMATICAL BOLD DIGIT ZERO..MATHEMATICAL MONOSPACE DIGIT NINE
};
-sal_Bool HasDigits( const OUString &rText )
+bool HasDigits( const OUString &rText )
{
static const int nNumDigitZeroes = sizeof(the_aDigitZeroes) / sizeof(the_aDigitZeroes[0]);
const sal_Int32 nLen = rText.getLength();
@@ -697,25 +697,25 @@ sal_Bool HasDigits( const OUString &rText )
if (nDigitZero > nCodePoint)
break;
if (/*nDigitZero <= nCodePoint &&*/ nCodePoint <= nDigitZero + 9)
- return sal_True;
+ return true;
}
}
- return sal_False;
+ return false;
}
-sal_Bool IsNumeric( const OUString &rText )
+bool IsNumeric( const OUString &rText )
{
- sal_Bool bRes = sal_False;
+ bool bRes = false;
if (!rText.isEmpty())
{
sal_Int32 nLen = rText.getLength();
- bRes = sal_True;
+ bRes = true;
for(sal_Int32 i = 0; i < nLen; ++i)
{
sal_Unicode cChar = rText[ i ];
if ( !((sal_Unicode)'0' <= cChar && cChar <= (sal_Unicode)'9') )
{
- bRes = sal_False;
+ bRes = false;
break;
}
}
diff --git a/linguistic/source/misc2.cxx b/linguistic/source/misc2.cxx
index 02421495a80e..e7e8031e41c8 100644
--- a/linguistic/source/misc2.cxx
+++ b/linguistic/source/misc2.cxx
@@ -40,9 +40,9 @@ namespace linguistic
{
-sal_Bool FileExists( const OUString &rMainURL )
+bool FileExists( const OUString &rMainURL )
{
- sal_Bool bExists = sal_False;
+ bool bExists = false;
if (!rMainURL.isEmpty())
{
try
diff --git a/linguistic/source/spelldsp.cxx b/linguistic/source/spelldsp.cxx
index 0c892f38c20a..3ea7d5f4f40b 100644
--- a/linguistic/source/spelldsp.cxx
+++ b/linguistic/source/spelldsp.cxx
@@ -262,13 +262,13 @@ static Reference< XDictionaryEntry > lcl_GetRulingDictionaryEntry(
{
Reference< XSearchableDictionaryList > xDList( GetDictionaryList() );
Reference< XDictionaryEntry > xNegEntry( SearchDicList( xDList,
- rWord, nLanguage, sal_False, sal_True ) );
+ rWord, nLanguage, false, true ) );
if (xNegEntry.is())
xRes = xNegEntry;
else
{
Reference< XDictionaryEntry > xPosEntry( SearchDicList( xDList,
- rWord, nLanguage, sal_True, sal_True ) );
+ rWord, nLanguage, true, true ) );
if (xPosEntry.is())
xRes = xPosEntry;
}
@@ -660,7 +660,7 @@ Reference< XSpellAlternatives > SpellCheckerDispatcher::spell_Impl(
// replacement text must not be in negative dictionary itself
if (!aAddRplcTxt.isEmpty() &&
- !SearchDicList( xDList, aAddRplcTxt, nLanguage, sal_False, sal_True ).is())
+ !SearchDicList( xDList, aAddRplcTxt, nLanguage, false, true ).is())
{
aProposalList.Prepend( aAddRplcTxt );
}
diff --git a/linguistic/source/spelldta.cxx b/linguistic/source/spelldta.cxx
index d895bcb9fa90..b8490ee08aeb 100644
--- a/linguistic/source/spelldta.cxx
+++ b/linguistic/source/spelldta.cxx
@@ -44,17 +44,17 @@ namespace linguistic
#define MAX_PROPOSALS 40
-sal_Bool SeqHasEntry(
+bool SeqHasEntry(
const Sequence< OUString > &rSeq,
const OUString &rTxt)
{
- sal_Bool bRes = sal_False;
+ bool bRes = false;
sal_Int32 nLen = rSeq.getLength();
const OUString *pEntry = rSeq.getConstArray();
for (sal_Int32 i = 0; i < nLen && !bRes; ++i)
{
if (rTxt == pEntry[i])
- bRes = sal_True;
+ bRes = true;
}
return bRes;
}
@@ -117,7 +117,7 @@ void SeqRemoveNegEntries( Sequence< OUString > &rSeq,
for (sal_Int32 i = 0; i < nLen; ++i)
{
Reference< XDictionaryEntry > xNegEntry( SearchDicList( rxDicList,
- pEntries[i], nLanguage, sal_False, sal_True ) );
+ pEntries[i], nLanguage, false, true ) );
if (xNegEntry.is())
{
pEntries[i] = aEmpty;
@@ -128,7 +128,7 @@ void SeqRemoveNegEntries( Sequence< OUString > &rSeq,
{
Sequence< OUString > aNew;
// merge sequence without duplicates and empty strings in new empty sequence
- aNew = MergeProposalSeqs( aNew, rSeq, sal_False );
+ aNew = MergeProposalSeqs( aNew, rSeq, false );
rSeq = aNew;
}
}
@@ -137,7 +137,7 @@ void SeqRemoveNegEntries( Sequence< OUString > &rSeq,
Sequence< OUString > MergeProposalSeqs(
Sequence< OUString > &rAlt1,
Sequence< OUString > &rAlt2,
- sal_Bool bAllowDuplicates )
+ bool bAllowDuplicates )
{
Sequence< OUString > aMerged;