LibreOffice Module i18npool (master) 1
Classes | Public Member Functions | Static Public Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
i18npool::BreakIteratorImpl Class Reference

#include <breakiteratorImpl.hxx>

Inheritance diagram for i18npool::BreakIteratorImpl:
[legend]
Collaboration diagram for i18npool::BreakIteratorImpl:
[legend]

Classes

struct  lookupTableItem
 

Public Member Functions

 BreakIteratorImpl (const css::uno::Reference< css::uno::XComponentContext > &rxContext)
 
 BreakIteratorImpl ()
 
virtual ~BreakIteratorImpl () override
 
virtual sal_Int32 SAL_CALL nextCharacters (const OUString &Text, sal_Int32 nStartPos, const css::lang::Locale &rLocale, sal_Int16 nCharacterIteratorMode, sal_Int32 nCount, sal_Int32 &nDone) override
 
virtual sal_Int32 SAL_CALL previousCharacters (const OUString &Text, sal_Int32 nStartPos, const css::lang::Locale &nLocale, sal_Int16 nCharacterIteratorMode, sal_Int32 nCount, sal_Int32 &nDone) override
 
virtual css::i18n::Boundary SAL_CALL previousWord (const OUString &Text, sal_Int32 nStartPos, const css::lang::Locale &nLocale, sal_Int16 WordType) override
 
virtual css::i18n::Boundary SAL_CALL nextWord (const OUString &Text, sal_Int32 nStartPos, const css::lang::Locale &nLocale, sal_Int16 WordType) override
 
virtual css::i18n::Boundary SAL_CALL getWordBoundary (const OUString &Text, sal_Int32 nPos, const css::lang::Locale &nLocale, sal_Int16 WordType, sal_Bool bDirection) override
 
virtual sal_Bool SAL_CALL isBeginWord (const OUString &Text, sal_Int32 nPos, const css::lang::Locale &nLocale, sal_Int16 WordType) override
 
virtual sal_Bool SAL_CALL isEndWord (const OUString &Text, sal_Int32 nPos, const css::lang::Locale &nLocale, sal_Int16 WordType) override
 
virtual sal_Int16 SAL_CALL getWordType (const OUString &Text, sal_Int32 nPos, const css::lang::Locale &nLocale) override
 
virtual sal_Int32 SAL_CALL beginOfSentence (const OUString &Text, sal_Int32 nStartPos, const css::lang::Locale &nLocale) override
 
virtual sal_Int32 SAL_CALL endOfSentence (const OUString &Text, sal_Int32 nStartPos, const css::lang::Locale &nLocale) override
 
virtual css::i18n::LineBreakResults SAL_CALL getLineBreak (const OUString &Text, sal_Int32 nStartPos, const css::lang::Locale &nLocale, sal_Int32 nMinBreakPos, const css::i18n::LineBreakHyphenationOptions &hOptions, const css::i18n::LineBreakUserOptions &bOptions) override
 
virtual sal_Int16 SAL_CALL getScriptType (const OUString &Text, sal_Int32 nPos) override
 
virtual sal_Int32 SAL_CALL beginOfScript (const OUString &Text, sal_Int32 nStartPos, sal_Int16 ScriptType) override
 
virtual sal_Int32 SAL_CALL endOfScript (const OUString &Text, sal_Int32 nStartPos, sal_Int16 ScriptType) override
 
virtual sal_Int32 SAL_CALL previousScript (const OUString &Text, sal_Int32 nStartPos, sal_Int16 ScriptType) override
 
virtual sal_Int32 SAL_CALL nextScript (const OUString &Text, sal_Int32 nStartPos, sal_Int16 ScriptType) override
 
virtual sal_Int32 SAL_CALL beginOfCharBlock (const OUString &Text, sal_Int32 nStartPos, const css::lang::Locale &nLocale, sal_Int16 CharType) override
 
virtual sal_Int32 SAL_CALL endOfCharBlock (const OUString &Text, sal_Int32 nStartPos, const css::lang::Locale &nLocale, sal_Int16 CharType) override
 
virtual sal_Int32 SAL_CALL previousCharBlock (const OUString &Text, sal_Int32 nStartPos, const css::lang::Locale &nLocale, sal_Int16 CharType) override
 
virtual sal_Int32 SAL_CALL nextCharBlock (const OUString &Text, sal_Int32 nStartPos, const css::lang::Locale &nLocale, sal_Int16 CharType) 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
 

Static Public Member Functions

static sal_Int16 getScriptClass (sal_uInt32 currentChar)
 

Protected Attributes

css::i18n::Boundary result
 

Private Member Functions

bool createLocaleSpecificBreakIterator (const OUString &aLocaleName)
 
const css::uno::Reference< XBreakIterator > & getLocaleSpecificBreakIterator (const css::lang::Locale &rLocale)
 

Private Attributes

std::vector< lookupTableItemlookupTable
 
css::lang::Locale aLocale
 
css::uno::Reference< XBreakIterator > xBI
 
css::uno::Reference< css::uno::XComponentContext > m_xContext
 

Detailed Description

Definition at line 34 of file breakiteratorImpl.hxx.

Constructor & Destructor Documentation

◆ BreakIteratorImpl() [1/2]

i18npool::BreakIteratorImpl::BreakIteratorImpl ( const css::uno::Reference< css::uno::XComponentContext > &  rxContext)

◆ BreakIteratorImpl() [2/2]

i18npool::BreakIteratorImpl::BreakIteratorImpl ( )

Definition at line 44 of file breakiteratorImpl.cxx.

◆ ~BreakIteratorImpl()

i18npool::BreakIteratorImpl::~BreakIteratorImpl ( )
overridevirtual

Definition at line 48 of file breakiteratorImpl.cxx.

Member Function Documentation

◆ beginOfCharBlock()

sal_Int32 SAL_CALL i18npool::BreakIteratorImpl::beginOfCharBlock ( const OUString &  Text,
sal_Int32  nStartPos,
const css::lang::Locale &  nLocale,
sal_Int16  CharType 
)
overridevirtual

Definition at line 399 of file breakiteratorImpl.cxx.

References nPos, and Text.

◆ beginOfScript()

sal_Int32 SAL_CALL i18npool::BreakIteratorImpl::beginOfScript ( const OUString &  Text,
sal_Int32  nStartPos,
sal_Int16  ScriptType 
)
overridevirtual

Definition at line 319 of file breakiteratorImpl.cxx.

References ch, iterateCodePoints(), and Text.

◆ beginOfSentence()

sal_Int32 SAL_CALL i18npool::BreakIteratorImpl::beginOfSentence ( const OUString &  Text,
sal_Int32  nStartPos,
const css::lang::Locale &  nLocale 
)
overridevirtual

Reimplemented in i18npool::BreakIterator_Unicode.

Definition at line 260 of file breakiteratorImpl.cxx.

References LBI, and Text.

◆ createLocaleSpecificBreakIterator()

bool i18npool::BreakIteratorImpl::createLocaleSpecificBreakIterator ( const OUString &  aLocaleName)
private
Exceptions
css::uno::RuntimeException

Definition at line 573 of file breakiteratorImpl.cxx.

References Locale, and m_xContext.

◆ endOfCharBlock()

sal_Int32 SAL_CALL i18npool::BreakIteratorImpl::endOfCharBlock ( const OUString &  Text,
sal_Int32  nStartPos,
const css::lang::Locale &  nLocale,
sal_Int16  CharType 
)
overridevirtual

Definition at line 411 of file breakiteratorImpl.cxx.

References ch, iterateCodePoints(), and Text.

◆ endOfScript()

sal_Int32 SAL_CALL i18npool::BreakIteratorImpl::endOfScript ( const OUString &  Text,
sal_Int32  nStartPos,
sal_Int16  ScriptType 
)
overridevirtual

Definition at line 337 of file breakiteratorImpl.cxx.

References ch, iterateCodePoints(), and Text.

◆ endOfSentence()

sal_Int32 SAL_CALL i18npool::BreakIteratorImpl::endOfSentence ( const OUString &  Text,
sal_Int32  nStartPos,
const css::lang::Locale &  nLocale 
)
overridevirtual

Reimplemented in i18npool::BreakIterator_Unicode.

Definition at line 269 of file breakiteratorImpl.cxx.

References LBI, and Text.

◆ getImplementationName()

OUString SAL_CALL i18npool::BreakIteratorImpl::getImplementationName ( )
overridevirtual

Reimplemented in i18npool::BreakIterator_Unicode.

Definition at line 662 of file breakiteratorImpl.cxx.

◆ getLineBreak()

LineBreakResults SAL_CALL i18npool::BreakIteratorImpl::getLineBreak ( const OUString &  Text,
sal_Int32  nStartPos,
const css::lang::Locale &  nLocale,
sal_Int32  nMinBreakPos,
const css::i18n::LineBreakHyphenationOptions &  hOptions,
const css::i18n::LineBreakUserOptions &  bOptions 
)
overridevirtual

Reimplemented in i18npool::BreakIterator_CJK, i18npool::BreakIterator_th, and i18npool::BreakIterator_Unicode.

Definition at line 278 of file breakiteratorImpl.cxx.

References LBI, and Text.

◆ getLocaleSpecificBreakIterator()

const Reference< XBreakIterator > & i18npool::BreakIteratorImpl::getLocaleSpecificBreakIterator ( const css::lang::Locale &  rLocale)
private
Exceptions
css::uno::RuntimeException

Definition at line 614 of file breakiteratorImpl.cxx.

References m_xContext, u, and v.

◆ getScriptClass()

sal_Int16 i18npool::BreakIteratorImpl::getScriptClass ( sal_uInt32  currentChar)
static

Definition at line 557 of file breakiteratorImpl.cxx.

Referenced by i18npool::xdictionary::exists().

◆ getScriptType()

sal_Int16 SAL_CALL i18npool::BreakIteratorImpl::getScriptType ( const OUString &  Text,
sal_Int32  nPos 
)
overridevirtual

◆ getSupportedServiceNames()

Sequence< OUString > SAL_CALL i18npool::BreakIteratorImpl::getSupportedServiceNames ( )
overridevirtual

Reimplemented in i18npool::BreakIterator_Unicode.

Definition at line 674 of file breakiteratorImpl.cxx.

◆ getWordBoundary()

Boundary SAL_CALL i18npool::BreakIteratorImpl::getWordBoundary ( const OUString &  Text,
sal_Int32  nPos,
const css::lang::Locale &  nLocale,
sal_Int16  WordType,
sal_Bool  bDirection 
)
overridevirtual

Reimplemented in i18npool::BreakIterator_CJK, and i18npool::BreakIterator_Unicode.

Definition at line 195 of file breakiteratorImpl.cxx.

References LBI, nPos, result, i18npool::skipSpace(), and Text.

◆ getWordType()

sal_Int16 SAL_CALL i18npool::BreakIteratorImpl::getWordType ( const OUString &  Text,
sal_Int32  nPos,
const css::lang::Locale &  nLocale 
)
overridevirtual

Definition at line 463 of file breakiteratorImpl.cxx.

◆ isBeginWord()

sal_Bool SAL_CALL i18npool::BreakIteratorImpl::isBeginWord ( const OUString &  Text,
sal_Int32  nPos,
const css::lang::Locale &  nLocale,
sal_Int16  WordType 
)
overridevirtual

Definition at line 228 of file breakiteratorImpl.cxx.

References nPos, result, i18npool::skipSpace(), and Text.

◆ isEndWord()

sal_Bool SAL_CALL i18npool::BreakIteratorImpl::isEndWord ( const OUString &  Text,
sal_Int32  nPos,
const css::lang::Locale &  nLocale,
sal_Int16  WordType 
)
overridevirtual

Definition at line 244 of file breakiteratorImpl.cxx.

References nPos, result, i18npool::skipSpace(), and Text.

◆ nextCharacters()

sal_Int32 SAL_CALL i18npool::BreakIteratorImpl::nextCharacters ( const OUString &  Text,
sal_Int32  nStartPos,
const css::lang::Locale &  rLocale,
sal_Int16  nCharacterIteratorMode,
sal_Int32  nCount,
sal_Int32 &  nDone 
)
overridevirtual

Reimplemented in i18npool::BreakIterator_Unicode, and i18npool::BreakIterator_th.

Definition at line 54 of file breakiteratorImpl.cxx.

References LBI, nCount, and Text.

◆ nextCharBlock()

sal_Int32 SAL_CALL i18npool::BreakIteratorImpl::nextCharBlock ( const OUString &  Text,
sal_Int32  nStartPos,
const css::lang::Locale &  nLocale,
sal_Int16  CharType 
)
overridevirtual

Definition at line 425 of file breakiteratorImpl.cxx.

References ch, iterateCodePoints(), and Text.

◆ nextScript()

sal_Int32 SAL_CALL i18npool::BreakIteratorImpl::nextScript ( const OUString &  Text,
sal_Int32  nStartPos,
sal_Int16  ScriptType 
)
overridevirtual

Definition at line 377 of file breakiteratorImpl.cxx.

References ch, iterateCodePoints(), and Text.

◆ nextWord()

Boundary SAL_CALL i18npool::BreakIteratorImpl::nextWord ( const OUString &  Text,
sal_Int32  nStartPos,
const css::lang::Locale &  nLocale,
sal_Int16  WordType 
)
overridevirtual

Reimplemented in i18npool::BreakIterator_CJK, and i18npool::BreakIterator_Unicode.

Definition at line 139 of file breakiteratorImpl.cxx.

References LBI, result, i18npool::skipSpace(), and Text.

◆ previousCharacters()

sal_Int32 SAL_CALL i18npool::BreakIteratorImpl::previousCharacters ( const OUString &  Text,
sal_Int32  nStartPos,
const css::lang::Locale &  nLocale,
sal_Int16  nCharacterIteratorMode,
sal_Int32  nCount,
sal_Int32 &  nDone 
)
overridevirtual

Reimplemented in i18npool::BreakIterator_Unicode, and i18npool::BreakIterator_th.

Definition at line 64 of file breakiteratorImpl.cxx.

References LBI, nCount, and Text.

◆ previousCharBlock()

sal_Int32 SAL_CALL i18npool::BreakIteratorImpl::previousCharBlock ( const OUString &  Text,
sal_Int32  nStartPos,
const css::lang::Locale &  nLocale,
sal_Int16  CharType 
)
overridevirtual

Definition at line 442 of file breakiteratorImpl.cxx.

References ch, iterateCodePoints(), and Text.

◆ previousScript()

sal_Int32 SAL_CALL i18npool::BreakIteratorImpl::previousScript ( const OUString &  Text,
sal_Int32  nStartPos,
sal_Int16  ScriptType 
)
overridevirtual

Definition at line 356 of file breakiteratorImpl.cxx.

References ch, iterateCodePoints(), and Text.

◆ previousWord()

Boundary SAL_CALL i18npool::BreakIteratorImpl::previousWord ( const OUString &  Text,
sal_Int32  nStartPos,
const css::lang::Locale &  nLocale,
sal_Int16  WordType 
)
overridevirtual

◆ supportsService()

sal_Bool SAL_CALL i18npool::BreakIteratorImpl::supportsService ( const OUString &  ServiceName)
overridevirtual

Reimplemented in i18npool::BreakIterator_Unicode.

Definition at line 668 of file breakiteratorImpl.cxx.

References cppu::supportsService().

Member Data Documentation

◆ aLocale

css::lang::Locale i18npool::BreakIteratorImpl::aLocale
private

Definition at line 112 of file breakiteratorImpl.hxx.

◆ lookupTable

std::vector<lookupTableItem> i18npool::BreakIteratorImpl::lookupTable
private

Definition at line 111 of file breakiteratorImpl.hxx.

◆ m_xContext

css::uno::Reference< css::uno::XComponentContext > i18npool::BreakIteratorImpl::m_xContext
private

Definition at line 114 of file breakiteratorImpl.hxx.

◆ result

css::i18n::Boundary i18npool::BreakIteratorImpl::result
protected

◆ xBI

css::uno::Reference< XBreakIterator > i18npool::BreakIteratorImpl::xBI
private

Definition at line 113 of file breakiteratorImpl.hxx.


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