LibreOffice Module lingucomponent (master) 1
Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
Hyphenator Class Reference

#include <hyphenimp.hxx>

Inheritance diagram for Hyphenator:
[legend]
Collaboration diagram for Hyphenator:
[legend]

Public Member Functions

 Hyphenator ()
 
virtual ~Hyphenator () override
 
virtual Sequence< Locale > SAL_CALL getLocales () override
 
virtual sal_Bool SAL_CALL hasLocale (const Locale &rLocale) override
 
virtual css::uno::Reference< css::linguistic2::XHyphenatedWord > SAL_CALL hyphenate (const OUString &aWord, const css::lang::Locale &aLocale, sal_Int16 nMaxLeading, const css::uno::Sequence< css::beans::PropertyValue > &aProperties) override
 
virtual css::uno::Reference< css::linguistic2::XHyphenatedWord > SAL_CALL queryAlternativeSpelling (const OUString &aWord, const css::lang::Locale &aLocale, sal_Int16 nIndex, const css::uno::Sequence< css::beans::PropertyValue > &aProperties) override
 
virtual css::uno::Reference< css::linguistic2::XPossibleHyphens > SAL_CALL createPossibleHyphens (const OUString &aWord, const css::lang::Locale &aLocale, const css::uno::Sequence< css::beans::PropertyValue > &aProperties) override
 
virtual sal_Bool SAL_CALL addLinguServiceEventListener (const Reference< XLinguServiceEventListener > &rxLstnr) override
 
virtual sal_Bool SAL_CALL removeLinguServiceEventListener (const Reference< XLinguServiceEventListener > &rxLstnr) override
 
virtual OUString SAL_CALL getServiceDisplayName (const Locale &rLocale) override
 
virtual void SAL_CALL initialize (const Sequence< Any > &rArguments) override
 
virtual void SAL_CALL dispose () override
 
virtual void SAL_CALL addEventListener (const Reference< XEventListener > &rxListener) override
 
virtual void SAL_CALL removeEventListener (const Reference< XEventListener > &rxListener) override
 
virtual OUString SAL_CALL getImplementationName () override
 
virtual sal_Bool SAL_CALL supportsService (const OUString &rServiceName) override
 
virtual Sequence< OUString > SAL_CALL getSupportedServiceNames () override
 

Private Member Functions

 Hyphenator (const Hyphenator &)=delete
 
Hyphenatoroperator= (const Hyphenator &)=delete
 
linguistic::PropertyHelper_Hyphenation & GetPropHelper_Impl ()
 
linguistic::PropertyHelper_Hyphenation & GetPropHelper ()
 

Static Private Member Functions

static OUString makeLowerCase (const OUString &, CharClass const *)
 
static OUString makeUpperCase (const OUString &, CharClass const *)
 
static OUString makeInitCap (const OUString &, CharClass const *)
 

Private Attributes

Sequence< LocaleaSuppLocales
 
std::vector< HDInfomvDicts
 
::comphelper::OInterfaceContainerHelper3< XEventListener > aEvtListeners
 
std::unique_ptr< linguistic::PropertyHelper_Hyphenation > pPropHelper
 
bool bDisposing
 

Detailed Description

Definition at line 57 of file hyphenimp.hxx.

Constructor & Destructor Documentation

◆ Hyphenator() [1/2]

Hyphenator::Hyphenator ( const Hyphenator )
privatedelete

◆ Hyphenator() [2/2]

Hyphenator::Hyphenator ( )

Definition at line 66 of file hyphenimp.cxx.

References bDisposing, and GetLinguMutex().

◆ ~Hyphenator()

Hyphenator::~Hyphenator ( )
overridevirtual

Definition at line 72 of file hyphenimp.cxx.

References mvDicts, and pPropHelper.

Member Function Documentation

◆ addEventListener()

void SAL_CALL Hyphenator::addEventListener ( const Reference< XEventListener > &  rxListener)
overridevirtual

◆ addLinguServiceEventListener()

sal_Bool SAL_CALL Hyphenator::addLinguServiceEventListener ( const Reference< XLinguServiceEventListener > &  rxLstnr)
overridevirtual

Definition at line 690 of file hyphenimp.cxx.

References bDisposing, GetLinguMutex(), and GetPropHelper().

◆ createPossibleHyphens()

Reference< XPossibleHyphens > SAL_CALL Hyphenator::createPossibleHyphens ( const OUString &  aWord,
const css::lang::Locale &  aLocale,
const css::uno::Sequence< css::beans::PropertyValue > &  aProperties 
)
overridevirtual

◆ dispose()

void SAL_CALL Hyphenator::dispose ( void  )
overridevirtual

◆ getImplementationName()

OUString SAL_CALL Hyphenator::getImplementationName ( )
overridevirtual

Definition at line 782 of file hyphenimp.cxx.

◆ getLocales()

Sequence< Locale > SAL_CALL Hyphenator::getLocales ( )
overridevirtual

! for compatibility with old dictionaries (the ones not using extensions ! or new configuration entries, but still using the dictionary.lst file) ! Get the list of old style spell checking dictionaries to use...

For each dictionary and each locale we need a separate entry. If this results in more than one dictionary per locale than (for now) it is undefined which dictionary gets used. In the future the implementation should support using several dictionaries for one locale.

Definition at line 98 of file hyphenimp.cxx.

References SvtLinguConfigDictionaryEntry::aLocaleNames, SvtLinguConfigDictionaryEntry::aLocations, aSuppLocales, comphelper::containerToSequence(), DBG_ASSERT, SvtLinguConfig::GetActiveDictionariesByFormat(), GetLinguMutex(), LanguageTag::getLocale(), GetOldStyleDics(), SvtLinguConfig::GetSupportedDictionaryFormatsFor(), MergeNewStyleDicsAndOldStyleDics(), mvDicts, and nPos.

Referenced by hasLocale().

◆ GetPropHelper()

linguistic::PropertyHelper_Hyphenation & Hyphenator::GetPropHelper ( )
inlineprivate

◆ GetPropHelper_Impl()

PropertyHelper_Hyphenation & Hyphenator::GetPropHelper_Impl ( )
private

after a reference is established

Definition at line 86 of file hyphenimp.cxx.

References GetLinguProperties(), and pPropHelper.

Referenced by GetPropHelper().

◆ getServiceDisplayName()

OUString SAL_CALL Hyphenator::getServiceDisplayName ( const Locale rLocale)
overridevirtual

Definition at line 716 of file hyphenimp.cxx.

References Translate::Create(), and Translate::get().

◆ getSupportedServiceNames()

Sequence< OUString > SAL_CALL Hyphenator::getSupportedServiceNames ( )
overridevirtual

Definition at line 792 of file hyphenimp.cxx.

References SN_HYPHENATOR.

◆ hasLocale()

sal_Bool SAL_CALL Hyphenator::hasLocale ( const Locale rLocale)
overridevirtual

Definition at line 206 of file hyphenimp.cxx.

References aSuppLocales, comphelper::findValue(), GetLinguMutex(), and getLocales().

◆ hyphenate()

Reference< XHyphenatedWord > SAL_CALL Hyphenator::hyphenate ( const OUString &  aWord,
const css::lang::Locale &  aLocale,
sal_Int16  nMaxLeading,
const css::uno::Sequence< css::beans::PropertyValue > &  aProperties 
)
overridevirtual

◆ initialize()

void SAL_CALL Hyphenator::initialize ( const Sequence< Any > &  rArguments)
overridevirtual

Pointer allows for access of the non-UNO functions. And the reference to the UNO-functions while increasing the ref-count and will implicitly free the memory when the object is no longer used.

after a reference is established

Definition at line 722 of file hyphenimp.cxx.

References GetLinguMutex(), and pPropHelper.

◆ makeInitCap()

OUString Hyphenator::makeInitCap ( const OUString &  aTerm,
CharClass const *  pCC 
)
staticprivate

Definition at line 676 of file hyphenimp.cxx.

References CharClass::lowercase(), and CharClass::uppercase().

Referenced by hyphenate().

◆ makeLowerCase()

OUString Hyphenator::makeLowerCase ( const OUString &  aTerm,
CharClass const *  pCC 
)
staticprivate

Definition at line 662 of file hyphenimp.cxx.

References CharClass::lowercase().

Referenced by createPossibleHyphens(), and hyphenate().

◆ makeUpperCase()

OUString Hyphenator::makeUpperCase ( const OUString &  aTerm,
CharClass const *  pCC 
)
staticprivate

Definition at line 669 of file hyphenimp.cxx.

References CharClass::uppercase().

Referenced by hyphenate().

◆ operator=()

Hyphenator & Hyphenator::operator= ( const Hyphenator )
privatedelete

◆ queryAlternativeSpelling()

Reference< XHyphenatedWord > SAL_CALL Hyphenator::queryAlternativeSpelling ( const OUString &  aWord,
const css::lang::Locale &  aLocale,
sal_Int16  nIndex,
const css::uno::Sequence< css::beans::PropertyValue > &  aProperties 
)
overridevirtual

Definition at line 475 of file hyphenimp.cxx.

References aProperties, hyphenate(), and nIndex.

◆ removeEventListener()

void SAL_CALL Hyphenator::removeEventListener ( const Reference< XEventListener > &  rxListener)
overridevirtual

◆ removeLinguServiceEventListener()

sal_Bool SAL_CALL Hyphenator::removeLinguServiceEventListener ( const Reference< XLinguServiceEventListener > &  rxLstnr)
overridevirtual

Definition at line 703 of file hyphenimp.cxx.

References bDisposing, GetLinguMutex(), and GetPropHelper().

◆ supportsService()

sal_Bool SAL_CALL Hyphenator::supportsService ( const OUString &  rServiceName)
overridevirtual

Definition at line 787 of file hyphenimp.cxx.

References ServiceName, and cppu::supportsService().

Member Data Documentation

◆ aEvtListeners

::comphelper::OInterfaceContainerHelper3<XEventListener> Hyphenator::aEvtListeners
private

Definition at line 71 of file hyphenimp.hxx.

Referenced by addEventListener(), dispose(), and removeEventListener().

◆ aSuppLocales

Sequence< Locale > Hyphenator::aSuppLocales
private

Definition at line 68 of file hyphenimp.hxx.

Referenced by getLocales(), and hasLocale().

◆ bDisposing

bool Hyphenator::bDisposing
private

◆ mvDicts

std::vector< HDInfo > Hyphenator::mvDicts
private

Definition at line 69 of file hyphenimp.hxx.

Referenced by createPossibleHyphens(), getLocales(), hyphenate(), and ~Hyphenator().

◆ pPropHelper

std::unique_ptr<linguistic::PropertyHelper_Hyphenation> Hyphenator::pPropHelper
private

Definition at line 72 of file hyphenimp.hxx.

Referenced by dispose(), GetPropHelper(), GetPropHelper_Impl(), initialize(), and ~Hyphenator().


The documentation for this class was generated from the following files: