+2002-08-02 Angus Leeming <leeming@lyx.org>
+
+ * FORMAT: document the InsetGraphicsParams "size_type" -> "size_kind"
+ change.
+
2002-08-02 Angus Leeming <leeming@lyx.org>
* FORMAT: a new file to document changes in the LyX file format.
\end_inset
Earlier versions of LyX just swallow this extra token silently.
+
+2002-08-12 Angus Leeming <leeming@lyx.org>
+
+The 1.2.0 InsetGraphicsParams "size_type" and "lyxsize_type" have been
+renamed as "size_kind" and "lyxsize_kind" respectively.
+
+ \begin_inset Graphics FormatVersion 1
+ filename file.eps
+ display default
+- size_kind original
++ size_type original
+ width 7cm
+ rotateOrigin center
+- lyxsize_kind original
++ lyxsize_type original
+ lyxwidth 4cm
+
+ \end_inset
+
+2002-08-12 Angus Leeming <leeming@lyx.org>
+
+ * insetgraphicsParams.C: fix reading of lyxsize_type in 1.2.0 documents.
+
2002-08-12 Juergen Vigna <jug@sad.it>
* insetcollapsable.C (edit): ignore if entered when pressing mouse
return "original";
}
+// compatibility-stuff 1.20->1.3.0
+InsetGraphicsParams::sizeKind getSizeKind(int type)
+{
+ switch (type) {
+ case 1:
+ return InsetGraphicsParams::WH;
+
+ case 2:
+ return InsetGraphicsParams::SCALE;
+
+ case 0:
+ default:
+ return InsetGraphicsParams::DEFAULT_SIZE;
+ }
+}
+
} //anon
// 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;
- }
+ size_kind = getSizeKind(lex.getInteger());
} else if (token == "width") {
lex.next();
width = LyXLength(lex.getString());
} else if (token == "lyxsize_kind") {
lex.next();
lyxsize_kind = getSizeKind(lex.getString());
+ // compatibility-stuff 1.20->1.3.0
+ } else if (token == "lyxsize_type") {
+ lex.next();
+ lyxsize_kind = getSizeKind(lex.getInteger());
} else if (token == "lyxwidth") {
lex.next();
lyxwidth = LyXLength(lex.getString());