% is bullshit

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3501 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2002-02-07 16:50:28 +00:00
parent 0dd7fe4e06
commit 6b5a92d3d6
3 changed files with 9 additions and 1 deletions

View File

@ -1,5 +1,10 @@
2002-02-07 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
* lyxlength.C (asLatexString): change PW to output as percent of
\textwidth.
* lengthcommon.C: change '%' to 't%'
* lyxfunc.C (dispatch): a few comments from Martin
2002-02-06 John Levon <moz@compsoc.man.ac.uk>

View File

@ -8,7 +8,7 @@ int const num_units = LyXLength::UNIT_NONE;
char const * unit_name[num_units] = { "sp", "pt", "bp", "dd",
"mm", "pc", "cc", "cm",
"in", "ex", "em", "mu",
"%", "c%", "p%", "l%" };
"t%", "c%", "p%", "l%" };
LyXLength::UNIT unitFromString(string const & data)

View File

@ -59,6 +59,9 @@ string const LyXLength::asLatexString() const
ostringstream buffer;
switch(unit_) {
case PW:
buffer << abs(static_cast<int>(val_/100)) << "."
<< abs(static_cast<int>(val_)%100) << "\\textwidth";
break;
case PE:
buffer << abs(static_cast<int>(val_/100)) << "."
<< abs(static_cast<int>(val_)%100) << "\\columnwidth";