[Libreoffice-commits] .: sw/source

Cédric Bosdonnat cbosdo at kemper.freedesktop.org
Wed Feb 8 11:31:43 PST 2012


 sw/source/core/layout/frmtool.cxx |   43 ++++++++++++++------------------------
 1 file changed, 16 insertions(+), 27 deletions(-)

New commits:
commit 2a22e664811e10ca58ec66ba8fd10b1a6185c178
Author: Cédric Bosdonnat <cedric.bosdonnat.ooo at free.fr>
Date:   Wed Feb 8 18:58:13 2012 +0100

    fdo#39006: Fixed layout loop
    
    OD's comment was right: forcing a restart of the layout may cause
    loops... and we falled into that case. As this seems to be useless,
    removed the whole thing.

diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx
index 9bc3957..c19dbf7 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -724,33 +724,22 @@ SwFlyNotify::~SwFlyNotify()
          ( !pFly->ISA(SwFlyFreeFrm) ||
            !static_cast<SwFlyFreeFrm*>(pFly)->IsNoMoveOnCheckClip() ) )
     {
-        // #i54138# - suppress restart of the layout process
-        // on changed frame height.
-        // Note: It doesn't seem to be necessary and can cause layout loops.
-        if ( bPosChgd )
-        {
-            // indicate a restart of the layout process
-            pFly->SetRestartLayoutProcess( true );
-        }
-        else
-        {
-            // lock position
-            pFly->LockPosition();
-
-            if ( !pFly->ConsiderForTextWrap() )
-            {
-                // indicate that object has to be considered for text wrap
-                pFly->SetConsiderForTextWrap( true );
-                // invalidate 'background' in order to allow its 'background'
-                // to wrap around it.
-                pFly->NotifyBackground( pFly->GetPageFrm(),
-                                        pFly->GetObjRectWithSpaces(),
-                                        PREP_FLY_ARRIVE );
-                // invalidate position of anchor frame in order to force
-                // a re-format of the anchor frame, which also causes a
-                // re-format of the invalid previous frames of the anchor frame.
-                pFly->AnchorFrm()->InvalidatePos();
-            }
+        // lock position
+        pFly->LockPosition();
+
+        if ( !pFly->ConsiderForTextWrap() )
+        {
+            // indicate that object has to be considered for text wrap
+            pFly->SetConsiderForTextWrap( true );
+            // invalidate 'background' in order to allow its 'background'
+            // to wrap around it.
+            pFly->NotifyBackground( pFly->GetPageFrm(),
+                                    pFly->GetObjRectWithSpaces(),
+                                    PREP_FLY_ARRIVE );
+            // invalidate position of anchor frame in order to force
+            // a re-format of the anchor frame, which also causes a
+            // re-format of the invalid previous frames of the anchor frame.
+            pFly->AnchorFrm()->InvalidatePos();
         }
     }
 }


More information about the Libreoffice-commits mailing list