]> git.lyx.org Git - features.git/commitdiff
(Herbert): delete old 1.2 stuff and add forgotten special option.
authorAngus Leeming <leeming@lyx.org>
Mon, 8 Apr 2002 14:47:21 +0000 (14:47 +0000)
committerAngus Leeming <leeming@lyx.org>
Mon, 8 Apr 2002 14:47:21 +0000 (14:47 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3945 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/ChangeLog
src/insets/insetgraphicsParams.C

index 5d983029b6cc718ce7940c9c5cf0ab8b494d7130..0f27ba48a3b5fa1c06dea4e710bd397fba9b91a6 100644 (file)
@@ -1,3 +1,8 @@
+2002-04-08  Herbert Voss  <voss@lyx.org>
+
+       * insetgraphicsparam.C: forgot special option and delete old
+       1.2.0 stuff
+
 2002-04-05  Juergen Vigna  <jug@sad.it>
 
        * insettext.C (localDispatch): make a CURSOR update if we inserted
index de44375bb533cae6c12b1a4c28141394918506bc..1ebc1d25e5ac211b9734d71ad4c4b455e579a7eb 100644 (file)
@@ -39,26 +39,6 @@ bool translatorsSet = false;
 Translator< InsetGraphicsParams::DisplayType, string >
 displayTranslator(InsetGraphicsParams::DEFAULT, "default");
 
-// this is only compatibility stuff for the first 1.2 version
-// it is obselete until 1.3
-LyXLength convertResizeValue(string const token, LyXLex & lex) {
-    lex.next();
-    string value = lex.getString();    // "width" or "height"
-    lex.next();                                // anyway not interesting
-    value = lex.getString();
-    if (token == "default")
-       return (LyXLength(value+"pt"));
-    else if (token == "cm")
-       return (LyXLength(value+"cm"));
-    else if (token == "inch")
-       return (LyXLength(value+"in"));
-    else if (token == "percentOfColumn")
-       return (LyXLength(value+"col%"));
-    else if (token == "percentOfPage")
-       return (LyXLength(value+"page%"));
-    else return LyXLength("0pt");      // nothing with figinset
-}
-
 } // namespace anon
 
 
@@ -308,26 +288,9 @@ bool InsetGraphicsParams::Read(LyXLex & lex, string const& token)
        } else if (token == "lyxscale") {
                lex.next();
                lyxscale = lex.getInteger();
-       // now the compytibility stuff for "old" 1.2.0 files which uses
-       // the first try of the new graphic inset. Can be deleted, when
-       // 1.3 comes out
-       } else if (token == "widthResize") {
-               if (lex.next()) {
-                   string const token = lex.getString();
-                   if (token == "scale") {
-                       lex.next();
-                       scale = lex.getInteger();
-                       size_type = SCALE;
-                   }
-                   else {
-                       width = convertResizeValue(token, lex);
-                       size_type = WH;
-                   }
-               }
-       } else if (token == "heightResize") {
-               if (lex.next())
-                       height = convertResizeValue(lex.getString(), lex);
-       // end compytibility stuff
+       } else if (token == "special") {
+               lex.eatLine();
+               special = lex.getString();
        } else {        // If it's none of the above, its not ours.
                return false;
        }