summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/ww8import/data/fdo68967.docbin0 -> 99328 bytes
-rw-r--r--sw/qa/extras/ww8import/ww8import.cxx4
-rw-r--r--sw/source/core/layout/tabfrm.cxx7
3 files changed, 11 insertions, 0 deletions
diff --git a/sw/qa/extras/ww8import/data/fdo68967.doc b/sw/qa/extras/ww8import/data/fdo68967.doc
new file mode 100644
index 000000000000..05271c3d868a
--- /dev/null
+++ b/sw/qa/extras/ww8import/data/fdo68967.doc
Binary files differ
diff --git a/sw/qa/extras/ww8import/ww8import.cxx b/sw/qa/extras/ww8import/ww8import.cxx
index 463c5aee19e0..5f4e0bc059f7 100644
--- a/sw/qa/extras/ww8import/ww8import.cxx
+++ b/sw/qa/extras/ww8import/ww8import.cxx
@@ -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();
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index 06f38c7f6605..f7a39f515880 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -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 ) );