Kaydet (Commit) 1fec67aa authored tarafından Caolán McNamara's avatar Caolán McNamara

Resolves: fdo#68967 looping layout

RemoveFollowFlowLine() marks the layout invalid, but the
next cycle through does everything exactly the same again.

Try the same foul horror as nUnSplitted. But at least with
a test-case that nails down reproducing the bug if a better
fix is needed.

Change-Id: Id6698bcb2364bd0253bedd4a7c313e25f705be8d
üst 76e04aef
This diff was suppressed by a .gitattributes entry.
......@@ -510,6 +510,10 @@ DECLARE_WW8IMPORT_TEST(testBnc787942, "bnc787942.doc")
parseDump("/root/page[1]/body/txt[4]/anchored");
}
DECLARE_WW8IMPORT_TEST(testLayoutHanging, "fdo68967.doc")
{
// This must not hang in layout
}
CPPUNIT_PLUGIN_IMPLEMENT();
......
......@@ -1831,6 +1831,7 @@ void SwTabFrm::MakeAll()
}
int nUnSplitted = 5; // Just another loop control :-(
int nThrowAwayValidLayoutLimit = 5; // And another one :-(
SWRECTFN( this )
while ( !mbValidPos || !mbValidSize || !mbValidPrtArea )
{
......@@ -2301,7 +2302,13 @@ void SwTabFrm::MakeAll()
// An existing follow flow line has to be removed.
if ( HasFollowFlowLine() )
{
if (!nThrowAwayValidLayoutLimit)
continue;
bool bInitialLoopEndCondition = mbValidPos && mbValidSize && mbValidPrtArea;
RemoveFollowFlowLine();
bool bFinalLoopEndCondition = mbValidPos && mbValidSize && mbValidPrtArea;
if (bInitialLoopEndCondition && !bFinalLoopEndCondition)
--nThrowAwayValidLayoutLimit;
}
const bool bSplitError = !Split( nDeadLine, bTryToSplit, ( bTableRowKeep && !bAllowSplitOfRow ) );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment