]> git.lyx.org Git - features.git/commitdiff
Length.cpp: take care of percent units also for glue lengths, with this change, ...
authorUwe Stöhr <uwestoehr@web.de>
Sun, 19 Jul 2009 20:01:39 +0000 (20:01 +0000)
committerUwe Stöhr <uwestoehr@web.de>
Sun, 19 Jul 2009 20:01:39 +0000 (20:01 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30693 a592a061-630c-0410-9148-cb99ea01b6c8

src/Length.cpp

index af61d0fe7681a4f5dbf698e0eca5063be40ac206..4b269aa31517e1ee7bd72dd40f3aa4b3333e3caa 100644 (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();
 }