From 22f6b2cae88e6690bc06cf9dd52f6ed77ce795e2 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Wed, 29 Dec 2004 15:39:05 +0000 Subject: [PATCH] the final word on bug 1523? git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_3_X@9411 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/ChangeLog | 5 +++++ src/lyxlength.C | 21 +++++++-------------- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 602d9ff563..9e33fafb28 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2004-12-29 Jean-Marc Lasgouttes + + * lyxlength.C (asLatexString): get rid of setprecision + (inPixels): remove bogus warning + 2004-12-19 Angus Leeming * lyx_main.C (init): on a Windows build, remove the ".exe" diff --git a/src/lyxlength.C b/src/lyxlength.C index b4430c94cc..568991af70 100644 --- a/src/lyxlength.C +++ b/src/lyxlength.C @@ -21,9 +21,6 @@ #include #include -using std::abs; -using std::setprecision; - LyXLength::LyXLength() : val_(0), unit_(LyXLength::UNIT_NONE) {} @@ -60,25 +57,25 @@ string const LyXLength::asLatexString() const ostringstream buffer; switch (unit_) { case PTW: - buffer << setprecision(2) << val_/100.0 << "\\textwidth"; + buffer << val_ / 100.0 << "\\textwidth"; break; case PCW: - buffer << setprecision(2) << val_/100.0 << "\\columnwidth"; + buffer << val_ / 100.0 << "\\columnwidth"; break; case PPW: - buffer << setprecision(2) << val_/100.0 << "\\paperwidth"; + buffer << val_ / 100.0 << "\\paperwidth"; break; case PLW: - buffer << setprecision(2) << val_/100.0 << "\\linewidth"; + buffer << val_ / 100.0 << "\\linewidth"; break; case PPH: - buffer << setprecision(2) << val_/100.0 << "\\paperheight"; + buffer << val_ / 100.0 << "\\paperheight"; break; case PTH: - buffer << setprecision(2) << val_/100.0 << "\\textheight"; + buffer << val_ / 100.0 << "\\textheight"; break; default: - buffer << setprecision(2) << val_ << unit_name[unit_]; + buffer << val_ << unit_name[unit_]; break; } return STRCONV(buffer.str()); @@ -141,10 +138,6 @@ int LyXLength::inPixels(int text_width, int em_width_base) const // between lengths and font sizes on the screen // is the same as on paper. -#ifdef WITH_WARNINGS -#warning if you don't care than either call this function differently or let it return negative values and call abs() explicitly when needed (Andre') -#endif - double result = 0.0; switch (unit_) {