[Libreoffice-commits] core.git: sw/source

Jan Holesovsky kendy at suse.cz
Wed Apr 17 01:33:05 PDT 2013


 sw/source/core/layout/layact.cxx |   26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

New commits:
commit 09f50c017fe106b7bf94f60933667b55130ea1b5
Author: Jan Holesovsky <kendy at suse.cz>
Date:   Wed Apr 17 10:30:28 2013 +0200

    Reintroduce unlockPositionOfObjects().
    
    This unlocking code was accidentally removed in commit
    120922361a5928ea4437ffe253ce209abd7060b0.  Not sure if it is still necessary,
    but I am at the moment unable to prove it is not, so better to be safe :-)
    
    Change-Id: I20a7cf3299de75182f890efb0d192e54c1b2543d

diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx
index bb46900..71659ce 100644
--- a/sw/source/core/layout/layact.cxx
+++ b/sw/source/core/layout/layact.cxx
@@ -498,6 +498,24 @@ SwPageFrm* SwLayAction::CheckFirstVisPage( SwPageFrm *pPage )
     return pPage;
 }
 
+// #114798# - unlock position on start and end of page
+// layout process.
+static void unlockPositionOfObjects( SwPageFrm *pPageFrm )
+{
+    assert( pPageFrm );
+
+    SwSortedObjs* pObjs = pPageFrm->GetSortedObjs();
+    if ( pObjs )
+    {
+        sal_uInt32 i = 0;
+        for ( ; i < pObjs->Count(); ++i )
+        {
+            SwAnchoredObject* pObj = (*pObjs)[i];
+            pObj->UnlockPosition();
+        }
+    }
+}
+
 void SwLayAction::InternalAction()
 {
     OSL_ENSURE( pRoot->Lower()->IsPageFrm(), ":-( No page below the root.");
@@ -597,6 +615,8 @@ void SwLayAction::InternalAction()
             while ( !IsInterrupt() && !IsNextCycle() &&
                     ((IS_FLYS && IS_INVAFLY) || pPage->IsInvalid()) )
             {
+                unlockPositionOfObjects( pPage );
+
                 // #i28701#
                 SwObjectFormatter::FormatObjsAtFrm( *pPage, *pPage, this );
                 if ( !IS_FLYS )
@@ -655,6 +675,8 @@ void SwLayAction::InternalAction()
                     if( bNoLoop )
                         pLayoutAccess->GetLayouter()->LoopControl( pPage, LOOP_PAGE );
                 }
+
+                unlockPositionOfObjects( pPage );
             }
 
             // A previous page may be invalid again.
@@ -769,6 +791,8 @@ void SwLayAction::InternalAction()
         while ( pPg && ( pPg->Frm().Top() < nBottom ||
                          ( IsIdle() && pPg == pPage ) ) )
         {
+            unlockPositionOfObjects( pPg );
+
             XCHECKPAGE;
 
             // #i81146# new loop control
@@ -843,6 +867,8 @@ void SwLayAction::InternalAction()
                     }
                 }
             }
+
+            unlockPositionOfObjects( pPg );
             pPg = (SwPageFrm*)pPg->GetNext();
         }
         // reset flag for special interrupt content formatting.


More information about the Libreoffice-commits mailing list