]> git.lyx.org Git - features.git/commitdiff
herbert patch to read 1.2.0 graphics insets
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 23 Jul 2002 12:20:21 +0000 (12:20 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 23 Jul 2002 12:20:21 +0000 (12:20 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4760 a592a061-630c-0410-9148-cb99ea01b6c8

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

index c91e1dffd29ed2e8012e57fb4bbdefa582c43130..bcf9eb72c0f258eab8775915a4aea0b7467cdefb 100644 (file)
@@ -1,3 +1,7 @@
+2002-07-22  Herbert Voss  <voss@lyx.org>
+
+       * insetgraphicsParams.[Ch]: support size_type for old docs
+
 2002-07-22  Herbert Voss  <voss@lyx.org>
 
        * insetgraphics.C:
index 71b5550fb3d61bd4210c5fcca37139ea62927e16..f1f019845deb354c5989a7dcff221b28ec70ee1a 100644 (file)
@@ -276,9 +276,23 @@ bool InsetGraphicsParams::Read(LyXLex & lex, string const & token)
                subcaptionText = lex.getString();
        } else if (token == "noUnzip") {
                noUnzip = true;
-       } else if (token == "size_kind") {
+       } else if (token == "size_kind")  {
                lex.next();
                size_kind = getSizeKind(lex.getString());
+       // compatibility-stuff 1.20->1.3.0
+       } else if (token == "size_type") {
+               lex.next();
+               switch (lex.getInteger()) {
+               case 0:
+                       size_kind = DEFAULT_SIZE;
+                       break;
+               case 1:
+                       size_kind = WH;
+                       break;
+               case 2:
+                       size_kind = SCALE;
+                       break;
+               }
        } else if (token == "width") {
                lex.next();
                width = LyXLength(lex.getString());