CWS gnumake4: convert linguistic to new build system
This commit is contained in:
committed by
Bjoern Michaelsen
parent
8d0058914e
commit
451314f294
@@ -114,17 +114,17 @@ Hyphenator::~Hyphenator()
|
||||
if (aDicts) delete[] aDicts;
|
||||
aDicts = NULL;
|
||||
numdict = 0;
|
||||
delete pPropHelper;
|
||||
}
|
||||
|
||||
|
||||
PropertyHelper_Hyphen & Hyphenator::GetPropHelper_Impl()
|
||||
PropertyHelper_Hyphenation& Hyphenator::GetPropHelper_Impl()
|
||||
{
|
||||
if (!pPropHelper)
|
||||
{
|
||||
Reference< XPropertySet > xPropSet( GetLinguProperties(), UNO_QUERY );
|
||||
|
||||
pPropHelper = new PropertyHelper_Hyphen ((XHyphenator *) this, xPropSet );
|
||||
xPropHelper = pPropHelper;
|
||||
pPropHelper = new PropertyHelper_Hyphenation ((XHyphenator *) this, xPropSet );
|
||||
pPropHelper->AddAsPropListener(); //! after a reference is established
|
||||
}
|
||||
return *pPropHelper;
|
||||
@@ -293,7 +293,7 @@ Reference< XHyphenatedWord > SAL_CALL Hyphenator::hyphenate( const ::rtl::OUStri
|
||||
char *lcword;
|
||||
int k = 0;
|
||||
|
||||
PropertyHelper_Hyphen & rHelper = GetPropHelper();
|
||||
PropertyHelper_Hyphenation& rHelper = GetPropHelper();
|
||||
rHelper.SetTmpPropVals(aProperties);
|
||||
sal_Int16 minTrail = rHelper.GetMinTrailing();
|
||||
sal_Int16 minLead = rHelper.GetMinLeading();
|
||||
@@ -506,13 +506,13 @@ Reference< XHyphenatedWord > SAL_CALL Hyphenator::hyphenate( const ::rtl::OUStri
|
||||
sal_Int16 nPos = (sal_Int16) ((nHyphenationPosAltHyph < nHyphenationPos) ?
|
||||
nHyphenationPosAltHyph : nHyphenationPos);
|
||||
// dicretionary hyphenation
|
||||
xRes = new HyphenatedWord( aWord, LocaleToLanguage( aLocale ), nPos,
|
||||
xRes = HyphenatedWord::CreateHyphenatedWord( aWord, LocaleToLanguage( aLocale ), nPos,
|
||||
aWord.replaceAt(nHyphenationPosAlt + 1, cut[nHyphenationPos], repHyph),
|
||||
(sal_Int16) nHyphenationPosAltHyph);
|
||||
}
|
||||
else
|
||||
{
|
||||
xRes = new HyphenatedWord( aWord, LocaleToLanguage( aLocale ),
|
||||
xRes = HyphenatedWord::CreateHyphenatedWord( aWord, LocaleToLanguage( aLocale ),
|
||||
(sal_Int16)nHyphenationPos, aWord, (sal_Int16) nHyphenationPos);
|
||||
}
|
||||
}
|
||||
@@ -558,7 +558,7 @@ Reference< XPossibleHyphens > SAL_CALL Hyphenator::createPossibleHyphens( const
|
||||
char *lcword;
|
||||
int k;
|
||||
|
||||
PropertyHelper_Hyphen & rHelper = GetPropHelper();
|
||||
PropertyHelper_Hyphenation& rHelper = GetPropHelper();
|
||||
rHelper.SetTmpPropVals(aProperties);
|
||||
sal_Int16 minTrail = rHelper.GetMinTrailing();
|
||||
sal_Int16 minLead = rHelper.GetMinLeading();
|
||||
@@ -715,7 +715,7 @@ Reference< XPossibleHyphens > SAL_CALL Hyphenator::createPossibleHyphens( const
|
||||
//fprintf(stderr,"result is %s\n",OU2A(hyphenatedWord));
|
||||
//fflush(stderr);
|
||||
|
||||
xRes = new PossibleHyphens( aWord, LocaleToLanguage( aLocale ),
|
||||
xRes = PossibleHyphens::CreatePossibleHyphens( aWord, LocaleToLanguage( aLocale ),
|
||||
hyphenatedWord, aHyphPos );
|
||||
|
||||
delete[] hyphens;
|
||||
@@ -826,7 +826,6 @@ sal_Bool SAL_CALL Hyphenator::removeLinguServiceEventListener(
|
||||
sal_Bool bRes = sal_False;
|
||||
if (!bDisposing && rxLstnr.is())
|
||||
{
|
||||
DBG_ASSERT( xPropHelper.is(), "xPropHelper non existent" );
|
||||
bRes = GetPropHelper().removeLinguServiceEventListener( rxLstnr );
|
||||
}
|
||||
return bRes;
|
||||
@@ -859,8 +858,7 @@ void SAL_CALL Hyphenator::initialize( const Sequence< Any >& rArguments )
|
||||
//! And the reference to the UNO-functions while increasing
|
||||
//! the ref-count and will implicitly free the memory
|
||||
//! when the object is not longer used.
|
||||
pPropHelper = new PropertyHelper_Hyphen( (XHyphenator *) this, xPropSet );
|
||||
xPropHelper = pPropHelper;
|
||||
pPropHelper = new PropertyHelper_Hyphenation( (XHyphenator *) this, xPropSet );
|
||||
pPropHelper->AddAsPropListener(); //! after a reference is established
|
||||
}
|
||||
else
|
||||
|
@@ -87,17 +87,16 @@ class Hyphenator :
|
||||
sal_Int32 numdict;
|
||||
|
||||
::cppu::OInterfaceContainerHelper aEvtListeners;
|
||||
Reference< XPropertyChangeListener > xPropHelper;
|
||||
Reference< XMultiServiceFactory > rSMgr;
|
||||
linguistic::PropertyHelper_Hyphen * pPropHelper;
|
||||
linguistic::PropertyHelper_Hyphenation* pPropHelper;
|
||||
sal_Bool bDisposing;
|
||||
|
||||
// disallow copy-constructor and assignment-operator for now
|
||||
Hyphenator(const Hyphenator &);
|
||||
Hyphenator & operator = (const Hyphenator &);
|
||||
|
||||
linguistic::PropertyHelper_Hyphen & GetPropHelper_Impl();
|
||||
linguistic::PropertyHelper_Hyphen & GetPropHelper()
|
||||
linguistic::PropertyHelper_Hyphenation& GetPropHelper_Impl();
|
||||
linguistic::PropertyHelper_Hyphenation& GetPropHelper()
|
||||
{
|
||||
return pPropHelper ? *pPropHelper : GetPropHelper_Impl();
|
||||
}
|
||||
|
@@ -106,17 +106,17 @@ SpellChecker::~SpellChecker()
|
||||
aDNames = NULL;
|
||||
if (pPropHelper)
|
||||
pPropHelper->RemoveAsPropListener();
|
||||
delete pPropHelper;
|
||||
}
|
||||
|
||||
|
||||
PropertyHelper_Spell & SpellChecker::GetPropHelper_Impl()
|
||||
PropertyHelper_Spelling & SpellChecker::GetPropHelper_Impl()
|
||||
{
|
||||
if (!pPropHelper)
|
||||
{
|
||||
Reference< XPropertySet > xPropSet( GetLinguProperties(), UNO_QUERY );
|
||||
|
||||
pPropHelper = new PropertyHelper_Spell( (XSpellChecker *) this, xPropSet );
|
||||
xPropHelper = pPropHelper;
|
||||
pPropHelper = new PropertyHelper_Spelling( (XSpellChecker *) this, xPropSet );
|
||||
pPropHelper->AddAsPropListener(); //! after a reference is established
|
||||
}
|
||||
return *pPropHelper;
|
||||
@@ -386,7 +386,7 @@ sal_Bool SAL_CALL SpellChecker::isValid( const OUString& rWord, const Locale& rL
|
||||
// You'll probably like to use a simplier solution than the provided
|
||||
// one using the PropertyHelper_Spell.
|
||||
|
||||
PropertyHelper_Spell &rHelper = GetPropHelper();
|
||||
PropertyHelper_Spelling& rHelper = GetPropHelper();
|
||||
rHelper.SetTmpPropVals( rProperties );
|
||||
|
||||
sal_Int16 nFailure = GetSpellFailure( rWord, rLocale );
|
||||
@@ -475,12 +475,8 @@ Reference< XSpellAlternatives >
|
||||
}
|
||||
|
||||
// now return an empty alternative for no suggestions or the list of alternatives if some found
|
||||
SpellAlternatives *pAlt = new SpellAlternatives;
|
||||
String aTmp(rWord);
|
||||
pAlt->SetWordLanguage( aTmp, nLang );
|
||||
pAlt->SetFailureType( SpellFailure::SPELLING_ERROR );
|
||||
pAlt->SetAlternatives( aStr );
|
||||
xRes = pAlt;
|
||||
xRes = SpellAlternatives::CreateSpellAlternatives( aTmp, nLang, SpellFailure::SPELLING_ERROR, aStr );
|
||||
return xRes;
|
||||
}
|
||||
return xRes;
|
||||
@@ -547,7 +543,6 @@ sal_Bool SAL_CALL SpellChecker::removeLinguServiceEventListener(
|
||||
sal_Bool bRes = sal_False;
|
||||
if (!bDisposing && rxLstnr.is())
|
||||
{
|
||||
DBG_ASSERT( xPropHelper.is(), "xPropHelper non existent" );
|
||||
bRes = GetPropHelper().removeLinguServiceEventListener( rxLstnr );
|
||||
}
|
||||
return bRes;
|
||||
@@ -580,8 +575,7 @@ void SAL_CALL SpellChecker::initialize( const Sequence< Any >& rArguments )
|
||||
//! And the reference to the UNO-functions while increasing
|
||||
//! the ref-count and will implicitly free the memory
|
||||
//! when the object is not longer used.
|
||||
pPropHelper = new PropertyHelper_Spell( (XSpellChecker *) this, xPropSet );
|
||||
xPropHelper = pPropHelper;
|
||||
pPropHelper = new PropertyHelper_Spelling( (XSpellChecker *) this, xPropSet );
|
||||
pPropHelper->AddAsPropListener(); //! after a reference is established
|
||||
}
|
||||
else
|
||||
|
@@ -76,16 +76,15 @@ class SpellChecker :
|
||||
sal_Int32 numdict;
|
||||
|
||||
::cppu::OInterfaceContainerHelper aEvtListeners;
|
||||
Reference< XPropertyChangeListener > xPropHelper;
|
||||
linguistic::PropertyHelper_Spell * pPropHelper;
|
||||
linguistic::PropertyHelper_Spelling* pPropHelper;
|
||||
sal_Bool bDisposing;
|
||||
|
||||
// disallow copy-constructor and assignment-operator for now
|
||||
SpellChecker(const SpellChecker &);
|
||||
SpellChecker & operator = (const SpellChecker &);
|
||||
|
||||
linguistic::PropertyHelper_Spell & GetPropHelper_Impl();
|
||||
linguistic::PropertyHelper_Spell & GetPropHelper()
|
||||
linguistic::PropertyHelper_Spelling& GetPropHelper_Impl();
|
||||
linguistic::PropertyHelper_Spelling& GetPropHelper()
|
||||
{
|
||||
return pPropHelper ? *pPropHelper : GetPropHelper_Impl();
|
||||
}
|
||||
|
@@ -137,17 +137,17 @@ Thesaurus::~Thesaurus()
|
||||
|
||||
if (pPropHelper)
|
||||
pPropHelper->RemoveAsPropListener();
|
||||
delete pPropHelper;
|
||||
}
|
||||
|
||||
|
||||
PropertyHelper_Thes & Thesaurus::GetPropHelper_Impl()
|
||||
PropertyHelper_Thesaurus& Thesaurus::GetPropHelper_Impl()
|
||||
{
|
||||
if (!pPropHelper)
|
||||
{
|
||||
Reference< XPropertySet > xPropSet( GetLinguProperties(), UNO_QUERY );
|
||||
|
||||
pPropHelper = new PropertyHelper_Thes( (XThesaurus *) this, xPropSet );
|
||||
xPropHelper = pPropHelper;
|
||||
pPropHelper = new PropertyHelper_Thesaurus( (XThesaurus *) this, xPropSet );
|
||||
pPropHelper->AddAsPropListener(); //! after a reference is established
|
||||
}
|
||||
return *pPropHelper;
|
||||
@@ -342,7 +342,7 @@ Sequence < Reference < ::com::sun::star::linguistic2::XMeaning > > SAL_CALL Thes
|
||||
mentry * pmean = NULL;
|
||||
sal_Int32 nmean = 0;
|
||||
|
||||
PropertyHelper_Thes &rHelper = GetPropHelper();
|
||||
PropertyHelper_Thesaurus &rHelper = GetPropHelper();
|
||||
rHelper.SetTmpPropVals( rProperties );
|
||||
|
||||
MyThes * pTH = NULL;
|
||||
@@ -601,8 +601,7 @@ void SAL_CALL Thesaurus::initialize( const Sequence< Any >& rArguments )
|
||||
//! And the reference to the UNO-functions while increasing
|
||||
//! the ref-count and will implicitly free the memory
|
||||
//! when the object is not longer used.
|
||||
pPropHelper = new PropertyHelper_Thes( (XThesaurus *) this, xPropSet );
|
||||
xPropHelper = pPropHelper;
|
||||
pPropHelper = new PropertyHelper_Thesaurus( (XThesaurus *) this, xPropSet );
|
||||
pPropHelper->AddAsPropListener(); //! after a reference is established
|
||||
}
|
||||
else
|
||||
|
@@ -85,8 +85,7 @@ class Thesaurus :
|
||||
Sequence< Locale > aSuppLocales;
|
||||
|
||||
::cppu::OInterfaceContainerHelper aEvtListeners;
|
||||
Reference< XPropertyChangeListener > xPropHelper;
|
||||
linguistic::PropertyHelper_Thes * pPropHelper;
|
||||
linguistic::PropertyHelper_Thesaurus* pPropHelper;
|
||||
sal_Bool bDisposing;
|
||||
CharClass ** aCharSetInfo;
|
||||
MyThes ** aThes;
|
||||
@@ -104,8 +103,8 @@ class Thesaurus :
|
||||
Thesaurus(const Thesaurus &);
|
||||
Thesaurus & operator = (const Thesaurus &);
|
||||
|
||||
linguistic::PropertyHelper_Thes & GetPropHelper_Impl();
|
||||
linguistic::PropertyHelper_Thes & GetPropHelper()
|
||||
linguistic::PropertyHelper_Thesaurus& GetPropHelper_Impl();
|
||||
linguistic::PropertyHelper_Thesaurus& GetPropHelper()
|
||||
{
|
||||
return pPropHelper ? *pPropHelper : GetPropHelper_Impl();
|
||||
}
|
||||
|
Reference in New Issue
Block a user