]> git.lyx.org Git - lyx.git/blobdiff - src/tabular.C
reduce number of calls to LyXText::getFont
[lyx.git] / src / tabular.C
index d43d6b58925a0aa26add94e890ed183b5e5d4e4f..bde0dc4f78c869bdd83e536433e7396925e72308 100644 (file)
@@ -37,7 +37,6 @@
 using lyx::support::ltrim;
 using lyx::support::prefixIs;
 using lyx::support::rtrim;
-using lyx::support::strToInt;
 using lyx::support::suffixIs;
 
 using boost::shared_ptr;
@@ -249,7 +248,7 @@ bool getTokenValue(string const & str, char const * token, int & num)
        num = 0;
        if (!getTokenValue(str, token, tmp))
                return false;
-       num = strToInt(tmp);
+       num = convert<int>(tmp);
        return true;
 }
 
@@ -818,7 +817,6 @@ void LyXTabular::recalculateMulticolumnsOfColumn(col_type column)
 }
 
 
-// returns 1 if a complete update is necessary, otherwise 0
 void LyXTabular::setWidthOfCell(idx_type cell, int new_width)
 {
        row_type const row = row_of_cell(cell);
@@ -2512,6 +2510,13 @@ shared_ptr<InsetText> LyXTabular::getCellInset(row_type row,
 }
 
 
+void LyXTabular::setCellInset(row_type row, col_type column,
+                             shared_ptr<InsetText> ins) const
+{
+       cell_info[row][column].inset = ins;
+}
+
+
 LyXTabular::idx_type
 LyXTabular::getCellFromInset(InsetBase const * inset) const
 {