From b232321ff8f7c5521e82c41b8c279f6176ddd096 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Lars=20Gullik=20Bj=C3=B8nnes?= Date: Wed, 22 May 2002 12:33:02 +0000 Subject: [PATCH] begin cleanup slowly git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4185 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/ChangeLog | 8 ++++++++ src/ParagraphParameters.h | 2 +- src/buffer.C | 16 +++++++++++++++- src/buffer.h | 2 +- src/paragraph.h | 2 +- 5 files changed, 26 insertions(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 3eef6f2b84..cbdbb7e7de 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,13 @@ 2002-05-22 Lars Gullik Bjønnes + * buffer.C: comment out some some code that depend upon lyx_format + < 220 + + * paragraph.h (NO_PEXTRA_REALLY): turn off all pextra + * ParagraphParameters.h (NO_PEXTRA_REALLY): ditto + + * buffer.h (NO_COMPABILITY): turn off compability + * ColorHandler.C: include scoped_array.hpp * font.C: Use more specific smart_ptr header. diff --git a/src/ParagraphParameters.h b/src/ParagraphParameters.h index 320235e86b..de6b2c0894 100644 --- a/src/ParagraphParameters.h +++ b/src/ParagraphParameters.h @@ -12,7 +12,7 @@ #include "layout.h" // Not yet... lyx 1.3.x or so -//#define NO_PEXTRA_REALLY 1 +#define NO_PEXTRA_REALLY 1 #include "ParameterStruct.h" diff --git a/src/buffer.C b/src/buffer.C index 0f8d2601f0..5aee0fe97e 100644 --- a/src/buffer.C +++ b/src/buffer.C @@ -330,8 +330,11 @@ bool Buffer::readLyXformat2(LyXLex & lex, Paragraph * par) Paragraph * first_par = 0; LyXFont font(LyXFont::ALL_INHERIT, params.language); + +#if 0 if (file_format < 216 && params.language->lang() == "hebrew") font.setLanguage(default_language); +#endif if (!par) { par = new Paragraph; @@ -521,8 +524,11 @@ Buffer::parseSingleLyXformat2Token(LyXLex & lex, Paragraph *& par, // 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 0 if (file_format < 216 && params.language->lang() == "hebrew") font.setLanguage(default_language); +#endif lex.eatLine(); string layoutname = lex.getString(); @@ -1082,7 +1088,7 @@ Buffer::parseSingleLyXformat2Token(LyXLex & lex, Paragraph *& par, if (ert_comp.active && ert_comp.contents.empty()) { ert_comp.font.setLanguage(font.language()); } -#endif +#endif } else if (token == "\\numeric") { lex.next(); font.setNumber(font.setLyXMisc(lex.getString())); @@ -1697,13 +1703,21 @@ bool Buffer::readFile(LyXLex & lex, Paragraph * par) _("Old LyX file format found. " "Use LyX 0.10.x to read this!")); return false; + } else if (file_format < 220) { + Alert::alert(_("ERROR!"), + _("Old LyX file format found. " + "User LyX 1.2.x to read this!")); + return false; } } bool the_end = readLyXformat2(lex, par); params.setPaperStuff(); + +#if 0 // the_end was added in 213 if (file_format < 213) the_end = true; +#endif if (!the_end) { Alert::alert(_("Warning!"), diff --git a/src/buffer.h b/src/buffer.h index f18e03e6f8..8c4e925e81 100644 --- a/src/buffer.h +++ b/src/buffer.h @@ -35,7 +35,7 @@ class ParIterator; // When lyx 1.3.x starts we should enable this // btw. we should also test this with 1.2 so that we // do not get any surprises. (Lgb) -//#define NO_COMPABILITY 1 +#define NO_COMPABILITY 1 /// struct DEPCLEAN { diff --git a/src/paragraph.h b/src/paragraph.h index f6e437064a..ecc95e4fab 100644 --- a/src/paragraph.h +++ b/src/paragraph.h @@ -33,7 +33,7 @@ class Language; // After 1.2.0 is released, during 1.3.0cvs, we enable this. And after // a while we verify that reading of 1.2.x files work perfectly we remove // this code completely. (Lgb) -//#define NO_PEXTRA_REALLY 1 +#define NO_PEXTRA_REALLY 1 // Define this if you want to try out the new storage container for // paragraphs. std::container instead of obfuscated homegrown -- 2.39.2