diff options
Diffstat (limited to 'sw/source/core/edit/acorrect.cxx')
-rw-r--r-- | sw/source/core/edit/acorrect.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sw/source/core/edit/acorrect.cxx b/sw/source/core/edit/acorrect.cxx index 366560dad139..b5e423b94099 100644 --- a/sw/source/core/edit/acorrect.cxx +++ b/sw/source/core/edit/acorrect.cxx @@ -406,10 +406,10 @@ bool SwAutoCorrDoc::ChgAutoCorrWord( sal_Int32& rSttPos, sal_Int32 nEndPos, if (sw::GetRanges(ranges, *rEditSh.GetDoc(), aPam)) { pDoc->getIDocumentContentOperations().ReplaceRange(aPam, pFnd->GetLong(), false); + bRet = true; } - else + else if (!ranges.empty()) { - assert(!ranges.empty()); assert(ranges.front()->GetPoint()->nNode == ranges.front()->GetMark()->nNode); pDoc->getIDocumentContentOperations().ReplaceRange( *ranges.front(), pFnd->GetLong(), false); @@ -417,6 +417,7 @@ bool SwAutoCorrDoc::ChgAutoCorrWord( sal_Int32& rSttPos, sal_Int32 nEndPos, { DeleteSelImpl(**it); } + bRet = true; } // tdf#83260 After calling sw::DocumentContentOperationsManager::ReplaceRange @@ -424,8 +425,6 @@ bool SwAutoCorrDoc::ChgAutoCorrWord( sal_Int32& rSttPos, sal_Int32 nEndPos, // ReplaceRange shows changes, this moves deleted nodes from special section to document. // Then Show mode is disabled again. As a result pTextNd may be invalidated. pTextNd = rCursor.GetNode().GetTextNode(); - - bRet = true; } } else |