removetooltypes: #i112600# remove tooltypes

This commit is contained in:
Mikhail Voytenko
2011-01-07 18:15:52 +01:00
parent 4446d50fc7
commit e7ee592b13
11 changed files with 89 additions and 89 deletions

View File

@@ -91,7 +91,7 @@ using namespace linguistic;
Hyphenator::Hyphenator() : Hyphenator::Hyphenator() :
aEvtListeners ( GetLinguMutex() ) aEvtListeners ( GetLinguMutex() )
{ {
bDisposing = FALSE; bDisposing = sal_False;
pPropHelper = NULL; pPropHelper = NULL;
aDicts = NULL; aDicts = NULL;
numdict = 0; numdict = 0;
@@ -261,17 +261,17 @@ sal_Bool SAL_CALL Hyphenator::hasLocale(const Locale& rLocale)
{ {
MutexGuard aGuard( GetLinguMutex() ); MutexGuard aGuard( GetLinguMutex() );
BOOL bRes = FALSE; sal_Bool bRes = sal_False;
if (!aSuppLocales.getLength()) if (!aSuppLocales.getLength())
getLocales(); getLocales();
const Locale *pLocale = aSuppLocales.getConstArray(); const Locale *pLocale = aSuppLocales.getConstArray();
INT32 nLen = aSuppLocales.getLength(); sal_Int32 nLen = aSuppLocales.getLength();
for (INT32 i = 0; i < nLen; ++i) for (sal_Int32 i = 0; i < nLen; ++i)
{ {
if (rLocale == pLocale[i]) if (rLocale == pLocale[i])
{ {
bRes = TRUE; bRes = sal_True;
break; break;
} }
} }
@@ -422,12 +422,12 @@ Reference< XHyphenatedWord > SAL_CALL Hyphenator::hyphenate( const ::rtl::OUStri
for (int c = n; c < wordlen; c++) hyphens[c] = '0'; for (int c = n; c < wordlen; c++) hyphens[c] = '0';
hyphens[wordlen] = '\0'; hyphens[wordlen] = '\0';
INT32 Leading = GetPosInWordToCheck( aWord, nMaxLeading ); sal_Int32 Leading = GetPosInWordToCheck( aWord, nMaxLeading );
for (INT32 i = 0; i < n; i++) for (sal_Int32 i = 0; i < n; i++)
{ {
int leftrep = 0; int leftrep = 0;
BOOL hit = (n >= minLen); sal_Bool hit = (n >= minLen);
if (!rep || !rep[i] || (i >= n)) if (!rep || !rep[i] || (i >= n))
{ {
hit = hit && (hyphens[i]&1) && (i < Leading); hit = hit && (hyphens[i]&1) && (i < Leading);
@@ -503,17 +503,17 @@ Reference< XHyphenatedWord > SAL_CALL Hyphenator::hyphenate( const ::rtl::OUStri
} }
// handle shortening // handle shortening
INT16 nPos = (INT16) ((nHyphenationPosAltHyph < nHyphenationPos) ? sal_Int16 nPos = (sal_Int16) ((nHyphenationPosAltHyph < nHyphenationPos) ?
nHyphenationPosAltHyph : nHyphenationPos); nHyphenationPosAltHyph : nHyphenationPos);
// dicretionary hyphenation // dicretionary hyphenation
xRes = new HyphenatedWord( aWord, LocaleToLanguage( aLocale ), nPos, xRes = new HyphenatedWord( aWord, LocaleToLanguage( aLocale ), nPos,
aWord.replaceAt(nHyphenationPosAlt + 1, cut[nHyphenationPos], repHyph), aWord.replaceAt(nHyphenationPosAlt + 1, cut[nHyphenationPos], repHyph),
(INT16) nHyphenationPosAltHyph); (sal_Int16) nHyphenationPosAltHyph);
} }
else else
{ {
xRes = new HyphenatedWord( aWord, LocaleToLanguage( aLocale ), xRes = new HyphenatedWord( aWord, LocaleToLanguage( aLocale ),
(INT16)nHyphenationPos, aWord, (INT16) nHyphenationPos); (sal_Int16)nHyphenationPos, aWord, (sal_Int16) nHyphenationPos);
} }
} }
@@ -684,8 +684,8 @@ Reference< XPossibleHyphens > SAL_CALL Hyphenator::createPossibleHyphens( const
hyphens[wordlen] = '\0'; hyphens[wordlen] = '\0';
// fprintf(stderr,"... %s\n",hyphens); fflush(stderr); // fprintf(stderr,"... %s\n",hyphens); fflush(stderr);
INT16 nHyphCount = 0; sal_Int16 nHyphCount = 0;
INT16 i; sal_Int16 i;
for ( i = 0; i < encWord.getLength(); i++) for ( i = 0; i < encWord.getLength(); i++)
{ {
@@ -693,8 +693,8 @@ Reference< XPossibleHyphens > SAL_CALL Hyphenator::createPossibleHyphens( const
nHyphCount++; nHyphCount++;
} }
Sequence< INT16 > aHyphPos(nHyphCount); Sequence< sal_Int16 > aHyphPos(nHyphCount);
INT16 *pPos = aHyphPos.getArray(); sal_Int16 *pPos = aHyphPos.getArray();
OUStringBuffer hyphenatedWordBuffer; OUStringBuffer hyphenatedWordBuffer;
OUString hyphenatedWord; OUString hyphenatedWord;
nHyphCount = 0; nHyphCount = 0;
@@ -808,7 +808,7 @@ sal_Bool SAL_CALL Hyphenator::addLinguServiceEventListener(
{ {
MutexGuard aGuard( GetLinguMutex() ); MutexGuard aGuard( GetLinguMutex() );
BOOL bRes = FALSE; sal_Bool bRes = sal_False;
if (!bDisposing && rxLstnr.is()) if (!bDisposing && rxLstnr.is())
{ {
bRes = GetPropHelper().addLinguServiceEventListener( rxLstnr ); bRes = GetPropHelper().addLinguServiceEventListener( rxLstnr );
@@ -823,7 +823,7 @@ sal_Bool SAL_CALL Hyphenator::removeLinguServiceEventListener(
{ {
MutexGuard aGuard( GetLinguMutex() ); MutexGuard aGuard( GetLinguMutex() );
BOOL bRes = FALSE; sal_Bool bRes = sal_False;
if (!bDisposing && rxLstnr.is()) if (!bDisposing && rxLstnr.is())
{ {
DBG_ASSERT( xPropHelper.is(), "xPropHelper non existent" ); DBG_ASSERT( xPropHelper.is(), "xPropHelper non existent" );
@@ -848,7 +848,7 @@ void SAL_CALL Hyphenator::initialize( const Sequence< Any >& rArguments )
if (!pPropHelper) if (!pPropHelper)
{ {
INT32 nLen = rArguments.getLength(); sal_Int32 nLen = rArguments.getLength();
if (2 == nLen) if (2 == nLen)
{ {
Reference< XPropertySet > xPropSet; Reference< XPropertySet > xPropSet;
@@ -878,7 +878,7 @@ void SAL_CALL Hyphenator::dispose()
if (!bDisposing) if (!bDisposing)
{ {
bDisposing = TRUE; bDisposing = sal_True;
EventObject aEvtObj( (XHyphenator *) this ); EventObject aEvtObj( (XHyphenator *) this );
aEvtListeners.disposeAndClear( aEvtObj ); aEvtListeners.disposeAndClear( aEvtObj );
} }
@@ -925,10 +925,10 @@ sal_Bool SAL_CALL Hyphenator::supportsService( const OUString& ServiceName )
Sequence< OUString > aSNL = getSupportedServiceNames(); Sequence< OUString > aSNL = getSupportedServiceNames();
const OUString * pArray = aSNL.getConstArray(); 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 ) if( pArray[i] == ServiceName )
return TRUE; return sal_True;
return FALSE; return sal_False;
} }

View File

@@ -90,7 +90,7 @@ class Hyphenator :
Reference< XPropertyChangeListener > xPropHelper; Reference< XPropertyChangeListener > xPropHelper;
Reference< XMultiServiceFactory > rSMgr; Reference< XMultiServiceFactory > rSMgr;
linguistic::PropertyHelper_Hyphen * pPropHelper; linguistic::PropertyHelper_Hyphen * pPropHelper;
BOOL bDisposing; sal_Bool bDisposing;
// disallow copy-constructor and assignment-operator for now // disallow copy-constructor and assignment-operator for now
Hyphenator(const Hyphenator &); Hyphenator(const Hyphenator &);

View File

@@ -69,7 +69,7 @@ struct lt_rtl_OUString
} }
}; };
inline BOOL operator == ( const ::com::sun::star::lang::Locale &rL1, const ::com::sun::star::lang::Locale &rL2 ) inline sal_Bool operator == ( const ::com::sun::star::lang::Locale &rL1, const ::com::sun::star::lang::Locale &rL2 )
{ {
return rL1.Language == rL2.Language && return rL1.Language == rL2.Language &&
rL1.Country == rL2.Country && rL1.Country == rL2.Country &&

View File

@@ -98,7 +98,7 @@ MacSpellChecker::MacSpellChecker() :
aDEncs = NULL; aDEncs = NULL;
aDLocs = NULL; aDLocs = NULL;
aDNames = NULL; aDNames = NULL;
bDisposing = FALSE; bDisposing = sal_False;
pPropHelper = NULL; pPropHelper = NULL;
numdict = 0; numdict = 0;
NSApplicationLoad(); NSApplicationLoad();
@@ -261,17 +261,17 @@ sal_Bool SAL_CALL MacSpellChecker::hasLocale(const Locale& rLocale)
{ {
MutexGuard aGuard( GetLinguMutex() ); MutexGuard aGuard( GetLinguMutex() );
BOOL bRes = FALSE; sal_Bool bRes = sal_False;
if (!aSuppLocales.getLength()) if (!aSuppLocales.getLength())
getLocales(); getLocales();
INT32 nLen = aSuppLocales.getLength(); sal_Int32 nLen = aSuppLocales.getLength();
for (INT32 i = 0; i < nLen; ++i) for (sal_Int32 i = 0; i < nLen; ++i)
{ {
const Locale *pLocale = aSuppLocales.getConstArray(); const Locale *pLocale = aSuppLocales.getConstArray();
if (rLocale == pLocale[i]) if (rLocale == pLocale[i])
{ {
bRes = TRUE; bRes = sal_True;
break; 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; rtl_TextEncoding aEnc;
@@ -287,7 +287,7 @@ INT16 MacSpellChecker::GetSpellFailure( const OUString &rWord, const Locale &rLo
// (note: mutex is held higher up in isValid) // (note: mutex is held higher up in isValid)
INT16 nRes = -1; sal_Int16 nRes = -1;
// first handle smart quotes both single and double // first handle smart quotes both single and double
OUStringBuffer rBuf(rWord); OUStringBuffer rBuf(rWord);
@@ -316,7 +316,7 @@ INT16 MacSpellChecker::GetSpellFailure( const OUString &rWord, const Locale &rLo
} }
int aCount; 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; int rVal = 0;
if(range.length>0) if(range.length>0)
{ {
@@ -347,13 +347,13 @@ sal_Bool SAL_CALL
MutexGuard aGuard( GetLinguMutex() ); MutexGuard aGuard( GetLinguMutex() );
if (rLocale == Locale() || !rWord.getLength()) if (rLocale == Locale() || !rWord.getLength())
return TRUE; return sal_True;
if (!hasLocale( rLocale )) if (!hasLocale( rLocale ))
#ifdef LINGU_EXCEPTIONS #ifdef LINGU_EXCEPTIONS
throw( IllegalArgumentException() ); throw( IllegalArgumentException() );
#else #else
return TRUE; return sal_True;
#endif #endif
// Get property values to be used. // Get property values to be used.
@@ -366,10 +366,10 @@ sal_Bool SAL_CALL
PropertyHelper_Spell &rHelper = GetPropHelper(); PropertyHelper_Spell &rHelper = GetPropHelper();
rHelper.SetTmpPropVals( rProperties ); rHelper.SetTmpPropVals( rProperties );
INT16 nFailure = GetSpellFailure( rWord, rLocale ); sal_Int16 nFailure = GetSpellFailure( rWord, rLocale );
if (nFailure != -1) if (nFailure != -1)
{ {
INT16 nLang = LocaleToLanguage( rLocale ); sal_Int16 nLang = LocaleToLanguage( rLocale );
// postprocess result for errors that should be ignored // postprocess result for errors that should be ignored
if ( (!rHelper.IsSpellUpperCase() && IsUpper( rWord, nLang )) if ( (!rHelper.IsSpellUpperCase() && IsUpper( rWord, nLang ))
|| (!rHelper.IsSpellWithDigits() && HasDigits( rWord )) || (!rHelper.IsSpellWithDigits() && HasDigits( rWord ))
@@ -393,7 +393,7 @@ Reference< XSpellAlternatives >
Reference< XSpellAlternatives > xRes; Reference< XSpellAlternatives > xRes;
// note: mutex is held by higher up by spell which covers both // note: mutex is held by higher up by spell which covers both
INT16 nLang = LocaleToLanguage( rLocale ); sal_Int16 nLang = LocaleToLanguage( rLocale );
int count; int count;
Sequence< OUString > aStr( 0 ); Sequence< OUString > aStr( 0 );
@@ -496,7 +496,7 @@ sal_Bool SAL_CALL
{ {
MutexGuard aGuard( GetLinguMutex() ); MutexGuard aGuard( GetLinguMutex() );
BOOL bRes = FALSE; sal_Bool bRes = sal_False;
if (!bDisposing && rxLstnr.is()) if (!bDisposing && rxLstnr.is())
{ {
bRes = GetPropHelper().addLinguServiceEventListener( rxLstnr ); bRes = GetPropHelper().addLinguServiceEventListener( rxLstnr );
@@ -512,7 +512,7 @@ sal_Bool SAL_CALL
{ {
MutexGuard aGuard( GetLinguMutex() ); MutexGuard aGuard( GetLinguMutex() );
BOOL bRes = FALSE; sal_Bool bRes = sal_False;
if (!bDisposing && rxLstnr.is()) if (!bDisposing && rxLstnr.is())
{ {
DBG_ASSERT( xPropHelper.is(), "xPropHelper non existent" ); DBG_ASSERT( xPropHelper.is(), "xPropHelper non existent" );
@@ -539,7 +539,7 @@ void SAL_CALL
if (!pPropHelper) if (!pPropHelper)
{ {
INT32 nLen = rArguments.getLength(); sal_Int32 nLen = rArguments.getLength();
if (2 == nLen) if (2 == nLen)
{ {
Reference< XPropertySet > xPropSet; Reference< XPropertySet > xPropSet;
@@ -569,7 +569,7 @@ void SAL_CALL
if (!bDisposing) if (!bDisposing)
{ {
bDisposing = TRUE; bDisposing = sal_True;
EventObject aEvtObj( (XSpellChecker *) this ); EventObject aEvtObj( (XSpellChecker *) this );
aEvtListeners.disposeAndClear( aEvtObj ); aEvtListeners.disposeAndClear( aEvtObj );
} }
@@ -618,10 +618,10 @@ sal_Bool SAL_CALL MacSpellChecker::supportsService( const OUString& ServiceName
Sequence< OUString > aSNL = getSupportedServiceNames(); Sequence< OUString > aSNL = getSupportedServiceNames();
const OUString * pArray = aSNL.getConstArray(); 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 ) if( pArray[i] == ServiceName )
return TRUE; return sal_True;
return FALSE; return sal_False;
} }

View File

@@ -87,7 +87,7 @@ class MacSpellChecker :
::cppu::OInterfaceContainerHelper aEvtListeners; ::cppu::OInterfaceContainerHelper aEvtListeners;
Reference< XPropertyChangeListener > xPropHelper; Reference< XPropertyChangeListener > xPropHelper;
linguistic::PropertyHelper_Spell * pPropHelper; linguistic::PropertyHelper_Spell * pPropHelper;
BOOL bDisposing; sal_Bool bDisposing;
// disallow copy-constructor and assignment-operator for now // disallow copy-constructor and assignment-operator for now
MacSpellChecker(const MacSpellChecker &); MacSpellChecker(const MacSpellChecker &);
@@ -99,7 +99,7 @@ class MacSpellChecker :
return pPropHelper ? *pPropHelper : GetPropHelper_Impl(); 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 ); Reference< XSpellAlternatives > GetProposals( const OUString &rWord, const Locale &rLocale );
public: public:

View File

@@ -79,7 +79,7 @@ SpellChecker::SpellChecker() :
aDEncs = NULL; aDEncs = NULL;
aDLocs = NULL; aDLocs = NULL;
aDNames = NULL; aDNames = NULL;
bDisposing = FALSE; bDisposing = sal_False;
pPropHelper = NULL; pPropHelper = NULL;
numdict = 0; numdict = 0;
} }
@@ -255,17 +255,17 @@ sal_Bool SAL_CALL SpellChecker::hasLocale(const Locale& rLocale)
{ {
MutexGuard aGuard( GetLinguMutex() ); MutexGuard aGuard( GetLinguMutex() );
BOOL bRes = FALSE; sal_Bool bRes = sal_False;
if (!aSuppLocales.getLength()) if (!aSuppLocales.getLength())
getLocales(); getLocales();
INT32 nLen = aSuppLocales.getLength(); sal_Int32 nLen = aSuppLocales.getLength();
for (INT32 i = 0; i < nLen; ++i) for (sal_Int32 i = 0; i < nLen; ++i)
{ {
const Locale *pLocale = aSuppLocales.getConstArray(); const Locale *pLocale = aSuppLocales.getConstArray();
if (rLocale == pLocale[i]) if (rLocale == pLocale[i])
{ {
bRes = TRUE; bRes = sal_True;
break; 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; Hunspell * pMS = NULL;
rtl_TextEncoding eEnc = RTL_TEXTENCODING_DONTKNOW; 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 // initialize a myspell object for each dictionary once
// (note: mutex is held higher up in isValid) // (note: mutex is held higher up in isValid)
INT16 nRes = -1; sal_Int16 nRes = -1;
// first handle smart quotes both single and double // first handle smart quotes both single and double
OUStringBuffer rBuf(rWord); OUStringBuffer rBuf(rWord);
@@ -367,17 +367,17 @@ sal_Bool SAL_CALL SpellChecker::isValid( const OUString& rWord, const Locale& rL
MutexGuard aGuard( GetLinguMutex() ); MutexGuard aGuard( GetLinguMutex() );
if (rLocale == Locale() || !rWord.getLength()) if (rLocale == Locale() || !rWord.getLength())
return TRUE; return sal_True;
if (!hasLocale( rLocale )) if (!hasLocale( rLocale ))
#ifdef LINGU_EXCEPTIONS #ifdef LINGU_EXCEPTIONS
throw( IllegalArgumentException() ); throw( IllegalArgumentException() );
#else #else
return TRUE; return sal_True;
#endif #endif
// return FALSE to process SPELLML requests (they are longer than the header) // return sal_False to process SPELLML requests (they are longer than the header)
if (rWord.match(A2OU(SPELLML_HEADER), 0) && (rWord.getLength() > 10)) return FALSE; if (rWord.match(A2OU(SPELLML_HEADER), 0) && (rWord.getLength() > 10)) return sal_False;
// Get property values to be used. // Get property values to be used.
// These are be the default values set in the SN_LINGU_PROPERTIES // 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(); PropertyHelper_Spell &rHelper = GetPropHelper();
rHelper.SetTmpPropVals( rProperties ); rHelper.SetTmpPropVals( rProperties );
INT16 nFailure = GetSpellFailure( rWord, rLocale ); sal_Int16 nFailure = GetSpellFailure( rWord, rLocale );
if (nFailure != -1 && !rWord.match(A2OU(SPELLML_HEADER), 0)) 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 // postprocess result for errors that should be ignored
const bool bIgnoreError = const bool bIgnoreError =
(!rHelper.IsSpellUpperCase() && IsUpper( rWord, nLang )) || (!rHelper.IsSpellUpperCase() && IsUpper( rWord, nLang )) ||
@@ -437,7 +437,7 @@ Reference< XSpellAlternatives >
if (n) if (n)
{ {
INT16 nLang = LocaleToLanguage( rLocale ); sal_Int16 nLang = LocaleToLanguage( rLocale );
Sequence< OUString > aStr( 0 ); Sequence< OUString > aStr( 0 );
@@ -529,7 +529,7 @@ sal_Bool SAL_CALL SpellChecker::addLinguServiceEventListener(
{ {
MutexGuard aGuard( GetLinguMutex() ); MutexGuard aGuard( GetLinguMutex() );
BOOL bRes = FALSE; sal_Bool bRes = sal_False;
if (!bDisposing && rxLstnr.is()) if (!bDisposing && rxLstnr.is())
{ {
bRes = GetPropHelper().addLinguServiceEventListener( rxLstnr ); bRes = GetPropHelper().addLinguServiceEventListener( rxLstnr );
@@ -544,7 +544,7 @@ sal_Bool SAL_CALL SpellChecker::removeLinguServiceEventListener(
{ {
MutexGuard aGuard( GetLinguMutex() ); MutexGuard aGuard( GetLinguMutex() );
BOOL bRes = FALSE; sal_Bool bRes = sal_False;
if (!bDisposing && rxLstnr.is()) if (!bDisposing && rxLstnr.is())
{ {
DBG_ASSERT( xPropHelper.is(), "xPropHelper non existent" ); DBG_ASSERT( xPropHelper.is(), "xPropHelper non existent" );
@@ -569,7 +569,7 @@ void SAL_CALL SpellChecker::initialize( const Sequence< Any >& rArguments )
if (!pPropHelper) if (!pPropHelper)
{ {
INT32 nLen = rArguments.getLength(); sal_Int32 nLen = rArguments.getLength();
if (2 == nLen) if (2 == nLen)
{ {
Reference< XPropertySet > xPropSet; Reference< XPropertySet > xPropSet;
@@ -599,7 +599,7 @@ void SAL_CALL SpellChecker::dispose()
if (!bDisposing) if (!bDisposing)
{ {
bDisposing = TRUE; bDisposing = sal_True;
EventObject aEvtObj( (XSpellChecker *) this ); EventObject aEvtObj( (XSpellChecker *) this );
aEvtListeners.disposeAndClear( aEvtObj ); aEvtListeners.disposeAndClear( aEvtObj );
} }
@@ -646,10 +646,10 @@ sal_Bool SAL_CALL SpellChecker::supportsService( const OUString& ServiceName )
Sequence< OUString > aSNL = getSupportedServiceNames(); Sequence< OUString > aSNL = getSupportedServiceNames();
const OUString * pArray = aSNL.getConstArray(); 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 ) if( pArray[i] == ServiceName )
return TRUE; return sal_True;
return FALSE; return sal_False;
} }

View File

@@ -78,7 +78,7 @@ class SpellChecker :
::cppu::OInterfaceContainerHelper aEvtListeners; ::cppu::OInterfaceContainerHelper aEvtListeners;
Reference< XPropertyChangeListener > xPropHelper; Reference< XPropertyChangeListener > xPropHelper;
linguistic::PropertyHelper_Spell * pPropHelper; linguistic::PropertyHelper_Spell * pPropHelper;
BOOL bDisposing; sal_Bool bDisposing;
// disallow copy-constructor and assignment-operator for now // disallow copy-constructor and assignment-operator for now
SpellChecker(const SpellChecker &); SpellChecker(const SpellChecker &);
@@ -90,7 +90,7 @@ class SpellChecker :
return pPropHelper ? *pPropHelper : GetPropHelper_Impl(); 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 ); Reference< XSpellAlternatives > GetProposals( const OUString &rWord, const Locale &rLocale );
public: public:

View File

@@ -54,10 +54,10 @@ namespace linguistic
Meaning::Meaning( Meaning::Meaning(
#if 0 #if 0
const OUString &rTerm, INT16 nLang, const OUString &rTerm, sal_Int16 nLang,
const PropertyHelper_Thes &rHelper ) : const PropertyHelper_Thes &rHelper ) :
#else #else
const OUString &rTerm, INT16 nLang) : const OUString &rTerm, sal_Int16 nLang) :
#endif #endif
aSyn ( Sequence< OUString >(1) ), aSyn ( Sequence< OUString >(1) ),

View File

@@ -48,11 +48,11 @@ class Meaning :
{ {
::com::sun::star::uno::Sequence< ::rtl::OUString > aSyn; // list of synonyms, may be empty. ::com::sun::star::uno::Sequence< ::rtl::OUString > aSyn; // list of synonyms, may be empty.
::rtl::OUString aTerm; ::rtl::OUString aTerm;
INT16 nLanguage; sal_Int16 nLanguage;
#if 0 #if 0
// this is for future use by a German thesaurus // this is for future use by a German thesaurus
BOOL bIsGermanPreReform; sal_Bool bIsGermanPreReform;
#endif #endif
// disallow copy-constructor and assignment-operator for now // disallow copy-constructor and assignment-operator for now
@@ -61,9 +61,9 @@ class Meaning :
public: public:
#if 0 #if 0
Meaning(const ::rtl::OUString &rTerm, INT16 nLang, const PropertyHelper_Thes &rHelper); Meaning(const ::rtl::OUString &rTerm, sal_Int16 nLang, const PropertyHelper_Thes &rHelper);
#else #else
Meaning(const ::rtl::OUString &rTerm, INT16 nLang); Meaning(const ::rtl::OUString &rTerm, sal_Int16 nLang);
#endif #endif
virtual ~Meaning(); virtual ~Meaning();

View File

@@ -93,7 +93,7 @@ static uno::Reference< XLinguServiceManager > GetLngSvcMgr_Impl()
Thesaurus::Thesaurus() : Thesaurus::Thesaurus() :
aEvtListeners ( GetLinguMutex() ) aEvtListeners ( GetLinguMutex() )
{ {
bDisposing = FALSE; bDisposing = sal_False;
pPropHelper = NULL; pPropHelper = NULL;
aThes = NULL; aThes = NULL;
aCharSetInfo = NULL; aCharSetInfo = NULL;
@@ -289,16 +289,16 @@ sal_Bool SAL_CALL Thesaurus::hasLocale(const Locale& rLocale)
{ {
MutexGuard aGuard( GetLinguMutex() ); MutexGuard aGuard( GetLinguMutex() );
BOOL bRes = FALSE; sal_Bool bRes = sal_False;
if (!aSuppLocales.getLength()) if (!aSuppLocales.getLength())
getLocales(); getLocales();
INT32 nLen = aSuppLocales.getLength(); sal_Int32 nLen = aSuppLocales.getLength();
for (INT32 i = 0; i < nLen; ++i) for (sal_Int32 i = 0; i < nLen; ++i)
{ {
const Locale *pLocale = aSuppLocales.getConstArray(); const Locale *pLocale = aSuppLocales.getConstArray();
if (rLocale == pLocale[i]) if (rLocale == pLocale[i])
{ {
bRes = TRUE; bRes = sal_True;
break; break;
} }
} }
@@ -324,7 +324,7 @@ Sequence < Reference < ::com::sun::star::linguistic2::XMeaning > > SAL_CALL Thes
sal_Int32 stem = 0; sal_Int32 stem = 0;
sal_Int32 stem2 = 0; sal_Int32 stem2 = 0;
INT16 nLanguage = LocaleToLanguage( rLocale ); sal_Int16 nLanguage = LocaleToLanguage( rLocale );
if (nLanguage == LANGUAGE_NONE || !rTerm.getLength()) if (nLanguage == LANGUAGE_NONE || !rTerm.getLength())
return noMeanings; return noMeanings;
@@ -591,7 +591,7 @@ void SAL_CALL Thesaurus::initialize( const Sequence< Any >& rArguments )
if (!pPropHelper) if (!pPropHelper)
{ {
INT32 nLen = rArguments.getLength(); sal_Int32 nLen = rArguments.getLength();
if (1 == nLen) if (1 == nLen)
{ {
Reference< XPropertySet > xPropSet; Reference< XPropertySet > xPropSet;
@@ -619,7 +619,7 @@ sal_uInt16 SAL_CALL Thesaurus::capitalType(const OUString& aTerm, CharClass * pC
{ {
String aStr(aTerm); String aStr(aTerm);
sal_Int32 nc = 0; sal_Int32 nc = 0;
for (USHORT tindex = 0; tindex < tlen; tindex++) for (sal_uInt16 tindex = 0; tindex < tlen; tindex++)
{ {
if (pCC->getCharacterType(aStr,tindex) & if (pCC->getCharacterType(aStr,tindex) &
::com::sun::star::i18n::KCharacterType::UPPER) nc++; ::com::sun::star::i18n::KCharacterType::UPPER) nc++;
@@ -682,7 +682,7 @@ void SAL_CALL Thesaurus::dispose()
if (!bDisposing) if (!bDisposing)
{ {
bDisposing = TRUE; bDisposing = sal_True;
EventObject aEvtObj( (XThesaurus *) this ); EventObject aEvtObj( (XThesaurus *) this );
aEvtListeners.disposeAndClear( aEvtObj ); aEvtListeners.disposeAndClear( aEvtObj );
} }
@@ -728,10 +728,10 @@ sal_Bool SAL_CALL Thesaurus::supportsService( const OUString& ServiceName )
Sequence< OUString > aSNL = getSupportedServiceNames(); Sequence< OUString > aSNL = getSupportedServiceNames();
const OUString * pArray = aSNL.getConstArray(); 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 ) if( pArray[i] == ServiceName )
return TRUE; return sal_True;
return FALSE; return sal_False;
} }

View File

@@ -87,7 +87,7 @@ class Thesaurus :
::cppu::OInterfaceContainerHelper aEvtListeners; ::cppu::OInterfaceContainerHelper aEvtListeners;
Reference< XPropertyChangeListener > xPropHelper; Reference< XPropertyChangeListener > xPropHelper;
linguistic::PropertyHelper_Thes * pPropHelper; linguistic::PropertyHelper_Thes * pPropHelper;
BOOL bDisposing; sal_Bool bDisposing;
CharClass ** aCharSetInfo; CharClass ** aCharSetInfo;
MyThes ** aThes; MyThes ** aThes;
rtl_TextEncoding * aTEncs; rtl_TextEncoding * aTEncs;
@@ -98,7 +98,7 @@ class Thesaurus :
// cache for the Thesaurus dialog // cache for the Thesaurus dialog
Sequence < Reference < ::com::sun::star::linguistic2::XMeaning > > prevMeanings; Sequence < Reference < ::com::sun::star::linguistic2::XMeaning > > prevMeanings;
OUString prevTerm; OUString prevTerm;
INT16 prevLocale; sal_Int16 prevLocale;
// disallow copy-constructor and assignment-operator for now // disallow copy-constructor and assignment-operator for now
Thesaurus(const Thesaurus &); Thesaurus(const Thesaurus &);