[Libreoffice-commits] core.git: editeng/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri Aug 10 16:40:43 UTC 2018
editeng/source/editeng/impedit2.cxx | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit 36a2af004e1a7b17a71d8327c7ae2b6091ab0ffa
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Fri Aug 10 16:43:11 2018 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Fri Aug 10 18:40:17 2018 +0200
tdf#119169 impress, crash when editing bulleted list
regression from
commit e278df1a14c5cb5dbb7add5d6ed5dd52da131e92
tdf#108608 Draw file unresponsive on large text pasted into textbox
Somewhere up in the accessibility code it has a stale paragraph index.
Judging up other code in this class, that is fairly common, so just add
similar safety checks.
The old code (pre-regression) only worked because it iterated over all
paragraphs, and it just ignored the paragraph index.
Change-Id: I51c573b95f976fa87228e4f7e9f33bd6ea0dc3c8
Reviewed-on: https://gerrit.libreoffice.org/58836
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index c075a8ae6f59..8a38a97661db 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -3124,8 +3124,9 @@ sal_uInt32 ImpEditEngine::CalcParaWidth( sal_Int32 nPara, bool bIgnoreExtraSpace
// Over all the paragraphs ...
+ OSL_ENSURE( 0 <= nPara && nPara < GetParaPortions().Count(), "CalcParaWidth: Out of range" );
ParaPortion* pPortion = GetParaPortions()[nPara];
- if ( pPortion->IsVisible() )
+ if ( pPortion && pPortion->IsVisible() )
{
const SvxLRSpaceItem& rLRItem = GetLRSpaceItem( pPortion->GetNode() );
sal_Int32 nSpaceBeforeAndMinLabelWidth = GetSpaceBeforeAndMinLabelWidth( pPortion->GetNode() );
More information about the Libreoffice-commits
mailing list