]> git.lyx.org Git - lyx.git/commitdiff
Fix compatibility read for "latex" layout as first paragraph of the
authorJürgen Vigna <jug@sad.it>
Tue, 30 Apr 2002 10:58:10 +0000 (10:58 +0000)
committerJürgen Vigna <jug@sad.it>
Tue, 30 Apr 2002 10:58:10 +0000 (10:58 +0000)
buffer (fix #337).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4094 a592a061-630c-0410-9148-cb99ea01b6c8

src/ChangeLog
src/buffer.C

index 622551b67007436ccd45e7c6778bd52c6b51848d..5a4b257c06474b0c1046e68138e208c8ceafb254 100644 (file)
@@ -1,3 +1,8 @@
+2002-04-30  Juergen Vigna  <jug@sad.it>
+
+       * buffer.C (parseSingleLyXformat2Token): reset the font before the
+       ert compatibility check for "latex" layout.
+
 2002-04-29  Dekel Tsur  <dekelts@tau.ac.il>
 
        * buffer.C (parseSingleLyXformat2Token): Fix reading of old format 
index c5c3bfbbcd60a6e11098a9bd6791a1dd8a6cf61d..c3e987b9597ebc6e85322d6f43ed654ca58e6507 100644 (file)
@@ -482,6 +482,13 @@ Buffer::parseSingleLyXformat2Token(LyXLex & lex, Paragraph *& par,
                        layoutname = tclass.defaultLayoutName();
                }
 
+               // reset the font as we start a new layout and if the font is
+               // not ALL_INHERIT,document_language then it will be set to the
+               // right values after this tag (Jug 20020420)
+               font = LyXFont(LyXFont::ALL_INHERIT, params.language);
+               if (file_format < 216 && params.language->lang() == "hebrew")
+                       font.setLanguage(default_language);
+               
 #ifndef NO_COMPABILITY
                if (compare_no_case(layoutname, "latex") == 0) {
                        ert_comp.active = true;
@@ -555,10 +562,6 @@ Buffer::parseSingleLyXformat2Token(LyXLex & lex, Paragraph *& par,
                        if (!layout.obsoleted_by().empty())
                                par->layout(layout.obsoleted_by());
                        par->params().depth(depth);
-                       font = LyXFont(LyXFont::ALL_INHERIT, params.language);
-                       if (file_format < 216
-                           && params.language->lang() == "hebrew")
-                               font.setLanguage(default_language);
 #if USE_CAPTION
                }
 #endif