From 7f8b868f4a40f3c5e754da36bc40165e42cd5e6c Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Fri, 26 Nov 2010 17:21:17 +0000 Subject: [PATCH] Fix bug #2607. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36520 a592a061-630c-0410-9148-cb99ea01b6c8 --- lib/layouts/scrclass.inc | 8 ++------ lib/layouts/stdlists.inc | 7 ++++++- lib/lyx2lyx/lyx_2_0.py | 17 +++++++++++++++-- src/Buffer.cpp | 2 +- 4 files changed, 24 insertions(+), 10 deletions(-) diff --git a/lib/layouts/scrclass.inc b/lib/layouts/scrclass.inc index a0c77e1ca3..46a0e263e7 100644 --- a/lib/layouts/scrclass.inc +++ b/lib/layouts/scrclass.inc @@ -4,7 +4,8 @@ # Update for Koma Script Release >=2.8q # Juergen Spitzmueller , 2003/2/08. # Mapped List to Labeling -# Guenter Milde +# Guenter Milde , 2009-02-02 +# Labeling is now used also in non-KOMA classes Format 30 @@ -39,17 +40,12 @@ Style Description End Style Labeling - CopyStyle List LatexName labeling # overwrite the preamble code definition Preamble EndPreamble End -Style List - Obsoletedby Labeling -End - Input stdsections.inc Style Part diff --git a/lib/layouts/stdlists.inc b/lib/layouts/stdlists.inc index c2e97cd7d6..07a9f8cc9f 100644 --- a/lib/layouts/stdlists.inc +++ b/lib/layouts/stdlists.inc @@ -85,7 +85,7 @@ Style Description End -Style List +Style Labeling Category List Margin Manual LatexType List_Environment @@ -126,3 +126,8 @@ Style List } EndHTMLStyle End + + +Style List + Obsoletedby Labeling +End diff --git a/lib/lyx2lyx/lyx_2_0.py b/lib/lyx2lyx/lyx_2_0.py index 492a6cb1cb..0478e72272 100644 --- a/lib/lyx2lyx/lyx_2_0.py +++ b/lib/lyx2lyx/lyx_2_0.py @@ -2385,6 +2385,17 @@ def revert_use_xetex(document): document.header[i] = "\\use_xetex " + val +def revert_labeling(document): + koma = ("scrartcl", "scrarticle-beamer", "scrbook", "scrlettr", + "scrlttr2", "scrreprt") + if document.textclass in koma: + return + i = 0 + while True: + i = find_token_exact(document.body, "\\begin_layout Labeling", i) + document.body[i] = "\\begin_layout List" + + ## # Conversion hub # @@ -2453,10 +2464,12 @@ convert = [[346, []], [406, [convert_passthru]], [407, []], [408, []], - [409, [convert_use_xetex]] + [409, [convert_use_xetex]], + [410, []] ] -revert = [[408, [revert_use_xetex]], +revert = [[409, [revert_labeling]], + [408, [revert_use_xetex]], [407, [revert_script]], [406, [revert_multirowOffset]], [405, [revert_passthru]], diff --git a/src/Buffer.cpp b/src/Buffer.cpp index 28ee885900..b1daedf3ca 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -128,7 +128,7 @@ namespace { // Do not remove the comment below, so we get merge conflict in // independent branches. Instead add your own. -int const LYX_FORMAT = 409; // spitz use_xetex -> use_non_tex_fonts +int const LYX_FORMAT = 410; // rgh: dummy format for list->labeling typedef map DepClean; typedef map > RefCache; -- 2.39.5