mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 02:49:46 +00:00
* Fix reading of lyxsize_type in 1.2.0 documents.
* Document change to format. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4945 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
2a4413e415
commit
9360861f33
@ -1,3 +1,8 @@
|
||||
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.
|
||||
|
@ -15,3 +15,22 @@ The LyX file now contains:
|
||||
\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
|
||||
|
||||
|
@ -1,3 +1,7 @@
|
||||
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
|
||||
|
@ -197,6 +197,22 @@ string const getSizeKindStr(InsetGraphicsParams::sizeKind sK_in)
|
||||
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
|
||||
|
||||
|
||||
@ -282,17 +298,7 @@ bool InsetGraphicsParams::Read(LyXLex & lex, string const & token)
|
||||
// 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());
|
||||
@ -315,6 +321,10 @@ bool InsetGraphicsParams::Read(LyXLex & lex, string const & token)
|
||||
} 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());
|
||||
|
Loading…
Reference in New Issue
Block a user