mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 10:58:52 +00:00
Fix bug 5411
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27329 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
9179d40890
commit
bd64e75489
@ -1,6 +1,10 @@
|
||||
LyX file-format changes
|
||||
-----------------------
|
||||
|
||||
2008-11-07 José Matos <jamatos@lyx.org>
|
||||
* Format incremented to 345: for docbook backend CharStyle: -> Element:
|
||||
(fix bug 5411)
|
||||
|
||||
2008-10-12 Pavel Sanda <sanda@lyx.org>
|
||||
* Format incremented to 344: sanitize backreference settings
|
||||
for hyperref (fix bug 5340).
|
||||
|
@ -79,8 +79,8 @@ format_relation = [("0_06", [200], minor_versions("0.6" , 4)),
|
||||
("1_2", [220], minor_versions("1.2" , 4)),
|
||||
("1_3", [221], minor_versions("1.3" , 7)),
|
||||
("1_4", range(222,246), minor_versions("1.4" , 5)),
|
||||
("1_5", range(246,277), minor_versions("1.5" , 5)),
|
||||
("1_6", [] , minor_versions("1.6" , 0))]
|
||||
("1_5", range(246,277), minor_versions("1.5" , 6)),
|
||||
("1_6", range(277,346), minor_versions("1.6" , 0))]
|
||||
|
||||
####################################################################
|
||||
# This is useful just for development versions #
|
||||
@ -113,7 +113,7 @@ def get_backend(textclass):
|
||||
" For _textclass_ returns its backend."
|
||||
if textclass == "linuxdoc" or textclass == "manpage":
|
||||
return "linuxdoc"
|
||||
if textclass[:7] == "docbook":
|
||||
if textclass.startswith("docbook") or textclass.startswith("agu-"):
|
||||
return "docbook"
|
||||
return "latex"
|
||||
|
||||
|
@ -3052,6 +3052,31 @@ def convert_backref_options(document):
|
||||
elif k != -1 and j != -1:
|
||||
document.header[k] = "\\pdf_backref section"
|
||||
|
||||
|
||||
def convert_charstyle_element(document):
|
||||
"Convert CharStyle to Element for docbook backend"
|
||||
if document.backend != "docbook":
|
||||
return
|
||||
i = 0
|
||||
while True:
|
||||
i = find_token(document.body, "\\begin_inset Flex CharStyle:", i)
|
||||
if i == -1:
|
||||
return
|
||||
document.body[i] = document.body[i].replace('\\begin_inset Flex CharStyle:',
|
||||
'\\begin_inset Flex Element:')
|
||||
|
||||
def revert_charstyle_element(document):
|
||||
"Convert Element to CharStyle for docbook backend"
|
||||
if document.backend != "docbook":
|
||||
return
|
||||
i = 0
|
||||
while True:
|
||||
i = find_token(document.body, "\\begin_inset Flex Element:", i)
|
||||
if i == -1:
|
||||
return
|
||||
document.body[i] = document.body[i].replace('\\begin_inset Flex Element:',
|
||||
'\\begin_inset Flex CharStyle:')
|
||||
|
||||
##
|
||||
# Conversion hub
|
||||
#
|
||||
@ -3124,10 +3149,12 @@ convert = [[277, [fix_wrong_tables]],
|
||||
[341, []],
|
||||
[342, []],
|
||||
[343, [convert_default_options]],
|
||||
[344, [convert_backref_options]]
|
||||
[344, [convert_backref_options]],
|
||||
[345, [convert_charstyle_element]]
|
||||
]
|
||||
|
||||
revert = [[343, [revert_backref_options]],
|
||||
revert = [[344, [revert_charstyle_element]],
|
||||
[343, [revert_backref_options]],
|
||||
[342, [revert_default_options]],
|
||||
[341, [revert_mongolian]],
|
||||
[340, [revert_tabulators, revert_tabsize]],
|
||||
|
@ -117,7 +117,7 @@ namespace {
|
||||
|
||||
// Do not remove the comment below, so we get merge conflict in
|
||||
// independent branches. Instead add your own.
|
||||
int const LYX_FORMAT = 344; // ps: backref
|
||||
int const LYX_FORMAT = 345; // jamatos: xml elements
|
||||
|
||||
typedef map<string, bool> DepClean;
|
||||
typedef map<docstring, pair<InsetLabel const *, Buffer::References> > RefCache;
|
||||
|
Loading…
Reference in New Issue
Block a user