From d009cd4d93b1a1f4bff300096db74e54ab1518bc Mon Sep 17 00:00:00 2001 From: John Levon Date: Wed, 16 Oct 2002 20:27:23 +0000 Subject: [PATCH] Remove \\protected_separator. Tested with load/save a current lyx document, and lyx2lyxing of klyx UserGuide git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5428 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/ChangeLog | 4 ++++ src/buffer.C | 16 +--------------- src/insets/ChangeLog | 4 ++++ src/insets/insetspecialchar.C | 4 +--- 4 files changed, 10 insertions(+), 18 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 9e6eba627c..bf87efabf9 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2002-10-16 John Levon + + * buffer.C: remove \\protected_separator parsing done by lyx2lyx now + 2002-10-16 Jean-Marc Lasgouttes * converter.C (view): add support for $$i (file name) and $$p diff --git a/src/buffer.C b/src/buffer.C index 0acfd71a74..ac3d0e35f7 100644 --- a/src/buffer.C +++ b/src/buffer.C @@ -566,8 +566,7 @@ Buffer::parseSingleLyXformat2Token(LyXLex & lex, Paragraph *& par, string next_token = lex.getString(); if (next_token == "\\-") { par->insertChar(pos, '-', font); - } else if (next_token == "\\protected_separator" - || next_token == "~") { + } else if (next_token == "~") { par->insertChar(pos, ' ', font); } else { lex.printError("Token `$$Token' " @@ -915,19 +914,6 @@ Buffer::parseSingleLyXformat2Token(LyXLex & lex, Paragraph *& par, } else if (token == "\\hfill") { par->insertChar(pos, Paragraph::META_HFILL, font); ++pos; - } else if (token == "\\protected_separator") { // obsolete - // This is a backward compability thingie. (Lgb) - // Remove it later some time...introduced with fileformat - // 2.16. (Lgb) - LyXLayout_ptr const & layout = par->layout(); - - if (layout->free_spacing || par->isFreeSpacing()) { - par->insertChar(pos, ' ', font); - } else { - Inset * inset = new InsetSpecialChar(InsetSpecialChar::PROTECTED_SEPARATOR); - par->insertInset(pos, inset, font); - } - ++pos; } else if (token == "\\bibitem") { // ale970302 if (!par->bibkey) { InsetCommandParams p("bibitem", "dummy"); diff --git a/src/insets/ChangeLog b/src/insets/ChangeLog index 59a486f380..010ee214d1 100644 --- a/src/insets/ChangeLog +++ b/src/insets/ChangeLog @@ -1,3 +1,7 @@ +2002-10-16 John Levon + + * insetspecialchar.C: remove \\protected_separator parsing + 2002-09-25 Juergen Spitzmueller * insetquote.C: fix LaTeX output of quotation marks. diff --git a/src/insets/insetspecialchar.C b/src/insets/insetspecialchar.C index f0f5d5e881..ce473a29f2 100644 --- a/src/insets/insetspecialchar.C +++ b/src/insets/insetspecialchar.C @@ -185,7 +185,6 @@ void InsetSpecialChar::write(Buffer const *, ostream & os) const command = "\\menuseparator"; break; case PROTECTED_SEPARATOR: - //command = "\\protected_separator"; command = "~"; break; } @@ -209,8 +208,7 @@ void InsetSpecialChar::read(Buffer const *, LyXLex & lex) kind_ = LDOTS; else if (command == "\\menuseparator") kind_ = MENU_SEPARATOR; - else if (command == "\\protected_separator" - || command == "~") + else if (command == "~") kind_ = PROTECTED_SEPARATOR; else lex.printError("InsetSpecialChar: Unknown kind: `$$Token'");