sw/source/core/text/frmform.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
New commits: commit 8a08f68669f9acfe98dadcca4af6519164a17000 Author: Mike <mikekagan...@hotmail.com> Date: Mon Apr 27 01:27:05 2015 +1000 tdf#66141: SwTxtFrm::FormatQuick(bool) endless loop If a line happens to be invisible (e.g. in too thin cell of a table) then aLine.FormatLine(nStart) returns nStart, and aLine.Insert( new SwLineLayout() ) is executed until OOM. Change-Id: I9b12cf2f1f3f1987cd8ce380b1d85196ffe95e5e Reviewed-on: https://gerrit.libreoffice.org/15542 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/sw/source/core/text/frmform.cxx b/sw/source/core/text/frmform.cxx index abec386..7ad55d7 100644 --- a/sw/source/core/text/frmform.cxx +++ b/sw/source/core/text/frmform.cxx @@ -1918,8 +1918,11 @@ bool SwTxtFrm::FormatQuick( bool bForceQuickFormat ) ? GetFollow()->GetOfst() : aInf.GetTxt().getLength(); do { - nStart = aLine.FormatLine( nStart ); - if( aInf.IsNewLine() || (!aInf.IsStop() && nStart < nEnd) ) + sal_Int32 nShift = aLine.FormatLine(nStart) - nStart; + nStart += nShift; + if ((nShift != 0) // Check for special case: line is invisible, + // like in too thin table cell: tdf#66141 + && (aInf.IsNewLine() || (!aInf.IsStop() && nStart < nEnd))) aLine.Insert( new SwLineLayout() ); } while( aLine.Next() );
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits