+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
* 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.
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
} else if (token == "height") {
lex.next();
height = LyXLength(lex.getString());
+ scale = 0.0;
} else if (token == "keepAspectRatio") {
keepAspectRatio = true;
} else if (token == "draft") {
} 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;