]> git.lyx.org Git - features.git/commitdiff
Change \papersize Default|Custom to lower letter for consistency.
authorJosé Matox <jamatos@lyx.org>
Sun, 15 Aug 2004 21:52:13 +0000 (21:52 +0000)
committerJosé Matox <jamatos@lyx.org>
Sun, 15 Aug 2004 21:52:13 +0000 (21:52 +0000)
Fix comment.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8948 a592a061-630c-0410-9148-cb99ea01b6c8

lib/lyx2lyx/ChangeLog
lib/lyx2lyx/lyx_1_4.py
src/ChangeLog
src/lyxlex.C
src/tex-strings.C

index b688d93dccd6ccb4ec08d0b8bc77f84a30c8be57..7193f4946f7979a0d0e4ccf7828ba5a664c1cc07 100644 (file)
@@ -1,3 +1,9 @@
+2004-08-15  José Matos  <jamatos@lyx.org>
+
+       * lyx_1_4.py (normalize_papersize, denormalize_papersize):
+       \papersize Default -> \papersize default
+       \papersize Custom -> \papersize custom
+
 2004-08-15  José Matos  <jamatos@lyx.org>
 
        * LyX.py: new file that gathers all the knowleadge of the LyX file
index f2265dd67857967472237f1cef63bbddfc63823a..947915f357273e820826358667555e55d6848e14 100644 (file)
@@ -1444,6 +1444,32 @@ def remove_begin_body(body, opt):
         del body[i]
 
 
+##
+# \papersize
+#
+def normalize_papersize(header):
+    i = find_token(header, '\\papersize', 0)
+    if i == -1:
+        return
+
+    tmp = split(header[i])
+    if tmp[1] == "Default":
+        header[i] = '\\papersize default'
+        return
+    if tmp[1] == "Custom":
+        header[i] = '\\papersize custom'
+
+
+def denormalize_papersize(header):
+    i = find_token(header, '\\papersize', 0)
+    if i == -1:
+        return
+
+    tmp = split(header[i])
+    if tmp[1] == "custom":
+        header[i] = '\\papersize Custom'
+
+
 ##
 # Convertion hub
 #
@@ -1529,10 +1555,12 @@ def convert(file):
         convert_bullets(file.header, file)
         add_begin_header(file.header, file)
         add_begin_body(file.body, file)
+        normalize_papersize(file.header)
         file.format = 236
 
 def revert(file):
     if file.format > 235:
+        denormalize_papersize(file.header)
         remove_begin_body(file.body, file)
         remove_begin_header(file.header, file)
         revert_bullets(file.header, file)
index 51f5b488062a334e9d93afdad5ea5a0401a81c19..b6fa72604a8f318838c550f1352304399d3992ac 100644 (file)
@@ -1,3 +1,11 @@
+2004-08-15  José Matos  <jamatos@lyx.org>
+
+       * lyxlex.C (getString): fix comment, buffer::readBody is now
+       buffer:readDocument.
+       
+       * tex-strings.C (string_papersize): Default -> default,
+       Custom -> custom, for consistency with other options.
+
 2004-08-15  Lars Gullik Bjonnes  <larsbj@gullik.net>
 
        * pch.h: new file
index 32c4ace873262f48856f9b1983d2e01ea13f39a8..3e4f0d70dc137fc46ce8fcce36ed2c8f2bae7935 100644 (file)
@@ -147,7 +147,7 @@ string const LyXLex::getString() const
 
 
 // I would prefer to give a tag number instead of an explicit token
-// here, but it is not possible because Buffer::readBody uses
+// here, but it is not possible because Buffer::readDocument uses
 // explicit tokens (JMarc)
 string const LyXLex::getLongString(string const & endtoken)
 {
index b5f68fa0c33aa55868103c396e921e2678b018a2..042533fa412261ebca0d4a1edee32953c4351b7b 100644 (file)
@@ -27,7 +27,7 @@ char const * const string_quotes_language[] = {
 
 
 char const * const string_papersize[] = {
-       "Default", "Custom", "letterpaper", "executivepaper", "legalpaper",
+       "default", "custom", "letterpaper", "executivepaper", "legalpaper",
        "a3paper", "a4paper", "a5paper", "b3paper", "b4paper", "b5paper", ""
 };