Update format to 340.

Move

\begin_layout

to

\begin_layout Plain Layout

for consistency.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26020 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
José Matox 2008-08-01 17:57:01 +00:00
parent 04ab3867c4
commit 94b2838bec
3 changed files with 77 additions and 61 deletions

View File

@ -1,6 +1,9 @@
LyX file-format changes
-----------------------
2008-08-01 José Matos <jamatos@fc.up.pt>
* Format incremented to 340: move empty layouts to "Plain Layout".
2008-07-28 Richard Heck <rgheck@brown.edu>
* Format incremented to 339: removal of default modules.

View File

@ -1315,7 +1315,8 @@ def convert_ams_classes(document):
return
m = r.match(document.body[i])
if m == None:
document.warning("Weirdly formed \\begin_layout at line %d of body!" % i)
# This is an empty layout
# document.warning("Weirdly formed \\begin_layout at line %d of body!" % i)
i += 1
continue
m = m.group(1)
@ -2873,6 +2874,16 @@ def revert_removed_modules(document):
document.header[i : j + 1] = []
def add_plain_layout(document):
i = 0
while True:
i = find_token(document.body, "\\begin_layout", i)
if i == -1:
return
if len(document.body[i].split()) == 1:
document.body[i] = "\\begin_layout Plain Layout"
i += 1
##
# Conversion hub
#
@ -2941,9 +2952,11 @@ convert = [[277, [fix_wrong_tables]],
[337, [convert_display_enum]],
[338, []],
[339, []],
[340, [add_plain_layout]]
]
revert = [[338, [revert_removed_modules]],
revert = [[339, []],
[338, [revert_removed_modules]],
[337, [revert_polytonicgreek]],
[336, [revert_display_enum]],
[335, [remove_fontsCJK]],

View File

@ -115,7 +115,7 @@ namespace os = support::os;
namespace {
int const LYX_FORMAT = 339; //rgh: removed modules
int const LYX_FORMAT = 340; //jamatos: add plain layout
typedef map<string, bool> DepClean;
typedef map<docstring, pair<InsetLabel const *, Buffer::References> > RefCache;