]> git.lyx.org Git - lyx.git/commitdiff
provide wrap tables based on the current wrap float implementation
authorUwe Stöhr <uwestoehr@web.de>
Wed, 3 Oct 2007 21:07:01 +0000 (21:07 +0000)
committerUwe Stöhr <uwestoehr@web.de>
Wed, 3 Oct 2007 21:07:01 +0000 (21:07 +0000)
file format increased to 290

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20713 a592a061-630c-0410-9148-cb99ea01b6c8

development/FORMAT
lib/lyx2lyx/LyX.py
lib/lyx2lyx/lyx_1_6.py
lib/ui/stdmenus.inc
src/Buffer.cpp
src/factory.cpp

index 727ee191ed1d5a7f36197adf07c16e4af5eb3626..ac2c10b604ff2938eac1ad3fc5d56dc1330079c9 100644 (file)
@@ -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.
index a500167d9dc144a3fa2829bbf6e8dbedca8a6ef7..97b3f19823741abc84ec714c8d0186733e75345b 100644 (file)
@@ -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():
index 9050a1012d84c94a462514fdc1404884f0705aff..7936fcfdb73487e591e1d4b11b778709f93e4921 100644 (file)
@@ -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]],
index d74771b4afb6a822b62f593917a7d236d6f02324..d7878321bf70c768fbab980f9334a158c9a7cb5d 100644 (file)
@@ -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"
index f540360f2fa69fb3e2d26663dad9557921796216..5218e84639a0f57521d3063c38881faa6a6d7761 100644 (file)
@@ -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
 
index e332a0b7d2c901017f088428607fddf260f08035..faa386251c7a4fbf9c34cb1c5f6ddd2ad649a946 100644 (file)
@@ -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;