Length.cpp: take care of percent units also for glue lengths, with this change, #6091 and #6098 can be fixed

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30693 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Uwe Stöhr 2009-07-19 20:01:39 +00:00
parent 3020ec058f
commit 969a8356b8

View File

@ -427,13 +427,12 @@ string const GlueLength::asString() const
string const GlueLength::asLatexString() const
{
ostringstream buffer;
buffer << len_.value() << unit_name[len_.unit()];
// use Length::asLatexString() to handle also the percent lengths
buffer << len_.Length::asLatexString();
if (!plus_.zero())
buffer << " plus " << plus_.value() << unit_name[plus_.unit()];
buffer << " plus " << plus_.Length::asLatexString();
if (!minus_.zero())
buffer << " minus " << minus_.value() << unit_name[minus_.unit()];
buffer << " minus " << minus_.Length::asLatexString();
return buffer.str();
}