LibreOffice Module sw (master)  1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
SwAutoCorrect Class Referencefinal

#include <swacorr.hxx>

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

Public Member Functions

 SwAutoCorrect (const SvxAutoCorrect &rACorr)
 
virtual ~SwAutoCorrect () override
 
- Public Member Functions inherited from SvxAutoCorrect
sal_Unicode GetQuote (sal_Unicode cInsChar, bool bSttQuote, LanguageType eLang) const
 
 SvxAutoCorrect (const OUString &rShareAutocorrFile, const OUString &rUserAutocorrFile)
 
 SvxAutoCorrect (const SvxAutoCorrect &)
 
virtual ~SvxAutoCorrect ()
 
void DoAutoCorrect (SvxAutoCorrDoc &rDoc, const OUString &rTxt, sal_Int32 nPos, sal_Unicode cInsChar, bool bInsert, bool &io_bNbspRunNext, vcl::Window const *pFrameWin=nullptr)
 
OUString GetPrevAutoCorrWord (SvxAutoCorrDoc const &rDoc, const OUString &rTxt, sal_Int32 nPos)
 
const SvxAutocorrWordSearchWordsInList (const OUString &rTxt, sal_Int32 &rStt, sal_Int32 nEndPos, SvxAutoCorrDoc &rDoc, LanguageTag &rLang)
 
sal_Unicode GetStartSingleQuote () const
 
sal_Unicode GetEndSingleQuote () const
 
sal_Unicode GetStartDoubleQuote () const
 
sal_Unicode GetEndDoubleQuote () const
 
void SetStartSingleQuote (const sal_Unicode cStart)
 
void SetEndSingleQuote (const sal_Unicode cEnd)
 
void SetStartDoubleQuote (const sal_Unicode cStart)
 
void SetEndDoubleQuote (const sal_Unicode cEnd)
 
OUString GetQuote (SvxAutoCorrDoc const &rDoc, sal_Int32 nInsPos, sal_Unicode cInsChar, bool bSttQuote)
 
void InsertQuote (SvxAutoCorrDoc &rDoc, sal_Int32 nInsPos, sal_Unicode cInsChar, bool bSttQuote, bool bIns, bool b_iApostrophe) const
 
OUString GetAutoCorrFileName (const LanguageTag &rLanguageTag, bool bNewFile=false, bool bTstUserExist=false, bool bUnlocalized=false) const
 
ACFlags GetFlags () const
 
SvxSwAutoFormatFlagsGetSwFlags ()
 
const SvxSwAutoFormatFlagsGetSwFlags () const
 
bool IsAutoCorrFlag (ACFlags nFlag) const
 
void SetAutoCorrFlag (ACFlags nFlag, bool bOn=true)
 
SvxAutocorrWordListLoadAutocorrWordList (LanguageType eLang)
 
bool PutText (const OUString &rShort, const OUString &rLong, LanguageType eLang)
 
void PutText (const OUString &rShort, SfxObjectShell &rShell, LanguageType eLang)
 
void MakeCombinedChanges (std::vector< SvxAutocorrWord > &aNewEntries, std::vector< SvxAutocorrWord > &aDeleteEntries, LanguageType eLang)
 
void SaveCplSttExceptList (LanguageType eLang)
 
SvStringsISortDtorLoadCplSttExceptList (LanguageType eLang)
 
const SvStringsISortDtorGetCplSttExceptList (LanguageType eLang)
 
bool AddCplSttException (const OUString &rNew, LanguageType eLang)
 
void SaveWrdSttExceptList (LanguageType eLang)
 
SvStringsISortDtorLoadWrdSttExceptList (LanguageType eLang)
 
const SvStringsISortDtorGetWrdSttExceptList (LanguageType eLang)
 
bool AddWrtSttException (const OUString &rNew, LanguageType eLang)
 
bool FindInWrdSttExceptList (LanguageType eLang, const OUString &sWord)
 
bool FindInCplSttExceptList (LanguageType eLang, const OUString &sWord, bool bAbbreviation=false)
 
void FnCapitalStartWord (SvxAutoCorrDoc &, const OUString &, sal_Int32 nSttPos, sal_Int32 nEndPos, LanguageType eLang)
 
bool FnChgOrdinalNumber (SvxAutoCorrDoc &, const OUString &, sal_Int32 nSttPos, sal_Int32 nEndPos, LanguageType eLang)
 
bool FnChgToEnEmDash (SvxAutoCorrDoc &, const OUString &, sal_Int32 nSttPos, sal_Int32 nEndPos, LanguageType eLang)
 
bool FnAddNonBrkSpace (SvxAutoCorrDoc &, const OUString &, sal_Int32 nEndPos, LanguageType eLang, bool &io_bNbspRunNext)
 
bool FnSetINetAttr (SvxAutoCorrDoc &, const OUString &, sal_Int32 nSttPos, sal_Int32 nEndPos, LanguageType eLang)
 
bool FnChgWeightUnderl (SvxAutoCorrDoc &, const OUString &, sal_Int32 nEndPos)
 
void FnCapitalStartSentence (SvxAutoCorrDoc &, const OUString &, bool bNormalPos, sal_Int32 nSttPos, sal_Int32 nEndPos, LanguageType eLang)
 
bool FnCorrectCapsLock (SvxAutoCorrDoc &, const OUString &, sal_Int32 nSttPos, sal_Int32 nEndPos, LanguageType eLang)
 
CharClassGetCharClass (LanguageType eLang)
 

Private Member Functions

virtual bool GetLongText (const OUString &rShort, OUString &rLong) override
 Returns the replacement text. More...
 
virtual void refreshBlockList (const css::uno::Reference< css::embed::XStorage > &) override
 
virtual bool PutText (const css::uno::Reference< css::embed::XStorage > &, const OUString &rFileName, const OUString &rShort, SfxObjectShell &, OUString &) override
 Text with attributes. More...
 

Private Attributes

std::unique_ptr< SwXMLTextBlocksm_pTextBlocks
 

Additional Inherited Members

- Static Public Member Functions inherited from SvxAutoCorrect
static std::vector< OUString > GetChunkForAutoText (const OUString &rTxt, sal_Int32 nPos)
 
static ACFlags GetDefaultFlags ()
 
static bool IsAutoCorrectChar (sal_Unicode cChar)
 
static bool NeedsHardspaceAutocorr (sal_Unicode cChar)
 
- Protected Member Functions inherited from SvxAutoCorrect
bool CreateLanguageFile (const LanguageTag &rLanguageTag, bool bNewFile=true)
 

Detailed Description

Definition at line 32 of file swacorr.hxx.

Constructor & Destructor Documentation

SwAutoCorrect::SwAutoCorrect ( const SvxAutoCorrect rACorr)

Definition at line 89 of file swacorr.cxx.

References SvxAutoCorrect::GetSwFlags(), and SwEditShell::SetAutoFormatFlags().

SwAutoCorrect::~SwAutoCorrect ( )
overridevirtual

Definition at line 95 of file swacorr.cxx.

Member Function Documentation

bool SwAutoCorrect::GetLongText ( const OUString &  rShort,
OUString &  rLong 
)
overrideprivatevirtual

Returns the replacement text.

Only for the SWG format, all others can be extracted from the word list

Parameters
rShort- the stream name (encrypted)

Reimplemented from SvxAutoCorrect.

Definition at line 36 of file swacorr.cxx.

References ERRCODE_NONE, ErrCode::IsError(), and m_pTextBlocks.

bool SwAutoCorrect::PutText ( const css::uno::Reference< css::embed::XStorage > &  ,
const OUString &  rFileName,
const OUString &  rShort,
SfxObjectShell ,
OUString &   
)
overrideprivatevirtual

Text with attributes.

Only for SWG format

Parameters
rShort- the stream name (encrypted)

Reimplemented from SvxAutoCorrect.

Definition at line 63 of file swacorr.cxx.

References SwXMLTextBlocks::AddName(), SwXMLTextBlocks::BeginPutDoc(), SwEditShell::CopySelToDoc(), ERRCODE_NONE, SwXMLTextBlocks::GetDoc(), SwDocShell::GetEditShell(), SwXMLTextBlocks::GetText(), ErrCode::IsError(), and SwXMLTextBlocks::PutDoc().

void SwAutoCorrect::refreshBlockList ( const css::uno::Reference< css::embed::XStorage > &  )
overrideprivatevirtual

Reimplemented from SvxAutoCorrect.

Definition at line 44 of file swacorr.cxx.

References m_pTextBlocks.

Member Data Documentation

std::unique_ptr<SwXMLTextBlocks> SwAutoCorrect::m_pTextBlocks
private

Definition at line 36 of file swacorr.hxx.

Referenced by GetLongText(), and refreshBlockList().


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