summaryrefslogtreecommitdiff
path: root/lingucomponent/source/spellcheck
diff options
context:
space:
mode:
Diffstat (limited to 'lingucomponent/source/spellcheck')
-rw-r--r--lingucomponent/source/spellcheck/macosxspell/macspellimp.cxx40
-rw-r--r--[-rwxr-xr-x]lingucomponent/source/spellcheck/macosxspell/macspellimp.hxx4
-rw-r--r--lingucomponent/source/spellcheck/spell/sspellimp.cxx42
-rw-r--r--[-rwxr-xr-x]lingucomponent/source/spellcheck/spell/sspellimp.hxx4
4 files changed, 45 insertions, 45 deletions
diff --git a/lingucomponent/source/spellcheck/macosxspell/macspellimp.cxx b/lingucomponent/source/spellcheck/macosxspell/macspellimp.cxx
index 002f1dec0b36..9343ccb68d2b 100644
--- a/lingucomponent/source/spellcheck/macosxspell/macspellimp.cxx
+++ b/lingucomponent/source/spellcheck/macosxspell/macspellimp.cxx
@@ -98,7 +98,7 @@ MacSpellChecker::MacSpellChecker() :
aDEncs = NULL;
aDLocs = NULL;
aDNames = NULL;
- bDisposing = FALSE;
+ bDisposing = sal_False;
pPropHelper = NULL;
numdict = 0;
NSApplicationLoad();
@@ -261,17 +261,17 @@ sal_Bool SAL_CALL MacSpellChecker::hasLocale(const Locale& rLocale)
{
MutexGuard aGuard( GetLinguMutex() );
- BOOL bRes = FALSE;
+ sal_Bool bRes = sal_False;
if (!aSuppLocales.getLength())
getLocales();
- INT32 nLen = aSuppLocales.getLength();
- for (INT32 i = 0; i < nLen; ++i)
+ sal_Int32 nLen = aSuppLocales.getLength();
+ for (sal_Int32 i = 0; i < nLen; ++i)
{
const Locale *pLocale = aSuppLocales.getConstArray();
if (rLocale == pLocale[i])
{
- bRes = TRUE;
+ bRes = sal_True;
break;
}
}
@@ -279,7 +279,7 @@ sal_Bool SAL_CALL MacSpellChecker::hasLocale(const Locale& rLocale)
}
-INT16 MacSpellChecker::GetSpellFailure( const OUString &rWord, const Locale &rLocale )
+sal_Int16 MacSpellChecker::GetSpellFailure( const OUString &rWord, const Locale &rLocale )
{
rtl_TextEncoding aEnc;
@@ -287,7 +287,7 @@ INT16 MacSpellChecker::GetSpellFailure( const OUString &rWord, const Locale &rLo
// (note: mutex is held higher up in isValid)
- INT16 nRes = -1;
+ sal_Int16 nRes = -1;
// first handle smart quotes both single and double
OUStringBuffer rBuf(rWord);
@@ -316,7 +316,7 @@ INT16 MacSpellChecker::GetSpellFailure( const OUString &rWord, const Locale &rLo
}
int aCount;
- NSRange range = [macSpell checkSpellingOfString:aNSStr startingAt:0 language:aLang wrap:FALSE inSpellDocumentWithTag:macTag wordCount:&aCount];
+ NSRange range = [macSpell checkSpellingOfString:aNSStr startingAt:0 language:aLang wrap:sal_False inSpellDocumentWithTag:macTag wordCount:&aCount];
int rVal = 0;
if(range.length>0)
{
@@ -347,13 +347,13 @@ sal_Bool SAL_CALL
MutexGuard aGuard( GetLinguMutex() );
if (rLocale == Locale() || !rWord.getLength())
- return TRUE;
+ return sal_True;
if (!hasLocale( rLocale ))
#ifdef LINGU_EXCEPTIONS
throw( IllegalArgumentException() );
#else
- return TRUE;
+ return sal_True;
#endif
// Get property values to be used.
@@ -366,10 +366,10 @@ sal_Bool SAL_CALL
PropertyHelper_Spell &rHelper = GetPropHelper();
rHelper.SetTmpPropVals( rProperties );
- INT16 nFailure = GetSpellFailure( rWord, rLocale );
+ sal_Int16 nFailure = GetSpellFailure( rWord, rLocale );
if (nFailure != -1)
{
- INT16 nLang = LocaleToLanguage( rLocale );
+ sal_Int16 nLang = LocaleToLanguage( rLocale );
// postprocess result for errors that should be ignored
if ( (!rHelper.IsSpellUpperCase() && IsUpper( rWord, nLang ))
|| (!rHelper.IsSpellWithDigits() && HasDigits( rWord ))
@@ -393,7 +393,7 @@ Reference< XSpellAlternatives >
Reference< XSpellAlternatives > xRes;
// note: mutex is held by higher up by spell which covers both
- INT16 nLang = LocaleToLanguage( rLocale );
+ sal_Int16 nLang = LocaleToLanguage( rLocale );
int count;
Sequence< OUString > aStr( 0 );
@@ -496,7 +496,7 @@ sal_Bool SAL_CALL
{
MutexGuard aGuard( GetLinguMutex() );
- BOOL bRes = FALSE;
+ sal_Bool bRes = sal_False;
if (!bDisposing && rxLstnr.is())
{
bRes = GetPropHelper().addLinguServiceEventListener( rxLstnr );
@@ -512,7 +512,7 @@ sal_Bool SAL_CALL
{
MutexGuard aGuard( GetLinguMutex() );
- BOOL bRes = FALSE;
+ sal_Bool bRes = sal_False;
if (!bDisposing && rxLstnr.is())
{
DBG_ASSERT( xPropHelper.is(), "xPropHelper non existent" );
@@ -539,7 +539,7 @@ void SAL_CALL
if (!pPropHelper)
{
- INT32 nLen = rArguments.getLength();
+ sal_Int32 nLen = rArguments.getLength();
if (2 == nLen)
{
Reference< XPropertySet > xPropSet;
@@ -569,7 +569,7 @@ void SAL_CALL
if (!bDisposing)
{
- bDisposing = TRUE;
+ bDisposing = sal_True;
EventObject aEvtObj( (XSpellChecker *) this );
aEvtListeners.disposeAndClear( aEvtObj );
}
@@ -618,10 +618,10 @@ sal_Bool SAL_CALL MacSpellChecker::supportsService( const OUString& ServiceName
Sequence< OUString > aSNL = getSupportedServiceNames();
const OUString * pArray = aSNL.getConstArray();
- for( INT32 i = 0; i < aSNL.getLength(); i++ )
+ for( sal_Int32 i = 0; i < aSNL.getLength(); i++ )
if( pArray[i] == ServiceName )
- return TRUE;
- return FALSE;
+ return sal_True;
+ return sal_False;
}
diff --git a/lingucomponent/source/spellcheck/macosxspell/macspellimp.hxx b/lingucomponent/source/spellcheck/macosxspell/macspellimp.hxx
index fc1906e18025..5384e5772169 100755..100644
--- a/lingucomponent/source/spellcheck/macosxspell/macspellimp.hxx
+++ b/lingucomponent/source/spellcheck/macosxspell/macspellimp.hxx
@@ -87,7 +87,7 @@ class MacSpellChecker :
::cppu::OInterfaceContainerHelper aEvtListeners;
Reference< XPropertyChangeListener > xPropHelper;
linguistic::PropertyHelper_Spell * pPropHelper;
- BOOL bDisposing;
+ sal_Bool bDisposing;
// disallow copy-constructor and assignment-operator for now
MacSpellChecker(const MacSpellChecker &);
@@ -99,7 +99,7 @@ class MacSpellChecker :
return pPropHelper ? *pPropHelper : GetPropHelper_Impl();
}
- INT16 GetSpellFailure( const OUString &rWord, const Locale &rLocale );
+ sal_Int16 GetSpellFailure( const OUString &rWord, const Locale &rLocale );
Reference< XSpellAlternatives > GetProposals( const OUString &rWord, const Locale &rLocale );
public:
diff --git a/lingucomponent/source/spellcheck/spell/sspellimp.cxx b/lingucomponent/source/spellcheck/spell/sspellimp.cxx
index 577d105afcde..bd608ffda972 100644
--- a/lingucomponent/source/spellcheck/spell/sspellimp.cxx
+++ b/lingucomponent/source/spellcheck/spell/sspellimp.cxx
@@ -79,7 +79,7 @@ SpellChecker::SpellChecker() :
aDEncs = NULL;
aDLocs = NULL;
aDNames = NULL;
- bDisposing = FALSE;
+ bDisposing = sal_False;
pPropHelper = NULL;
numdict = 0;
}
@@ -255,17 +255,17 @@ sal_Bool SAL_CALL SpellChecker::hasLocale(const Locale& rLocale)
{
MutexGuard aGuard( GetLinguMutex() );
- BOOL bRes = FALSE;
+ sal_Bool bRes = sal_False;
if (!aSuppLocales.getLength())
getLocales();
- INT32 nLen = aSuppLocales.getLength();
- for (INT32 i = 0; i < nLen; ++i)
+ sal_Int32 nLen = aSuppLocales.getLength();
+ for (sal_Int32 i = 0; i < nLen; ++i)
{
const Locale *pLocale = aSuppLocales.getConstArray();
if (rLocale == pLocale[i])
{
- bRes = TRUE;
+ bRes = sal_True;
break;
}
}
@@ -273,7 +273,7 @@ sal_Bool SAL_CALL SpellChecker::hasLocale(const Locale& rLocale)
}
-INT16 SpellChecker::GetSpellFailure( const OUString &rWord, const Locale &rLocale )
+sal_Int16 SpellChecker::GetSpellFailure( const OUString &rWord, const Locale &rLocale )
{
Hunspell * pMS = NULL;
rtl_TextEncoding eEnc = RTL_TEXTENCODING_DONTKNOW;
@@ -281,7 +281,7 @@ INT16 SpellChecker::GetSpellFailure( const OUString &rWord, const Locale &rLocal
// initialize a myspell object for each dictionary once
// (note: mutex is held higher up in isValid)
- INT16 nRes = -1;
+ sal_Int16 nRes = -1;
// first handle smart quotes both single and double
OUStringBuffer rBuf(rWord);
@@ -367,17 +367,17 @@ sal_Bool SAL_CALL SpellChecker::isValid( const OUString& rWord, const Locale& rL
MutexGuard aGuard( GetLinguMutex() );
if (rLocale == Locale() || !rWord.getLength())
- return TRUE;
+ return sal_True;
if (!hasLocale( rLocale ))
#ifdef LINGU_EXCEPTIONS
throw( IllegalArgumentException() );
#else
- return TRUE;
+ return sal_True;
#endif
- // return FALSE to process SPELLML requests (they are longer than the header)
- if (rWord.match(A2OU(SPELLML_HEADER), 0) && (rWord.getLength() > 10)) return FALSE;
+ // return sal_False to process SPELLML requests (they are longer than the header)
+ if (rWord.match(A2OU(SPELLML_HEADER), 0) && (rWord.getLength() > 10)) return sal_False;
// Get property values to be used.
// These are be the default values set in the SN_LINGU_PROPERTIES
@@ -389,10 +389,10 @@ sal_Bool SAL_CALL SpellChecker::isValid( const OUString& rWord, const Locale& rL
PropertyHelper_Spell &rHelper = GetPropHelper();
rHelper.SetTmpPropVals( rProperties );
- INT16 nFailure = GetSpellFailure( rWord, rLocale );
+ sal_Int16 nFailure = GetSpellFailure( rWord, rLocale );
if (nFailure != -1 && !rWord.match(A2OU(SPELLML_HEADER), 0))
{
- INT16 nLang = LocaleToLanguage( rLocale );
+ sal_Int16 nLang = LocaleToLanguage( rLocale );
// postprocess result for errors that should be ignored
const bool bIgnoreError =
(!rHelper.IsSpellUpperCase() && IsUpper( rWord, nLang )) ||
@@ -437,7 +437,7 @@ Reference< XSpellAlternatives >
if (n)
{
- INT16 nLang = LocaleToLanguage( rLocale );
+ sal_Int16 nLang = LocaleToLanguage( rLocale );
Sequence< OUString > aStr( 0 );
@@ -529,7 +529,7 @@ sal_Bool SAL_CALL SpellChecker::addLinguServiceEventListener(
{
MutexGuard aGuard( GetLinguMutex() );
- BOOL bRes = FALSE;
+ sal_Bool bRes = sal_False;
if (!bDisposing && rxLstnr.is())
{
bRes = GetPropHelper().addLinguServiceEventListener( rxLstnr );
@@ -544,7 +544,7 @@ sal_Bool SAL_CALL SpellChecker::removeLinguServiceEventListener(
{
MutexGuard aGuard( GetLinguMutex() );
- BOOL bRes = FALSE;
+ sal_Bool bRes = sal_False;
if (!bDisposing && rxLstnr.is())
{
DBG_ASSERT( xPropHelper.is(), "xPropHelper non existent" );
@@ -569,7 +569,7 @@ void SAL_CALL SpellChecker::initialize( const Sequence< Any >& rArguments )
if (!pPropHelper)
{
- INT32 nLen = rArguments.getLength();
+ sal_Int32 nLen = rArguments.getLength();
if (2 == nLen)
{
Reference< XPropertySet > xPropSet;
@@ -599,7 +599,7 @@ void SAL_CALL SpellChecker::dispose()
if (!bDisposing)
{
- bDisposing = TRUE;
+ bDisposing = sal_True;
EventObject aEvtObj( (XSpellChecker *) this );
aEvtListeners.disposeAndClear( aEvtObj );
}
@@ -646,10 +646,10 @@ sal_Bool SAL_CALL SpellChecker::supportsService( const OUString& ServiceName )
Sequence< OUString > aSNL = getSupportedServiceNames();
const OUString * pArray = aSNL.getConstArray();
- for( INT32 i = 0; i < aSNL.getLength(); i++ )
+ for( sal_Int32 i = 0; i < aSNL.getLength(); i++ )
if( pArray[i] == ServiceName )
- return TRUE;
- return FALSE;
+ return sal_True;
+ return sal_False;
}
diff --git a/lingucomponent/source/spellcheck/spell/sspellimp.hxx b/lingucomponent/source/spellcheck/spell/sspellimp.hxx
index 9bcbdec5250b..8a42d98f0f60 100755..100644
--- a/lingucomponent/source/spellcheck/spell/sspellimp.hxx
+++ b/lingucomponent/source/spellcheck/spell/sspellimp.hxx
@@ -78,7 +78,7 @@ class SpellChecker :
::cppu::OInterfaceContainerHelper aEvtListeners;
Reference< XPropertyChangeListener > xPropHelper;
linguistic::PropertyHelper_Spell * pPropHelper;
- BOOL bDisposing;
+ sal_Bool bDisposing;
// disallow copy-constructor and assignment-operator for now
SpellChecker(const SpellChecker &);
@@ -90,7 +90,7 @@ class SpellChecker :
return pPropHelper ? *pPropHelper : GetPropHelper_Impl();
}
- INT16 GetSpellFailure( const OUString &rWord, const Locale &rLocale );
+ sal_Int16 GetSpellFailure( const OUString &rWord, const Locale &rLocale );
Reference< XSpellAlternatives > GetProposals( const OUString &rWord, const Locale &rLocale );
public: