Infinite loop fix that disables the experitmenal iterative mode in KoTextDocumentLayout::positionAnchoredObstructions

Sebastian Sauer mail at dipe.org
Sun May 15 20:40:45 BST 2011


Following patch fixes infinite loops with

http://www.zagge.de/anchor/110407/www.coe.unt.edu%252Fsystem%252Ffiles%252F433%252F833%252FTEKS%2520A2%2520B%2520Cab%2520Ride.docx
http://www.zagge.de/anchor/110407/www.colfinder.net%252Fmaterials%252FMalaria_Course%252Fodt%252FUNIT_6.odt
http://www.zagge.de/anchor/110407/www.itrainonline.org%252Fitrainonline%252Fmmtk%252Fwireless_en%252Ffiles_2%2530%25308%252F14_en_wimax-
and-non-standard-solutions_handout.odt

We need probably a better long-term solution to still make 20.172 working as 
expected :-/

Commit, add comment and address later?

diff --git a/libs/textlayout/KoTextDocumentLayout.cpp 
b/libs/textlayout/KoTextDocumentLayout.cpp
index 71f7b91..0a5ec61 100644
--- a/libs/textlayout/KoTextDocumentLayout.cpp
+++ b/libs/textlayout/KoTextDocumentLayout.cpp
@@ -346,6 +355,7 @@ void KoTextDocumentLayout::positionAnchoredObstructions()
         }
         break;
     case 3: //experimental iterative mode
+/*
         // For iterative (20.172) we layout until no more movement is 
happening
         while (d->anchoringIndex < d->textAnchors.size()) {
             KoTextAnchor *textAnchor = d->textAnchors[d->anchoringIndex];
@@ -362,6 +372,7 @@ void KoTextDocumentLayout::positionAnchoredObstructions()
             // move the index to next not positioned shape
             d->anchoringIndex++;
         }
+*/
         break;
     }
 }



More information about the calligra-devel mailing list