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

#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 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
 SvxAutoCorrDoc ()
 
virtual ~SvxAutoCorrDoc ()
 

Private Member Functions

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

Private Attributes

SwEditShellrEditSh
 
SwPaMrCursor
 
std::unique_ptr< SwNodeIndexpIdx
 
int m_nEndUndoCounter
 
bool bUndoIdInitialized
 

Detailed Description

Definition at line 48 of file acorrect.hxx.

Constructor & Destructor Documentation

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

Definition at line 86 of file acorrect.cxx.

SwAutoCorrDoc::~SwAutoCorrDoc ( )
overridevirtual

Definition at line 94 of file acorrect.cxx.

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

Member Function Documentation

bool SwAutoCorrDoc::ChgAutoCorrWord ( sal_Int32 &  rSttPos,
sal_Int32  nEndPos,
SvxAutoCorrect rACorrect,
OUString *  pPara 
)
overridevirtual
bool SwAutoCorrDoc::Delete ( sal_Int32  nStt,
sal_Int32  nEnd 
)
overridevirtual
void SwAutoCorrDoc::DeleteSel ( SwPaM rDelPam)
private

Definition at line 102 of file acorrect.cxx.

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

Referenced by ChgAutoCorrWord(), and Delete().

void SwAutoCorrDoc::DeleteSelImpl ( SwPaM rDelPam)
private
LanguageType SwAutoCorrDoc::GetLanguage ( sal_Int32  nPos) const
overridevirtual
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 327 of file acorrect.cxx.

References bUndoIdInitialized, SwViewShell::GetLayout(), SwPaM::GetPoint(), sw::GotoPrevLayoutTextFrame(), SwPosition::nNode, pIdx, rCursor, and rEditSh.

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

Implements SvxAutoCorrDoc.

Definition at line 173 of file acorrect.cxx.

References ReplaceRange().

bool SwAutoCorrDoc::ReplaceRange ( sal_Int32  nPos,
sal_Int32  nLen,
const OUString &  rText 
)
overridevirtual
void SwAutoCorrDoc::SaveCpltSttWord ( ACFlags  nFlag,
sal_Int32  nPos,
const OUString &  rExceptWord,
sal_Unicode  cChar 
)
overridevirtual
void SwAutoCorrDoc::SetAttr ( sal_Int32  nStt,
sal_Int32  nEnd,
sal_uInt16  nSlotId,
SfxPoolItem rItem 
)
overridevirtual
bool SwAutoCorrDoc::SetINetAttr ( sal_Int32  nStt,
sal_Int32  nEnd,
const OUString &  rURL 
)
overridevirtual

Member Data Documentation

bool SwAutoCorrDoc::bUndoIdInitialized
private
int SwAutoCorrDoc::m_nEndUndoCounter
private

Definition at line 53 of file acorrect.hxx.

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

std::unique_ptr<SwNodeIndex> SwAutoCorrDoc::pIdx
private

Definition at line 52 of file acorrect.hxx.

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

SwPaM& SwAutoCorrDoc::rCursor
private
SwEditShell& SwAutoCorrDoc::rEditSh
private

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