]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insettext.C
some reindentation, revert workarea xpos++, constify, remove all traces of LyXParagra...
[lyx.git] / src / insets / insettext.C
index 2af0d6d1701194d6f6a2ac950e48da59448839be..b4aead7368dadb18d88da3387c3a808cd7607237 100644 (file)
@@ -177,24 +177,7 @@ void InsetText::Read(Buffer const * buf, LyXLex & lex)
        char depth = 0; // signed or unsigned?
        LyXFont font(LyXFont::ALL_INHERIT);
 
-#if 0
-       // delete all instances of LyXText before deleting the paragraps used
-       // by it.
-       for (Cache::iterator cit = cache.begin(); cit != cache.end(); ++cit) {
-               delete (*cit).second;
-               (*cit).second = 0;
-       }
-
-       while (par) {
-               LyXParagraph * tmp = par->next();
-               delete par;
-               par = tmp;
-       }
-
-       par = new LyXParagraph;
-#else
        clear();
-#endif
        
        while (lex.IsOK()) {
                lex.nextToken();
@@ -1487,20 +1470,12 @@ void InsetText::SetParagraphData(LyXParagraph * p)
                par = tmp;
        }
 
-#if 0
-       par = p->Clone();
-#else
        par = new LyXParagraph(*p);
-#endif
        par->SetInsetOwner(this);
        LyXParagraph * np = par;
        while (p->next()) {
                p = p->next();
-#if 0
-               np->next(p->Clone());
-#else
                np->next(new LyXParagraph(*p));
-#endif
                np->next()->previous(np);
                np = np->next();
                np->SetInsetOwner(this);