summaryrefslogtreecommitdiff
path: root/linguistic
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-04-15 08:48:53 +0200
committerNoel Grandin <noel@peralex.com>2014-04-15 09:02:34 +0200
commit86c280acb528048131d233d96ce95848c6acf683 (patch)
tree3ce31467c7d4f35d4e4cb9eda1fecbd7c6df2708 /linguistic
parentaf047fc242c51d97477c109653a98749d2af335d (diff)
linguistic: sal_Bool->bool
Change-Id: Ifed60967edd768b16cafba3c2293149610138213
Diffstat (limited to 'linguistic')
-rw-r--r--linguistic/source/convdic.cxx54
-rw-r--r--linguistic/source/convdic.hxx16
-rw-r--r--linguistic/source/convdiclist.cxx14
-rw-r--r--linguistic/source/convdiclist.hxx2
-rw-r--r--linguistic/source/convdicxml.cxx6
-rw-r--r--linguistic/source/convdicxml.hxx12
-rw-r--r--linguistic/source/dicimp.cxx110
-rw-r--r--linguistic/source/dicimp.hxx38
-rw-r--r--linguistic/source/dlistimp.cxx58
-rw-r--r--linguistic/source/dlistimp.hxx6
-rw-r--r--linguistic/source/gciterator.cxx24
-rw-r--r--linguistic/source/gciterator.hxx10
-rw-r--r--linguistic/source/hhconvdic.cxx8
-rw-r--r--linguistic/source/hyphdsp.cxx16
-rw-r--r--linguistic/source/iprcache.cxx6
-rw-r--r--linguistic/source/lngopt.cxx8
-rw-r--r--linguistic/source/lngopt.hxx26
-rw-r--r--linguistic/source/lngprophelp.cxx8
-rw-r--r--linguistic/source/lngsvcmgr.cxx86
-rw-r--r--linguistic/source/lngsvcmgr.hxx14
-rw-r--r--linguistic/source/spelldsp.cxx56
-rw-r--r--linguistic/source/spelldsp.hxx6
-rw-r--r--linguistic/source/spelldta.cxx4
-rw-r--r--linguistic/source/thesdsp.cxx4
24 files changed, 295 insertions, 297 deletions
diff --git a/linguistic/source/convdic.cxx b/linguistic/source/convdic.cxx
index 0d2feb5e85b2..ef899ac85276 100644
--- a/linguistic/source/convdic.cxx
+++ b/linguistic/source/convdic.cxx
@@ -123,9 +123,9 @@ void ReadThroughDic( const OUString &rMainURL, ConvDicXMLImport &rImport )
}
}
-sal_Bool IsConvDic( const OUString &rFileURL, sal_Int16 &nLang, sal_Int16 &nConvType )
+bool IsConvDic( const OUString &rFileURL, sal_Int16 &nLang, sal_Int16 &nConvType )
{
- sal_Bool bRes = sal_False;
+ bool bRes = false;
if (rFileURL.isEmpty())
return bRes;
@@ -166,7 +166,7 @@ ConvDic::ConvDic(
const OUString &rName,
sal_Int16 nLang,
sal_Int16 nConvType,
- sal_Bool bBiDirectional,
+ bool bBiDirectional,
const OUString &rMainURL) :
aFlushListeners( GetLinguMutex() )
{
@@ -181,11 +181,11 @@ ConvDic::ConvDic(
pConvPropType.reset( new PropTypeMap );
nMaxLeftCharCount = nMaxRightCharCount = 0;
- bMaxCharCountIsValid = sal_True;
+ bMaxCharCountIsValid = true;
- bNeedEntries = sal_True;
- bIsModified = bIsActive = sal_False;
- bIsReadonly = sal_False;
+ bNeedEntries = true;
+ bIsModified = bIsActive = false;
+ bIsReadonly = false;
if( !rMainURL.isEmpty() )
{
@@ -194,7 +194,7 @@ ConvDic::ConvDic(
if( !bExists ) // new empty dictionary
{
- bNeedEntries = sal_False;
+ bNeedEntries = false;
//! create physical representation of an **empty** dictionary
//! that could be found by the dictionary-list implementation
// (Note: empty dictionaries are not just empty files!)
@@ -204,7 +204,7 @@ ConvDic::ConvDic(
}
else
{
- bNeedEntries = sal_False;
+ bNeedEntries = false;
}
}
@@ -219,12 +219,12 @@ void ConvDic::Load()
DBG_ASSERT( !bIsModified, "dictionary is modified. Really do 'Load'?" );
//!! prevent function from being called recursively via HasEntry, AddEntry
- bNeedEntries = sal_False;
+ bNeedEntries = false;
ConvDicXMLImport *pImport = new ConvDicXMLImport( this );
//!! keep a first reference to ensure the lifetime of the object !!
uno::Reference< XInterface > xRef( (document::XFilter *) pImport, UNO_QUERY );
ReadThroughDic( aMainURL, *pImport ); // will implicitly add the entries
- bIsModified = sal_False;
+ bIsModified = false;
}
@@ -267,10 +267,10 @@ void ConvDic::Save()
//!! keep a first(!) reference until everything is done to
//!! ensure the proper lifetime of the object
uno::Reference< document::XFilter > aRef( (document::XFilter *) pExport );
- sal_Bool bRet = pExport->Export(); // write entries to file
+ bool bRet = pExport->Export(); // write entries to file
DBG_ASSERT( !pStream->GetError(), "I/O error while writing to stream" );
if (bRet)
- bIsModified = sal_False;
+ bIsModified = false;
}
DBG_ASSERT( !bIsModified, "dictionary still modified after save. Save failed?" );
}
@@ -292,7 +292,7 @@ ConvMap::iterator ConvDic::GetEntry( ConvMap &rMap, const OUString &rFirstText,
}
-sal_Bool ConvDic::HasEntry( const OUString &rLeftText, const OUString &rRightText )
+bool ConvDic::HasEntry( const OUString &rLeftText, const OUString &rRightText )
{
if (bNeedEntries)
Load();
@@ -319,7 +319,7 @@ void ConvDic::AddEntry( const OUString &rLeftText, const OUString &rRightText )
nMaxRightCharCount = (sal_Int16) rRightText.getLength();
}
- bIsModified = sal_True;
+ bIsModified = true;
}
@@ -339,8 +339,8 @@ void ConvDic::RemoveEntry( const OUString &rLeftText, const OUString &rRightText
pFromRight->erase( aRightIt );
}
- bIsModified = sal_True;
- bMaxCharCountIsValid = sal_False;
+ bIsModified = true;
+ bMaxCharCountIsValid = false;
}
@@ -391,11 +391,11 @@ void SAL_CALL ConvDic::clear( )
aFromLeft .clear();
if (pFromRight.get())
pFromRight->clear();
- bNeedEntries = sal_False;
- bIsModified = sal_True;
+ bNeedEntries = false;
+ bIsModified = true;
nMaxLeftCharCount = 0;
nMaxRightCharCount = 0;
- bMaxCharCountIsValid = sal_True;
+ bMaxCharCountIsValid = true;
}
@@ -436,19 +436,19 @@ uno::Sequence< OUString > SAL_CALL ConvDic::getConversions(
}
-static sal_Bool lcl_SeqHasEntry(
+static bool lcl_SeqHasEntry(
const OUString *pSeqStart, // first element to check
sal_Int32 nToCheck, // number of elements to check
const OUString &rText)
{
- sal_Bool bRes = sal_False;
+ bool bRes = false;
if (pSeqStart && nToCheck > 0)
{
const OUString *pDone = pSeqStart + nToCheck; // one behind last to check
while (!bRes && pSeqStart != pDone)
{
if (*pSeqStart++ == rText)
- bRes = sal_True;
+ bRes = true;
}
}
return bRes;
@@ -556,7 +556,7 @@ sal_Int16 SAL_CALL ConvDic::getMaxCharCount( ConversionDirection eDirection )
}
}
- bMaxCharCountIsValid = sal_True;
+ bMaxCharCountIsValid = true;
}
sal_Int16 nRes = eDirection == ConversionDirection_FROM_LEFT ?
nMaxLeftCharCount : nMaxRightCharCount;
@@ -571,7 +571,7 @@ void SAL_CALL ConvDic::setPropertyType(
sal_Int16 nPropertyType )
throw (container::NoSuchElementException, IllegalArgumentException, RuntimeException, std::exception)
{
- sal_Bool bHasElement = HasEntry( rLeftText, rRightText);
+ bool bHasElement = HasEntry( rLeftText, rRightText);
if (!bHasElement)
throw container::NoSuchElementException();
@@ -579,7 +579,7 @@ void SAL_CALL ConvDic::setPropertyType(
// same PropertyType even if the right text is different...
if (pConvPropType.get())
pConvPropType->insert( PropTypeMap::value_type( rLeftText, nPropertyType ) );
- bIsModified = sal_True;
+ bIsModified = true;
}
@@ -588,7 +588,7 @@ sal_Int16 SAL_CALL ConvDic::getPropertyType(
const OUString& rRightText )
throw (container::NoSuchElementException, RuntimeException, std::exception)
{
- sal_Bool bHasElement = HasEntry( rLeftText, rRightText);
+ bool bHasElement = HasEntry( rLeftText, rRightText);
if (!bHasElement)
throw container::NoSuchElementException();
diff --git a/linguistic/source/convdic.hxx b/linguistic/source/convdic.hxx
index cc333ae8e71a..a43fa918aaf7 100644
--- a/linguistic/source/convdic.hxx
+++ b/linguistic/source/convdic.hxx
@@ -39,7 +39,7 @@
#define SN_CONV_DICTIONARY "com.sun.star.linguistic2.ConversionDictionary"
-sal_Bool IsConvDic( const OUString &rFileURL, sal_Int16 &nLang, sal_Int16 &nConvType );
+bool IsConvDic( const OUString &rFileURL, sal_Int16 &nLang, sal_Int16 &nConvType );
struct StrLT
{
@@ -92,11 +92,11 @@ protected:
sal_Int16 nConversionType;
sal_Int16 nMaxLeftCharCount;
sal_Int16 nMaxRightCharCount;
- sal_Bool bMaxCharCountIsValid;
- sal_Bool bNeedEntries;
- sal_Bool bIsModified;
- sal_Bool bIsActive;
- sal_Bool bIsReadonly;
+ bool bMaxCharCountIsValid;
+ bool bNeedEntries;
+ bool bIsModified;
+ bool bIsActive;
+ bool bIsReadonly;
// disallow copy-constructor and assignment-operator for now
ConvDic(const ConvDic &);
@@ -110,7 +110,7 @@ public:
ConvDic( const OUString &rName,
sal_Int16 nLanguage,
sal_Int16 nConversionType,
- sal_Bool bBiDirectional,
+ bool bBiDirectional,
const OUString &rMainURL);
virtual ~ConvDic();
@@ -147,7 +147,7 @@ public:
static com::sun::star::uno::Sequence< OUString >
getSupportedServiceNames_Static() throw();
- sal_Bool HasEntry( const OUString &rLeftText, const OUString &rRightText );
+ bool HasEntry( const OUString &rLeftText, const OUString &rRightText );
void AddEntry( const OUString &rLeftText, const OUString &rRightText );
void RemoveEntry( const OUString &rLeftText, const OUString &rRightText );
};
diff --git a/linguistic/source/convdiclist.cxx b/linguistic/source/convdiclist.cxx
index 4501670ef792..d5cf1b78ca71 100644
--- a/linguistic/source/convdiclist.cxx
+++ b/linguistic/source/convdiclist.cxx
@@ -284,7 +284,7 @@ void SAL_CALL ConvDicNameContainer::removeByName( const OUString& rName )
::ucbhelper::Content aCnt( aObj.GetMainURL( INetURLObject::NO_DECODE ),
uno::Reference< ::com::sun::star::ucb::XCommandEnvironment >(),
comphelper::getProcessComponentContext() );
- aCnt.executeCommand( "delete", makeAny( sal_Bool( sal_True ) ) );
+ aCnt.executeCommand( "delete", makeAny( true ) );
}
catch( ::com::sun::star::ucb::CommandAbortedException& )
{
@@ -341,7 +341,7 @@ void ConvDicNameContainer::AddConvDics(
else if ((nLang == LANGUAGE_CHINESE_SIMPLIFIED || nLang == LANGUAGE_CHINESE_TRADITIONAL) &&
nConvType == ConversionDictionaryType::SCHINESE_TCHINESE)
{
- xDic = new ConvDic( aDicName, nLang, nConvType, sal_False, aURL );
+ xDic = new ConvDic( aDicName, nLang, nConvType, false, aURL );
}
if (xDic.is())
@@ -374,7 +374,7 @@ ConvDicList::ConvDicList() :
aEvtListeners( GetLinguMutex() )
{
pNameContainer = 0;
- bDisposing = sal_False;
+ bDisposing = false;
pExitListener = new MyAppExitListener( *this );
xExitListener = pExitListener;
@@ -465,7 +465,7 @@ uno::Reference< XConversionDictionary > SAL_CALL ConvDicList::addNewDictionary(
else if ((nLang == LANGUAGE_CHINESE_SIMPLIFIED || nLang == LANGUAGE_CHINESE_TRADITIONAL) &&
nConvDicType == ConversionDictionaryType::SCHINESE_TCHINESE)
{
- xRes = new ConvDic( rName, nLang, nConvDicType, sal_False, aDicMainURL );
+ xRes = new ConvDic( rName, nLang, nConvDicType, false, aDicMainURL );
}
if (!xRes.is())
@@ -496,12 +496,12 @@ uno::Sequence< OUString > SAL_CALL ConvDicList::queryConversions(
uno::Sequence< OUString > aRes( 20 );
OUString *pRes = aRes.getArray();
- sal_Bool bSupported = sal_False;
+ bool bSupported = false;
sal_Int32 nLen = GetNameContainer().GetCount();
for (sal_Int32 i = 0; i < nLen; ++i)
{
const uno::Reference< XConversionDictionary > xDic( GetNameContainer().GetByIndex(i) );
- sal_Bool bMatch = xDic.is() &&
+ bool bMatch = xDic.is() &&
xDic->getLocale() == rLocale &&
xDic->getConversionType() == nConversionDictionaryType;
bSupported |= bMatch;
@@ -564,7 +564,7 @@ void SAL_CALL ConvDicList::dispose( )
MutexGuard aGuard( GetLinguMutex() );
if (!bDisposing)
{
- bDisposing = sal_True;
+ bDisposing = true;
EventObject aEvtObj( (XConversionDictionaryList *) this );
aEvtListeners.disposeAndClear( aEvtObj );
diff --git a/linguistic/source/convdiclist.hxx b/linguistic/source/convdiclist.hxx
index c19c17a9c362..8035348442a4 100644
--- a/linguistic/source/convdiclist.hxx
+++ b/linguistic/source/convdiclist.hxx
@@ -62,7 +62,7 @@ class ConvDicList :
::com::sun::star::uno::Reference< ::com::sun::star::frame::
XTerminateListener > xExitListener;
- sal_Bool bDisposing;
+ bool bDisposing;
// disallow copy-constructor and assignment-operator for now
ConvDicList( const ConvDicList & );
diff --git a/linguistic/source/convdicxml.cxx b/linguistic/source/convdicxml.cxx
index 6b7fb27e46f8..46b18a96dc37 100644
--- a/linguistic/source/convdicxml.cxx
+++ b/linguistic/source/convdicxml.cxx
@@ -289,9 +289,9 @@ void ConvDicXMLRightTextContext_Impl::EndElement()
-sal_Bool ConvDicXMLExport::Export()
+bool ConvDicXMLExport::Export()
{
- sal_Bool bRet = sal_False;
+ bool bRet = false;
uno::Reference< document::XExporter > xExporter( this );
uno::Reference< document::XFilter > xFilter( xExporter, UNO_QUERY );
@@ -328,7 +328,7 @@ sal_uInt32 ConvDicXMLExport::exportDoc( enum ::xmloff::token::XMLTokenEnum /*eCl
GetDocHandler()->endDocument();
- bSuccess = sal_True;
+ bSuccess = true;
return 0;
}
diff --git a/linguistic/source/convdicxml.hxx b/linguistic/source/convdicxml.hxx
index d31e212b8c0d..d8d155ccc76c 100644
--- a/linguistic/source/convdicxml.hxx
+++ b/linguistic/source/convdicxml.hxx
@@ -41,7 +41,7 @@ class ConvDic;
class ConvDicXMLExport : public SvXMLExport
{
ConvDic &rDic;
- sal_Bool bSuccess;
+ bool bSuccess;
public:
ConvDicXMLExport( ConvDic &rConvDic,
@@ -50,7 +50,7 @@ public:
SvXMLExport ( comphelper::getProcessComponentContext(), "com.sun.star.lingu2.ConvDicXMLExport", rFileName,
::com::sun::star::util::MeasureUnit::CM, rHandler ),
rDic ( rConvDic ),
- bSuccess ( sal_False )
+ bSuccess ( false )
{
}
virtual ~ConvDicXMLExport()
@@ -63,7 +63,7 @@ public:
void _ExportContent() SAL_OVERRIDE;
sal_uInt32 exportDoc( enum ::xmloff::token::XMLTokenEnum eClass ) SAL_OVERRIDE;
- sal_Bool Export();
+ bool Export();
};
@@ -78,7 +78,7 @@ class ConvDicXMLImport : public SvXMLImport
sal_Int16 nLanguage; // language of the dictionary
sal_Int16 nConversionType; // conversion type the dictionary is used for
- sal_Bool bSuccess;
+ bool bSuccess;
public:
@@ -89,7 +89,7 @@ public:
{
nLanguage = LANGUAGE_NONE;
nConversionType = -1;
- bSuccess = sal_False;
+ bSuccess = false;
}
virtual ~ConvDicXMLImport() throw ()
@@ -106,7 +106,7 @@ public:
ConvDic * GetDic() { return pDic; }
sal_Int16 GetLanguage() const { return nLanguage; }
sal_Int16 GetConversionType() const { return nConversionType; }
- sal_Bool GetSuccess() const { return bSuccess; }
+ bool GetSuccess() const { return bSuccess; }
void SetLanguage( sal_Int16 nLang ) { nLanguage = nLang; }
void SetConversionType( sal_Int16 nType ) { nConversionType = nType; }
diff --git a/linguistic/source/dicimp.cxx b/linguistic/source/dicimp.cxx
index 900a10b781e0..dac3046ec8b1 100644
--- a/linguistic/source/dicimp.cxx
+++ b/linguistic/source/dicimp.cxx
@@ -80,14 +80,14 @@ static bool getTag(const OString &rLine, const sal_Char *pTagName,
}
-sal_Int16 ReadDicVersion( SvStreamPtr &rpStream, sal_uInt16 &nLng, sal_Bool &bNeg )
+sal_Int16 ReadDicVersion( SvStreamPtr &rpStream, sal_uInt16 &nLng, bool &bNeg )
{
// Sniff the header
sal_Int16 nDicVersion = DIC_VERSION_DONTKNOW;
sal_Char pMagicHeader[MAX_HEADER_LENGTH];
nLng = LANGUAGE_NONE;
- bNeg = sal_False;
+ bNeg = false;
if (!rpStream.get() || rpStream->GetError())
return -1;
@@ -98,7 +98,7 @@ sal_Int16 ReadDicVersion( SvStreamPtr &rpStream, sal_uInt16 &nLng, sal_Bool &bNe
if ((rpStream->Read((void *) pMagicHeader, nVerOOo7Len) == nVerOOo7Len) &&
!strcmp(pMagicHeader, pVerOOo7))
{
- sal_Bool bSuccess;
+ bool bSuccess;
OString aLine;
nDicVersion = DIC_VERSION_7;
@@ -107,7 +107,7 @@ sal_Int16 ReadDicVersion( SvStreamPtr &rpStream, sal_uInt16 &nLng, sal_Bool &bNe
rpStream->ReadLine(aLine);
// 2nd line: language all | en-US | pt-BR ...
- while (sal_True == (bSuccess = rpStream->ReadLine(aLine)))
+ while ((bSuccess = rpStream->ReadLine(aLine)))
{
OString aTagValue;
@@ -128,9 +128,9 @@ sal_Int16 ReadDicVersion( SvStreamPtr &rpStream, sal_uInt16 &nLng, sal_Bool &bNe
if (getTag(aLine, "type: ", aTagValue))
{
if (aTagValue == "negative")
- bNeg = sal_True;
+ bNeg = true;
else
- bNeg = sal_False;
+ bNeg = false;
}
if (aLine.indexOf("---") != -1) // end of header
@@ -173,9 +173,7 @@ sal_Int16 ReadDicVersion( SvStreamPtr &rpStream, sal_uInt16 &nLng, sal_Bool &bNe
nLng = LANGUAGE_NONE;
// Negative Flag
- sal_Char nTmp;
- rpStream->ReadChar( nTmp );
- bNeg = (sal_Bool)nTmp;
+ rpStream->ReadCharAsBool( bNeg );
}
}
@@ -185,7 +183,7 @@ sal_Int16 ReadDicVersion( SvStreamPtr &rpStream, sal_uInt16 &nLng, sal_Bool &bNe
DictionaryNeo::DictionaryNeo(const OUString &rName,
sal_Int16 nLang, DictionaryType eType,
const OUString &rMainURL,
- sal_Bool bWriteable) :
+ bool bWriteable) :
aDicEvtListeners( GetLinguMutex() ),
aDicName (rName),
aMainURL (rMainURL),
@@ -194,13 +192,13 @@ DictionaryNeo::DictionaryNeo(const OUString &rName,
{
nCount = 0;
nDicVersion = DIC_VERSION_DONTKNOW;
- bNeedEntries = sal_True;
- bIsModified = bIsActive = sal_False;
+ bNeedEntries = true;
+ bIsModified = bIsActive = false;
bIsReadonly = !bWriteable;
if( !rMainURL.isEmpty())
{
- sal_Bool bExists = FileExists( rMainURL );
+ bool bExists = FileExists( rMainURL );
if( !bExists )
{
// save new dictionaries with in Format 7 (UTF8 plain text)
@@ -213,14 +211,14 @@ DictionaryNeo::DictionaryNeo(const OUString &rName,
"DictionaryNeo: dictionaries should be writeable if they are to be saved" );
if (!bIsReadonly)
saveEntries( rMainURL );
- bNeedEntries = sal_False;
+ bNeedEntries = false;
}
}
else
{
// non persistent dictionaries (like IgnoreAllList) should always be writable
- bIsReadonly = sal_False;
- bNeedEntries = sal_False;
+ bIsReadonly = false;
+ bNeedEntries = false;
}
}
@@ -237,7 +235,7 @@ sal_uLong DictionaryNeo::loadEntries(const OUString &rMainURL)
DBG_ASSERT(!bIsModified, "lng : dictionary already modified!");
// function should only be called once in order to load entries from file
- bNeedEntries = sal_False;
+ bNeedEntries = false;
if (rMainURL.isEmpty())
return 0;
@@ -263,7 +261,7 @@ sal_uLong DictionaryNeo::loadEntries(const OUString &rMainURL)
sal_uLong nErr = sal::static_int_cast< sal_uLong >(-1);
// read header
- sal_Bool bNegativ;
+ bool bNegativ;
sal_uInt16 nLang;
nDicVersion = ReadDicVersion(pStream, nLang, bNegativ);
if (0 != (nErr = pStream->GetError()))
@@ -311,7 +309,7 @@ sal_uLong DictionaryNeo::loadEntries(const OUString &rMainURL)
OUString aText(aWordBuf, rtl_str_getLength(aWordBuf), eEnc);
uno::Reference< XDictionaryEntry > xEntry =
new DicEntry( aText, bNegativ );
- addEntry_Impl( xEntry , sal_True ); //! don't launch events here
+ addEntry_Impl( xEntry, true ); //! don't launch events here
}
pStream->ReadUInt16( nLen );
@@ -333,18 +331,18 @@ sal_uLong DictionaryNeo::loadEntries(const OUString &rMainURL)
}
else if (DIC_VERSION_7 == nDicVersion)
{
- sal_Bool bSuccess;
+ bool bSuccess;
OString aLine;
// remaining lines - stock strings (a [==] b)
- while (sal_True == (bSuccess = pStream->ReadLine(aLine)))
+ while (true == (bSuccess = pStream->ReadLine(aLine)))
{
if (aLine[0] == '#') // skip comments
continue;
OUString aText = OStringToOUString(aLine, RTL_TEXTENCODING_UTF8);
uno::Reference< XDictionaryEntry > xEntry =
new DicEntry( aText, eDicType == DictionaryType_NEGATIVE );
- addEntry_Impl( xEntry , sal_True ); //! don't launch events here
+ addEntry_Impl( xEntry, true ); //! don't launch events here
}
}
@@ -353,7 +351,7 @@ sal_uLong DictionaryNeo::loadEntries(const OUString &rMainURL)
// since this routine should be called only initialy (prior to any
// modification to be saved) we reset the bIsModified flag here that
// was implicitly set by addEntry_Impl
- bIsModified = sal_False;
+ bIsModified = false;
return pStream->GetError();
}
@@ -514,7 +512,7 @@ void DictionaryNeo::launchEvent(sal_Int16 nEvent,
int DictionaryNeo::cmpDicEntry(const OUString& rWord1,
const OUString &rWord2,
- sal_Bool bSimilarOnly)
+ bool bSimilarOnly)
{
MutexGuard aGuard( GetLinguMutex() );
@@ -620,8 +618,8 @@ int DictionaryNeo::cmpDicEntry(const OUString& rWord1,
return nRes;
}
-sal_Bool DictionaryNeo::seekEntry(const OUString &rWord,
- sal_Int32 *pPos, sal_Bool bSimilarOnly)
+bool DictionaryNeo::seekEntry(const OUString &rWord,
+ sal_Int32 *pPos, bool bSimilarOnly)
{
// look for entry with binary search.
// return sal_True if found sal_False else.
@@ -648,21 +646,21 @@ sal_Bool DictionaryNeo::seekEntry(const OUString &rWord,
if(nCmp == 0)
{
if( pPos ) *pPos = nMidIdx;
- return sal_True;
+ return true;
}
else if(nCmp > 0)
nLowerIdx = nMidIdx + 1;
else if( nMidIdx == 0 )
{
if( pPos ) *pPos = nLowerIdx;
- return sal_False;
+ return false;
}
else
nUpperIdx = nMidIdx - 1;
}
}
if( pPos ) *pPos = nLowerIdx;
- return sal_False;
+ return false;
}
bool DictionaryNeo::isSorted()
@@ -684,17 +682,17 @@ bool DictionaryNeo::isSorted()
return bRes;
}
-sal_Bool DictionaryNeo::addEntry_Impl(const uno::Reference< XDictionaryEntry > xDicEntry,
- sal_Bool bIsLoadEntries)
+bool DictionaryNeo::addEntry_Impl(const uno::Reference< XDictionaryEntry > xDicEntry,
+ bool bIsLoadEntries)
{
MutexGuard aGuard( GetLinguMutex() );
- sal_Bool bRes = sal_False;
+ bool bRes = false;
if ( bIsLoadEntries || (!bIsReadonly && xDicEntry.is()) )
{
- sal_Bool bIsNegEntry = xDicEntry->isNegative();
- sal_Bool bAddEntry = !isFull() &&
+ bool bIsNegEntry = xDicEntry->isNegative();
+ bool bAddEntry = !isFull() &&
( ( eDicType == DictionaryType_POSITIVE && !bIsNegEntry )
|| ( eDicType == DictionaryType_NEGATIVE && bIsNegEntry )
|| ( eDicType == DictionaryType_MIXED ) );
@@ -702,12 +700,12 @@ sal_Bool DictionaryNeo::addEntry_Impl(const uno::Reference< XDictionaryEntry > x
// look for position to insert entry at
// if there is already an entry do not insert the new one
sal_Int32 nPos = 0;
- sal_Bool bFound = sal_False;
+ bool bFound = false;
if (bAddEntry)
{
bFound = seekEntry( xDicEntry->getDictionaryWord(), &nPos );
if (bFound)
- bAddEntry = sal_False;
+ bAddEntry = false;
}
if (bAddEntry)
@@ -728,8 +726,8 @@ sal_Bool DictionaryNeo::addEntry_Impl(const uno::Reference< XDictionaryEntry > x
nCount++;
- bIsModified = sal_True;
- bRes = sal_True;
+ bIsModified = true;
+ bRes = true;
if (!bIsLoadEntries)
launchEvent( DictionaryEventFlags::ADD_ENTRY, xDicEntry );
@@ -771,16 +769,16 @@ void SAL_CALL DictionaryNeo::setActive( sal_Bool bActivate )
{
MutexGuard aGuard( GetLinguMutex() );
- if (bIsActive != bActivate)
+ if ((bIsActive ? 1 : 0) != bActivate)
{
bIsActive = bActivate != 0;
sal_Int16 nEvent = bIsActive ?
DictionaryEventFlags::ACTIVATE_DIC : DictionaryEventFlags::DEACTIVATE_DIC;
// remove entries from memory if dictionary is deactivated
- if (bIsActive == sal_False)
+ if (bIsActive == false)
{
- sal_Bool bIsEmpty = nCount == 0;
+ bool bIsEmpty = nCount == 0;
// save entries first if necessary
if (bIsModified && hasLocation() && !isReadonly())
@@ -831,7 +829,7 @@ void SAL_CALL DictionaryNeo::setLocale( const Locale& aLocale )
if (!bIsReadonly && nLanguage != nLanguageP)
{
nLanguage = nLanguageP;
- bIsModified = sal_True; // new language needs to be saved with dictionary
+ bIsModified = true; // new language needs to be saved with dictionary
launchEvent( DictionaryEventFlags::CHG_LANGUAGE, NULL );
}
@@ -847,7 +845,7 @@ uno::Reference< XDictionaryEntry > SAL_CALL DictionaryNeo::getEntry(
loadEntries( aMainURL );
sal_Int32 nPos;
- sal_Bool bFound = seekEntry( aWord, &nPos, sal_True );
+ bool bFound = seekEntry( aWord, &nPos, true );
DBG_ASSERT( nCount <= aEntries.getLength(), "lng : wrong number of entries");
DBG_ASSERT(!bFound || nPos < nCount, "lng : index out of range");
@@ -861,7 +859,7 @@ sal_Bool SAL_CALL DictionaryNeo::addEntry(
{
MutexGuard aGuard( GetLinguMutex() );
- sal_Bool bRes = sal_False;
+ bool bRes = false;
if (!bIsReadonly)
{
@@ -880,7 +878,7 @@ sal_Bool SAL_CALL
{
MutexGuard aGuard( GetLinguMutex() );
- sal_Bool bRes = sal_False;
+ bool bRes = false;
if (!bIsReadonly)
{
@@ -917,7 +915,7 @@ sal_Bool SAL_CALL DictionaryNeo::remove( const OUString& aWord )
{
MutexGuard aGuard( GetLinguMutex() );
- sal_Bool bRemoved = sal_False;
+ bool bRemoved = false;
if (!bIsReadonly)
{
@@ -925,7 +923,7 @@ sal_Bool SAL_CALL DictionaryNeo::remove( const OUString& aWord )
loadEntries( aMainURL );
sal_Int32 nPos;
- sal_Bool bFound = seekEntry( aWord, &nPos );
+ bool bFound = seekEntry( aWord, &nPos );
DBG_ASSERT( nCount < aEntries.getLength(),
"lng : wrong number of entries");
DBG_ASSERT(!bFound || nPos < nCount, "lng : index out of range");
@@ -942,7 +940,7 @@ sal_Bool SAL_CALL DictionaryNeo::remove( const OUString& aWord )
//! the following call reduces the length of the sequence by 1 also
lcl_SequenceRemoveElementAt( aEntries, nPos );
- bRemoved = bIsModified = sal_True;
+ bRemoved = bIsModified = true;
launchEvent( DictionaryEventFlags::DEL_ENTRY, xDicEntry );
}
@@ -987,8 +985,8 @@ void SAL_CALL DictionaryNeo::clear( )
aEntries = uno::Sequence< uno::Reference< XDictionaryEntry > > ( 32 );
nCount = 0;
- bNeedEntries = sal_False;
- bIsModified = sal_True;
+ bNeedEntries = false;
+ bIsModified = true;
launchEvent( DictionaryEventFlags::ENTRIES_CLEARED , NULL );
}
@@ -1000,7 +998,7 @@ sal_Bool SAL_CALL DictionaryNeo::addDictionaryEventListener(
{
MutexGuard aGuard( GetLinguMutex() );
- sal_Bool bRes = sal_False;
+ bool bRes = false;
if (xListener.is())
{
sal_Int32 nLen = aDicEvtListeners.getLength();
@@ -1015,7 +1013,7 @@ sal_Bool SAL_CALL DictionaryNeo::removeDictionaryEventListener(
{
MutexGuard aGuard( GetLinguMutex() );
- sal_Bool bRes = sal_False;
+ bool bRes = false;
if (xListener.is())
{
sal_Int32 nLen = aDicEvtListeners.getLength();
@@ -1055,7 +1053,7 @@ void SAL_CALL DictionaryNeo::store()
if (bIsModified && hasLocation() && !isReadonly())
{
if (!saveEntries( aMainURL ))
- bIsModified = sal_False;
+ bIsModified = false;
}
}
@@ -1069,7 +1067,7 @@ void SAL_CALL DictionaryNeo::storeAsURL(
if (!saveEntries( aURL ))
{
aMainURL = aURL;
- bIsModified = sal_False;
+ bIsModified = false;
bIsReadonly = IsReadOnly( getLocation() );
}
}
@@ -1085,14 +1083,14 @@ void SAL_CALL DictionaryNeo::storeToURL(
DicEntry::DicEntry(const OUString &rDicFileWord,
- sal_Bool bIsNegativWord)
+ bool bIsNegativWord)
{
if (!rDicFileWord.isEmpty())
splitDicFileWord( rDicFileWord, aDicWord, aReplacement );
bIsNegativ = bIsNegativWord;
}
-DicEntry::DicEntry(const OUString &rDicWord, sal_Bool bNegativ,
+DicEntry::DicEntry(const OUString &rDicWord, bool bNegativ,
const OUString &rRplcText) :
aDicWord (rDicWord),
aReplacement (rRplcText),
diff --git a/linguistic/source/dicimp.hxx b/linguistic/source/dicimp.hxx
index 5c6c25969b94..7d19a3282d19 100644
--- a/linguistic/source/dicimp.hxx
+++ b/linguistic/source/dicimp.hxx
@@ -34,7 +34,7 @@
#define DIC_MAX_ENTRIES 30000
-sal_Int16 ReadDicVersion( SvStreamPtr &rpStream, sal_uInt16 &nLng, sal_Bool &bNeg );
+sal_Int16 ReadDicVersion( SvStreamPtr &rpStream, sal_uInt16 &nLng, bool &bNeg );
class DictionaryNeo :
public ::cppu::WeakImplHelper2
@@ -48,16 +48,16 @@ class DictionaryNeo :
::com::sun::star::uno::Sequence<
::com::sun::star::uno::Reference<
::com::sun::star::linguistic2::XDictionaryEntry > > aEntries;
- OUString aDicName;
- OUString aMainURL;
+ OUString aDicName;
+ OUString aMainURL;
::com::sun::star::linguistic2::DictionaryType eDicType;
- sal_Int16 nCount;
- sal_Int16 nLanguage;
- sal_Int16 nDicVersion;
- sal_Bool bNeedEntries;
- sal_Bool bIsModified;
- sal_Bool bIsActive;
- sal_Bool bIsReadonly;
+ sal_Int16 nCount;
+ sal_Int16 nLanguage;
+ sal_Int16 nDicVersion;
+ bool bNeedEntries;
+ bool bIsModified;
+ bool bIsActive;
+ bool bIsReadonly;
// disallow copy-constructor and assignment-operator for now
DictionaryNeo(const DictionaryNeo &);
@@ -71,20 +71,20 @@ class DictionaryNeo :
sal_uLong saveEntries(const OUString &rMainURL);
int cmpDicEntry(const OUString &rWord1,
const OUString &rWord2,
- sal_Bool bSimilarOnly = sal_False);
- sal_Bool seekEntry(const OUString &rWord, sal_Int32 *pPos,
- sal_Bool bSimilarOnly = sal_False);
+ bool bSimilarOnly = false);
+ bool seekEntry(const OUString &rWord, sal_Int32 *pPos,
+ bool bSimilarOnly = false);
bool isSorted();
- sal_Bool addEntry_Impl(const ::com::sun::star::uno::Reference<
+ bool addEntry_Impl(const ::com::sun::star::uno::Reference<
::com::sun::star::linguistic2::XDictionaryEntry > xDicEntry,
- sal_Bool bIsLoadEntries = sal_False);
+ bool bIsLoadEntries = false);
public:
DictionaryNeo(const OUString &rName, sal_Int16 nLang,
::com::sun::star::linguistic2::DictionaryType eType,
const OUString &rMainURL,
- sal_Bool bWriteable );
+ bool bWriteable );
virtual ~DictionaryNeo();
// XNamed
@@ -187,7 +187,7 @@ class DicEntry :
{
OUString aDicWord, // including hyphen positions represented by "="
aReplacement; // including hyphen positions represented by "="
- sal_Bool bIsNegativ;
+ bool bIsNegativ;
// disallow copy-constructor and assignment-operator for now
DicEntry(const DicEntry &);
@@ -198,8 +198,8 @@ class DicEntry :
OUString &rReplacement);
public:
- DicEntry(const OUString &rDicFileWord, sal_Bool bIsNegativ);
- DicEntry(const OUString &rDicWord, sal_Bool bIsNegativ,
+ DicEntry(const OUString &rDicFileWord, bool bIsNegativ);
+ DicEntry(const OUString &rDicWord, bool bIsNegativ,
const OUString &rRplcText);
virtual ~DicEntry();
diff --git a/linguistic/source/dlistimp.cxx b/linguistic/source/dlistimp.cxx
index 9b161db7e4e3..a6b6484e722d 100644
--- a/linguistic/source/dlistimp.cxx
+++ b/linguistic/source/dlistimp.cxx
@@ -52,7 +52,7 @@ using namespace linguistic;
-static sal_Bool IsVers2OrNewer( const OUString& rFileURL, sal_uInt16& nLng, sal_Bool& bNeg );
+static bool IsVers2OrNewer( const OUString& rFileURL, sal_uInt16& nLng, bool& bNeg );
static void AddInternal( const uno::Reference< XDictionary > &rDic,
const OUString& rNew );
@@ -90,10 +90,10 @@ public:
// non-UNO functions
void DisposeAndClear( const EventObject &rEvtObj );
- sal_Bool AddDicListEvtListener(
+ bool AddDicListEvtListener(
const uno::Reference< XDictionaryListEventListener >& rxListener,
- sal_Bool bReceiveVerbose );
- sal_Bool RemoveDicListEvtListener(
+ bool bReceiveVerbose );
+ bool RemoveDicListEvtListener(
const uno::Reference< XDictionaryListEventListener >& rxListener );
sal_Int16 BeginCollectEvents();
sal_Int16 EndCollectEvents();
@@ -208,9 +208,9 @@ void SAL_CALL DicEvtListenerHelper::processDictionaryEvent(
}
-sal_Bool DicEvtListenerHelper::AddDicListEvtListener(
+bool DicEvtListenerHelper::AddDicListEvtListener(
const uno::Reference< XDictionaryListEventListener >& xListener,
- sal_Bool /*bReceiveVerbose*/ )
+ bool /*bReceiveVerbose*/ )
{
DBG_ASSERT( xListener.is(), "empty reference" );
sal_Int32 nCount = aDicListEvtListeners.getLength();
@@ -218,7 +218,7 @@ sal_Bool DicEvtListenerHelper::AddDicListEvtListener(
}
-sal_Bool DicEvtListenerHelper::RemoveDicListEvtListener(
+bool DicEvtListenerHelper::RemoveDicListEvtListener(
const uno::Reference< XDictionaryListEventListener >& xListener )
{
DBG_ASSERT( xListener.is(), "empty reference" );
@@ -287,8 +287,8 @@ DicList::DicList() :
{
pDicEvtLstnrHelper = new DicEvtListenerHelper( this );
xDicEvtLstnrHelper = pDicEvtLstnrHelper;
- bDisposing = sal_False;
- bInCreation = sal_False;
+ bDisposing = false;
+ bInCreation = false;
pExitListener = new MyAppExitListener( *this );
xExitListener = pExitListener;
@@ -304,7 +304,7 @@ DicList::~DicList()
void DicList::SearchForDictionaries(
DictionaryVec_t&rDicList,
const OUString &rDicDirURL,
- sal_Bool bIsWriteablePath )
+ bool bIsWriteablePath )
{
osl::MutexGuard aGuard( GetLinguMutex() );
@@ -319,7 +319,7 @@ void DicList::SearchForDictionaries(
{
OUString aURL( pDirCnt[i] );
sal_uInt16 nLang = LANGUAGE_NONE;
- sal_Bool bNeg = sal_False;
+ bool bNeg = false;
if(!::IsVers2OrNewer( aURL, nLang, bNeg ))
{
@@ -328,9 +328,9 @@ void DicList::SearchForDictionaries(
OUString aExt( aURL.copy(nPos + 1).toAsciiLowerCase() );
if (aDCN.equals(aExt)) // negativ
- bNeg = sal_True;
+ bNeg = true;
else if (aDCP.equals(aExt)) // positiv
- bNeg = sal_False;
+ bNeg = false;
else
continue; // andere Files
}
@@ -450,12 +450,12 @@ sal_Bool SAL_CALL DicList::addDictionary(
if (bDisposing)
return sal_False;
- sal_Bool bRes = sal_False;
+ bool bRes = false;
if (xDictionary.is())
{
DictionaryVec_t& rDicList = GetOrCreateDicList();
rDicList.push_back( xDictionary );
- bRes = sal_True;
+ bRes = true;
// add listener helper to the dictionaries listener lists
xDictionary->addDictionaryEventListener( xDicEvtLstnrHelper );
@@ -472,7 +472,7 @@ sal_Bool SAL_CALL
if (bDisposing)
return sal_False;
- sal_Bool bRes = sal_False;
+ bool bRes = false;
sal_Int32 nPos = GetDicPos( xDictionary );
if (nPos >= 0)
{
@@ -490,7 +490,7 @@ sal_Bool SAL_CALL
// remove element at nPos
rDicList.erase( rDicList.begin() + nPos );
- bRes = sal_True;
+ bRes = true;
}
return bRes;
}
@@ -507,7 +507,7 @@ sal_Bool SAL_CALL DicList::addDictionaryListEventListener(
DBG_ASSERT(!bReceiveVerbose, "lng : not yet supported");
- sal_Bool bRes = sal_False;
+ bool bRes = false;
if (xListener.is()) //! don't add empty references
{
bRes = pDicEvtLstnrHelper->
@@ -525,7 +525,7 @@ sal_Bool SAL_CALL DicList::removeDictionaryListEventListener(
if (bDisposing)
return sal_False;
- sal_Bool bRes = sal_False;
+ bool bRes = false;
if(xListener.is())
{
bRes = pDicEvtLstnrHelper->RemoveDicListEvtListener( xListener );
@@ -583,7 +583,7 @@ void SAL_CALL
if (!bDisposing)
{
- bDisposing = sal_True;
+ bDisposing = true;
EventObject aEvtObj( (XDictionaryList *) this );
aEvtListeners.disposeAndClear( aEvtObj );
@@ -645,7 +645,7 @@ void SAL_CALL
void DicList::_CreateDicList()
{
- bInCreation = sal_True;
+ bInCreation = true;
// look for dictionaries
const OUString aWriteablePath( GetDictionaryWriteablePath() );
@@ -653,7 +653,7 @@ void DicList::_CreateDicList()
const OUString *pPaths = aPaths.getConstArray();
for (sal_Int32 i = 0; i < aPaths.getLength(); ++i)
{
- const sal_Bool bIsWriteablePath = (pPaths[i] == aWriteablePath);
+ const bool bIsWriteablePath = (pPaths[i] == aWriteablePath);
SearchForDictionaries( aDicList, pPaths[i], bIsWriteablePath );
}
@@ -695,7 +695,7 @@ void DicList::_CreateDicList()
pDicEvtLstnrHelper->EndCollectEvents();
- bInCreation = sal_False;
+ bInCreation = false;
}
@@ -854,10 +854,10 @@ static void AddUserData( const uno::Reference< XDictionary > &rDic )
}
}
-static sal_Bool IsVers2OrNewer( const OUString& rFileURL, sal_uInt16& nLng, sal_Bool& bNeg )
+static bool IsVers2OrNewer( const OUString& rFileURL, sal_uInt16& nLng, bool& bNeg )
{
if (rFileURL.isEmpty())
- return sal_False;
+ return false;
OUString aDIC("dic");
OUString aExt;
sal_Int32 nPos = rFileURL.lastIndexOf( '.' );
@@ -865,7 +865,7 @@ static sal_Bool IsVers2OrNewer( const OUString& rFileURL, sal_uInt16& nLng, sal_
aExt = rFileURL.copy( nPos + 1 ).toAsciiLowerCase();
if (aDIC != aExt)
- return sal_False;
+ return false;
// get stream to be used
uno::Reference< uno::XComponentContext > xContext( comphelper::getProcessComponentContext() );
@@ -883,15 +883,15 @@ static sal_Bool IsVers2OrNewer( const OUString& rFileURL, sal_uInt16& nLng, sal_
}
DBG_ASSERT( xStream.is(), "failed to get stream for read" );
if (!xStream.is())
- return sal_False;
+ return false;
SvStreamPtr pStream = SvStreamPtr( utl::UcbStreamHelper::CreateStream( xStream ) );
int nDicVersion = ReadDicVersion(pStream, nLng, bNeg);
if (2 == nDicVersion || nDicVersion >= 5)
- return sal_True;
+ return true;
- return sal_False;
+ return false;
}
diff --git a/linguistic/source/dlistimp.hxx b/linguistic/source/dlistimp.hxx
index 53e3aed93fe7..8dfeb3f0a2e6 100644
--- a/linguistic/source/dlistimp.hxx
+++ b/linguistic/source/dlistimp.hxx
@@ -68,8 +68,8 @@ class DicList :
XTerminateListener > xExitListener;
MyAppExitListener *pExitListener;
- sal_Bool bDisposing;
- sal_Bool bInCreation;
+ bool bDisposing;
+ bool bInCreation;
// disallow copy-constructor and assignment-operator for now
DicList( const DicList & );
@@ -86,7 +86,7 @@ class DicList :
void LaunchEvent(sal_Int16 nEvent, com::sun::star::uno::Sequence<
::com::sun::star::linguistic2::XDictionary > xDic);
void SearchForDictionaries( DictionaryVec_t &rDicList,
- const OUString &rDicDir, sal_Bool bIsWritePath );
+ const OUString &rDicDir, bool bIsWritePath );
sal_Int32 GetDicPos(const com::sun::star::uno::Reference<
::com::sun::star::linguistic2::XDictionary > &xDic);
diff --git a/linguistic/source/gciterator.cxx b/linguistic/source/gciterator.cxx
index 573dfd0f5983..74f9aba17506 100644
--- a/linguistic/source/gciterator.cxx
+++ b/linguistic/source/gciterator.cxx
@@ -236,9 +236,9 @@ static lang::Locale lcl_GetPrimaryLanguageOfSentence(
GrammarCheckingIterator::GrammarCheckingIterator() :
- m_bEnd( sal_False ),
+ m_bEnd( false ),
m_aCurCheckedDocId(),
- m_bGCServicesChecked( sal_False ),
+ m_bGCServicesChecked( false ),
m_nDocIdCounter( 0 ),
m_nLastEndOfSentencePos( -1 ),
m_aEventListeners( MyMutex::get() ),
@@ -260,7 +260,7 @@ void GrammarCheckingIterator::TerminateThread()
::osl::Guard< ::osl::Mutex > aGuard( MyMutex::get() );
t = m_thread;
m_thread = 0;
- m_bEnd = sal_True;
+ m_bEnd = true;
m_aWakeUpThread.set();
}
if (t != 0)
@@ -308,7 +308,7 @@ void GrammarCheckingIterator::AddEntry(
uno::WeakReference< text::XFlatParagraph > xFlatPara,
const OUString & rDocId,
sal_Int32 nStartIndex,
- sal_Bool bAutomatic )
+ bool bAutomatic )
{
// we may not need/have a xFlatParaIterator (e.g. if checkGrammarAtPos was called)
// but we always need a xFlatPara...
@@ -339,11 +339,11 @@ void GrammarCheckingIterator::ProcessResult(
{
DBG_ASSERT( rRes.xFlatParagraph.is(), "xFlatParagraph is missing" );
//no guard necessary as no members are used
- sal_Bool bContinueWithNextPara = sal_False;
+ bool bContinueWithNextPara = false;
if (!rRes.xFlatParagraph.is() || rRes.xFlatParagraph->isModified())
{
// if paragraph was modified/deleted meanwhile continue with the next one...
- bContinueWithNextPara = sal_True;
+ bContinueWithNextPara = true;
}
else // paragraph is still unchanged...
{
@@ -412,7 +412,7 @@ void GrammarCheckingIterator::ProcessResult(
if (rRes.xFlatParagraph.is())
rRes.xFlatParagraph->setChecked( text::TextMarkupType::PROOFREADING, true );
- bContinueWithNextPara = sal_True;
+ bContinueWithNextPara = true;
}
}
@@ -442,7 +442,7 @@ uno::Reference< linguistic2::XProofreader > GrammarCheckingIterator::GetGrammarC
if (!m_bGCServicesChecked)
{
GetConfiguredGCSvcs_Impl();
- m_bGCServicesChecked = sal_True;
+ m_bGCServicesChecked = true;
}
const LanguageType nLang = LanguageTag::convertToLanguageType( rLocale, false);
@@ -527,7 +527,7 @@ void GrammarCheckingIterator::DequeueAndCheck()
uno::Reference< text::XFlatParagraph > xFlatPara;
FPEntry aFPEntryItem;
OUString aCurDocId;
- sal_Bool bModified = sal_False;
+ bool bModified = false;
// ---- THREAD SAFE START ----
{
::osl::Guard< ::osl::Mutex > aGuard( MyMutex::get() );
@@ -820,7 +820,7 @@ throw (uno::RuntimeException, std::exception)
// ---- THREAD SAFE START ----
::osl::Guard< ::osl::Mutex > aGuard( MyMutex::get() );
- sal_Bool bRes = sal_False;
+ bool bRes = false;
uno::Reference< lang::XComponent > xComponent( xDoc, uno::UNO_QUERY );
if (xComponent.is())
@@ -837,7 +837,7 @@ throw (uno::RuntimeException, std::exception)
if (!m_aCurCheckedDocId.isEmpty() && m_aCurCheckedDocId == aDocId)
{
// an entry for that document was dequed and is currently being checked.
- bRes = sal_True;
+ bRes = true;
}
else
{
@@ -848,7 +848,7 @@ throw (uno::RuntimeException, std::exception)
for (sal_Int32 i = 0; i < nSize && !bRes; ++i)
{
if (aDocId == m_aFPEntriesQueue[i].m_aDocId)
- bRes = sal_True;
+ bRes = true;
}
}
}
diff --git a/linguistic/source/gciterator.hxx b/linguistic/source/gciterator.hxx
index 6b9bdd02b525..7b3138aa19ff 100644
--- a/linguistic/source/gciterator.hxx
+++ b/linguistic/source/gciterator.hxx
@@ -59,12 +59,12 @@ struct FPEntry
sal_Int32 m_nStartIndex;
// the flag to identify whether the document does automatical grammar checking
- sal_Bool m_bAutomatic;
+ bool m_bAutomatic;
FPEntry()
: m_aDocId()
, m_nStartIndex( 0 )
- , m_bAutomatic( 0 )
+ , m_bAutomatic( false )
{
}
};
@@ -91,7 +91,7 @@ class GrammarCheckingIterator:
FPQueue_t m_aFPEntriesQueue;
// the flag to end the endless loop
- sal_Bool m_bEnd;
+ bool m_bEnd;
// Note that it must be the pointer and not the uno-reference to check if it is the same implementation object
typedef std::map< XComponent *, OUString > DocMap_t;
@@ -107,7 +107,7 @@ class GrammarCheckingIterator:
GCReferences_t m_aGCReferencesByService;
OUString m_aCurCheckedDocId;
- sal_Bool m_bGCServicesChecked;
+ bool m_bGCServicesChecked;
sal_Int32 m_nDocIdCounter;
sal_Int32 m_nLastEndOfSentencePos;
osl::Condition m_aWakeUpThread;
@@ -129,7 +129,7 @@ class GrammarCheckingIterator:
void AddEntry(
::com::sun::star::uno::WeakReference< ::com::sun::star::text::XFlatParagraphIterator > xFlatParaIterator,
::com::sun::star::uno::WeakReference< ::com::sun::star::text::XFlatParagraph > xFlatPara,
- const OUString &rDocId, sal_Int32 nStartIndex, sal_Bool bAutomatic );
+ const OUString &rDocId, sal_Int32 nStartIndex, bool bAutomatic );
void ProcessResult( const ::com::sun::star::linguistic2::ProofreadingResult &rRes,
const ::com::sun::star::uno::Reference< ::com::sun::star::text::XFlatParagraphIterator > &rxFlatParagraphIterator,
diff --git a/linguistic/source/hhconvdic.cxx b/linguistic/source/hhconvdic.cxx
index d7e3044af27b..75125c9b48be 100644
--- a/linguistic/source/hhconvdic.cxx
+++ b/linguistic/source/hhconvdic.cxx
@@ -71,13 +71,13 @@ sal_Int16 SAL_CALL checkScriptType(sal_Unicode c) throw (RuntimeException)
-sal_Bool TextIsAllScriptType( const OUString &rTxt, sal_Int16 nScriptType )
+bool TextIsAllScriptType( const OUString &rTxt, sal_Int16 nScriptType )
{
- sal_Bool bIsAll = sal_True;
+ bool bIsAll = true;
for (sal_Int32 i = 0; i < rTxt.getLength() && bIsAll; ++i)
{
if (checkScriptType( rTxt[i]) != nScriptType)
- bIsAll = sal_False;
+ bIsAll = false;
}
return bIsAll;
}
@@ -85,7 +85,7 @@ sal_Bool TextIsAllScriptType( const OUString &rTxt, sal_Int16 nScriptType )
HHConvDic::HHConvDic( const OUString &rName, const OUString &rMainURL ) :
- ConvDic( rName, LANGUAGE_KOREAN, ConversionDictionaryType::HANGUL_HANJA, sal_True, rMainURL )
+ ConvDic( rName, LANGUAGE_KOREAN, ConversionDictionaryType::HANGUL_HANJA, true, rMainURL )
{
}
diff --git a/linguistic/source/hyphdsp.cxx b/linguistic/source/hyphdsp.cxx
index 3202c7857ea4..45c3564991ca 100644
--- a/linguistic/source/hyphdsp.cxx
+++ b/linguistic/source/hyphdsp.cxx
@@ -86,8 +86,8 @@ Reference<XHyphenatedWord> HyphenatorDispatcher::buildHyphWord(
sal_Int16 nOrigHyphPos = -1;
OUStringBuffer aTmp( nTextLen );
- sal_Bool bSkip = sal_False;
- sal_Bool bSkip2 = sal_False;
+ bool bSkip = false;
+ bool bSkip2 = false;
sal_Int32 nHyphIdx = -1;
sal_Int32 nLeading = 0;
for (sal_Int32 i = 0; i < nTextLen; i++)
@@ -99,7 +99,7 @@ Reference<XHyphenatedWord> HyphenatorDispatcher::buildHyphWord(
{
aTmp.append( cTmp );
nLeading++;
- bSkip = sal_False;
+ bSkip = false;
nHyphIdx++;
}
else
@@ -111,7 +111,7 @@ Reference<XHyphenatedWord> HyphenatorDispatcher::buildHyphWord(
nOrigHyphPos = i;
}
}
- bSkip = sal_True; //! multiple '=' should count as one only
+ bSkip = true; //! multiple '=' should count as one only
}
}
@@ -202,8 +202,8 @@ Reference< XPossibleHyphens > HyphenatorDispatcher::buildPossHyphens(
sal_Int32 nHyphCount = 0;
OUStringBuffer aTmp( nTextLen );
- sal_Bool bSkip = sal_False;
- sal_Bool bSkip2 = sal_False;
+ bool bSkip = false;
+ bool bSkip2 = false;
sal_Int32 nHyphIdx = -1;
for (sal_Int32 i = 0; i < nTextLen; i++)
{
@@ -213,14 +213,14 @@ Reference< XPossibleHyphens > HyphenatorDispatcher::buildPossHyphens(
if (cTmp != '=' && !bSkip2 && cTmp != ']')
{
aTmp.append( cTmp );
- bSkip = sal_False;
+ bSkip = false;
nHyphIdx++;
}
else
{
if (!bSkip && nHyphIdx >= 0)
pPos[ nHyphCount++ ] = (sal_Int16) nHyphIdx;
- bSkip = sal_True; //! multiple '=' should count as one only
+ bSkip = true; //! multiple '=' should count as one only
}
}
diff --git a/linguistic/source/iprcache.cxx b/linguistic/source/iprcache.cxx
index c3d021061103..cb68a3bad86d 100644
--- a/linguistic/source/iprcache.cxx
+++ b/linguistic/source/iprcache.cxx
@@ -87,7 +87,7 @@ static void lcl_RemoveAsPropertyChangeListener(
}
-static sal_Bool lcl_IsFlushProperty( sal_Int32 nHandle )
+static bool lcl_IsFlushProperty( sal_Int32 nHandle )
{
int i;
for (i = 0; i < NUM_FLUSH_PROPS; ++i)
@@ -174,7 +174,7 @@ void SAL_CALL FlushListener::processDictionaryListEvent(
DictionaryListEventFlags::DEL_POS_ENTRY |
DictionaryListEventFlags::ACTIVATE_NEG_DIC |
DictionaryListEventFlags::DEACTIVATE_POS_DIC;
- sal_Bool bFlush = 0 != (nEvt & nFlushFlags);
+ bool bFlush = 0 != (nEvt & nFlushFlags);
DBG_ASSERT( pFlushObj, "missing object (NULL pointer)" );
if (bFlush && pFlushObj != NULL)
@@ -191,7 +191,7 @@ void SAL_CALL FlushListener::propertyChange(
if (rEvt.Source == xPropSet)
{
- sal_Bool bFlush = lcl_IsFlushProperty( rEvt.PropertyHandle );
+ bool bFlush = lcl_IsFlushProperty( rEvt.PropertyHandle );
DBG_ASSERT( pFlushObj, "missing object (NULL pointer)" );
if (bFlush && pFlushObj != NULL)
diff --git a/linguistic/source/lngopt.cxx b/linguistic/source/lngopt.cxx
index fb5bcff2ea42..5176c38115d4 100644
--- a/linguistic/source/lngopt.cxx
+++ b/linguistic/source/lngopt.cxx
@@ -195,7 +195,7 @@ LinguProps::LinguProps() :
aPropListeners (GetLinguMutex()),
aPropertyMap(lcl_GetLinguProps())
{
- bDisposing = sal_False;
+ bDisposing = false;
}
void LinguProps::launchEvent( const PropertyChangeEvent &rEvt ) const
@@ -387,7 +387,7 @@ void SAL_CALL
if (!bDisposing)
{
- bDisposing = sal_True;
+ bDisposing = true;
//! its too late to save the options here!
// (see AppExitListener for saving)
@@ -456,10 +456,10 @@ uno::Sequence< OUString > LinguProps::getSupportedServiceNames_Static()
return aSNS;
}
-sal_Bool LinguProps::getPropertyBool(const OUString& aPropertyName) throw (css::uno::RuntimeException)
+bool LinguProps::getPropertyBool(const OUString& aPropertyName) throw (css::uno::RuntimeException)
{
uno::Any any = getPropertyValue(aPropertyName);
- sal_Bool b = sal_False;
+ bool b = false;
any >>= b;
return b;
}
diff --git a/linguistic/source/lngopt.hxx b/linguistic/source/lngopt.hxx
index 93806dd4f405..bc2238b3a3c3 100644
--- a/linguistic/source/lngopt.hxx
+++ b/linguistic/source/lngopt.hxx
@@ -85,7 +85,7 @@ class LinguProps :
SfxItemPropertyMap aPropertyMap;
SvtLinguConfig aConfig;
- sal_Bool bDisposing;
+ bool bDisposing;
// disallow copy-constructor and assignment-operator for now
LinguProps(const LinguProps &);
@@ -93,10 +93,10 @@ class LinguProps :
void launchEvent( const ::com::sun::star::beans::PropertyChangeEvent &rEvt ) const;
- sal_Bool getPropertyBool(const OUString& aPropertyName) throw (css::uno::RuntimeException);
+ bool getPropertyBool(const OUString& aPropertyName) throw (css::uno::RuntimeException);
sal_Int16 getPropertyInt16(const OUString& aPropertyName) throw (css::uno::RuntimeException);
css::lang::Locale getPropertyLocale(const OUString& aPropertyName) throw (css::uno::RuntimeException);
- void setProperty(const OUString& aPropertyName, sal_Bool p1) throw (css::uno::RuntimeException)
+ void setProperty(const OUString& aPropertyName, bool p1) throw (css::uno::RuntimeException)
{ setPropertyValue( aPropertyName, css::uno::Any(p1) ); }
void setProperty(const OUString& aPropertyName, sal_Int16 p1) throw (css::uno::RuntimeException)
{ setPropertyValue( aPropertyName, css::uno::Any(p1) ); }
@@ -109,23 +109,23 @@ public:
virtual sal_Bool SAL_CALL getIsUseDictionaryList() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
{ return getPropertyBool(UPN_IS_USE_DICTIONARY_LIST); }
virtual void SAL_CALL setIsUseDictionaryList(sal_Bool p1) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
- { setProperty(UPN_IS_USE_DICTIONARY_LIST, p1); }
+ { setProperty(UPN_IS_USE_DICTIONARY_LIST, (bool) p1); }
virtual sal_Bool SAL_CALL getIsIgnoreControlCharacters() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
{ return getPropertyBool(UPN_IS_IGNORE_CONTROL_CHARACTERS); }
virtual void SAL_CALL setIsIgnoreControlCharacters(sal_Bool p1) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
- { setProperty(UPN_IS_IGNORE_CONTROL_CHARACTERS, p1); }
+ { setProperty(UPN_IS_IGNORE_CONTROL_CHARACTERS, (bool) p1); }
virtual sal_Bool SAL_CALL getIsSpellUpperCase() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
{ return getPropertyBool(UPN_IS_SPELL_UPPER_CASE); }
virtual void SAL_CALL setIsSpellUpperCase(sal_Bool p1) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
- { setProperty(UPN_IS_SPELL_UPPER_CASE, p1); }
+ { setProperty(UPN_IS_SPELL_UPPER_CASE, (bool) p1); }
virtual sal_Bool SAL_CALL getIsSpellWithDigits() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
{ return getPropertyBool(UPN_IS_SPELL_WITH_DIGITS); }
virtual void SAL_CALL setIsSpellWithDigits(sal_Bool p1) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
- { setProperty(UPN_IS_SPELL_WITH_DIGITS, p1); }
+ { setProperty(UPN_IS_SPELL_WITH_DIGITS, (bool) p1); }
virtual sal_Bool SAL_CALL getIsSpellCapitalization() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
{ return getPropertyBool(UPN_IS_SPELL_CAPITALIZATION); }
virtual void SAL_CALL setIsSpellCapitalization(sal_Bool p1) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
- { setProperty(UPN_IS_SPELL_CAPITALIZATION, p1); }
+ { setProperty(UPN_IS_SPELL_CAPITALIZATION, (bool) p1); }
virtual sal_Int16 SAL_CALL getHyphMinLeading() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
{ return getPropertyInt16(UPN_HYPH_MIN_LEADING); }
virtual void SAL_CALL setHyphMinLeading(sal_Int16 p1) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
@@ -145,23 +145,23 @@ public:
virtual sal_Bool SAL_CALL getIsHyphAuto() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
{ return getPropertyBool(UPN_IS_HYPH_AUTO); }
virtual void SAL_CALL setIsHyphAuto(sal_Bool p1) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
- { setProperty(UPN_IS_HYPH_AUTO, p1); }
+ { setProperty(UPN_IS_HYPH_AUTO, (bool) p1); }
virtual sal_Bool SAL_CALL getIsHyphSpecial() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
{ return getPropertyBool(UPN_IS_HYPH_SPECIAL); }
virtual void SAL_CALL setIsHyphSpecial(sal_Bool p1) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
- { setProperty(UPN_IS_HYPH_SPECIAL, p1); }
+ { setProperty(UPN_IS_HYPH_SPECIAL, (bool) p1); }
virtual sal_Bool SAL_CALL getIsSpellAuto() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
{ return getPropertyBool(UPN_IS_SPELL_AUTO); }
virtual void SAL_CALL setIsSpellAuto(sal_Bool p1) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
- { setProperty(UPN_IS_SPELL_AUTO, p1); }
+ { setProperty(UPN_IS_SPELL_AUTO, (bool) p1); }
virtual sal_Bool SAL_CALL getIsSpellSpecial() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
{ return getPropertyBool(UPN_IS_SPELL_SPECIAL); }
virtual void SAL_CALL setIsSpellSpecial(sal_Bool p1) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
- { setProperty(UPN_IS_SPELL_SPECIAL, p1); }
+ { setProperty(UPN_IS_SPELL_SPECIAL, (bool) p1); }
virtual sal_Bool SAL_CALL getIsWrapReverse() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
{ return getPropertyBool(UPN_IS_WRAP_REVERSE); }
virtual void SAL_CALL setIsWrapReverse(sal_Bool p1) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
- { setProperty(UPN_IS_WRAP_REVERSE, p1); }
+ { setProperty(UPN_IS_WRAP_REVERSE, (bool) p1); }
virtual com::sun::star::lang::Locale SAL_CALL getDefaultLocale_CJK() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
{ return getPropertyLocale(UPN_DEFAULT_LOCALE_CJK); }
virtual void SAL_CALL setDefaultLocale_CJK(const com::sun::star::lang::Locale& p1) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
diff --git a/linguistic/source/lngprophelp.cxx b/linguistic/source/lngprophelp.cxx
index ce5a6ef6e5ed..3aeb32953d70 100644
--- a/linguistic/source/lngprophelp.cxx
+++ b/linguistic/source/lngprophelp.cxx
@@ -305,7 +305,7 @@ sal_Bool SAL_CALL
{
MutexGuard aGuard( GetLinguMutex() );
- sal_Bool bRes = sal_False;
+ bool bRes = false;
if (rxListener.is())
{
sal_Int32 nCount = aLngSvcEvtListeners.getLength();
@@ -322,7 +322,7 @@ sal_Bool SAL_CALL
{
MutexGuard aGuard( GetLinguMutex() );
- sal_Bool bRes = sal_False;
+ bool bRes = false;
if (rxListener.is())
{
sal_Int32 nCount = aLngSvcEvtListeners.getLength();
@@ -772,7 +772,7 @@ sal_Int16 PropertyHelper_Hyphenation::GetMinWordLength() const
return pInst->GetMinWordLength();
}
-sal_Bool PropertyHelper_Hyphenation::addLinguServiceEventListener(
+bool PropertyHelper_Hyphenation::addLinguServiceEventListener(
const ::com::sun::star::uno::Reference<
::com::sun::star::linguistic2::XLinguServiceEventListener >& rxListener )
throw(::com::sun::star::uno::RuntimeException)
@@ -780,7 +780,7 @@ sal_Bool PropertyHelper_Hyphenation::addLinguServiceEventListener(
return pInst->addLinguServiceEventListener( rxListener );
}
-sal_Bool PropertyHelper_Hyphenation::removeLinguServiceEventListener(
+bool PropertyHelper_Hyphenation::removeLinguServiceEventListener(
const ::com::sun::star::uno::Reference<
::com::sun::star::linguistic2::XLinguServiceEventListener >& rxListener )
throw(::com::sun::star::uno::RuntimeException)
diff --git a/linguistic/source/lngsvcmgr.cxx b/linguistic/source/lngsvcmgr.cxx
index 1284d9512e82..44c5551b7e03 100644
--- a/linguistic/source/lngsvcmgr.cxx
+++ b/linguistic/source/lngsvcmgr.cxx
@@ -55,9 +55,9 @@ uno::Sequence< OUString > static GetLangSvcList( const uno::Any &rVal );
uno::Sequence< OUString > static GetLangSvc( const uno::Any &rVal );
-static sal_Bool lcl_SeqHasString( const uno::Sequence< OUString > &rSeq, const OUString &rText )
+static bool lcl_SeqHasString( const uno::Sequence< OUString > &rSeq, const OUString &rText )
{
- sal_Bool bRes = sal_False;
+ bool bRes = false;
sal_Int32 nLen = rSeq.getLength();
if (nLen == 0 || rText.isEmpty())
@@ -67,7 +67,7 @@ static sal_Bool lcl_SeqHasString( const uno::Sequence< OUString > &rSeq, const O
for (sal_Int32 i = 0; i < nLen && !bRes; ++i)
{
if (rText == pSeq[i])
- bRes = sal_True;
+ bRes = true;
}
return bRes;
}
@@ -157,11 +157,11 @@ struct SvcInfo
{
}
- sal_Bool HasLanguage( sal_Int16 nLanguage ) const;
+ bool HasLanguage( sal_Int16 nLanguage ) const;
};
-sal_Bool SvcInfo::HasLanguage( sal_Int16 nLanguage ) const
+bool SvcInfo::HasLanguage( sal_Int16 nLanguage ) const
{
sal_Int32 nCnt = aSuppLanguages.getLength();
const sal_Int16 *pLang = aSuppLanguages.getConstArray();
@@ -215,14 +215,14 @@ public:
const linguistic2::DictionaryListEvent& rDicListEvent )
throw(uno::RuntimeException, std::exception) SAL_OVERRIDE;
- inline sal_Bool AddLngSvcMgrListener(
+ inline bool AddLngSvcMgrListener(
const uno::Reference< lang::XEventListener >& rxListener );
- inline sal_Bool RemoveLngSvcMgrListener(
+ inline bool RemoveLngSvcMgrListener(
const uno::Reference< lang::XEventListener >& rxListener );
void DisposeAndClear( const lang::EventObject &rEvtObj );
- sal_Bool AddLngSvcEvtBroadcaster(
+ bool AddLngSvcEvtBroadcaster(
const uno::Reference< linguistic2::XLinguServiceEventBroadcaster > &rxBroadcaster );
- sal_Bool RemoveLngSvcEvtBroadcaster(
+ bool RemoveLngSvcEvtBroadcaster(
const uno::Reference< linguistic2::XLinguServiceEventBroadcaster > &rxBroadcaster );
void AddLngSvcEvt( sal_Int16 nLngSvcEvt );
@@ -378,19 +378,19 @@ void LngSvcMgrListenerHelper::LaunchEvent( sal_Int16 nLngSvcEvtFlags )
}
-inline sal_Bool LngSvcMgrListenerHelper::AddLngSvcMgrListener(
+inline bool LngSvcMgrListenerHelper::AddLngSvcMgrListener(
const uno::Reference< lang::XEventListener >& rxListener )
{
aLngSvcMgrListeners.addInterface( rxListener );
- return sal_True;
+ return true;
}
-inline sal_Bool LngSvcMgrListenerHelper::RemoveLngSvcMgrListener(
+inline bool LngSvcMgrListenerHelper::RemoveLngSvcMgrListener(
const uno::Reference< lang::XEventListener >& rxListener )
{
aLngSvcMgrListeners.removeInterface( rxListener );
- return sal_True;
+ return true;
}
@@ -418,10 +418,10 @@ void LngSvcMgrListenerHelper::DisposeAndClear( const lang::EventObject &rEvtObj
}
-sal_Bool LngSvcMgrListenerHelper::AddLngSvcEvtBroadcaster(
+bool LngSvcMgrListenerHelper::AddLngSvcEvtBroadcaster(
const uno::Reference< linguistic2::XLinguServiceEventBroadcaster > &rxBroadcaster )
{
- sal_Bool bRes = sal_False;
+ bool bRes = false;
if (rxBroadcaster.is())
{
aLngSvcEvtBroadcasters.addInterface( rxBroadcaster );
@@ -432,10 +432,10 @@ sal_Bool LngSvcMgrListenerHelper::AddLngSvcEvtBroadcaster(
}
-sal_Bool LngSvcMgrListenerHelper::RemoveLngSvcEvtBroadcaster(
+bool LngSvcMgrListenerHelper::RemoveLngSvcEvtBroadcaster(
const uno::Reference< linguistic2::XLinguServiceEventBroadcaster > &rxBroadcaster )
{
- sal_Bool bRes = sal_False;
+ bool bRes = false;
if (rxBroadcaster.is())
{
aLngSvcEvtBroadcasters.removeInterface( rxBroadcaster );
@@ -452,7 +452,7 @@ LngSvcMgr::LngSvcMgr()
: utl::ConfigItem("Office.Linguistic")
, aEvtListeners(GetLinguMutex())
{
- bDisposing = sal_False;
+ bDisposing = false;
pSpellDsp = 0;
pGrammarDsp = 0;
@@ -589,7 +589,7 @@ namespace
using uno::Any;
using uno::Sequence;
- sal_Bool lcl_FindEntry( const OUString &rEntry, const Sequence< OUString > &rCfgSvcs )
+ bool lcl_FindEntry( const OUString &rEntry, const Sequence< OUString > &rCfgSvcs )
{
sal_Int32 nRes = -1;
sal_Int32 nEntries = rCfgSvcs.getLength();
@@ -612,7 +612,7 @@ namespace
OUString aCfgLocaleStr( LanguageTag::convertToBcp47( rAvailLocale ) );
Sequence< OUString > aNodeNames( rCfg.GetNodeNames(rLastFoundList) );
- sal_Bool bFound = lcl_FindEntry( aCfgLocaleStr, aNodeNames);
+ bool bFound = lcl_FindEntry( aCfgLocaleStr, aNodeNames);
if (bFound)
{
@@ -812,7 +812,7 @@ void LngSvcMgr::UpdateAll()
{
// add new or replace existing entries.
- sal_Bool bRes = aCfg.ReplaceSetProperties( aSubNodeName, aNewValues );
+ bool bRes = aCfg.ReplaceSetProperties( aSubNodeName, aNewValues );
if (!bRes)
{
#if OSL_DEBUG_LEVEL > 1
@@ -879,7 +879,7 @@ void LngSvcMgr::Notify( const uno::Sequence< OUString > &rPropertyNames )
if (!aKeyText.isEmpty())
nLang = LanguageTag::convertToLanguageTypeWithFallback( aKeyText );
- GetSpellCheckerDsp_Impl( sal_False ); // don't set service list, it will be done below
+ GetSpellCheckerDsp_Impl( false ); // don't set service list, it will be done below
pSpellDsp->SetServiceList( LanguageTag::convertToLocale(nLang), aSvcImplNames );
}
}
@@ -906,7 +906,7 @@ void LngSvcMgr::Notify( const uno::Sequence< OUString > &rPropertyNames )
if (SvtLinguConfig().HasGrammarChecker())
{
- GetGrammarCheckerDsp_Impl( sal_False ); // don't set service list, it will be done below
+ GetGrammarCheckerDsp_Impl( false ); // don't set service list, it will be done below
pGrammarDsp->SetServiceList( LanguageTag::convertToLocale(nLang), aSvcImplNames );
}
}
@@ -932,7 +932,7 @@ void LngSvcMgr::Notify( const uno::Sequence< OUString > &rPropertyNames )
if (!aKeyText.isEmpty())
nLang = LanguageTag::convertToLanguageTypeWithFallback( aKeyText );
- GetHyphenatorDsp_Impl( sal_False ); // don't set service list, it will be done below
+ GetHyphenatorDsp_Impl( false ); // don't set service list, it will be done below
pHyphDsp->SetServiceList( LanguageTag::convertToLocale(nLang), aSvcImplNames );
}
}
@@ -957,7 +957,7 @@ void LngSvcMgr::Notify( const uno::Sequence< OUString > &rPropertyNames )
if (!aKeyText.isEmpty())
nLang = LanguageTag::convertToLanguageTypeWithFallback( aKeyText );
- GetThesaurusDsp_Impl( sal_False ); // don't set service list, it will be done below
+ GetThesaurusDsp_Impl( false ); // don't set service list, it will be done below
pThesDsp->SetServiceList( LanguageTag::convertToLocale(nLang), aSvcImplNames );
}
}
@@ -987,7 +987,7 @@ void LngSvcMgr::GetListenerHelper_Impl()
}
-void LngSvcMgr::GetSpellCheckerDsp_Impl( sal_Bool bSetSvcList )
+void LngSvcMgr::GetSpellCheckerDsp_Impl( bool bSetSvcList )
{
if (!pSpellDsp)
{
@@ -999,7 +999,7 @@ void LngSvcMgr::GetSpellCheckerDsp_Impl( sal_Bool bSetSvcList )
}
-void LngSvcMgr::GetGrammarCheckerDsp_Impl( sal_Bool bSetSvcList )
+void LngSvcMgr::GetGrammarCheckerDsp_Impl( bool bSetSvcList )
{
if (!pGrammarDsp && SvtLinguConfig().HasGrammarChecker())
{
@@ -1027,7 +1027,7 @@ void LngSvcMgr::GetGrammarCheckerDsp_Impl( sal_Bool bSetSvcList )
}
-void LngSvcMgr::GetHyphenatorDsp_Impl( sal_Bool bSetSvcList )
+void LngSvcMgr::GetHyphenatorDsp_Impl( bool bSetSvcList )
{
if (!pHyphDsp)
{
@@ -1039,7 +1039,7 @@ void LngSvcMgr::GetHyphenatorDsp_Impl( sal_Bool bSetSvcList )
}
-void LngSvcMgr::GetThesaurusDsp_Impl( sal_Bool bSetSvcList )
+void LngSvcMgr::GetThesaurusDsp_Impl( bool bSetSvcList )
{
if (!pThesDsp)
{
@@ -1525,7 +1525,7 @@ sal_Bool SAL_CALL
{
osl::MutexGuard aGuard( GetLinguMutex() );
- sal_Bool bRes = sal_False;
+ bool bRes = false;
if (!bDisposing && xListener.is())
{
if (!pListenerHelper)
@@ -1543,7 +1543,7 @@ sal_Bool SAL_CALL
{
osl::MutexGuard aGuard( GetLinguMutex() );
- sal_Bool bRes = sal_False;
+ bool bRes = false;
if (!bDisposing && xListener.is())
{
DBG_ASSERT( pListenerHelper, "listener removed without being added" );
@@ -1647,22 +1647,22 @@ uno::Sequence< lang::Locale > SAL_CALL
return aRes;
}
-static sal_Bool IsEqSvcList( const uno::Sequence< OUString > &rList1,
+static bool IsEqSvcList( const uno::Sequence< OUString > &rList1,
const uno::Sequence< OUString > &rList2 )
{
// returns sal_True iff both sequences are equal
- sal_Bool bRes = sal_False;
+ bool bRes = false;
sal_Int32 nLen = rList1.getLength();
if (rList2.getLength() == nLen)
{
const OUString *pStr1 = rList1.getConstArray();
const OUString *pStr2 = rList2.getConstArray();
- bRes = sal_True;
+ bRes = true;
for (sal_Int32 i = 0; i < nLen && bRes; ++i)
{
if (*pStr1++ != *pStr2++)
- bRes = sal_False;
+ bRes = false;
}
}
return bRes;
@@ -1690,7 +1690,7 @@ void SAL_CALL
{
if (!xSpellDsp.is())
GetSpellCheckerDsp_Impl();
- sal_Bool bChanged = !IsEqSvcList( rServiceImplNames,
+ bool bChanged = !IsEqSvcList( rServiceImplNames,
pSpellDsp->GetServiceList( rLocale ) );
if (bChanged)
{
@@ -1707,7 +1707,7 @@ void SAL_CALL
{
if (!xGrammarDsp.is())
GetGrammarCheckerDsp_Impl();
- sal_Bool bChanged = !IsEqSvcList( rServiceImplNames,
+ bool bChanged = !IsEqSvcList( rServiceImplNames,
pGrammarDsp->GetServiceList( rLocale ) );
if (bChanged)
{
@@ -1723,7 +1723,7 @@ void SAL_CALL
{
if (!xHyphDsp.is())
GetHyphenatorDsp_Impl();
- sal_Bool bChanged = !IsEqSvcList( rServiceImplNames,
+ bool bChanged = !IsEqSvcList( rServiceImplNames,
pHyphDsp->GetServiceList( rLocale ) );
if (bChanged)
{
@@ -1739,7 +1739,7 @@ void SAL_CALL
{
if (!xThesDsp.is())
GetThesaurusDsp_Impl();
- sal_Bool bChanged = !IsEqSvcList( rServiceImplNames,
+ bool bChanged = !IsEqSvcList( rServiceImplNames,
pThesDsp->GetServiceList( rLocale ) );
if (bChanged)
{
@@ -1751,7 +1751,7 @@ void SAL_CALL
}
-sal_Bool LngSvcMgr::SaveCfgSvcs( const OUString &rServiceName )
+bool LngSvcMgr::SaveCfgSvcs( const OUString &rServiceName )
{
SAL_INFO( "linguistic", "linguistic: LngSvcMgr::SaveCfgSvcs" );
@@ -2004,7 +2004,7 @@ void SAL_CALL
if (!bDisposing)
{
- bDisposing = sal_True;
+ bDisposing = true;
// require listeners to release this object
lang::EventObject aEvtObj( static_cast<XLinguServiceManager*>(this) );
@@ -2044,10 +2044,10 @@ void SAL_CALL
}
-sal_Bool LngSvcMgr::AddLngSvcEvtBroadcaster(
+bool LngSvcMgr::AddLngSvcEvtBroadcaster(
const uno::Reference< linguistic2::XLinguServiceEventBroadcaster > &rxBroadcaster )
{
- sal_Bool bRes = sal_False;
+ bool bRes = false;
if (rxBroadcaster.is())
{
if (!pListenerHelper)
diff --git a/linguistic/source/lngsvcmgr.hxx b/linguistic/source/lngsvcmgr.hxx
index 7e9a8ec2ed3f..1b0d66443fd4 100644
--- a/linguistic/source/lngsvcmgr.hxx
+++ b/linguistic/source/lngsvcmgr.hxx
@@ -106,7 +106,7 @@ class LngSvcMgr :
SvcInfoArray * pAvailHyphSvcs;
SvcInfoArray * pAvailThesSvcs;
- sal_Bool bDisposing;
+ bool bDisposing;
// disallow copy-constructor and assignment-operator for now
LngSvcMgr(const LngSvcMgr &);
@@ -118,17 +118,17 @@ class LngSvcMgr :
void GetAvailableThesSvcs_Impl();
void GetListenerHelper_Impl();
- void GetSpellCheckerDsp_Impl( sal_Bool bSetSvcList = sal_True );
- void GetGrammarCheckerDsp_Impl( sal_Bool bSetSvcList = sal_True );
- void GetHyphenatorDsp_Impl( sal_Bool bSetSvcList = sal_True );
- void GetThesaurusDsp_Impl( sal_Bool bSetSvcList = sal_True );
+ void GetSpellCheckerDsp_Impl( bool bSetSvcList = true );
+ void GetGrammarCheckerDsp_Impl( bool bSetSvcList = true );
+ void GetHyphenatorDsp_Impl( bool bSetSvcList = true );
+ void GetThesaurusDsp_Impl( bool bSetSvcList = true );
void SetCfgServiceLists( SpellCheckerDispatcher &rSpellDsp );
void SetCfgServiceLists( GrammarCheckingIterator &rGrammarDsp );
void SetCfgServiceLists( HyphenatorDispatcher &rHyphDsp );
void SetCfgServiceLists( ThesaurusDispatcher &rThesDsp );
- sal_Bool SaveCfgSvcs( const OUString &rServiceName );
+ bool SaveCfgSvcs( const OUString &rServiceName );
static void clearSvcInfoArray(SvcInfoArray *&rpInfo);
@@ -178,7 +178,7 @@ public:
static inline OUString getImplementationName_Static();
static ::com::sun::star::uno::Sequence< OUString > getSupportedServiceNames_Static() throw();
- sal_Bool AddLngSvcEvtBroadcaster(
+ bool AddLngSvcEvtBroadcaster(
const ::com::sun::star::uno::Reference<
::com::sun::star::linguistic2::XLinguServiceEventBroadcaster > &rxBroadcaster );
};
diff --git a/linguistic/source/spelldsp.cxx b/linguistic/source/spelldsp.cxx
index f2e7ce898bb0..15ecfeff7999 100644
--- a/linguistic/source/spelldsp.cxx
+++ b/linguistic/source/spelldsp.cxx
@@ -59,7 +59,7 @@ class ProposalList: private boost::noncopyable
{
std::vector< OUString > aVec;
- sal_Bool HasEntry( const OUString &rText ) const;
+ bool HasEntry( const OUString &rText ) const;
public:
ProposalList() {}
@@ -73,14 +73,14 @@ public:
};
-sal_Bool ProposalList::HasEntry( const OUString &rText ) const
+bool ProposalList::HasEntry( const OUString &rText ) const
{
- sal_Bool bFound = sal_False;
+ bool bFound = false;
size_t nCnt = aVec.size();
for (size_t i = 0; !bFound && i < nCnt; ++i)
{
if (aVec[i] == rText)
- bFound = sal_True;
+ bFound = true;
}
return bFound;
}
@@ -151,11 +151,11 @@ Sequence< OUString > ProposalList::GetSequence() const
return aRes;
}
-sal_Bool SvcListHasLanguage(
+bool SvcListHasLanguage(
const LangSvcEntries_Spell &rEntry,
LanguageType nLanguage )
{
- sal_Bool bHasLanguage = sal_False;
+ bool bHasLanguage = false;
Locale aTmpLocale;
const Reference< XSpellChecker > *pRef = rEntry.aSvcRefs .getConstArray();
@@ -228,7 +228,7 @@ sal_Bool SAL_CALL
throw(IllegalArgumentException, RuntimeException, std::exception)
{
MutexGuard aGuard( GetLinguMutex() );
- return isValid_Impl( rWord, LinguLocaleToLanguage( rLocale ), rProperties, sal_True );
+ return isValid_Impl( rWord, LinguLocaleToLanguage( rLocale ), rProperties, true );
}
@@ -238,7 +238,7 @@ Reference< XSpellAlternatives > SAL_CALL
throw(IllegalArgumentException, RuntimeException, std::exception)
{
MutexGuard aGuard( GetLinguMutex() );
- return spell_Impl( rWord, LinguLocaleToLanguage( rLocale ), rProperties, sal_True );
+ return spell_Impl( rWord, LinguLocaleToLanguage( rLocale ), rProperties, true );
}
@@ -276,16 +276,16 @@ static Reference< XDictionaryEntry > lcl_GetRulingDictionaryEntry(
}
-sal_Bool SpellCheckerDispatcher::isValid_Impl(
+bool SpellCheckerDispatcher::isValid_Impl(
const OUString& rWord,
LanguageType nLanguage,
const PropertyValues& rProperties,
- sal_Bool bCheckDics)
+ bool bCheckDics)
throw( RuntimeException, IllegalArgumentException )
{
MutexGuard aGuard( GetLinguMutex() );
- sal_Bool bRes = sal_True;
+ bool bRes = true;
if (LinguIsUnspecified( nLanguage) || rWord.isEmpty())
return bRes;
@@ -316,17 +316,17 @@ sal_Bool SpellCheckerDispatcher::isValid_Impl(
"lng : index out of range");
sal_Int32 i = 0;
- sal_Bool bTmpRes = sal_True;
- sal_Bool bTmpResValid = sal_False;
+ bool bTmpRes = true;
+ bool bTmpResValid = false;
// try already instantiated services first
{
const Reference< XSpellChecker > *pRef =
pEntry->aSvcRefs.getConstArray();
while (i <= pEntry->nLastTriedSvcIndex
- && (!bTmpResValid || sal_False == bTmpRes))
+ && (!bTmpResValid || !bTmpRes))
{
- bTmpResValid = sal_True;
+ bTmpResValid = true;
if (pRef[i].is() && pRef[i]->hasLocale( aLocale ))
{
bTmpRes = GetCache().CheckWord( aChkWord, nLanguage );
@@ -342,7 +342,7 @@ sal_Bool SpellCheckerDispatcher::isValid_Impl(
}
}
else
- bTmpResValid = sal_False;
+ bTmpResValid = false;
if (bTmpResValid)
bRes = bTmpRes;
@@ -352,7 +352,7 @@ sal_Bool SpellCheckerDispatcher::isValid_Impl(
}
// if still no result instantiate new services and try those
- if ((!bTmpResValid || sal_False == bTmpRes)
+ if ((!bTmpResValid || !bTmpRes)
&& pEntry->nLastTriedSvcIndex < nLen - 1)
{
const OUString *pImplNames = pEntry->aSvcImplNames.getConstArray();
@@ -365,7 +365,7 @@ sal_Bool SpellCheckerDispatcher::isValid_Impl(
Sequence< Any > aArgs(2);
aArgs.getArray()[0] <<= GetPropSet();
- while (i < nLen && (!bTmpResValid || sal_False == bTmpRes))
+ while (i < nLen && (!bTmpResValid || !bTmpRes))
{
// create specific service via it's implementation name
Reference< XSpellChecker > xSpell;
@@ -387,7 +387,7 @@ sal_Bool SpellCheckerDispatcher::isValid_Impl(
if (xBroadcaster.is())
rMgr.AddLngSvcEvtBroadcaster( xBroadcaster );
- bTmpResValid = sal_True;
+ bTmpResValid = true;
if (xSpell.is() && xSpell->hasLocale( aLocale ))
{
bTmpRes = GetCache().CheckWord( aChkWord, nLanguage );
@@ -402,7 +402,7 @@ sal_Bool SpellCheckerDispatcher::isValid_Impl(
}
}
else
- bTmpResValid = sal_False;
+ bTmpResValid = false;
if (bTmpResValid)
bRes = bTmpRes;
@@ -447,7 +447,7 @@ Reference< XSpellAlternatives > SpellCheckerDispatcher::spell_Impl(
const OUString& rWord,
LanguageType nLanguage,
const PropertyValues& rProperties,
- sal_Bool bCheckDics )
+ bool bCheckDics )
throw(IllegalArgumentException, RuntimeException)
{
MutexGuard aGuard( GetLinguMutex() );
@@ -484,7 +484,7 @@ Reference< XSpellAlternatives > SpellCheckerDispatcher::spell_Impl(
sal_Int32 i = 0;
Reference< XSpellAlternatives > xTmpRes;
- sal_Bool bTmpResValid = sal_False;
+ bool bTmpResValid = false;
// try already instantiated services first
{
@@ -493,10 +493,10 @@ Reference< XSpellAlternatives > SpellCheckerDispatcher::spell_Impl(
while (i <= pEntry->nLastTriedSvcIndex
&& (!bTmpResValid || xTmpRes.is()) )
{
- bTmpResValid = sal_True;
+ bTmpResValid = true;
if (pRef[i].is() && pRef[i]->hasLocale( aLocale ))
{
- sal_Bool bOK = GetCache().CheckWord( aChkWord, nLanguage );
+ bool bOK = GetCache().CheckWord( aChkWord, nLanguage );
if (bOK)
xTmpRes = NULL;
else
@@ -511,7 +511,7 @@ Reference< XSpellAlternatives > SpellCheckerDispatcher::spell_Impl(
}
}
else
- bTmpResValid = sal_False;
+ bTmpResValid = false;
// return first found result if the word is not known by any checker.
// But if that result has no suggestions use the first one that does
@@ -573,10 +573,10 @@ Reference< XSpellAlternatives > SpellCheckerDispatcher::spell_Impl(
if (xBroadcaster.is())
rMgr.AddLngSvcEvtBroadcaster( xBroadcaster );
- bTmpResValid = sal_True;
+ bTmpResValid = true;
if (xSpell.is() && xSpell->hasLocale( aLocale ))
{
- sal_Bool bOK = GetCache().CheckWord( aChkWord, nLanguage );
+ bool bOK = GetCache().CheckWord( aChkWord, nLanguage );
if (bOK)
xTmpRes = NULL;
else
@@ -591,7 +591,7 @@ Reference< XSpellAlternatives > SpellCheckerDispatcher::spell_Impl(
}
}
else
- bTmpResValid = sal_False;
+ bTmpResValid = false;
// return first found result if the word is not known by any checker.
// But if that result has no suggestions use the first one that does
diff --git a/linguistic/source/spelldsp.hxx b/linguistic/source/spelldsp.hxx
index 4a29a5431913..3de032707917 100644
--- a/linguistic/source/spelldsp.hxx
+++ b/linguistic/source/spelldsp.hxx
@@ -82,16 +82,16 @@ class SpellCheckerDispatcher :
void ClearSvcList();
- sal_Bool isValid_Impl(const OUString& aWord, LanguageType nLanguage,
+ bool isValid_Impl(const OUString& aWord, LanguageType nLanguage,
const ::com::sun::star::beans::PropertyValues& aProperties,
- sal_Bool bCheckDics)
+ bool bCheckDics)
throw( ::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::IllegalArgumentException );
::com::sun::star::uno::Reference<
::com::sun::star::linguistic2::XSpellAlternatives >
spell_Impl(const OUString& aWord, LanguageType nLanguage,
const ::com::sun::star::beans::PropertyValues& aProperties,
- sal_Bool bCheckDics)
+ bool bCheckDics)
throw( ::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::IllegalArgumentException );
public:
diff --git a/linguistic/source/spelldta.cxx b/linguistic/source/spelldta.cxx
index b8490ee08aeb..f1d5d7b00023 100644
--- a/linguistic/source/spelldta.cxx
+++ b/linguistic/source/spelldta.cxx
@@ -111,7 +111,7 @@ void SeqRemoveNegEntries( Sequence< OUString > &rSeq,
sal_Int16 nLanguage )
{
static const OUString aEmpty;
- sal_Bool bSthRemoved = sal_False;
+ bool bSthRemoved = false;
sal_Int32 nLen = rSeq.getLength();
OUString *pEntries = rSeq.getArray();
for (sal_Int32 i = 0; i < nLen; ++i)
@@ -121,7 +121,7 @@ void SeqRemoveNegEntries( Sequence< OUString > &rSeq,
if (xNegEntry.is())
{
pEntries[i] = aEmpty;
- bSthRemoved = sal_True;
+ bSthRemoved = true;
}
}
if (bSthRemoved)
diff --git a/linguistic/source/thesdsp.cxx b/linguistic/source/thesdsp.cxx
index 664216cd6ceb..4386f400c985 100644
--- a/linguistic/source/thesdsp.cxx
+++ b/linguistic/source/thesdsp.cxx
@@ -40,11 +40,11 @@ using namespace linguistic;
-static sal_Bool SvcListHasLanguage(
+static bool SvcListHasLanguage(
const Sequence< Reference< XThesaurus > > &rRefs,
const Locale &rLocale )
{
- sal_Bool bHasLanguage = sal_False;
+ bool bHasLanguage = false;
const Reference< XThesaurus > *pRef = rRefs.getConstArray();
sal_Int32 nLen = rRefs.getLength();