mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-08 18:19:42 +00:00
(Rob Lahaye): read and write latex height data of graphic correctly.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5562 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
6de5387b91
commit
b3e2ee2a8d
@ -1,3 +1,9 @@
|
||||
2002-10-31 Rob Lahaye <lahaye@snu.ac.kr>
|
||||
|
||||
* insetgraphicsParams.C (Write): use lyx::float_equal.
|
||||
Write height data correctly.
|
||||
(Read): zero scale when reading height data.
|
||||
|
||||
2002-10-30 John Levon <levon@movementarian.org>
|
||||
|
||||
* insetfloat.C (addToTOC): recursively traverse all
|
||||
|
@ -18,7 +18,6 @@ TODO
|
||||
* Add a way to roll the image file into the file format.
|
||||
* When loading, if the image is not found in the expected place, try
|
||||
to find it in the clipart, or in the same directory with the image.
|
||||
* Keep a tab on the image file, if it changes, update the lyx view.
|
||||
* The image choosing dialog could show thumbnails of the image formats
|
||||
it knows of, thus selection based on the image instead of based on
|
||||
filename.
|
||||
|
@ -142,16 +142,16 @@ void InsetGraphicsParams::Write(ostream & os) const
|
||||
os << "\tlyxscale " << lyxscale << '\n';
|
||||
if (display != grfx::DefaultDisplay)
|
||||
os << "\tdisplay " << grfx::displayTranslator.find(display) << '\n';
|
||||
if (scale) {
|
||||
if (!lyx::float_equal(scale, 0.0, 0.05)) {
|
||||
if (!lyx::float_equal(scale, 100.0, 0.05))
|
||||
os << "\tscale " << scale << '\n';
|
||||
} else {
|
||||
if (!width.zero())
|
||||
os << "\twidth " << width.asString() << '\n';
|
||||
if (!height.zero())
|
||||
os << "\theight " << height.asString() << '\n';
|
||||
}
|
||||
|
||||
if (!height.zero())
|
||||
os << "\theight " << height.asString() << '\n';
|
||||
if (keepAspectRatio)
|
||||
os << "\tkeepAspectRatio\n";
|
||||
if (draft) // draft mode
|
||||
@ -199,6 +199,7 @@ bool InsetGraphicsParams::Read(LyXLex & lex, string const & token)
|
||||
} else if (token == "height") {
|
||||
lex.next();
|
||||
height = LyXLength(lex.getString());
|
||||
scale = 0.0;
|
||||
} else if (token == "keepAspectRatio") {
|
||||
keepAspectRatio = true;
|
||||
} else if (token == "draft") {
|
||||
@ -206,9 +207,12 @@ bool InsetGraphicsParams::Read(LyXLex & lex, string const & token)
|
||||
} else if (token == "noUnzip") {
|
||||
noUnzip = true;
|
||||
} else if (token == "BoundingBox") {
|
||||
for (int i=0; i<4 ;i++) {
|
||||
bb.erase();
|
||||
for (int i = 0; i < 4; ++i) {
|
||||
if (i != 0)
|
||||
bb += " ";
|
||||
lex.next();
|
||||
bb += (lex.getString()+" ");
|
||||
bb += lex.getString();
|
||||
}
|
||||
} else if (token == "clip") {
|
||||
clip = true;
|
||||
|
Loading…
Reference in New Issue
Block a user