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

#include <acorrect.hxx>

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

Public Member Functions

 SwAutoCorrDoc (SwEditShell &rEditShell, SwPaM &rPam, sal_Unicode cIns=0)
 
virtual ~SwAutoCorrDoc () override
 
virtual bool Delete (sal_Int32 nStt, sal_Int32 nEnd) override
 
virtual bool Insert (sal_Int32 nPos, const OUString &rText) override
 
virtual bool Replace (sal_Int32 nPos, const OUString &rText) override
 
virtual bool ReplaceRange (sal_Int32 nPos, sal_Int32 nLen, const OUString &rText) override
 
virtual void SetAttr (sal_Int32 nStt, sal_Int32 nEnd, sal_uInt16 nSlotId, SfxPoolItem &) override
 
virtual bool SetINetAttr (sal_Int32 nStt, sal_Int32 nEnd, const OUString &rURL) override
 
virtual OUString const * GetPrevPara (bool bAtNormalPos) override
 Return the text of a previous paragraph. More...
 
virtual bool ChgAutoCorrWord (sal_Int32 &rSttPos, sal_Int32 nEndPos, SvxAutoCorrect &rACorrect, OUString *pPara) override
 
virtual bool TransliterateRTLWord (sal_Int32 &rSttPos, sal_Int32 nEndPos, bool bApply=false) override
 
virtual void SaveCpltSttWord (ACFlags nFlag, sal_Int32 nPos, const OUString &rExceptWord, sal_Unicode cChar) override
 
virtual LanguageType GetLanguage (sal_Int32 nPos) const override
 
- Public Member Functions inherited from SvxAutoCorrDoc
virtual ~SvxAutoCorrDoc ()
 
virtual bool Delete (sal_Int32 nStt, sal_Int32 nEnd)=0
 
virtual bool Insert (sal_Int32 nPos, const OUString &rTxt)=0
 
virtual bool Replace (sal_Int32 nPos, const OUString &rTxt)=0
 
virtual bool ReplaceRange (sal_Int32 nPos, sal_Int32 nLen, const OUString &rTxt)=0
 
virtual void SetAttr (sal_Int32 nStt, sal_Int32 nEnd, sal_uInt16 nSlotId, SfxPoolItem &)=0
 
virtual bool SetINetAttr (sal_Int32 nStt, sal_Int32 nEnd, const OUString &rURL)=0
 
virtual OUString const * GetPrevPara (bool bAtNormalPos)=0
 
virtual bool ChgAutoCorrWord (sal_Int32 &rSttPos, sal_Int32 nEndPos, SvxAutoCorrect &rACorrect, OUString *pPara)=0
 
virtual bool TransliterateRTLWord (sal_Int32 &rSttPos, sal_Int32 nEndPos, bool bApply=false)=0
 
virtual void SaveCpltSttWord (ACFlags nFlag, sal_Int32 nPos, const OUString &rExceptWord, sal_Unicode cChar)
 
virtual LanguageType GetLanguage (sal_Int32 nPos) const
 

Private Member Functions

void DeleteSel (SwPaM &rDelPam)
 
void DeleteSelImpl (SwPaM &rDelPam)
 

Private Attributes

SwEditShellm_rEditSh
 
SwPaMm_rCursor
 
std::optional< SwNodeIndexm_oIndex
 
int m_nEndUndoCounter
 
bool m_bUndoIdInitialized
 

Detailed Description

Definition at line 49 of file acorrect.hxx.

Constructor & Destructor Documentation

◆ SwAutoCorrDoc()

SwAutoCorrDoc::SwAutoCorrDoc ( SwEditShell rEditShell,
SwPaM rPam,
sal_Unicode  cIns = 0 
)

Definition at line 92 of file acorrect.cxx.

◆ ~SwAutoCorrDoc()

SwAutoCorrDoc::~SwAutoCorrDoc ( )
overridevirtual

Definition at line 100 of file acorrect.cxx.

References SwEditShell::EndUndo(), i, m_nEndUndoCounter, and m_rEditSh.

Member Function Documentation

◆ ChgAutoCorrWord()

bool SwAutoCorrDoc::ChgAutoCorrWord ( sal_Int32 &  rSttPos,
sal_Int32  nEndPos,
SvxAutoCorrect rACorrect,
OUString *  pPara 
)
overridevirtual

◆ Delete()

bool SwAutoCorrDoc::Delete ( sal_Int32  nStt,
sal_Int32  nEnd 
)
overridevirtual

◆ DeleteSel()

void SwAutoCorrDoc::DeleteSel ( SwPaM rDelPam)
private

Definition at line 108 of file acorrect.cxx.

References DeleteSelImpl(), SwViewShell::GetDoc(), sw::GetRanges(), and m_rEditSh.

Referenced by ChgAutoCorrWord(), and Delete().

◆ DeleteSelImpl()

void SwAutoCorrDoc::DeleteSelImpl ( SwPaM rDelPam)
private

◆ GetLanguage()

LanguageType SwAutoCorrDoc::GetLanguage ( sal_Int32  nPos) const
overridevirtual

◆ GetPrevPara()

OUString const * SwAutoCorrDoc::GetPrevPara ( bool  bAtNormalPos)
overridevirtual

Return the text of a previous paragraph.

Parameters
bAtNormalPosIf <true> before the normal insert position; if <false> in which the corrected word was inserted. (Doesn't need to be the same paragraph!)
Returns
text or 0, if previous paragraph does not exists or there are only blankness

Implements SvxAutoCorrDoc.

Definition at line 337 of file acorrect.cxx.

References SwTextNode::GetAttrOutlineLevel(), SwViewShell::GetLayout(), SwPosition::GetNode(), SwPaM::GetPoint(), SwTextFrame::GetText(), SwTextFrame::GetTextNodeForParaProps(), sw::GotoPrevLayoutTextFrame(), m_bUndoIdInitialized, m_oIndex, m_rCursor, and m_rEditSh.

◆ Insert()

bool SwAutoCorrDoc::Insert ( sal_Int32  nPos,
const OUString &  rText 
)
overridevirtual

◆ Replace()

bool SwAutoCorrDoc::Replace ( sal_Int32  nPos,
const OUString &  rText 
)
overridevirtual

Implements SvxAutoCorrDoc.

Definition at line 179 of file acorrect.cxx.

References nPos, and ReplaceRange().

◆ ReplaceRange()

bool SwAutoCorrDoc::ReplaceRange ( sal_Int32  nPos,
sal_Int32  nLen,
const OUString &  rText 
)
overridevirtual

◆ SaveCpltSttWord()

void SwAutoCorrDoc::SaveCpltSttWord ( ACFlags  nFlag,
sal_Int32  nPos,
const OUString &  rExceptWord,
sal_Unicode  cChar 
)
overridevirtual

◆ SetAttr()

void SwAutoCorrDoc::SetAttr ( sal_Int32  nStt,
sal_Int32  nEnd,
sal_uInt16  nSlotId,
SfxPoolItem rItem 
)
overridevirtual

◆ SetINetAttr()

bool SwAutoCorrDoc::SetINetAttr ( sal_Int32  nStt,
sal_Int32  nEnd,
const OUString &  rURL 
)
overridevirtual

◆ TransliterateRTLWord()

bool SwAutoCorrDoc::TransliterateRTLWord ( sal_Int32 &  rSttPos,
sal_Int32  nEndPos,
bool  bApply = false 
)
overridevirtual

Member Data Documentation

◆ m_bUndoIdInitialized

bool SwAutoCorrDoc::m_bUndoIdInitialized
private

◆ m_nEndUndoCounter

int SwAutoCorrDoc::m_nEndUndoCounter
private

Definition at line 54 of file acorrect.hxx.

Referenced by Insert(), ReplaceRange(), and ~SwAutoCorrDoc().

◆ m_oIndex

std::optional<SwNodeIndex> SwAutoCorrDoc::m_oIndex
private

Definition at line 53 of file acorrect.hxx.

Referenced by ChgAutoCorrWord(), GetPrevPara(), and SaveCpltSttWord().

◆ m_rCursor

SwPaM& SwAutoCorrDoc::m_rCursor
private

◆ m_rEditSh

SwEditShell& SwAutoCorrDoc::m_rEditSh
private

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