]> git.lyx.org Git - features.git/commitdiff
% is bullshit
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 7 Feb 2002 16:50:28 +0000 (16:50 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 7 Feb 2002 16:50:28 +0000 (16:50 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3501 a592a061-630c-0410-9148-cb99ea01b6c8

src/ChangeLog
src/lengthcommon.C
src/lyxlength.C

index dc4e855e1ca178bbac21a81d7af7ad3e28425287..e497bd7b6ea51262b874af0715899c586d246b75 100644 (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>
index 6e90ceff3a8a5245177b68bd97f6879b81d4923f..6f56497cbf4ca8b0954dc0b171df3ed9ceb30585 100644 (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)
index 9c7826a7e2c106bbb27ad2afd49bf094aaaace2c..1ae1de20986383cfded8dd10286ae487e3efe00c 100644 (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";