summaryrefslogtreecommitdiff
path: root/lingucomponent/source/spellcheck/macosxspell/macspellimp.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'lingucomponent/source/spellcheck/macosxspell/macspellimp.cxx')
-rw-r--r--lingucomponent/source/spellcheck/macosxspell/macspellimp.cxx66
1 files changed, 20 insertions, 46 deletions
diff --git a/lingucomponent/source/spellcheck/macosxspell/macspellimp.cxx b/lingucomponent/source/spellcheck/macosxspell/macspellimp.cxx
index 18232d557250..97407f2cd070 100644
--- a/lingucomponent/source/spellcheck/macosxspell/macspellimp.cxx
+++ b/lingucomponent/source/spellcheck/macosxspell/macspellimp.cxx
@@ -100,7 +100,7 @@ MacSpellChecker::MacSpellChecker() :
aDEncs = NULL;
aDLocs = NULL;
aDNames = NULL;
- bDisposing = FALSE;
+ bDisposing = sal_False;
pPropHelper = NULL;
numdict = 0;
NSApplicationLoad();
@@ -249,17 +249,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;
}
}
@@ -267,7 +267,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;
@@ -275,7 +275,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);
@@ -304,7 +304,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)
{
@@ -335,13 +335,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.
@@ -354,10 +354,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 ))
@@ -381,7 +381,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 );
@@ -484,7 +484,7 @@ sal_Bool SAL_CALL
{
MutexGuard aGuard( GetLinguMutex() );
- BOOL bRes = FALSE;
+ sal_Bool bRes = sal_False;
if (!bDisposing && rxLstnr.is())
{
bRes = GetPropHelper().addLinguServiceEventListener( rxLstnr );
@@ -500,7 +500,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" );
@@ -527,7 +527,7 @@ void SAL_CALL
if (!pPropHelper)
{
- INT32 nLen = rArguments.getLength();
+ sal_Int32 nLen = rArguments.getLength();
if (2 == nLen)
{
Reference< XPropertySet > xPropSet;
@@ -557,7 +557,7 @@ void SAL_CALL
if (!bDisposing)
{
- bDisposing = TRUE;
+ bDisposing = sal_True;
EventObject aEvtObj( (XSpellChecker *) this );
aEvtListeners.disposeAndClear( aEvtObj );
}
@@ -606,10 +606,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;
}
@@ -632,32 +632,6 @@ Sequence< OUString > MacSpellChecker::getSupportedServiceNames_Static()
return aSNS;
}
-
-sal_Bool SAL_CALL MacSpellChecker_writeInfo(
- void * /*pServiceManager*/, registry::XRegistryKey * pRegistryKey )
-{
-
- try
- {
- String aImpl( '/' );
- aImpl += MacSpellChecker::getImplementationName_Static().getStr();
- aImpl.AppendAscii( "/UNO/SERVICES" );
- Reference< registry::XRegistryKey > xNewKey =
- pRegistryKey->createKey( aImpl );
- Sequence< OUString > aServices =
- MacSpellChecker::getSupportedServiceNames_Static();
- for( INT32 i = 0; i < aServices.getLength(); i++ )
- xNewKey->createKey( aServices.getConstArray()[i] );
-
- return sal_True;
- }
- catch(Exception &)
- {
- return sal_False;
- }
-}
-
-
void * SAL_CALL MacSpellChecker_getFactory( const sal_Char * pImplName,
XMultiServiceFactory * pServiceManager, void * )
{