mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-25 05:55:34 +00:00
provide wrap tables based on the current wrap float implementation
file format increased to 290 git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20713 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
e462715b01
commit
2492def7da
@ -1,6 +1,12 @@
|
||||
LyX file-format changes
|
||||
-----------------------
|
||||
|
||||
2007-10-03 Uwe Stöhr Uwe Stöhr <uwestoehr@web.de>
|
||||
* Format incremented to 291: Add table wrap floats.
|
||||
|
||||
2007-10-03 Martin Vermeer <martin.vermeer@tkk.fi>
|
||||
* Format incremented to 290: ??
|
||||
|
||||
2007-09-25 Richard Heck <rgheck@bobjweil.com>
|
||||
* Format incremented to 288: Change how command insets are
|
||||
represented in LyX files.
|
||||
|
@ -80,7 +80,7 @@ format_relation = [("0_06", [200], minor_versions("0.6" , 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" , 1)),
|
||||
("1_6", range(277,290), minor_versions("1.6" , 0))] #MV, index collapsable
|
||||
("1_6", range(277,291), minor_versions("1.6" , 0))] # Uwe Stöhr, wrap table
|
||||
|
||||
|
||||
def formats_list():
|
||||
|
@ -394,6 +394,17 @@ def revert_latexcommand_index(document):
|
||||
|
||||
|
||||
|
||||
def revert_wraptable(document):
|
||||
"Revert wrap table to wrap figure."
|
||||
i = 0
|
||||
while True:
|
||||
i = find_token(document.body, "\\begin_inset Wrap table", i)
|
||||
if i == -1:
|
||||
return
|
||||
document.body[i] = document.body[i].replace('\\begin_inset Wrap table', '\\begin_inset Wrap figure')
|
||||
i = i + 1
|
||||
|
||||
|
||||
##
|
||||
# Conversion hub
|
||||
#
|
||||
@ -412,9 +423,10 @@ convert = [[277, [fix_wrong_tables]],
|
||||
[287, [convert_wrapfig_options]],
|
||||
[288, [convert_inset_command]],
|
||||
[289, [convert_latexcommand_index]]
|
||||
[290, []]
|
||||
]
|
||||
|
||||
revert = [
|
||||
revert = [[289, [revert_wraptable]],
|
||||
[288, [revert_latexcommand_index]],
|
||||
[287, [revert_inset_command]],
|
||||
[286, [revert_wrapfig_options]],
|
||||
|
@ -374,7 +374,8 @@ Menuset
|
||||
Menu "insert_float"
|
||||
FloatInsert
|
||||
# This has got to be better than "Wrap", anyway
|
||||
Item "Text Wrap Float|W" "wrap-insert figure"
|
||||
Item "Figure Wrap Float|F" "wrap-insert figure"
|
||||
Item "Table Wrap Float|T" "wrap-insert table"
|
||||
End
|
||||
|
||||
Menu "insert_toc"
|
||||
|
@ -151,7 +151,7 @@ namespace fs = boost::filesystem;
|
||||
|
||||
namespace {
|
||||
|
||||
int const LYX_FORMAT = 289; //MV, index collapsable
|
||||
int const LYX_FORMAT = 290; //Uwe Stöhr, wrap table
|
||||
|
||||
} // namespace anon
|
||||
|
||||
|
@ -171,7 +171,7 @@ Inset * createInset(BufferView * bv, FuncRequest const & cmd)
|
||||
|
||||
case LFUN_WRAP_INSERT: {
|
||||
string const argument = to_utf8(cmd.argument());
|
||||
if (argument == "figure")
|
||||
if (argument == "figure" || argument == "table")
|
||||
return new InsetWrap(params, argument);
|
||||
lyxerr << "Non-existent wrapfig type: " << argument << endl;
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user