Kaydet (Commit) afb566b6 authored tarafından Michael Stahl's avatar Michael Stahl

tdf#125261 sw_redlinehide: fix inf. loop in SwAutoFormat::AutoCorrect()

The problem is that somehow a subraction of 1 from nPos made its way
into commit 938f8a6b, which is likely
some copypasta blunder.

Change-Id: I46362fb416b9078ffe441396bcf927bfa5a23fd7
Reviewed-on: https://gerrit.libreoffice.org/72282
Tested-by: Jenkins
Reviewed-by: 's avatarMichael Stahl <Michael.Stahl@cib.de>
üst 5053584e
...@@ -2145,7 +2145,7 @@ void SwAutoFormat::AutoCorrect(TextFrameIndex nPos) ...@@ -2145,7 +2145,7 @@ void SwAutoFormat::AutoCorrect(TextFrameIndex nPos)
if( m_aFlags.bAutoCorrect && if( m_aFlags.bAutoCorrect &&
aACorrDoc.ChgAutoCorrWord(reinterpret_cast<sal_Int32&>(nSttPos), sal_Int32(nPos), *pATst, nullptr)) aACorrDoc.ChgAutoCorrWord(reinterpret_cast<sal_Int32&>(nSttPos), sal_Int32(nPos), *pATst, nullptr))
{ {
nPos = m_pCurTextFrame->MapModelToViewPos(*m_aDelPam.GetPoint()) - TextFrameIndex(1); nPos = m_pCurTextFrame->MapModelToViewPos(*m_aDelPam.GetPoint());
if( m_aFlags.bWithRedlining ) if( m_aFlags.bWithRedlining )
{ {
...@@ -2181,7 +2181,7 @@ void SwAutoFormat::AutoCorrect(TextFrameIndex nPos) ...@@ -2181,7 +2181,7 @@ void SwAutoFormat::AutoCorrect(TextFrameIndex nPos)
SetRedlineText( STR_AUTOFMTREDL_DETECT_URL ) && SetRedlineText( STR_AUTOFMTREDL_DETECT_URL ) &&
pATst->FnSetINetAttr(aACorrDoc, *pText, sal_Int32(nLastBlank), sal_Int32(nPos), eLang))) pATst->FnSetINetAttr(aACorrDoc, *pText, sal_Int32(nLastBlank), sal_Int32(nPos), eLang)))
{ {
nPos = m_pCurTextFrame->MapModelToViewPos(*m_aDelPam.GetPoint()) - TextFrameIndex(1); nPos = m_pCurTextFrame->MapModelToViewPos(*m_aDelPam.GetPoint());
} }
else else
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment