]> git.lyx.org Git - lyx.git/blobdiff - lib/lyx2lyx/LyX.py
fix bug 2026 and bug 2088
[lyx.git] / lib / lyx2lyx / LyX.py
index 729425bb3988c2ed01fac55e3f7ddb53ced641f5..187a30821322fa0edc13db30ac5aff2ac16c7eb4 100644 (file)
@@ -111,6 +111,10 @@ class LyX_Base:
 
         self.backend = "latex"
         self.textclass = "article"
+        # This is a hack: We use '' since we don't know the default
+        # layout of the text class. LyX will parse it as default layout.
+        # FIXME: Read the layout file and use the real default layout
+        self.default_layout = ''
         self.header = []
         self.preamble = []
         self.body = []
@@ -291,6 +295,14 @@ class LyX_Base:
         self.header[i] = '\\%s %s' % (param, str(value))
 
 
+    def is_default_layout(self, layout):
+        " Check whether a layout is the default layout of this class."
+        # FIXME: Check against the real text class default layout
+        if layout == 'Standard' or layout == self.default_layout:
+            return 1
+        return 0
+
+
     def convert(self):
         "Convert from current (self.format) to self.end_format."
         mode, convertion_chain = self.chain()