Fix bug 3823: Division needs not to return an integer.

Also added some comments about a different possible fix.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18692 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2007-06-06 19:33:57 +00:00
parent 8559f2fd0e
commit 30a63bd86f

View File

@ -491,8 +491,16 @@ string const LaTeXFeatures::getPackages() const
// shadecolor for shaded
if (mustProvide("framed") && mustProvide("color")) {
RGBColor c = RGBColor(lcolor.getX11Name(Color::shadedbg));
//255.0 to force conversion to double
//NOTE As Jürgen Spitzmüller pointed out, an alternative would be
//to use the xcolor package instead, and then we can do
// \define{shadcolor}{RGB}...
//and not do any conversion. We'd then need to require xcolor
//in InsetNote::validate().
int const stmSize = packages.precision(2);
packages << "\\definecolor{shadecolor}{rgb}{"
<< c.r/255 << ',' << c.g/255 << ',' << c.b/255 << "}\n";
<< c.r/255.0 << ',' << c.g/255.0 << ',' << c.b/255.0 << "}\n";
packages.precision(stmSize);
}
// lyxskak.sty --- newer chess support based on skak.sty