diff options
author | Justin Luth <justin_luth@sil.org> | 2021-11-11 12:28:21 +0200 |
---|---|---|
committer | Thorsten Behrens <thorsten.behrens@allotropia.de> | 2021-12-21 23:51:46 +0100 |
commit | 55a7fde6bbe62eb9be2f48f1e97ac86192d932c8 (patch) | |
tree | 66a900f5ca3c14d0b5600565c6d3e5233412aa69 | |
parent | tdf#136452 sw_redlinehide: fix crash in undo of delete across sections (diff) | |
download | core-55a7fde6bbe62eb9be2f48f1e97ac86192d932c8.tar.gz core-55a7fde6bbe62eb9be2f48f1e97ac86192d932c8.zip |
tdf#139922 sw autocorr: don't return GetPrevPara if isEmpty
This fixes a LO 6.2 regression caused by
commit 4cf5a46f16dec8ce16c6662ce5c17903e28b8fa3.
Change-Id: I4aee8f4e79a40a8b8f82faa3e62dead80a952510
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125037
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
(cherry picked from commit 59dc5d00b04927d07df2dcc3c17acfdc760d8765)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125144
(cherry picked from commit 133fe29d06445daadc556cff013d5194a883ea9b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127156
Tested-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
-rw-r--r-- | sw/source/core/edit/acorrect.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sw/source/core/edit/acorrect.cxx b/sw/source/core/edit/acorrect.cxx index 7304e6e7b702..286d4d078de5 100644 --- a/sw/source/core/edit/acorrect.cxx +++ b/sw/source/core/edit/acorrect.cxx @@ -346,8 +346,11 @@ OUString const* SwAutoCorrDoc::GetPrevPara(bool const bAtNormalPos) } sw::GotoPrevLayoutTextFrame(*pIdx, rEditSh.GetLayout()); } - if (pFrame && 0 == pFrame->GetTextNodeForParaProps()->GetAttrOutlineLevel()) + if (pFrame && !pFrame->GetText().isEmpty() && + 0 == pFrame->GetTextNodeForParaProps()->GetAttrOutlineLevel()) + { pStr = & pFrame->GetText(); + } if( bUndoIdInitialized ) bUndoIdInitialized = true; |