LibreOffice Module linguistic (master) 1
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Friends | List of all members
ConvDic Class Reference

#include <convdic.hxx>

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

Public Member Functions

 ConvDic (OUString aName, LanguageType nLanguage, sal_Int16 nConversionType, bool bBiDirectional, const OUString &rMainURL)
 
virtual ~ConvDic () override
 
virtual OUString SAL_CALL getName () override
 
virtual css::lang::Locale SAL_CALL getLocale () override
 
virtual sal_Int16 SAL_CALL getConversionType () override
 
virtual void SAL_CALL setActive (sal_Bool bActivate) override
 
virtual sal_Bool SAL_CALL isActive () override
 
virtual void SAL_CALL clear () override
 
virtual css::uno::Sequence< OUString > SAL_CALL getConversions (const OUString &aText, sal_Int32 nStartPos, sal_Int32 nLength, css::linguistic2::ConversionDirection eDirection, sal_Int32 nTextConversionOptions) override
 
virtual css::uno::Sequence< OUString > SAL_CALL getConversionEntries (css::linguistic2::ConversionDirection eDirection) override
 
virtual void SAL_CALL addEntry (const OUString &aLeftText, const OUString &aRightText) override
 
virtual void SAL_CALL removeEntry (const OUString &aLeftText, const OUString &aRightText) override
 
virtual sal_Int16 SAL_CALL getMaxCharCount (css::linguistic2::ConversionDirection eDirection) override
 
virtual void SAL_CALL setPropertyType (const OUString &aLeftText, const OUString &aRightText, ::sal_Int16 nPropertyType) override
 
virtual ::sal_Int16 SAL_CALL getPropertyType (const OUString &aLeftText, const OUString &aRightText) override
 
virtual void SAL_CALL flush () override
 
virtual void SAL_CALL addFlushListener (const css::uno::Reference< css::util::XFlushListener > &l) override
 
virtual void SAL_CALL removeFlushListener (const css::uno::Reference< css::util::XFlushListener > &l) override
 
virtual OUString SAL_CALL getImplementationName () override
 
virtual sal_Bool SAL_CALL supportsService (const OUString &ServiceName) override
 
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames () override
 
bool HasEntry (const OUString &rLeftText, std::u16string_view rRightText)
 
void AddEntry (const OUString &rLeftText, const OUString &rRightText)
 
void RemoveEntry (const OUString &rLeftText, const OUString &rRightText)
 

Protected Member Functions

 ConvDic (const ConvDic &)
 
ConvDicoperator= (const ConvDic &)
 
void Load ()
 
void Save ()
 

Static Protected Member Functions

static ConvMap::iterator GetEntry (ConvMap &rMap, const OUString &rFirstText, std::u16string_view rSecondText)
 

Protected Attributes

::comphelper::OInterfaceContainerHelper3< css::util::XFlushListener > aFlushListeners
 
ConvMap aFromLeft
 
std::unique_ptr< ConvMappFromRight
 
std::unique_ptr< PropTypeMappConvPropType
 
OUString aMainURL
 
OUString aName
 
LanguageType nLanguage
 
sal_Int16 nConversionType
 
sal_Int16 nMaxLeftCharCount
 
sal_Int16 nMaxRightCharCount
 
bool bMaxCharCountIsValid
 
bool bNeedEntries
 
bool bIsModified
 
bool bIsActive
 

Friends

class ConvDicXMLExport
 

Detailed Description

Definition at line 44 of file convdic.hxx.

Constructor & Destructor Documentation

◆ ConvDic() [1/2]

ConvDic::ConvDic ( const ConvDic )
protected

◆ ConvDic() [2/2]

ConvDic::ConvDic ( OUString  aName,
LanguageType  nLanguage,
sal_Int16  nConversionType,
bool  bBiDirectional,
const OUString &  rMainURL 
)

create physical representation of an empty dictionary that could be found by the dictionary-list implementation

Definition at line 145 of file convdic.cxx.

References aName, bNeedEntries, linguistic::IsReadOnly(), LANGUAGE_CHINESE_SIMPLIFIED, LANGUAGE_CHINESE_TRADITIONAL, pConvPropType, pFromRight, and Save().

◆ ~ConvDic()

ConvDic::~ConvDic ( )
overridevirtual

Definition at line 186 of file convdic.cxx.

Member Function Documentation

◆ addEntry()

void SAL_CALL ConvDic::addEntry ( const OUString &  aLeftText,
const OUString &  aRightText 
)
overridevirtual

Reimplemented in HHConvDic.

Definition at line 426 of file convdic.cxx.

References AddEntry(), bNeedEntries, linguistic::GetLinguMutex(), HasEntry(), and Load().

Referenced by HHConvDic::addEntry().

◆ AddEntry()

void ConvDic::AddEntry ( const OUString &  rLeftText,
const OUString &  rRightText 
)

◆ addFlushListener()

void SAL_CALL ConvDic::addFlushListener ( const css::uno::Reference< css::util::XFlushListener > &  l)
overridevirtual

◆ clear()

void SAL_CALL ConvDic::clear ( )
overridevirtual

◆ flush()

void SAL_CALL ConvDic::flush ( )
overridevirtual

◆ getConversionEntries()

uno::Sequence< OUString > SAL_CALL ConvDic::getConversionEntries ( css::linguistic2::ConversionDirection  eDirection)
overridevirtual

◆ getConversions()

uno::Sequence< OUString > SAL_CALL ConvDic::getConversions ( const OUString &  aText,
sal_Int32  nStartPos,
sal_Int32  nLength,
css::linguistic2::ConversionDirection  eDirection,
sal_Int32  nTextConversionOptions 
)
overridevirtual

◆ getConversionType()

sal_Int16 SAL_CALL ConvDic::getConversionType ( )
overridevirtual

Definition at line 329 of file convdic.cxx.

References linguistic::GetLinguMutex(), and nConversionType.

◆ GetEntry()

ConvMap::iterator ConvDic::GetEntry ( ConvMap rMap,
const OUString &  rFirstText,
std::u16string_view  rSecondText 
)
staticprotected

Definition at line 247 of file convdic.cxx.

Referenced by HasEntry(), and RemoveEntry().

◆ getImplementationName()

OUString SAL_CALL ConvDic::getImplementationName ( )
overridevirtual

Reimplemented in HHConvDic.

Definition at line 567 of file convdic.cxx.

◆ getLocale()

Locale SAL_CALL ConvDic::getLocale ( )
overridevirtual

◆ getMaxCharCount()

sal_Int16 SAL_CALL ConvDic::getMaxCharCount ( css::linguistic2::ConversionDirection  eDirection)
overridevirtual

◆ getName()

OUString SAL_CALL ConvDic::getName ( )
overridevirtual

Definition at line 315 of file convdic.cxx.

References aName, and linguistic::GetLinguMutex().

◆ getPropertyType()

sal_Int16 SAL_CALL ConvDic::getPropertyType ( const OUString &  aLeftText,
const OUString &  aRightText 
)
override

Definition at line 512 of file convdic.cxx.

References HasEntry(), and pConvPropType.

◆ getSupportedServiceNames()

uno::Sequence< OUString > SAL_CALL ConvDic::getSupportedServiceNames ( )
overridevirtual

Reimplemented in HHConvDic.

Definition at line 577 of file convdic.cxx.

References SN_CONV_DICTIONARY.

◆ HasEntry()

bool ConvDic::HasEntry ( const OUString &  rLeftText,
std::u16string_view  rRightText 
)

Definition at line 263 of file convdic.cxx.

References aFromLeft, bNeedEntries, GetEntry(), and Load().

Referenced by addEntry(), AddEntry(), getPropertyType(), removeEntry(), and setPropertyType().

◆ isActive()

sal_Bool SAL_CALL ConvDic::isActive ( )
overridevirtual

Definition at line 343 of file convdic.cxx.

References bIsActive, and linguistic::GetLinguMutex().

◆ Load()

void ConvDic::Load ( )
protected

! prevent function from being called recursively via HasEntry, AddEntry

Definition at line 191 of file convdic.cxx.

References aMainURL, bIsModified, bNeedEntries, DBG_ASSERT, and ReadThroughDic().

Referenced by addEntry(), AddEntry(), getConversionEntries(), getConversions(), getMaxCharCount(), HasEntry(), removeEntry(), and RemoveEntry().

◆ operator=()

ConvDic & ConvDic::operator= ( const ConvDic )
protected

◆ removeEntry()

void SAL_CALL ConvDic::removeEntry ( const OUString &  aLeftText,
const OUString &  aRightText 
)
overridevirtual

Definition at line 439 of file convdic.cxx.

References bNeedEntries, linguistic::GetLinguMutex(), HasEntry(), Load(), and RemoveEntry().

◆ RemoveEntry()

void ConvDic::RemoveEntry ( const OUString &  rLeftText,
const OUString &  rRightText 
)

Definition at line 294 of file convdic.cxx.

References aFromLeft, bIsModified, bMaxCharCountIsValid, bNeedEntries, DBG_ASSERT, GetEntry(), Load(), and pFromRight.

Referenced by removeEntry().

◆ removeFlushListener()

void SAL_CALL ConvDic::removeFlushListener ( const css::uno::Reference< css::util::XFlushListener > &  l)
overridevirtual

◆ Save()

void ConvDic::Save ( )
protected

◆ setActive()

void SAL_CALL ConvDic::setActive ( sal_Bool  bActivate)
overridevirtual

Definition at line 336 of file convdic.cxx.

References bIsActive, and linguistic::GetLinguMutex().

◆ setPropertyType()

void SAL_CALL ConvDic::setPropertyType ( const OUString &  aLeftText,
const OUString &  aRightText,
::sal_Int16  nPropertyType 
)
overridevirtual

Definition at line 495 of file convdic.cxx.

References bIsModified, HasEntry(), and pConvPropType.

◆ supportsService()

sal_Bool SAL_CALL ConvDic::supportsService ( const OUString &  ServiceName)
overridevirtual

Reimplemented in HHConvDic.

Definition at line 572 of file convdic.cxx.

References cppu::supportsService().

Friends And Related Function Documentation

◆ ConvDicXMLExport

friend class ConvDicXMLExport
friend

Definition at line 53 of file convdic.hxx.

Referenced by Save().

Member Data Documentation

◆ aFlushListeners

::comphelper::OInterfaceContainerHelper3<css::util::XFlushListener> ConvDic::aFlushListeners
protected

Definition at line 57 of file convdic.hxx.

Referenced by addFlushListener(), flush(), and removeFlushListener().

◆ aFromLeft

ConvMap ConvDic::aFromLeft
protected

◆ aMainURL

OUString ConvDic::aMainURL
protected

Definition at line 64 of file convdic.hxx.

Referenced by Load(), and Save().

◆ aName

OUString ConvDic::aName
protected

Definition at line 65 of file convdic.hxx.

Referenced by getName().

◆ bIsActive

bool ConvDic::bIsActive
protected

Definition at line 73 of file convdic.hxx.

Referenced by isActive(), and setActive().

◆ bIsModified

bool ConvDic::bIsModified
protected

Definition at line 72 of file convdic.hxx.

Referenced by AddEntry(), clear(), flush(), Load(), RemoveEntry(), Save(), and setPropertyType().

◆ bMaxCharCountIsValid

bool ConvDic::bMaxCharCountIsValid
protected

Definition at line 70 of file convdic.hxx.

Referenced by AddEntry(), clear(), getMaxCharCount(), and RemoveEntry().

◆ bNeedEntries

bool ConvDic::bNeedEntries
protected

◆ nConversionType

sal_Int16 ConvDic::nConversionType
protected

Definition at line 67 of file convdic.hxx.

Referenced by ConvDicXMLExport::exportDoc(), and getConversionType().

◆ nLanguage

LanguageType ConvDic::nLanguage
protected

Definition at line 66 of file convdic.hxx.

Referenced by ConvDicXMLExport::exportDoc(), and getLocale().

◆ nMaxLeftCharCount

sal_Int16 ConvDic::nMaxLeftCharCount
protected

Definition at line 68 of file convdic.hxx.

Referenced by AddEntry(), clear(), and getMaxCharCount().

◆ nMaxRightCharCount

sal_Int16 ConvDic::nMaxRightCharCount
protected

Definition at line 69 of file convdic.hxx.

Referenced by AddEntry(), clear(), and getMaxCharCount().

◆ pConvPropType

std::unique_ptr< PropTypeMap > ConvDic::pConvPropType
protected

◆ pFromRight

std::unique_ptr< ConvMap > ConvDic::pFromRight
protected

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