* text.C, tex2lyx.h (translate_len): make public

* table.C (handle_tabular): translate widths to LyX (bug 2290)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13403 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Georg Baum 2006-03-16 15:37:35 +00:00
parent 4c772b2376
commit 23a95c2293
3 changed files with 8 additions and 2 deletions

View File

@ -1059,7 +1059,7 @@ void handle_tabular(Parser & p, ostream & os, bool is_long_tabular,
<< verbose_valign(colinfo[col].valign) << "\""
<< write_attribute("leftline", colinfo[col].leftlines > 0)
<< write_attribute("rightline", colinfo[col].rightlines > 0)
<< write_attribute("width", colinfo[col].width)
<< write_attribute("width", translate_len(colinfo[col].width))
<< write_attribute("special", colinfo[col].special)
<< ">\n";
}
@ -1099,7 +1099,7 @@ void handle_tabular(Parser & p, ostream & os, bool is_long_tabular,
//if (cell.bottomline)
// cerr << " bottomline=\"true\"";
os << " usebox=\"none\""
<< write_attribute("width", cell.width);
<< write_attribute("width", translate_len(cell.width));
if (cell.multi != CELL_NORMAL)
os << write_attribute("special", cell.special);
os << ">"

View File

@ -31,6 +31,8 @@ extern std::map<std::string, std::vector<std::string> > used_packages;
/// in text.C
std::string translate_len(std::string const &);
void parse_text(Parser & p, std::ostream & os, unsigned flags, bool outer,
Context & context);

View File

@ -293,6 +293,8 @@ bool translate_len(string const & length, string & valstring, string & unit)
return true;
}
}
string translate_len(string const & length)
{
@ -305,6 +307,8 @@ string translate_len(string const & length)
}
namespace {
/*!
* Translates a LaTeX length into \p value, \p unit and
* \p special parts suitable for a box inset.