BufferParams.cpp: fix the order for page sizes, fileformat change is needed, fixes http://bugzilla.lyx.org/show_bug.cgi?id=4868

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24792 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Uwe Stöhr 2008-05-15 22:54:13 +00:00
parent f185e01c68
commit b2b4cb1fe3
4 changed files with 37 additions and 4 deletions

View File

@ -1,6 +1,9 @@
LyX file-format changes
-----------------------
2008-05-16 Uwe Stöhr <uwestoehr@web.de>
* Format incremented to 334: fix for bug 4868.
2008-05-09 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
* Format incremented to 333: fixes in the APA layout.

View File

@ -2229,7 +2229,7 @@ def revert_graphics_group(document):
def update_apa_styles(document):
' Replace obsolete styles'
' Replace obsolete styles '
if document.textclass != "apa":
return
@ -2252,6 +2252,34 @@ def update_apa_styles(document):
i += 1
def convert_paper_sizes(document):
' exchange size options legalpaper and executivepaper to correct order '
# routine is needed to fix http://bugzilla.lyx.org/show_bug.cgi?id=4868
i = 0
j = 0
i = find_token(document.header, "\\papersize executivepaper", 0)
if i != -1:
document.header[i] = "\\papersize legalpaper"
return
j = find_token(document.header, "\\papersize legalpaper", 0)
if j != -1:
document.header[j] = "\\papersize executivepaper"
def revert_paper_sizes(document):
' exchange size options legalpaper and executivepaper to correct order '
i = 0
j = 0
i = find_token(document.header, "\\papersize executivepaper", 0)
if i != -1:
document.header[i] = "\\papersize legalpaper"
return
j = find_token(document.header, "\\papersize legalpaper", 0)
if j != -1:
document.header[j] = "\\papersize executivepaper"
##
# Conversion hub
#
@ -2314,9 +2342,11 @@ convert = [[277, [fix_wrong_tables]],
[331, [convert_ltcaption]],
[332, []],
[333, [update_apa_styles]],
[334, [convert_paper_sizes]],
]
revert = [[332, []],
revert = [[333, [revert_paper_sizes]],
[332, []],
[331, [revert_graphics_group]],
[330, [revert_ltcaption]],
[329, [revert_leftarrowfill, revert_rightarrowfill, revert_upbracefill, revert_downbracefill]],

View File

@ -115,7 +115,7 @@ namespace os = support::os;
namespace {
int const LYX_FORMAT = 333;
int const LYX_FORMAT = 334;
typedef map<string, bool> DepClean;
typedef map<docstring, pair<InsetLabel const *, Buffer::References> > RefCache;

View File

@ -68,7 +68,7 @@ static char const * const string_quotes_language[] = {
static char const * const string_papersize[] = {
"default", "custom", "letterpaper", "executivepaper", "legalpaper",
"default", "custom", "letterpaper", "legalpaper", "executivepaper",
"a3paper", "a4paper", "a5paper", "b3paper", "b4paper", "b5paper", ""
};