[Open Office] Bug 162979 - Hang on .sxi import

Jian Hua Jiao jjiao at novell.com
Sun Apr 23 10:41:00 EDT 2006


In the swx file, its loop caused by an page be processed at format time,
the
validlayout data change by pCntnt->OptCalc(). the function changed the
InvalidFlyout to true. then the loop occur.

Does it mean that test file contain an error format against current OOo?

I think this file should be created by MS office.

this loop caused by an bad content that can not be repaired. Then we
should add
an check before return. 
I think this is adjusted for fault tolerant. for more improve,  Better
format
method should be improved.


the current method just can deal with the format error that occur at
last
content of the page. but if the error is not at final. how to do?

add patch.
-------------- next part --------------
--- sw/source/core/layout/layact.cxx.m163	2006-04-22 18:26:26.000000000 +0800
+++ sw/source/core/layout/layact.cxx	2006-04-23 21:58:57.000000000 +0800
@@ -2251,23 +2251,28 @@
 			}
 
 			if ( IsAgain() )
+            {
 				return FALSE;
+            }
 
 			//Wenn Layout oder Flys wieder Invalid sind breche ich die Verarbeitung
 			//vorlaeufig ab - allerdings nicht fuer die BrowseView, denn dort wird
 			//das Layout staendig ungueltig, weil die Seitenhoehe angepasst wird.
 			//Desgleichen wenn der Benutzer weiterarbeiten will und mindestens ein
 			//Absatz verarbeitet wurde.
-			if ( (!pTab || (pTab && !bInValid)) )
+			if ( ( !pTab || (pTab && !bInValid) ) )
 			{
                 CheckIdleEnd();
                 // OD 14.04.2003 #106346# - consider interrupt formatting.
-                if ( ( IsInterrupt() && !mbFormatCntntOnInterrupt ) ||
+                if ( ( ( IsInterrupt() && !mbFormatCntntOnInterrupt ) ||
                      ( !bBrowse && pPage->IsInvalidLayout() ) ||
                      // OD 07.05.2003 #109435# - consider interrupt formatting
-                     ( IS_FLYS && IS_INVAFLY && !mbFormatCntntOnInterrupt )
+                     ( IS_FLYS && IS_INVAFLY && !mbFormatCntntOnInterrupt ) )
+                     && pCntnt->GetNextCntntFrm()
                    )
+                {
 					return FALSE;
+                }
 			}
 			if ( pOldUpper != pCntnt->GetUpper() )
 			{
@@ -2349,9 +2354,11 @@
 			if ( IsIdle() )
 			{
 				CheckIdleEnd();
-                // OD 14.04.2003 #106346# - consider interrupt formatting.
-                if ( IsInterrupt() && !mbFormatCntntOnInterrupt )
+            	// OD 14.04.2003 #106346# - consider interrupt formatting.
+           		if ( IsInterrupt() && !mbFormatCntntOnInterrupt )
+				{
 					return FALSE;
+				}
 			}
 			if ( bBrowse && !IsIdle() && !IsCalcLayout() && !IsComplete() &&
 				 pCntnt->Frm().Top() > pImp->GetShell()->VisArea().Bottom())


More information about the Openoffice mailing list