From 4acce5c117e0d6101113f38e2e058d284b866de9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Matox?= Date: Tue, 5 Oct 2004 12:56:22 +0000 Subject: [PATCH] replace nextToken by more appropriate lex methods. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9049 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/ChangeLog | 5 +++++ src/ParagraphParameters.C | 2 +- src/insets/ChangeLog | 12 ++++++++++-- src/insets/insetfloatlist.C | 2 +- src/insets/insetquotes.C | 2 +- src/insets/insetspace.C | 2 +- src/insets/insetspecialchar.C | 2 +- src/insets/insettabular.C | 4 ++-- src/text.C | 4 ++-- 9 files changed, 24 insertions(+), 11 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 8031b23dfc..23a28c304c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2004-10-05 José Matos + * ParagraphParameters.C (read): + * text.C (readParToken): replace nexToken by more appropriate lex + methods. + 2004-10-05 Hartmut Haase * LaTeX.C (runMakeIndex): diff --git a/src/ParagraphParameters.C b/src/ParagraphParameters.C index 428063f0fd..52c3385461 100644 --- a/src/ParagraphParameters.C +++ b/src/ParagraphParameters.C @@ -206,7 +206,7 @@ void ParagraphParameters::read(LyXLex & lex) if (token == "\\noindent") { noindent(true); } else if (token == "\\leftindent") { - lex.nextToken(); + lex.next(); LyXLength value(lex.getString()); leftIndent(value); } else if (token == "\\start_of_appendix") { diff --git a/src/insets/ChangeLog b/src/insets/ChangeLog index 3f315997e8..4a18c01314 100644 --- a/src/insets/ChangeLog +++ b/src/insets/ChangeLog @@ -1,4 +1,12 @@ -2004-09-29 Andreas Vox +2004-10-05 José Matos + * insetfloatlist.C (read): + * insetquotes.C (read): + * insetspace.C (read): + * insetspecialchar.C (read): + * insettabular.C (read): replace nextToken by more appropriate lex + methods. + +2004-09-29 Andreas Vox * insetgraphics.C (createDocBookAttribute, docbook) : convert scale, width, height and keepaspectratio to Docbook standards) @@ -6,7 +14,7 @@ * insetgraphics.[hC] (toDocbookLength): new method to convert TeX units to Docbook units where possible. -2004-09-29 Andreas Vox +2004-09-29 Andreas Vox * insetgraphics.C (docbook): create inlinegraphic instead of graphic. diff --git a/src/insets/insetfloatlist.C b/src/insets/insetfloatlist.C index cdd1d857af..54d5f67a0d 100644 --- a/src/insets/insetfloatlist.C +++ b/src/insets/insetfloatlist.C @@ -82,7 +82,7 @@ void InsetFloatList::read(Buffer const & buf, LyXLex & lex) } else lex.printError("InsetFloatList: Parse error: `$$Token'"); while (lex.isOK()) { - lex.nextToken(); + lex.next(); token = lex.getString(); if (token == "\\end_inset") break; diff --git a/src/insets/insetquotes.C b/src/insets/insetquotes.C index 78424adc99..3774e4335d 100644 --- a/src/insets/insetquotes.C +++ b/src/insets/insetquotes.C @@ -254,7 +254,7 @@ void InsetQuotes::write(Buffer const &, ostream & os) const void InsetQuotes::read(Buffer const &, LyXLex & lex) { - lex.nextToken(); + lex.next(); parseString(lex.getString()); lex.next(); if (lex.getString() != "\\end_inset") { diff --git a/src/insets/insetspace.C b/src/insets/insetspace.C index bca1456318..11cc7925e1 100644 --- a/src/insets/insetspace.C +++ b/src/insets/insetspace.C @@ -137,7 +137,7 @@ void InsetSpace::write(Buffer const &, ostream & os) const // This function will not be necessary when lyx3 void InsetSpace::read(Buffer const &, LyXLex & lex) { - lex.nextToken(); + lex.next(); string const command = lex.getString(); if (command == "\\space") diff --git a/src/insets/insetspecialchar.C b/src/insets/insetspecialchar.C index fb3f7547a5..c9ea76abe5 100644 --- a/src/insets/insetspecialchar.C +++ b/src/insets/insetspecialchar.C @@ -138,7 +138,7 @@ void InsetSpecialChar::write(Buffer const &, ostream & os) const // This function will not be necessary when lyx3 void InsetSpecialChar::read(Buffer const &, LyXLex & lex) { - lex.nextToken(); + lex.next(); string const command = lex.getString(); if (command == "\\-") diff --git a/src/insets/insettabular.C b/src/insets/insettabular.C index c3e1f89839..fd5c283bf5 100644 --- a/src/insets/insettabular.C +++ b/src/insets/insettabular.C @@ -204,10 +204,10 @@ void InsetTabular::read(Buffer const & buf, LyXLex & lex) if (old_format) return; - lex.nextToken(); + lex.next(); string token = lex.getString(); while (lex.isOK() && (token != "\\end_inset")) { - lex.nextToken(); + lex.next(); token = lex.getString(); } if (token != "\\end_inset") { diff --git a/src/text.C b/src/text.C index aaa1fbf088..05954f6ddc 100644 --- a/src/text.C +++ b/src/text.C @@ -324,14 +324,14 @@ void readParToken(Buffer const & buf, Paragraph & par, LyXLex & lex, par.cleanChanges(); change = Change(Change::UNCHANGED); } else if (token == "\\change_inserted") { - lex.nextToken(); + lex.eatLine(); std::istringstream is(lex.getString()); int aid; lyx::time_type ct; is >> aid >> ct; change = Change(Change::INSERTED, bp.author_map[aid], ct); } else if (token == "\\change_deleted") { - lex.nextToken(); + lex.eatLine(); std::istringstream is(lex.getString()); int aid; lyx::time_type ct;