Rebased ref, commits from common ancestor: commit 170c8dbf14dc44026ffe85378f0aba890b06e60e Author: Vasily Melenchuk <vasily.melenc...@cib.de> Date: Wed Mar 28 13:30:10 2018 +0300
Update loop prevention in SwContentFrame::MakeAll In some cases there is an endless loop with just two states switchin one into another. To avoid such freeze now 2 last states are kept in loop prevention code. Reviewed-on: https://gerrit.libreoffice.org/51996 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de> Conflicts: sw/source/core/layout/calcmove.cxx Change-Id: I64fe8aecd5d972eecc9fde3a96d8729960a1998e diff --git a/sw/source/core/layout/calcmove.cxx b/sw/source/core/layout/calcmove.cxx index 801a7d582d75..3feed0d31eef 100644 --- a/sw/source/core/layout/calcmove.cxx +++ b/sw/source/core/layout/calcmove.cxx @@ -1242,11 +1242,17 @@ void SwContentFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/) bool bMoveable; + SwRect aOldFrame_StopFormat, aOldFrame_StopFormat2; + SwRect aOldPrt_StopFormat, aOldPrt_StopFormat2; + while ( !mbValidPos || !mbValidSize || !mbValidPrtArea ) { // - loop prevention - SwRect aOldFrame_StopFormat( Frame() ); - SwRect aOldPrt_StopFormat( Prt() ); + aOldFrame_StopFormat2 = aOldFrame_StopFormat; + aOldPrt_StopFormat2 = aOldPrt_StopFormat; + aOldFrame_StopFormat = Frame(); + aOldPrt_StopFormat = Prt(); + if ( (bMoveable = IsMoveable()) ) { SwFrame *pPre = GetIndPrev(); @@ -1492,8 +1498,8 @@ void SwContentFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/) // - loop prevention { - if ( aOldFrame_StopFormat == Frame() && - aOldPrt_StopFormat == Prt() ) + if ( (aOldFrame_StopFormat == Frame() || aOldFrame_StopFormat2 == Frame() ) && + (aOldPrt_StopFormat == Prt() || aOldPrt_StopFormat2 == Prt())) { ++nConsecutiveFormatsWithoutChange; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits