LibreOffice Module sw (master) 1
|
#include <acorrect.hxx>
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 | |
SwEditShell & | m_rEditSh |
SwPaM & | m_rCursor |
std::optional< SwNodeIndex > | m_oIndex |
int | m_nEndUndoCounter |
bool | m_bUndoIdInitialized |
Definition at line 49 of file acorrect.hxx.
SwAutoCorrDoc::SwAutoCorrDoc | ( | SwEditShell & | rEditShell, |
SwPaM & | rPam, | ||
sal_Unicode | cIns = 0 |
||
) |
Definition at line 92 of file acorrect.cxx.
|
overridevirtual |
Definition at line 100 of file acorrect.cxx.
References SwEditShell::EndUndo(), i, m_nEndUndoCounter, and m_rEditSh.
|
overridevirtual |
Implements SvxAutoCorrDoc.
Definition at line 371 of file acorrect.cxx.
References SwPosition::Assign(), SwTextBlocks::BeginGetDoc(), CheckPosInFly, IDocumentContentOperations::CopyRange(), DeleteSel(), DeleteSelImpl(), SwDoc::DontExpandFormat(), SwTextBlocks::EndGetDoc(), SwNode::FindTableNode(), GetAppLanguage(), SvxAutoCorrect::GetAutoCorrFileName(), SwTextBlocks::GetDoc(), SwViewShell::GetDoc(), SwNodes::GetEndOfContent(), SwNodes::GetEndOfExtras(), SwDoc::getIDocumentContentOperations(), SwDoc::getIDocumentRedlineAccess(), SwTextBlocks::GetIndex(), GetLanguage(), SwViewShell::GetLayout(), SwContentNode::getLayoutFrame(), SvxAutocorrWord::GetLong(), SwPosition::GetNode(), SwDoc::GetNodes(), SwPaM::GetPoint(), SwPaM::GetPointContentNode(), SwPaM::GetPointNode(), sw::GetRanges(), SvxAutocorrWord::GetShort(), SwTextFrame::GetText(), SwNode::GetTextNode(), SwNodes::GoNext(), sw::GotoNextLayoutTextFrame(), sw::GotoPrevLayoutTextFrame(), IDocumentRedlineAccess::HasRedline(), SvxAutocorrWord::IsTextOnly(), LANGUAGE_SYSTEM, SwContentNode::Len(), m_bUndoIdInitialized, m_oIndex, m_rCursor, m_rEditSh, SwTextFrame::MapViewToModelPos(), nPos, IDocumentContentOperations::ReplaceRange(), SwDontExpandItem::RestoreDontExpandItems(), SwDontExpandItem::SaveDontExpandItems(), SvxAutoCorrect::SearchWordsInList(), SwPosition::SetContent(), and SwPaM::SetMark().
Referenced by SwAutoFormat::AutoCorrect().
|
overridevirtual |
Implements SvxAutoCorrDoc.
Definition at line 144 of file acorrect.cxx.
References DeleteSel(), SwViewShell::GetLayout(), SwContentNode::getLayoutFrame(), SwPaM::GetPointNode(), SwNode::GetTextNode(), m_bUndoIdInitialized, m_rCursor, m_rEditSh, and SwTextFrame::MapViewToModelPos().
|
private |
Definition at line 108 of file acorrect.cxx.
References DeleteSelImpl(), SwViewShell::GetDoc(), sw::GetRanges(), and m_rEditSh.
Referenced by ChgAutoCorrWord(), and Delete().
|
private |
Definition at line 126 of file acorrect.cxx.
References IDocumentContentOperations::DeleteAndJoin(), IDocumentContentOperations::DeleteRange(), SwViewShell::GetDoc(), SwDoc::getIDocumentContentOperations(), SwPaM::GetMark(), SwPosition::GetNode(), SwPaM::GetPoint(), SwDoc::IsAutoFormatRedline(), and m_rEditSh.
Referenced by ChgAutoCorrWord(), and DeleteSel().
|
overridevirtual |
Reimplemented from SvxAutoCorrDoc.
Definition at line 607 of file acorrect.cxx.
References GetAppLanguage(), SwTextFrame::GetLangOfChar(), SwViewShell::GetLayout(), SwContentNode::getLayoutFrame(), SwPosition::GetNode(), SwPaM::GetPoint(), SwNode::GetTextNode(), LANGUAGE_SYSTEM, m_rCursor, m_rEditSh, and nPos.
Referenced by ChgAutoCorrWord(), SaveCpltSttWord(), and TransliterateRTLWord().
|
overridevirtual |
Return the text of a previous paragraph.
bAtNormalPos | If <true> before the normal insert position; if <false> in which the corrected word was inserted. (Doesn't need to be the same paragraph!) |
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.
|
overridevirtual |
Implements SvxAutoCorrDoc.
Definition at line 159 of file acorrect.cxx.
References AUTOCORRECT, SwViewShell::GetDoc(), SwDoc::getIDocumentContentOperations(), SwViewShell::GetLayout(), SwContentNode::getLayoutFrame(), SwPaM::GetPointNode(), SwNode::GetTextNode(), IDocumentContentOperations::InsertString(), m_bUndoIdInitialized, m_nEndUndoCounter, m_rCursor, m_rEditSh, SwTextFrame::MapViewToModelPos(), nPos, and SwEditShell::StartUndo().
|
overridevirtual |
Implements SvxAutoCorrDoc.
Definition at line 179 of file acorrect.cxx.
References nPos, and ReplaceRange().
|
overridevirtual |
Implements SvxAutoCorrDoc.
Definition at line 184 of file acorrect.cxx.
References AUTOCORRECT, CH_TXTATR_BREAKWORD, CH_TXTATR_INWORD, Char, SwPaM::DeleteMark(), SwPaM::Exchange(), first, SwPosition::GetContentIndex(), SwViewShell::GetDoc(), SwDoc::getIDocumentContentOperations(), SwDoc::getIDocumentRedlineAccess(), SwViewShell::GetLayout(), SwContentNode::getLayoutFrame(), getLength(), SwPosition::GetNode(), SwPaM::GetPoint(), SwPaM::GetPointNode(), SwFrame::getRootFrame(), SwTextFrame::GetText(), SwNode::GetTextNode(), IDocumentRedlineAccess::HasRedline(), IDocumentContentOperations::InsertString(), SwDoc::IsAutoFormatRedline(), SwRootFrame::IsHideRedlines(), m_bUndoIdInitialized, m_nEndUndoCounter, m_rCursor, m_rEditSh, SwTextFrame::MapViewToModel(), n, nPos, pos, IDocumentContentOperations::ReplaceRange(), SwPosition::SetContent(), SwPaM::SetMark(), and SwEditShell::StartUndo().
Referenced by Replace().
|
overridevirtual |
Reimplemented from SvxAutoCorrDoc.
Definition at line 597 of file acorrect.cxx.
References SwViewShell::GetDoc(), GetLanguage(), SwPosition::GetNodeIndex(), SwPaM::GetPoint(), m_oIndex, m_rCursor, m_rEditSh, nPos, and SwDoc::SetAutoCorrExceptWord().
|
overridevirtual |
Implements SvxAutoCorrDoc.
Definition at line 287 of file acorrect.cxx.
References aCharFormatSetRange, SwDoc::GetAttrPool(), SwViewShell::GetDoc(), SwViewShell::GetLayout(), SwContentNode::getLayoutFrame(), SwPaM::GetPointNode(), SwNode::GetTextNode(), SfxItemPool::GetWhich(), m_bUndoIdInitialized, m_rCursor, m_rEditSh, SwTextFrame::MapViewToModelPos(), SetAllScriptItem(), SwDoc::SetFormatItemByAutoFormat(), and SfxPoolItem::SetWhich().
|
overridevirtual |
Implements SvxAutoCorrDoc.
Definition at line 313 of file acorrect.cxx.
References SwDoc::GetAttrPool(), SwViewShell::GetDoc(), SwViewShell::GetLayout(), SwContentNode::getLayoutFrame(), SwPaM::GetPointNode(), SwNode::GetTextNode(), m_bUndoIdInitialized, m_rCursor, m_rEditSh, SwTextFrame::MapViewToModelPos(), SfxItemSet::Put(), and SwDoc::SetFormatItemByAutoFormat().
|
overridevirtual |
Implements SvxAutoCorrDoc.
Definition at line 512 of file acorrect.cxx.
References aProperties, CHAR_ZWSP, GetAppLanguage(), SwViewShell::GetDoc(), GetHyphenator(), SwDoc::getIDocumentContentOperations(), GetLanguage(), SwViewShell::GetLayout(), SwContentNode::getLayoutFrame(), LanguageTag::getLocale(), SwDoc::GetNumberFormatter(), SwPaM::GetPointNode(), SvNumberFormatter::GetPreviewString(), SwTextFrame::GetText(), SwNode::GetTextNode(), i, SwFrame::IsRightToLeft(), LANGUAGE_SYSTEM, LANGUAGE_USER_HUNGARIAN_ROVAS, m_bUndoIdInitialized, m_rCursor, m_rEditSh, SwTextFrame::MapViewToModelPos(), IDocumentContentOperations::ReplaceRange(), and sPrefix.
Referenced by SwAutoFormat::AutoCorrect().
|
private |
Definition at line 55 of file acorrect.hxx.
Referenced by ChgAutoCorrWord(), Delete(), GetPrevPara(), Insert(), ReplaceRange(), SetAttr(), SetINetAttr(), and TransliterateRTLWord().
|
private |
Definition at line 54 of file acorrect.hxx.
Referenced by Insert(), ReplaceRange(), and ~SwAutoCorrDoc().
|
private |
Definition at line 53 of file acorrect.hxx.
Referenced by ChgAutoCorrWord(), GetPrevPara(), and SaveCpltSttWord().
|
private |
Definition at line 52 of file acorrect.hxx.
Referenced by ChgAutoCorrWord(), Delete(), GetLanguage(), GetPrevPara(), Insert(), ReplaceRange(), SaveCpltSttWord(), SetAttr(), SetINetAttr(), and TransliterateRTLWord().
|
private |
Definition at line 51 of file acorrect.hxx.
Referenced by ChgAutoCorrWord(), Delete(), DeleteSel(), DeleteSelImpl(), GetLanguage(), GetPrevPara(), Insert(), ReplaceRange(), SaveCpltSttWord(), SetAttr(), SetINetAttr(), TransliterateRTLWord(), and ~SwAutoCorrDoc().