]> git.lyx.org Git - features.git/blobdiff - src/lyxlength.C
remove NO_PEXTRA_STUFF
[features.git] / src / lyxlength.C
index af8d8734e8c2dfb0c99da4eac7c6e60bd16ee256..fc6504ce4ddcfdfb8104a0ddcc4aae899d6df2f6 100644 (file)
@@ -36,49 +36,12 @@ LyXLength::LyXLength(double v, LyXLength::UNIT u)
 {}
 
 
-#ifndef NO_PEXTRA_REALLY
-// compatibility stuff < version 1.2.0pre and for
-// "old" 1.2.0 files before the pre
-namespace {
-string const convertOldRelLength(string const & oldLength)
-{
-       // we can have only one or none of the following
-       if (oldLength.find("c%") != string::npos) {
-               return subst(oldLength,"c%","col%");
-
-       } else if (oldLength.find("t%") != string::npos) {
-               if (oldLength.find("text%") != string::npos ||
-                   oldLength.find("height%") != string::npos)
-                   return oldLength;
-               else
-                   return subst(oldLength,"t%","text%");
-
-       } else if (oldLength.find("l%") != string::npos) {
-               if (oldLength.find("col%") != string::npos)
-                   return oldLength;
-               else
-                   return subst(oldLength,"l%","line%");
-
-       } else if (oldLength.find("p%") != string::npos)
-               return subst(oldLength,"p%","page%");
-
-       return oldLength;
-}
-} // end anon
-#endif
-
 LyXLength::LyXLength(string const & data)
        : val_(0), unit_(LyXLength::PT)
 {
        LyXLength tmp;
 
-#ifndef NO_PEXTRA_REALLY
-       // this is needed for 1.1.x minipages with width like %t
-       if (!isValidLength (convertOldRelLength(data), &tmp))
-#else
-       if (!isValidLength (data, &tmp))
-#endif
-               if (!isValidLength (convertOldRelLength(data), &tmp))
+       if (!isValidLength(data, &tmp))
                return; // should raise an exception
 
        val_  = tmp.val_;