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

#include <dicimp.hxx>

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

Public Member Functions

 DictionaryNeo (OUString aName, LanguageType nLang, css::linguistic2::DictionaryType eType, const OUString &rMainURL, bool bWriteable)
 
virtual ~DictionaryNeo () override
 
virtual OUString SAL_CALL getName () override
 
virtual void SAL_CALL setName (const OUString &aName) override
 
virtual css::linguistic2::DictionaryType SAL_CALL getDictionaryType () override
 
virtual void SAL_CALL setActive (sal_Bool bActivate) override
 
virtual sal_Bool SAL_CALL isActive () override
 
virtual sal_Int32 SAL_CALL getCount () override
 
virtual css::lang::Locale SAL_CALL getLocale () override
 
virtual void SAL_CALL setLocale (const css::lang::Locale &aLocale) override
 
virtual css::uno::Reference< css::linguistic2::XDictionaryEntry > SAL_CALL getEntry (const OUString &aWord) override
 
virtual sal_Bool SAL_CALL addEntry (const css::uno::Reference< css::linguistic2::XDictionaryEntry > &xDicEntry) override
 
virtual sal_Bool SAL_CALL add (const OUString &aWord, sal_Bool bIsNegative, const OUString &aRplcText) override
 
virtual sal_Bool SAL_CALL remove (const OUString &aWord) override
 
virtual sal_Bool SAL_CALL isFull () override
 
virtual css::uno::Sequence< css::uno::Reference< css::linguistic2::XDictionaryEntry > > SAL_CALL getEntries () override
 
virtual void SAL_CALL clear () override
 
virtual sal_Bool SAL_CALL addDictionaryEventListener (const css::uno::Reference< css::linguistic2::XDictionaryEventListener > &xListener) override
 
virtual sal_Bool SAL_CALL removeDictionaryEventListener (const css::uno::Reference< css::linguistic2::XDictionaryEventListener > &xListener) override
 
virtual sal_Bool SAL_CALL hasLocation () override
 
virtual OUString SAL_CALL getLocation () override
 
virtual sal_Bool SAL_CALL isReadonly () override
 
virtual void SAL_CALL store () override
 
virtual void SAL_CALL storeAsURL (const OUString &aURL, const css::uno::Sequence< css::beans::PropertyValue > &aArgs) override
 
virtual void SAL_CALL storeToURL (const OUString &aURL, const css::uno::Sequence< css::beans::PropertyValue > &aArgs) override
 

Private Member Functions

 DictionaryNeo (const DictionaryNeo &)=delete
 
DictionaryNeooperator= (const DictionaryNeo &)=delete
 
void launchEvent (sal_Int16 nEvent, const css::uno::Reference< css::linguistic2::XDictionaryEntry > &xEntry)
 
ErrCode loadEntries (const OUString &rMainURL)
 
ErrCode saveEntries (const OUString &rMainURL)
 
bool seekEntry (std::u16string_view rWord, sal_Int32 *pPos, bool bSimilarOnly=false)
 
bool isSorted ()
 
bool addEntry_Impl (const css::uno::Reference< css::linguistic2::XDictionaryEntry > &rDicEntry, bool bIsLoadEntries=false)
 

Static Private Member Functions

static int cmpDicEntry (std::u16string_view rWord1, std::u16string_view rWord2, bool bSimilarOnly=false)
 

Private Attributes

::comphelper::OInterfaceContainerHelper3< css::linguistic2::XDictionaryEventListener > aDicEvtListeners
 
std::vector< css::uno::Reference< css::linguistic2::XDictionaryEntry > > aEntries
 
OUString aDicName
 
OUString aMainURL
 
css::linguistic2::DictionaryType eDicType
 
LanguageType nLanguage
 
sal_Int16 nDicVersion
 
bool bNeedEntries
 
bool bIsModified
 
bool bIsActive
 
bool bIsReadonly
 

Detailed Description

Definition at line 36 of file dicimp.hxx.

Constructor & Destructor Documentation

◆ DictionaryNeo() [1/2]

DictionaryNeo::DictionaryNeo ( const DictionaryNeo )
privatedelete

◆ DictionaryNeo() [2/2]

DictionaryNeo::DictionaryNeo ( OUString  aName,
LanguageType  nLang,
css::linguistic2::DictionaryType  eType,
const OUString &  rMainURL,
bool  bWriteable 
)

◆ ~DictionaryNeo()

DictionaryNeo::~DictionaryNeo ( )
overridevirtual

Definition at line 258 of file dicimp.cxx.

Member Function Documentation

◆ add()

sal_Bool SAL_CALL DictionaryNeo::add ( const OUString &  aWord,
sal_Bool  bIsNegative,
const OUString &  aRplcText 
)
overridevirtual

Definition at line 863 of file dicimp.cxx.

References addEntry_Impl(), bIsReadonly, and linguistic::GetLinguMutex().

◆ addDictionaryEventListener()

sal_Bool SAL_CALL DictionaryNeo::addDictionaryEventListener ( const css::uno::Reference< css::linguistic2::XDictionaryEventListener > &  xListener)
overridevirtual

◆ addEntry()

sal_Bool SAL_CALL DictionaryNeo::addEntry ( const css::uno::Reference< css::linguistic2::XDictionaryEntry > &  xDicEntry)
overridevirtual

◆ addEntry_Impl()

bool DictionaryNeo::addEntry_Impl ( const css::uno::Reference< css::linguistic2::XDictionaryEntry > &  rDicEntry,
bool  bIsLoadEntries = false 
)
private

◆ clear()

void SAL_CALL DictionaryNeo::clear ( )
overridevirtual

◆ cmpDicEntry()

int DictionaryNeo::cmpDicEntry ( std::u16string_view  rWord1,
std::u16string_view  rWord2,
bool  bSimilarOnly = false 
)
staticprivate

Definition at line 503 of file dicimp.cxx.

Referenced by isSorted(), and seekEntry().

◆ getCount()

sal_Int32 SAL_CALL DictionaryNeo::getCount ( )
overridevirtual

Definition at line 801 of file dicimp.cxx.

References aEntries, aMainURL, bNeedEntries, linguistic::GetLinguMutex(), and loadEntries().

Referenced by isSorted(), and seekEntry().

◆ getDictionaryType()

DictionaryType SAL_CALL DictionaryNeo::getDictionaryType ( )
overridevirtual

Definition at line 757 of file dicimp.cxx.

References eDicType, and linguistic::GetLinguMutex().

◆ getEntries()

uno::Sequence< uno::Reference< XDictionaryEntry > > SAL_CALL DictionaryNeo::getEntries ( )
overridevirtual

◆ getEntry()

uno::Reference< XDictionaryEntry > SAL_CALL DictionaryNeo::getEntry ( const OUString &  aWord)
overridevirtual

◆ getLocale()

Locale SAL_CALL DictionaryNeo::getLocale ( )
overridevirtual

◆ getLocation()

OUString SAL_CALL DictionaryNeo::getLocation ( )
overridevirtual

Definition at line 985 of file dicimp.cxx.

References aMainURL, and linguistic::GetLinguMutex().

Referenced by storeAsURL().

◆ getName()

OUString SAL_CALL DictionaryNeo::getName ( )
overridevirtual

Definition at line 740 of file dicimp.cxx.

References aDicName, and linguistic::GetLinguMutex().

◆ hasLocation()

sal_Bool SAL_CALL DictionaryNeo::hasLocation ( )
overridevirtual

Definition at line 979 of file dicimp.cxx.

References aMainURL, and linguistic::GetLinguMutex().

Referenced by setActive(), and store().

◆ isActive()

sal_Bool SAL_CALL DictionaryNeo::isActive ( )
overridevirtual

Definition at line 795 of file dicimp.cxx.

References bIsActive, and linguistic::GetLinguMutex().

◆ isFull()

sal_Bool SAL_CALL DictionaryNeo::isFull ( )
overridevirtual

Definition at line 914 of file dicimp.cxx.

References aEntries, aMainURL, bNeedEntries, DIC_MAX_ENTRIES, linguistic::GetLinguMutex(), and loadEntries().

Referenced by addEntry_Impl().

◆ isReadonly()

sal_Bool SAL_CALL DictionaryNeo::isReadonly ( )
overridevirtual

Definition at line 991 of file dicimp.cxx.

References bIsReadonly, and linguistic::GetLinguMutex().

Referenced by setActive(), and store().

◆ isSorted()

bool DictionaryNeo::isSorted ( )
private

Definition at line 657 of file dicimp.cxx.

References aEntries, cmpDicEntry(), getCount(), and i.

Referenced by addEntry_Impl(), and loadEntries().

◆ launchEvent()

void DictionaryNeo::launchEvent ( sal_Int16  nEvent,
const css::uno::Reference< css::linguistic2::XDictionaryEntry > &  xEntry 
)
private

◆ loadEntries()

ErrCode DictionaryNeo::loadEntries ( const OUString &  rMainURL)
private

◆ operator=()

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

◆ remove()

sal_Bool SAL_CALL DictionaryNeo::remove ( const OUString &  aWord)
overridevirtual

◆ removeDictionaryEventListener()

sal_Bool SAL_CALL DictionaryNeo::removeDictionaryEventListener ( const css::uno::Reference< css::linguistic2::XDictionaryEventListener > &  xListener)
overridevirtual

◆ saveEntries()

ErrCode DictionaryNeo::saveEntries ( const OUString &  rMainURL)
private

◆ seekEntry()

bool DictionaryNeo::seekEntry ( std::u16string_view  rWord,
sal_Int32 *  pPos,
bool  bSimilarOnly = false 
)
private

Definition at line 613 of file dicimp.cxx.

References aEntries, cmpDicEntry(), DBG_ASSERT, getCount(), and linguistic::GetLinguMutex().

Referenced by addEntry_Impl(), getEntry(), and remove().

◆ setActive()

void SAL_CALL DictionaryNeo::setActive ( sal_Bool  bActivate)
overridevirtual

◆ setLocale()

void SAL_CALL DictionaryNeo::setLocale ( const css::lang::Locale &  aLocale)
overridevirtual

◆ setName()

void SAL_CALL DictionaryNeo::setName ( const OUString &  aName)
overridevirtual

Definition at line 746 of file dicimp.cxx.

References aDicName, aName, linguistic::GetLinguMutex(), and launchEvent().

◆ store()

void SAL_CALL DictionaryNeo::store ( )
overridevirtual

Definition at line 998 of file dicimp.cxx.

References aMainURL, bIsModified, linguistic::GetLinguMutex(), hasLocation(), isReadonly(), and saveEntries().

Referenced by setActive().

◆ storeAsURL()

void SAL_CALL DictionaryNeo::storeAsURL ( const OUString &  aURL,
const css::uno::Sequence< css::beans::PropertyValue > &  aArgs 
)
overridevirtual

◆ storeToURL()

void SAL_CALL DictionaryNeo::storeToURL ( const OUString &  aURL,
const css::uno::Sequence< css::beans::PropertyValue > &  aArgs 
)
overridevirtual

Definition at line 1023 of file dicimp.cxx.

References aURL, linguistic::GetLinguMutex(), and saveEntries().

Member Data Documentation

◆ aDicEvtListeners

::comphelper::OInterfaceContainerHelper3<css::linguistic2::XDictionaryEventListener> DictionaryNeo::aDicEvtListeners
private

◆ aDicName

OUString DictionaryNeo::aDicName
private

Definition at line 47 of file dicimp.hxx.

Referenced by getName(), loadEntries(), saveEntries(), and setName().

◆ aEntries

std::vector< css::uno::Reference< css::linguistic2::XDictionaryEntry > > DictionaryNeo::aEntries
private

◆ aMainURL

OUString DictionaryNeo::aMainURL
private

◆ bIsActive

bool DictionaryNeo::bIsActive
private

Definition at line 54 of file dicimp.hxx.

Referenced by isActive(), and setActive().

◆ bIsModified

bool DictionaryNeo::bIsModified
private

Definition at line 53 of file dicimp.hxx.

Referenced by addEntry_Impl(), clear(), loadEntries(), remove(), setActive(), setLocale(), store(), and storeAsURL().

◆ bIsReadonly

bool DictionaryNeo::bIsReadonly
private

Definition at line 55 of file dicimp.hxx.

Referenced by add(), addEntry(), addEntry_Impl(), clear(), isReadonly(), remove(), setLocale(), and storeAsURL().

◆ bNeedEntries

bool DictionaryNeo::bNeedEntries
private

◆ eDicType

css::linguistic2::DictionaryType DictionaryNeo::eDicType
private

Definition at line 49 of file dicimp.hxx.

Referenced by addEntry_Impl(), getDictionaryType(), loadEntries(), and saveEntries().

◆ nDicVersion

sal_Int16 DictionaryNeo::nDicVersion
private

Definition at line 51 of file dicimp.hxx.

Referenced by loadEntries(), and saveEntries().

◆ nLanguage

LanguageType DictionaryNeo::nLanguage
private

Definition at line 50 of file dicimp.hxx.

Referenced by addEntry_Impl(), getLocale(), loadEntries(), saveEntries(), and setLocale().


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