[Libreoffice-commits] core.git: 2 commits - sw/qa sw/source
Caolán McNamara
caolanm at redhat.com
Tue Sep 16 07:13:56 PDT 2014
sw/qa/extras/ww8import/data/fdo68967.doc |binary
sw/qa/extras/ww8import/ww8import.cxx | 4 ++++
sw/source/core/layout/tabfrm.cxx | 9 ++++++++-
3 files changed, 12 insertions(+), 1 deletion(-)
New commits:
commit 4fd5423739c12900e8efe2f3901568431e36a94c
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Sep 16 13:24:05 2014 +0100
'Artur Dent' -> 'Arthur Dent'
Change-Id: Idbeac2925ce0f91075f3c4f5468574c62e29f420
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index f7a39f5..a946293 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -2169,7 +2169,7 @@ void SwTabFrm::MakeAll()
//right moment to do some preferably constructive changes.
//If I'm NOT allowed to leave the parent Frm, I've got a problem.
- // Following Artur Dent, we do the only thing that you can do with
+ // Following Arthur Dent, we do the only thing that you can do with
// an unsolvable problem: We ignore it with all our power.
if ( !bMoveable )
{
commit 1fec67aab152e0c0ad6dd85082c50f1beff7d520
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Sep 16 13:22:44 2014 +0100
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
diff --git a/sw/qa/extras/ww8import/data/fdo68967.doc b/sw/qa/extras/ww8import/data/fdo68967.doc
new file mode 100644
index 0000000..05271c3
Binary files /dev/null and b/sw/qa/extras/ww8import/data/fdo68967.doc differ
diff --git a/sw/qa/extras/ww8import/ww8import.cxx b/sw/qa/extras/ww8import/ww8import.cxx
index 463c5ae..5f4e0bc 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 06f38c7..f7a39f5 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 ) );
More information about the Libreoffice-commits
mailing list