[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - editeng/source
Ashod Nakashian (via logerrit)
logerrit at kemper.freedesktop.org
Fri May 29 12:39:12 UTC 2020
editeng/source/editeng/impedit.cxx | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
New commits:
commit aae3b007935deb08adfd753c25948e446566b6fb
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
AuthorDate: Wed Jul 24 13:16:35 2019 -0400
Commit: Marco Cecchetti <marco.cecchetti at collabora.com>
CommitDate: Fri May 29 14:38:41 2020 +0200
editeng: detect invalid paragraphs when drawing
This prevents live-lock (endless loop) in case
the paragraphs are invalid.
Change-Id: I77cc7818dabc8e518bd7ca3f5161d46ba3fe50b4
(cherry picked from commit deab77cb71c01171d0f8284339627ed33798c3a1)
Reviewed-on: https://gerrit.libreoffice.org/85002
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95105
Tested-by: Marco Cecchetti <marco.cecchetti at collabora.com>
Reviewed-by: Marco Cecchetti <marco.cecchetti at collabora.com>
diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx
index 6c7360d41fea..56970d8ea6cf 100644
--- a/editeng/source/editeng/impedit.cxx
+++ b/editeng/source/editeng/impedit.cxx
@@ -278,8 +278,10 @@ void ImpEditView::DrawSelectionXOR( EditSelection aTmpSel, vcl::Region* pRegion,
ContentNode* pStartNode = aTmpSel.Min().GetNode();
ContentNode* pEndNode = aTmpSel.Max().GetNode();
- sal_Int32 nStartPara = pEditEngine->GetEditDoc().GetPos( pStartNode );
- sal_Int32 nEndPara = pEditEngine->GetEditDoc().GetPos( pEndNode );
+ const sal_Int32 nStartPara = pEditEngine->GetEditDoc().GetPos(pStartNode);
+ const sal_Int32 nEndPara = pEditEngine->GetEditDoc().GetPos(pEndNode);
+ if (nStartPara == EE_PARA_NOT_FOUND || nEndPara == EE_PARA_NOT_FOUND)
+ return;
for ( sal_Int32 nPara = nStartPara; nPara <= nEndPara; nPara++ )
{
ParaPortion* pTmpPortion = pEditEngine->GetParaPortions().SafeGetObject( nPara );
More information about the Libreoffice-commits
mailing list