]> git.lyx.org Git - lyx.git/commitdiff
Change lyx2lyx to conform to new standard URL inset.
authorRichard Heck <rgheck@comcast.net>
Tue, 13 Nov 2007 15:30:29 +0000 (15:30 +0000)
committerRichard Heck <rgheck@comcast.net>
Tue, 13 Nov 2007 15:30:29 +0000 (15:30 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21586 a592a061-630c-0410-9148-cb99ea01b6c8

lib/lyx2lyx/lyx_1_6.py

index 3a3fee3a3d7b5df2a2a086cfee19494b2009759c..d62ef3eb4df9e40760e553692d397fb80186a5e2 100644 (file)
@@ -521,7 +521,6 @@ def convert_url(document):
     'Convert url insets to url charstyles'
     if document.backend == "docbook":
       return
-    didone = False
     i = 0
     while True:
       i = find_token(document.body, "\\begin_inset CommandInset url", i)
@@ -555,30 +554,8 @@ def convert_url(document):
         "\\end_layout",
         ""]
       document.body[i:k] = newstuff
-      didone = True
       i = k
 
-    #If we did one, we need to add URL to the modules
-    if didone:
-      i = find_token(document.header, "\\begin_modules", 0)
-      if i == -1:
-        #No modules yet included
-        i = find_token(document.header, "\\textclass", 0)
-        if i == -1:
-          document.warning("Malformed LyX document: No \\textclass!!")
-          return
-        modinfo = ["\\begin_modules", "URL", "\\end_modules"]
-        document.header[i + 1: i + 1] = modinfo
-        return
-      j = find_token(document.header, "\\end_modules", i)
-      if j == -1:
-        document.warning("Malformed LyX document: No \\end_modules.")
-        return
-      k = find_token(document.header, "URL", i)
-      if k != -1 and k < j:
-        return
-      document.header.insert(i + 1, "URL")
-
 
 def revert_href(document):
     'Reverts hyperlink insets (href) to url insets (url)'