mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 01:59:02 +00:00
file format change due to new change tracking behaviour
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17187 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
0a36347897
commit
a69aaf5685
@ -1,6 +1,24 @@
|
||||
LyX file-format changes
|
||||
-----------------------§
|
||||
|
||||
2007-02-14 Georg Baum <Georg.Baum@post.rwth-aachen.de>
|
||||
|
||||
* format incremented to 261: \output_changes is now considered
|
||||
even if \tracking_changes is false. This allows to output existing
|
||||
changes even if future changes are not tracked anymore.
|
||||
The old combination
|
||||
|
||||
\tracking_changes false
|
||||
\output_changes true
|
||||
|
||||
is therefore converted to
|
||||
|
||||
\tracking_changes false
|
||||
\output_changes false
|
||||
|
||||
on upgrade. Nothing is done on downgrade since the new behaviour is
|
||||
not supported in older formats.
|
||||
|
||||
2007-02-13 Georg Baum <Georg.Baum@post.rwth-aachen.de>
|
||||
|
||||
* format incremented to 260: Allow utf8x \inputencoding
|
||||
|
@ -74,7 +74,7 @@ format_relation = [("0_06", [200], generate_minor_versions("0.6" , 4)),
|
||||
("1_2", [220], generate_minor_versions("1.2" , 4)),
|
||||
("1_3", [221], generate_minor_versions("1.3" , 7)),
|
||||
("1_4", range(222,246), generate_minor_versions("1.4" , 3)),
|
||||
("1_5", range(246,261), generate_minor_versions("1.5" , 0))]
|
||||
("1_5", range(246,262), generate_minor_versions("1.5" , 0))]
|
||||
|
||||
|
||||
def formats_list():
|
||||
|
@ -1194,6 +1194,22 @@ def revert_utf8x(document):
|
||||
document.inputencoding = get_value(document.header, "\\inputencoding", 0)
|
||||
|
||||
|
||||
def convert_changes(document):
|
||||
" Switch output_changes off if tracking_changes is off. "
|
||||
i = find_token(document.header, '\\tracking_changes', 0)
|
||||
if i == -1:
|
||||
document.warning("Malformed lyx document: Missing '\\tracking_changes'.")
|
||||
return
|
||||
j = find_token(document.header, '\\output_changes', 0)
|
||||
if j == -1:
|
||||
document.warning("Malformed lyx document: Missing '\\output_changes'.")
|
||||
return
|
||||
tracking_changes = get_value(document.header, "\\tracking_changes", i)
|
||||
output_changes = get_value(document.header, "\\output_changes", j)
|
||||
if tracking_changes == "false" and output_changes == "true":
|
||||
document.header[j] = "\\output_changes false"
|
||||
|
||||
|
||||
##
|
||||
# Conversion hub
|
||||
#
|
||||
@ -1213,9 +1229,11 @@ convert = [[246, []],
|
||||
[257, [convert_caption]],
|
||||
[258, [convert_lyxline]],
|
||||
[259, [convert_accent, normalize_font_whitespace]],
|
||||
[260, []]]
|
||||
[260, []],
|
||||
[261, [convert_changes]]]
|
||||
|
||||
revert = [[259, [revert_utf8x]],
|
||||
revert = [[260, []],
|
||||
[259, [revert_utf8x]],
|
||||
[258, []],
|
||||
[257, []],
|
||||
[256, [revert_caption]],
|
||||
|
@ -141,7 +141,7 @@ using std::string;
|
||||
|
||||
namespace {
|
||||
|
||||
int const LYX_FORMAT = 260;
|
||||
int const LYX_FORMAT = 261;
|
||||
|
||||
} // namespace anon
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user