The branch, empty-length, has been updated.

- Log -----------------------------------------------------------------

commit 85e391e43a6d7188683dacae729475e77597415d
Author: Jean-Marc Lasgouttes <lasgout...@lyx.org>
Date:   Wed May 22 15:50:44 2013 +0200

    Latest changes from Uwe for tex2lyx and lyx2lyx
    
    I amended Uwe patches a bit, since empty width should be output as
      width ""
    in the LyX file.

diff --git a/development/FORMAT b/development/FORMAT
index a9d62bd..9b6422d 100644
--- a/development/FORMAT
+++ b/development/FORMAT
@@ -18,7 +18,7 @@ adjustments are made to tex2lyx and bugs are fixed in lyx2lyx.
 2013-03-22 Uwe Stöhr <uwesto...@web.de>
        * Format incremented to 468: support for \mbox and \fbox
          New checkbox in the box dialog to avoid using an explicit
-         width.
+         width. An empty/missing length can be specified as "".
 
 2013-03-19 Uwe Stöhr <uwesto...@web.de>
        * Format incremented to 467: support for iwona fonts
diff --git a/lib/lyx2lyx/lyx_2_1.py b/lib/lyx2lyx/lyx_2_1.py
index 8b51b2e..e31e37c 100644
--- a/lib/lyx2lyx/lyx_2_1.py
+++ b/lib/lyx2lyx/lyx_2_1.py
@@ -4069,8 +4069,8 @@ def revert_mbox_fbox(document):
             continue
         BeginLayout = find_token(document.body, "\\begin_layout Plain Layout", 
j)
         EndLayout = find_token(document.body, "\\end_layout", BeginLayout)
-        # replace if width is "-999col%"
-        if (width == '"-999col%"'):
+        # replace if width is ""
+        if (width == '""'):
             document.body[EndLayout:k + 1] = put_cmd_in_ert("}")
             if document.body[i] == "\\begin_inset Box Frameless":
                 document.body[i:BeginLayout + 1] = put_cmd_in_ert("\\mbox{")
diff --git a/src/tex2lyx/text.cpp b/src/tex2lyx/text.cpp
index 2206e00..a11723e 100644
--- a/src/tex2lyx/text.cpp
+++ b/src/tex2lyx/text.cpp
@@ -935,9 +935,8 @@ void parse_box(Parser & p, ostream & os, unsigned 
outer_flags,
                width_unit = "in";
                width_special = "width";
        } else if (latex_width.empty() && outer_type == "framebox") {
-               outer_type == "fbox";
-               width_value = "-999";
-               width_unit = "col%";
+               width_value.clear();
+               width_unit.clear();
                width_special = "none";
        }
        if (use_ert) {
@@ -1038,7 +1037,7 @@ void parse_box(Parser & p, ostream & os, unsigned 
outer_flags,
                else
                        os << "use_makebox " << (inner_type == "makebox") << 
'\n';
                if (outer_type == "fbox" || outer_type == "mbox")
-                       os << "width \"-999col%\"\n";
+                       os << "width \"\"\n";
                else
                        os << "width \"" << width_value << width_unit << "\"\n";
                os << "special \"" << width_special << "\"\n";

-----------------------------------------------------------------------

Summary of changes:
 development/FORMAT     |    2 +-
 lib/lyx2lyx/lyx_2_1.py |    4 ++--
 src/tex2lyx/text.cpp   |    7 +++----
 3 files changed, 6 insertions(+), 7 deletions(-)


hooks/post-receive
-- 
Repository for new features

Reply via email to