]> git.lyx.org Git - lyx.git/blobdiff - src/graphics/GraphicsParams.cpp
Fix #7720: plain text export of branches should contain only content of the inset.
[lyx.git] / src / graphics / GraphicsParams.cpp
index ce23f0b5c5ffe8ef7891ebad9ed28ebd45916d7b..a53d2c57b1ffb4f038c998cde7ceeea046f9b34c 100644 (file)
 
 #include "GraphicsParams.h"
 
-#include "LyXLength.h"
+#include "Length.h"
 
+#include <cstdlib>
 #include <sstream>
 
-
-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;