mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-13 01:08:45 +00:00
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
This commit is contained in:
parent
ea768f414b
commit
22f6b2cae8
@ -1,3 +1,8 @@
|
||||
2004-12-29 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
|
||||
|
||||
* lyxlength.C (asLatexString): get rid of setprecision
|
||||
(inPixels): remove bogus warning
|
||||
|
||||
2004-12-19 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* lyx_main.C (init): on a Windows build, remove the ".exe"
|
||||
|
@ -21,9 +21,6 @@
|
||||
#include <cstdlib>
|
||||
#include <iomanip>
|
||||
|
||||
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_) {
|
||||
|
Loading…
Reference in New Issue
Block a user