]> git.lyx.org Git - lyx.git/blobdiff - src/tex2lyx/table.cpp
Make undo action no-ops when the buffer is read-only
[lyx.git] / src / tex2lyx / table.cpp
index 8db0e23f9d88b51176268f9cc47693a5795bd858..b162617af233d153e4efa31cba5689895ea13566 100644 (file)
@@ -934,8 +934,8 @@ void handle_hline_below(RowInfo & ri, vector<CellInfo> & ci)
 }
 
 
-void parse_cell_content(ostringstream & os2, Parser & parse, Context & newcontext,
-                       vector< vector<CellInfo> > cellinfo, vector<ColInfo> colinfo,
+void parse_cell_content(ostringstream & os2, Parser & parse, unsigned int flags, Context & newcontext,
+                       vector< vector<CellInfo> > & cellinfo, vector<ColInfo> & colinfo,
                        size_t const row, size_t const col)
 {
        bool turn = false;
@@ -990,7 +990,7 @@ void parse_cell_content(ostringstream & os2, Parser & parse, Context & newcontex
                active_environments.pop_back();
                preamble.registerAutomaticallyLoadedPackage("varwidth");
        } else {
-               parse_text_in_inset(parse, os2, FLAG_CELL, false, newcontext);
+               parse_text_in_inset(parse, os2, flags, false, newcontext);
        }
 }
 
@@ -1335,7 +1335,7 @@ void handle_tabular(Parser & p, ostream & os, string const & name,
                                        parse.skip_spaces(true);
                                }
 
-                               if (width != "*")
+                               if (width != "*" && width != "=")
                                        colinfo[col].width = width;
                                if (!vmove.empty())
                                        cellinfo[row][col].mroffset = vmove;
@@ -1346,7 +1346,7 @@ void handle_tabular(Parser & p, ostream & os, string const & name,
 
                                ostringstream os2;
                                parse.get_token();// skip {
-                               parse_cell_content(os2, parse, newcontext,
+                               parse_cell_content(os2, parse, FLAG_BRACE_LAST, newcontext,
                                                        cellinfo, colinfo,
                                                        row, col);
                                parse.get_token();// skip }
@@ -1387,7 +1387,7 @@ void handle_tabular(Parser & p, ostream & os, string const & name,
                                cellinfo[row][col].rightlines = ci.rightlines;
                                ostringstream os2;
                                parse.get_token();// skip {
-                               parse_cell_content(os2, parse, newcontext,
+                               parse_cell_content(os2, parse, FLAG_BRACE_LAST, newcontext,
                                                        cellinfo, colinfo,
                                                        row, col);
                                parse.get_token();// skip }
@@ -1486,7 +1486,7 @@ void handle_tabular(Parser & p, ostream & os, string const & name,
                                        cellinfo[row][c].multi = CELL_PART_OF_MULTICOLUMN;
                        } else {
                                ostringstream os2;
-                               parse_cell_content(os2, parse, newcontext,
+                               parse_cell_content(os2, parse, FLAG_CELL, newcontext,
                                                        cellinfo, colinfo,
                                                        row, col);
                                cellinfo[row][col].leftlines  = colinfo[col].leftlines;