]> git.lyx.org Git - lyx.git/blobdiff - src/paragraph.C
zlib stuff
[lyx.git] / src / paragraph.C
index daeec8dd78ba8e850d40c06b5973d6db4d9d3db0..a637f98abeec94cc502283046865a552d0943da8 100644 (file)
@@ -240,6 +240,8 @@ void Paragraph::write(Buffer const * buf, ostream & os,
        }
        Changes::lyxMarkChange(os, column, curtime,
                running_change, Change(Change::UNCHANGED));
+
+       os << "\n\\end_layout\n";
 }
 
 
@@ -460,8 +462,9 @@ LyXFont const Paragraph::getFont(BufferParams const & bparams, pos_type pos,
        LyXFont tmpfont = getFontSettings(bparams, pos);
        tmpfont.realize(layoutfont);
        tmpfont.realize(outerfont);
+       tmpfont.realize(bparams.getLyXTextClass().defaultfont());
 
-       return realizeFont(tmpfont, bparams);
+       return tmpfont;
 }
 
 
@@ -473,8 +476,9 @@ LyXFont const Paragraph::getLabelFont(BufferParams const & bparams,
        LyXFont tmpfont = lout->labelfont;
        tmpfont.setLanguage(getParLanguage(bparams));
        tmpfont.realize(outerfont);
+       tmpfont.realize(bparams.getLyXTextClass().defaultfont());
 
-       return realizeFont(tmpfont, bparams);
+       return tmpfont;
 }
 
 
@@ -486,8 +490,9 @@ LyXFont const Paragraph::getLayoutFont(BufferParams const & bparams,
        LyXFont tmpfont = lout->font;
        tmpfont.setLanguage(getParLanguage(bparams));
        tmpfont.realize(outerfont);
+       tmpfont.realize(bparams.getLyXTextClass().defaultfont());
 
-       return realizeFont(tmpfont, bparams);
+       return tmpfont;
 }
 
 
@@ -1156,15 +1161,10 @@ bool Paragraph::isWord(pos_type pos) const
 Language const *
 Paragraph::getParLanguage(BufferParams const & bparams) const
 {
-       if (!empty()) {
+       if (!empty())
                return getFirstFontSettings().language();
 #warning FIXME we should check the prev par as well (Lgb)
-#if 0
-       } else if (previous_) {
-               return previous_->getParLanguage(bparams);
-#endif
-       }else
-               return bparams.language;
+       return bparams.language;
 }