]> git.lyx.org Git - features.git/commitdiff
Fix bug #2607.
authorRichard Heck <rgheck@comcast.net>
Fri, 26 Nov 2010 17:21:17 +0000 (17:21 +0000)
committerRichard Heck <rgheck@comcast.net>
Fri, 26 Nov 2010 17:21:17 +0000 (17:21 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36520 a592a061-630c-0410-9148-cb99ea01b6c8

lib/layouts/scrclass.inc
lib/layouts/stdlists.inc
lib/lyx2lyx/lyx_2_0.py
src/Buffer.cpp

index a0c77e1ca3b1d7fc97c7d844208911d13c4d7afc..46a0e263e76ab65da898d79e71c55dfc0acf6774 100644 (file)
@@ -4,7 +4,8 @@
 # Update for Koma Script Release >=2.8q
 # Juergen Spitzmueller <j.spitzmueller@gmx.de>, 2003/2/08.
 # Mapped List to Labeling
-# Guenter Milde <g.milde web.de>
+# Guenter Milde <milde users.berlios.de>, 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
index c2e97cd7d69039f8dba4f722236527e20fab8744..07a9f8cc9f2f772a1fc6a36c3f8d29bde01eb3eb 100644 (file)
@@ -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
index 492a6cb1cb5a78472f330d352c649d74e18613d5..0478e722724dd4dea0c435845781da37fd447eed 100644 (file)
@@ -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]],
index 28ee885900f81f70b90c1c31745521f9e2b14eff..b1daedf3ca4c2c5c9d2b92d50cc7a05dadbf877c 100644 (file)
@@ -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<string, bool> DepClean;
 typedef map<docstring, pair<InsetLabel const *, Buffer::References> > RefCache;