mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-27 11:52:25 +00:00
* 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:
parent
4c772b2376
commit
23a95c2293
@ -1059,7 +1059,7 @@ void handle_tabular(Parser & p, ostream & os, bool is_long_tabular,
|
|||||||
<< verbose_valign(colinfo[col].valign) << "\""
|
<< verbose_valign(colinfo[col].valign) << "\""
|
||||||
<< write_attribute("leftline", colinfo[col].leftlines > 0)
|
<< write_attribute("leftline", colinfo[col].leftlines > 0)
|
||||||
<< write_attribute("rightline", colinfo[col].rightlines > 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)
|
<< write_attribute("special", colinfo[col].special)
|
||||||
<< ">\n";
|
<< ">\n";
|
||||||
}
|
}
|
||||||
@ -1099,7 +1099,7 @@ void handle_tabular(Parser & p, ostream & os, bool is_long_tabular,
|
|||||||
//if (cell.bottomline)
|
//if (cell.bottomline)
|
||||||
// cerr << " bottomline=\"true\"";
|
// cerr << " bottomline=\"true\"";
|
||||||
os << " usebox=\"none\""
|
os << " usebox=\"none\""
|
||||||
<< write_attribute("width", cell.width);
|
<< write_attribute("width", translate_len(cell.width));
|
||||||
if (cell.multi != CELL_NORMAL)
|
if (cell.multi != CELL_NORMAL)
|
||||||
os << write_attribute("special", cell.special);
|
os << write_attribute("special", cell.special);
|
||||||
os << ">"
|
os << ">"
|
||||||
|
@ -31,6 +31,8 @@ extern std::map<std::string, std::vector<std::string> > used_packages;
|
|||||||
|
|
||||||
|
|
||||||
/// in text.C
|
/// in text.C
|
||||||
|
std::string translate_len(std::string const &);
|
||||||
|
|
||||||
void parse_text(Parser & p, std::ostream & os, unsigned flags, bool outer,
|
void parse_text(Parser & p, std::ostream & os, unsigned flags, bool outer,
|
||||||
Context & context);
|
Context & context);
|
||||||
|
|
||||||
|
@ -293,6 +293,8 @@ bool translate_len(string const & length, string & valstring, string & unit)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
string translate_len(string const & length)
|
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
|
* Translates a LaTeX length into \p value, \p unit and
|
||||||
* \p special parts suitable for a box inset.
|
* \p special parts suitable for a box inset.
|
||||||
|
Loading…
Reference in New Issue
Block a user