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
 
virtual bool GetLongText (const OUString &rShort, OUString &rLong)
 
virtual void refreshBlockList (const css::uno::Reference< css::embed::XStorage > &rStg)
 
 SvxAutoCorrect (OUString aShareAutocorrFile, OUString aUserAutocorrFile)
 
 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 (std::u16string_view 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, LanguageType eLang, ACQuotes eType) 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 SaveWordStartExceptList (LanguageType eLang)
 
SvStringsISortDtorLoadWordStartExceptList (LanguageType eLang)
 
const SvStringsISortDtorGetWordStartExceptList (LanguageType eLang)
 
bool AddWordStartException (const OUString &rNew, LanguageType eLang)
 
bool FindInWordStartExceptList (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 &, std::u16string_view, sal_Int32 nEndPos, LanguageType eLang, bool &io_bNbspRunNext)
 
bool FnSetINetAttr (SvxAutoCorrDoc &, const OUString &, sal_Int32 nSttPos, sal_Int32 nEndPos, LanguageType eLang)
 
bool FnSetDOIAttr (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...
 
bool PutText (const OUString &rShort, const OUString &rLong, LanguageType eLang)
 
void PutText (const OUString &rShort, SfxObjectShell &rShell, LanguageType eLang)
 
virtual bool PutText (const css::uno::Reference< css::embed::XStorage > &rStg, const OUString &rFileName, const OUString &rShort, SfxObjectShell &, OUString &)
 

Private Attributes

std::unique_ptr< SwXMLTextBlocksm_pTextBlocks
 

Additional Inherited Members

- Static Public Member Functions inherited from SvxAutoCorrect
static std::vector< OUString > GetChunkForAutoText (std::u16string_view 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
virtual bool PutText (const css::uno::Reference< css::embed::XStorage > &rStg, const OUString &rFileName, const OUString &rShort, SfxObjectShell &, OUString &)
 
bool CreateLanguageFile (const LanguageTag &rLanguageTag, bool bNewFile=true)
 

Detailed Description

Definition at line 32 of file swacorr.hxx.

Constructor & Destructor Documentation

◆ SwAutoCorrect()

SwAutoCorrect::SwAutoCorrect ( const SvxAutoCorrect rACorr)

Definition at line 93 of file swacorr.cxx.

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

◆ ~SwAutoCorrect()

SwAutoCorrect::~SwAutoCorrect ( )
overridevirtual

Definition at line 99 of file swacorr.cxx.

Member Function Documentation

◆ GetLongText()

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.

◆ PutText() [1/4]

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().

◆ PutText() [2/4]

virtual bool SvxAutoCorrect::PutText ( const css::uno::Reference< css::embed::XStorage > &  rStg,
const OUString &  rFileName,
const OUString &  rShort,
SfxObjectShell ,
OUString &   
)
privatevirtual

Reimplemented from SvxAutoCorrect.

◆ PutText() [3/4]

bool SvxAutoCorrect::PutText ( const OUString &  rShort,
const OUString &  rLong,
LanguageType  eLang 
)
private

◆ PutText() [4/4]

void SvxAutoCorrect::PutText ( const OUString &  rShort,
SfxObjectShell rShell,
LanguageType  eLang 
)
private

◆ refreshBlockList()

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

◆ m_pTextBlocks

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: