X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FRow.cpp;h=57f02e2987867729d1643f70b976202944a9bec6;hb=0933df00113ee2735699c13559ad3b6e7e9fd115;hp=9d944516843c2325e5617b4bd389e6857efcfc9a;hpb=9c55af4a223ce4db29d643251109e245665344bd;p=lyx.git diff --git a/src/Row.cpp b/src/Row.cpp index 9d94451684..57f02e2987 100644 --- a/src/Row.cpp +++ b/src/Row.cpp @@ -24,12 +24,10 @@ #include "support/debug.h" #include "support/lassert.h" +#include "support/lyxalgo.h" -#include #include -#include - 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); } }