1 |
From 1fec67aab152e0c0ad6dd85082c50f1beff7d520 Mon Sep 17 00:00:00 2001 |
2 |
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com> |
3 |
Date: Tue, 16 Sep 2014 13:22:44 +0100 |
4 |
Subject: [PATCH] Resolves: fdo#68967 looping layout |
5 |
|
6 |
RemoveFollowFlowLine() marks the layout invalid, but the |
7 |
next cycle through does everything exactly the same again. |
8 |
|
9 |
Try the same foul horror as nUnSplitted. But at least with |
10 |
a test-case that nails down reproducing the bug if a better |
11 |
fix is needed. |
12 |
|
13 |
Change-Id: Id6698bcb2364bd0253bedd4a7c313e25f705be8d |
14 |
--- |
15 |
sw/qa/extras/ww8import/data/fdo68967.doc | Bin 0 -> 99328 bytes |
16 |
sw/qa/extras/ww8import/ww8import.cxx | 4 ++++ |
17 |
sw/source/core/layout/tabfrm.cxx | 7 +++++++ |
18 |
3 files changed, 11 insertions(+) |
19 |
create mode 100644 sw/qa/extras/ww8import/data/fdo68967.doc |
20 |
|
21 |
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx |
22 |
index 06f38c7..f7a39f5 100644 |
23 |
--- a/sw/source/core/layout/tabfrm.cxx |
24 |
+++ b/sw/source/core/layout/tabfrm.cxx |
25 |
@@ -1831,6 +1831,7 @@ void SwTabFrm::MakeAll() |
26 |
} |
27 |
|
28 |
int nUnSplitted = 5; // Just another loop control :-( |
29 |
+ int nThrowAwayValidLayoutLimit = 5; // And another one :-( |
30 |
SWRECTFN( this ) |
31 |
while ( !mbValidPos || !mbValidSize || !mbValidPrtArea ) |
32 |
{ |
33 |
@@ -2301,7 +2302,13 @@ void SwTabFrm::MakeAll() |
34 |
// An existing follow flow line has to be removed. |
35 |
if ( HasFollowFlowLine() ) |
36 |
{ |
37 |
+ if (!nThrowAwayValidLayoutLimit) |
38 |
+ continue; |
39 |
+ bool bInitialLoopEndCondition = mbValidPos && mbValidSize && mbValidPrtArea; |
40 |
RemoveFollowFlowLine(); |
41 |
+ bool bFinalLoopEndCondition = mbValidPos && mbValidSize && mbValidPrtArea; |
42 |
+ if (bInitialLoopEndCondition && !bFinalLoopEndCondition) |
43 |
+ --nThrowAwayValidLayoutLimit; |
44 |
} |
45 |
|
46 |
const bool bSplitError = !Split( nDeadLine, bTryToSplit, ( bTableRowKeep && !bAllowSplitOfRow ) ); |
47 |
-- |
48 |
1.9.3 |
49 |
|