]> git.lyx.org Git - lyx.git/blobdiff - src/Row.cpp
Add Qt's Svg module to the list of used modules. This is required to allow the use...
[lyx.git] / src / Row.cpp
index 9d944516843c2325e5617b4bd389e6857efcfc9a..57f02e2987867729d1643f70b976202944a9bec6 100644 (file)
 
 #include "support/debug.h"
 #include "support/lassert.h"
+#include "support/lyxalgo.h"
 
-#include <algorithm>
 #include <ostream>
 
-#include <boost/next_prior.hpp>
-
 using namespace std;
 
 namespace lyx {
@@ -47,7 +45,8 @@ double Row::Element::pos2x(pos_type const i) const
 
        double w = 0;
        //handle first the two bounds of the element
-       if (i == endpos && !(inset && inset->lyxCode() == SEPARATOR_CODE))
+       if (i == endpos && type != VIRTUAL
+               && !(inset && inset->lyxCode() == SEPARATOR_CODE))
                w = rtl ? 0 : full_width();
        else if (i == pos || type != STRING)
                w = rtl ? full_width() : 0;
@@ -416,7 +415,7 @@ void Row::shortenIfNeeded(pos_type const keep, int const w)
                end_ = cit->endpos;
                dim_.wid = left_margin + cit->dim.wid;
                // If there are other elements, they should be removed.
-               elements_.erase(boost::next(cit), end);
+               elements_.erase(next(cit, 1), end);
        }
 }