[libreoffice] Resolves: rhbz#1133863 fix looping layout

Caolán McNamara caolanm at fedoraproject.org
Tue Sep 23 10:26:39 UTC 2014


commit 9e18775ed6847ed77c4929d431b85ccec9bf253d
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Sep 23 11:25:44 2014 +0100

    Resolves: rhbz#1133863 fix looping layout

 0001-Resolves-fdo-68967-looping-layout.patch |   49 ++++++++++++++++++++++++++
 libreoffice.spec                             |    2 +
 2 files changed, 51 insertions(+), 0 deletions(-)
---
diff --git a/0001-Resolves-fdo-68967-looping-layout.patch b/0001-Resolves-fdo-68967-looping-layout.patch
new file mode 100644
index 0000000..8c89e8f
--- /dev/null
+++ b/0001-Resolves-fdo-68967-looping-layout.patch
@@ -0,0 +1,49 @@
+From 1fec67aab152e0c0ad6dd85082c50f1beff7d520 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm at redhat.com>
+Date: Tue, 16 Sep 2014 13:22:44 +0100
+Subject: [PATCH] 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
+---
+ sw/qa/extras/ww8import/data/fdo68967.doc | Bin 0 -> 99328 bytes
+ sw/qa/extras/ww8import/ww8import.cxx     |   4 ++++
+ sw/source/core/layout/tabfrm.cxx         |   7 +++++++
+ 3 files changed, 11 insertions(+)
+ create mode 100644 sw/qa/extras/ww8import/data/fdo68967.doc
+
+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 ) );
+-- 
+1.9.3
+
diff --git a/libreoffice.spec b/libreoffice.spec
index 4661a89..11df2a0 100644
--- a/libreoffice.spec
+++ b/libreoffice.spec
@@ -320,6 +320,7 @@ Patch28: 0001-create-a-master-document-template-type.patch
 Patch29: 0001-Resolves-fdo-80911-don-t-swap-notes-page-width-heigh.patch
 Patch30: 0001-default-n-up-printing-of-notes-to-sensible-2-x-1-not.patch
 Patch31: 0001-n-up-printing-done-by-vcl-brochures-by-draw-impress.patch
+Patch32: 0001-Resolves-fdo-68967-looping-layout.patch
 
 %define instdir %{_libdir}
 %define baseinstdir %{instdir}/libreoffice
@@ -2298,6 +2299,7 @@ update-desktop-database %{_datadir}/applications &> /dev/null || :
 %changelog
 * Tue Sep 23 2014 Caolán McNamara <caolanm at redhat.com> - 1:4.3.2.2-2
 - make brochure printing of impress/draw work out of the box
+- Resolves: rhbz#1133863 fix looping layout
 
 * Mon Sep 22 2014 David Tardon <dtardon at redhat.com> - 1:4.3.2.2-1
 - update to 4.3.2 rc2


More information about the scm-commits mailing list