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>
|
2004-12-19 Angus Leeming <leeming@lyx.org>
|
||||||
|
|
||||||
* lyx_main.C (init): on a Windows build, remove the ".exe"
|
* lyx_main.C (init): on a Windows build, remove the ".exe"
|
||||||
|
@ -21,9 +21,6 @@
|
|||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
|
|
||||||
using std::abs;
|
|
||||||
using std::setprecision;
|
|
||||||
|
|
||||||
LyXLength::LyXLength()
|
LyXLength::LyXLength()
|
||||||
: val_(0), unit_(LyXLength::UNIT_NONE)
|
: val_(0), unit_(LyXLength::UNIT_NONE)
|
||||||
{}
|
{}
|
||||||
@ -60,25 +57,25 @@ string const LyXLength::asLatexString() const
|
|||||||
ostringstream buffer;
|
ostringstream buffer;
|
||||||
switch (unit_) {
|
switch (unit_) {
|
||||||
case PTW:
|
case PTW:
|
||||||
buffer << setprecision(2) << val_/100.0 << "\\textwidth";
|
buffer << val_ / 100.0 << "\\textwidth";
|
||||||
break;
|
break;
|
||||||
case PCW:
|
case PCW:
|
||||||
buffer << setprecision(2) << val_/100.0 << "\\columnwidth";
|
buffer << val_ / 100.0 << "\\columnwidth";
|
||||||
break;
|
break;
|
||||||
case PPW:
|
case PPW:
|
||||||
buffer << setprecision(2) << val_/100.0 << "\\paperwidth";
|
buffer << val_ / 100.0 << "\\paperwidth";
|
||||||
break;
|
break;
|
||||||
case PLW:
|
case PLW:
|
||||||
buffer << setprecision(2) << val_/100.0 << "\\linewidth";
|
buffer << val_ / 100.0 << "\\linewidth";
|
||||||
break;
|
break;
|
||||||
case PPH:
|
case PPH:
|
||||||
buffer << setprecision(2) << val_/100.0 << "\\paperheight";
|
buffer << val_ / 100.0 << "\\paperheight";
|
||||||
break;
|
break;
|
||||||
case PTH:
|
case PTH:
|
||||||
buffer << setprecision(2) << val_/100.0 << "\\textheight";
|
buffer << val_ / 100.0 << "\\textheight";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
buffer << setprecision(2) << val_ << unit_name[unit_];
|
buffer << val_ << unit_name[unit_];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return STRCONV(buffer.str());
|
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
|
// between lengths and font sizes on the screen
|
||||||
// is the same as on paper.
|
// 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;
|
double result = 0.0;
|
||||||
|
|
||||||
switch (unit_) {
|
switch (unit_) {
|
||||||
|
Loading…
Reference in New Issue
Block a user