X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fgraphics%2FGraphicsParams.cpp;h=a53d2c57b1ffb4f038c998cde7ceeea046f9b34c;hb=b19410d232db62f922b319ed737f0738e864ea82;hp=ce23f0b5c5ffe8ef7891ebad9ed28ebd45916d7b;hpb=00e305c9d9bd8b0ff54b6c58adb6192d5934ed60;p=lyx.git diff --git a/src/graphics/GraphicsParams.cpp b/src/graphics/GraphicsParams.cpp index ce23f0b5c5..a53d2c57b1 100644 --- a/src/graphics/GraphicsParams.cpp +++ b/src/graphics/GraphicsParams.cpp @@ -12,20 +12,18 @@ #include "GraphicsParams.h" -#include "LyXLength.h" +#include "Length.h" +#include #include - -using std::string; -using std::abs; - +using namespace std; namespace lyx { namespace graphics { Params::Params() - : display(ColorDisplay), + : display(true), scale(100), angle(0) {} @@ -47,7 +45,7 @@ bool operator!=(Params const & a, Params const & b) } -std::ostream & operator<<(std::ostream & os, BoundingBox const & bb) +ostream & operator<<(ostream & os, BoundingBox const & bb) { os << bb.xl << ' ' << bb.yb << ' ' << bb.xr << ' ' << bb.yt; return os; @@ -65,16 +63,16 @@ BoundingBox::BoundingBox(string const & bb) if (bb.empty()) return; - std::istringstream is(bb.c_str()); + istringstream is(bb.c_str()); string a, b, c, d; is >> a >> b >> c >> d; // inBP returns the length in Postscript points. // Note further that there are 72 Postscript pixels per inch. - unsigned int const xl_tmp = abs(LyXLength(a).inBP()); - unsigned int const yb_tmp = abs(LyXLength(b).inBP()); - unsigned int const xr_tmp = abs(LyXLength(c).inBP()); - unsigned int const yt_tmp = abs(LyXLength(d).inBP()); + unsigned int const xl_tmp = abs(Length(a).inBP()); + unsigned int const yb_tmp = abs(Length(b).inBP()); + unsigned int const xr_tmp = abs(Length(c).inBP()); + unsigned int const yt_tmp = abs(Length(d).inBP()); if (xr_tmp <= xl_tmp || yt_tmp <= yb_tmp) return;