bool nextRowIsAllInset(Row const & row, pos_type last)
{
- Paragraph const * par = row.par();
+ ParagraphList::iterator pit = row.par();
- if (last + 1 >= par->size())
+ if (last + 1 >= pit->size())
return false;
- if (!par->isInset(last + 1))
+ if (!pit->isInset(last + 1))
return false;
- Inset const * i = par->getInset(last + 1);
+ Inset const * i = pit->getInset(last + 1);
return i->needFullRow() || i->display();
}
int numberOfSeparators(LyXText const & lt, RowList::iterator rit)
{
pos_type const last = lastPrintablePos(lt, rit);
- Paragraph const * par = rit->par();
+ ParagraphList::iterator pit = rit->par();
int n = 0;
- pos_type p = max(rit->pos(), par->beginningOfBody());
+ pos_type p = max(rit->pos(), pit->beginningOfBody());
for (; p < last; ++p) {
- if (par->isSeparator(p)) {
+ if (pit->isSeparator(p)) {
++n;
}
}
{
pos_type const last = lastPos(lt, rit);
pos_type first = rit->pos();
- Paragraph const * par = rit->par();
+ ParagraphList::iterator pit = rit->par();
// hfill *DO* count at the beginning of paragraphs!
if (first) {
- while (first < last && par->isHfill(first)) {
+ while (first < last && pit->isHfill(first)) {
++first;
}
}
- first = max(first, par->beginningOfBody());
+ first = max(first, pit->beginningOfBody());
int n = 0;
// last, because the end is ignored!
for (pos_type p = first; p < last; ++p) {
- if (par->isHfill(p))
+ if (pit->isHfill(p))
++n;
}
return n;
{
pos_type last = lastPos(lt, rit);
pos_type first = rit->pos();
- Paragraph const * par = rit->par();
+ ParagraphList::iterator pit = rit->par();
// hfill *DO* count at the beginning of paragraphs!
if (first) {
- while (first < last && par->isHfill(first))
+ while (first < last && pit->isHfill(first))
++first;
}
- last = min(last, par->beginningOfBody());
+ last = min(last, pit->beginningOfBody());
int n = 0;
// last, because the end is ignored!
for (pos_type p = first; p < last; ++p) {
- if (par->isHfill(p))
+ if (pit->isHfill(p))
++n;
}
return n;
bool hfillExpansion(LyXText const & lt, RowList::iterator rit, pos_type pos)
{
- Paragraph const * par = rit->par();
+ ParagraphList::iterator pit = rit->par();
- if (!par->isHfill(pos))
+ if (!pit->isHfill(pos))
return false;
// at the end of a row it does not count
// unless another hfill exists on the line
if (pos >= lastPos(lt, rit)) {
pos_type i = rit->pos();
- while (i < pos && !par->isHfill(i)) {
+ while (i < pos && !pit->isHfill(i)) {
++i;
}
if (i == pos) {
return true;
// in some labels it does not count
- if (par->layout()->margintype != MARGIN_MANUAL
- && pos < par->beginningOfBody())
+ if (pit->layout()->margintype != MARGIN_MANUAL
+ && pos < pit->beginningOfBody())
return false;
// if there is anything between the first char of the row and
// the specified position that is not a newline and not a hfill,
// the hfill will count, otherwise not
pos_type i = rit->pos();
- while (i < pos && (par->isNewline(i) || par->isHfill(i)))
+ while (i < pos && (pit->isNewline(i) || pit->isHfill(i)))
++i;
return i != pos;
//
// Lgb
+#warning FIXME Convert this to ParagraphList::iterator
int LyXText::singleWidth(Paragraph * par,
pos_type pos) const
{
}
+#warning FIXME Convert this to ParagraphList::iterator
int LyXText::singleWidth(Paragraph * par,
pos_type pos, char c) const
{
}
}
- LyXFont const labelfont = getLabelFont(bv()->buffer(), row.par());
+ LyXFont const labelfont = getLabelFont(bv()->buffer(), &*row.par());
switch (layout->margintype) {
case MARGIN_DYNAMIC:
if (!layout->leftmargin.empty()) {
if (row.par()->getDepth()) {
// find the next level paragraph
- Paragraph const * newpar = row.par();
+ ParagraphList::iterator newpit = row.par();
do {
- newpar = newpar->previous();
- } while (newpar
- && newpar->getDepth() >= row.par()->getDepth());
+ --newpit;
+ } while (newpit != ownerParagraphs().begin()
+ && newpit->getDepth() >= row.par()->getDepth());
// make a corresponding row. Needed to call LeftMargin()
// check wether it is a sufficent paragraph
- if (newpar && newpar->layout()->isEnvironment()) {
+ if (newpit != ownerParagraphs().begin() &&
+ newpit->layout()->isEnvironment()) {
Row dummyrow;
- dummyrow.par(const_cast<Paragraph *>(newpar));
+ dummyrow.par(newpit);
dummyrow.pos(0);
x = rightMargin(buf, dummyrow);
} else {
pos_type
LyXText::rowBreakPoint(Row const & row) const
{
- Paragraph * par = row.par();
+ ParagraphList::iterator pit = row.par();
// maximum pixel width of a row.
int width = workWidth() - rightMargin(*bv()->buffer(), row);
// inset->textWidth() returns -1 via workWidth(),
// but why ?
if (width < 0)
- return par->size();
+ return pit->size();
- LyXLayout_ptr const & layout = par->layout();
+ LyXLayout_ptr const & layout = pit->layout();
if (layout->margintype == MARGIN_RIGHT_ADDRESS_BOX)
- return addressBreakPoint(row.pos(), par);
+ return addressBreakPoint(row.pos(), &*pit);
pos_type const pos = row.pos();
- pos_type const body_pos = par->beginningOfBody();
- pos_type const last = par->size();
+ pos_type const body_pos = pit->beginningOfBody();
+ pos_type const last = pit->size();
pos_type point = last;
if (pos == last)
pos_type i = pos;
for (; i < last; ++i) {
- if (par->isNewline(i)) {
+ if (pit->isNewline(i)) {
point = i;
break;
}
- char const c = par->getChar(i);
+ char const c = pit->getChar(i);
- int thiswidth = singleWidth(par, i, c);
+ int thiswidth = singleWidth(&*pit, i, c);
// add the auto-hfill from label end to the body
if (body_pos && i == body_pos) {
thiswidth += font_metrics::width(layout->labelsep,
- getLabelFont(bv()->buffer(), par));
- if (par->isLineSeparator(i - 1))
- thiswidth -= singleWidth(par, i - 1);
+ getLabelFont(bv()->buffer(), &*pit));
+ if (pit->isLineSeparator(i - 1))
+ thiswidth -= singleWidth(&*pit, i - 1);
int left_margin = labelEnd(row);
if (thiswidth < left_margin)
thiswidth = left_margin;
x += thiswidth;
chunkwidth += thiswidth;
- Inset * in = par->isInset(i) ? par->getInset(i) : 0;
+ Inset * in = pit->isInset(i) ? pit->getInset(i) : 0;
bool fullrow = (in && (in->display() || in->needFullRow()));
// break before a character that will fall off
if (!in || in->isChar()) {
// some insets are line separators too
- if (par->isLineSeparator(i)) {
+ if (pit->isLineSeparator(i)) {
point = i;
chunkwidth = 0;
}
if (i == pos) {
if (pos < last - 1) {
point = i;
- if (par->isLineSeparator(i + 1))
+ if (pit->isLineSeparator(i + 1))
++point;
} else {
// to avoid extra rows
} else
w = leftMargin(*row);
- Paragraph * par = row->par();
- LyXLayout_ptr const & layout = par->layout();
+ ParagraphList::iterator pit = row->par();
+ LyXLayout_ptr const & layout = pit->layout();
- pos_type const body_pos = par->beginningOfBody();
+ pos_type const body_pos = pit->beginningOfBody();
pos_type i = row->pos();
while (i <= last) {
if (body_pos > 0 && i == body_pos) {
- w += font_metrics::width(layout->labelsep, getLabelFont(bv()->buffer(), par));
- if (par->isLineSeparator(i - 1))
- w -= singleWidth(par, i - 1);
+ w += font_metrics::width(layout->labelsep, getLabelFont(bv()->buffer(), &*pit));
+ if (pit->isLineSeparator(i - 1))
+ w -= singleWidth(&*pit, i - 1);
int left_margin = labelEnd(*row);
if (w < left_margin)
w = left_margin;
}
- w += singleWidth(par, i);
+ w += singleWidth(&*pit, i);
++i;
}
if (body_pos > 0 && body_pos > last) {
- w += font_metrics::width(layout->labelsep, getLabelFont(bv()->buffer(), par));
- if (last >= 0 && par->isLineSeparator(last))
- w -= singleWidth(par, last);
+ w += font_metrics::width(layout->labelsep, getLabelFont(bv()->buffer(), &*pit));
+ if (last >= 0 && pit->isLineSeparator(last))
+ w -= singleWidth(&*pit, last);
int const left_margin = labelEnd(*row);
if (w < left_margin)
w = left_margin;
int w = 0;
pos_type i = row.pos();
while (i <= last) {
- w += singleWidth(row.par(), i);
+ w += singleWidth(&*row.par(), i);
++i;
}
int fill = 0;
string const & labwidstr = row.par()->params().labelWidthString();
if (!labwidstr.empty()) {
- LyXFont const labfont = getLabelFont(bv()->buffer(), row.par());
+ LyXFont const labfont = getLabelFont(bv()->buffer(), &*row.par());
int const labwidth = font_metrics::width(labwidstr, labfont);
fill = max(labwidth - w, 0);
}
// Correction: only the fontsize count. The other properties
// are taken from the layoutfont. Nicer on the screen :)
- Paragraph * par = rit->par();
- Paragraph * firstpar = par;
+ ParagraphList::iterator pit = rit->par();
+ ParagraphList::iterator firstpit = pit;
- LyXLayout_ptr const & layout = firstpar->layout();
+ LyXLayout_ptr const & layout = firstpit->layout();
// as max get the first character of this row then it can increase but not
// decrease the height. Just some point to start with so we don't have to
// do the assignment below too often.
- LyXFont font = getFont(bv()->buffer(), par, rit->pos());
+ LyXFont font = getFont(bv()->buffer(), &*pit, rit->pos());
LyXFont::FONT_SIZE const tmpsize = font.size();
- font = getLayoutFont(bv()->buffer(), par);
+ font = getLayoutFont(bv()->buffer(), &*pit);
LyXFont::FONT_SIZE const size = font.size();
font.setSize(tmpsize);
- LyXFont labelfont = getLabelFont(bv()->buffer(), par);
+ LyXFont labelfont = getLabelFont(bv()->buffer(), &*pit);
float spacing_val = 1.0;
if (!rit->par()->params().spacing().isDefault()) {
// Check if any insets are larger
for (pos_type pos = rit->pos(); pos <= pos_end; ++pos) {
if (rit->par()->isInset(pos)) {
- tmpfont = getFont(bv()->buffer(), rit->par(), pos);
+ tmpfont = getFont(bv()->buffer(), &*rit->par(), pos);
tmpinset = rit->par()->getInset(pos);
if (tmpinset) {
#if 1 // this is needed for deep update on initialitation
maxdesc = max(maxdesc, desc);
}
} else {
- maxwidth += singleWidth(rit->par(), pos);
+ maxwidth += singleWidth(&*rit->par(), pos);
}
}
}
rit->ascent_of_text(maxasc);
// is it a top line?
- if (!rit->pos() && (rit->par() == firstpar)) {
+ if (!rit->pos() && (rit->par() == firstpit)) {
// some parksips VERY EASY IMPLEMENTATION
if (bv()->buffer()->params.paragraph_separation ==
BufferParams::PARSEP_SKIP)
{
if (layout->isParagraph()
- && firstpar->getDepth() == 0
- && firstpar->previous())
+ && firstpit->getDepth() == 0
+ && firstpit->previous())
{
maxasc += bv()->buffer()->params.getDefSkip().inPixels(*bv());
- } else if (firstpar->previous() &&
- firstpar->previous()->layout()->isParagraph() &&
- firstpar->previous()->getDepth() == 0)
+ } else if (firstpit->previous() &&
+ firstpit->previous()->layout()->isParagraph() &&
+ firstpit->previous()->getDepth() == 0)
{
// is it right to use defskip here too? (AS)
maxasc += bv()->buffer()->params.getDefSkip().inPixels(*bv());
maxasc += PAPER_MARGIN;
// add the vertical spaces, that the user added
- maxasc += getLengthMarkerHeight(*bv(), firstpar->params().spaceTop());
+ maxasc += getLengthMarkerHeight(*bv(), firstpit->params().spaceTop());
// do not forget the DTP-lines!
// there height depends on the font of the nearest character
- if (firstpar->params().lineTop())
+ if (firstpit->params().lineTop())
maxasc += 2 * font_metrics::ascent('x', getFont(bv()->buffer(),
- firstpar, 0));
+ &*firstpit, 0));
// and now the pagebreaks
- if (firstpar->params().pagebreakTop())
+ if (firstpit->params().pagebreakTop())
maxasc += 3 * defaultRowHeight();
- if (firstpar->params().startOfAppendix())
+ if (firstpit->params().startOfAppendix())
maxasc += 3 * defaultRowHeight();
// This is special code for the chapter, since the label of this
// and now the layout spaces, for example before and after a section,
// or between the items of a itemize or enumerate environment
- if (!firstpar->params().pagebreakTop()) {
+ if (!firstpit->params().pagebreakTop()) {
Paragraph * prev = rit->par()->previous();
if (prev)
prev = rit->par()->depthHook(rit->par()->getDepth());
- if (prev && prev->layout() == firstpar->layout() &&
- prev->getDepth() == firstpar->getDepth() &&
- prev->getLabelWidthString() == firstpar->getLabelWidthString())
+ if (prev && prev->layout() == firstpit->layout() &&
+ prev->getDepth() == firstpit->getDepth() &&
+ prev->getLabelWidthString() == firstpit->getLabelWidthString())
{
layoutasc = (layout->itemsep * defaultRowHeight());
} else if (rit != rows().begin()) {
if (prev) {
maxasc += int(prev->layout()->parsep * defaultRowHeight());
} else {
- if (firstpar->previous() &&
- firstpar->previous()->getDepth() == 0 &&
- firstpar->previous()->layout() !=
- firstpar->layout())
+ if (firstpit->previous() &&
+ firstpit->previous()->getDepth() == 0 &&
+ firstpit->previous()->layout() !=
+ firstpit->layout())
{
// avoid parsep
- } else if (firstpar->previous()) {
+ } else if (firstpit->previous()) {
maxasc += int(layout->parsep * defaultRowHeight());
}
}
}
// is it a bottom line?
- if (rit->par() == par
+ if (rit->par() == pit
&& (boost::next(rit) == rows().end() ||
boost::next(rit)->par() != rit->par())) {
// the bottom margin
- if (!par->next() && !isInInset())
+ if (boost::next(pit) == ownerParagraphs().end() &&
+ !isInInset())
maxdesc += PAPER_MARGIN;
// add the vertical spaces, that the user added
- maxdesc += getLengthMarkerHeight(*bv(), firstpar->params().spaceBottom());
+ maxdesc += getLengthMarkerHeight(*bv(), firstpit->params().spaceBottom());
// do not forget the DTP-lines!
// there height depends on the font of the nearest character
- if (firstpar->params().lineBottom())
+ if (firstpit->params().lineBottom())
maxdesc += 2 * font_metrics::ascent('x',
getFont(bv()->buffer(),
- par,
- max(pos_type(0), par->size() - 1)));
+ &*pit,
+ max(pos_type(0), pit->size() - 1)));
// and now the pagebreaks
- if (firstpar->params().pagebreakBottom())
+ if (firstpit->params().pagebreakBottom())
maxdesc += 3 * defaultRowHeight();
// and now the layout spaces, for example before and after
// a section, or between the items of a itemize or enumerate
// environment
- if (!firstpar->params().pagebreakBottom()
+ if (!firstpit->params().pagebreakBottom()
&& rit->par()->next()) {
- Paragraph * nextpar = rit->par()->next();
- Paragraph * comparepar = rit->par();
+ ParagraphList::iterator nextpit = boost::next(rit->par());
+ ParagraphList::iterator comparepit = rit->par();
float usual = 0;
float unusual = 0;
- if (comparepar->getDepth() > nextpar->getDepth()) {
- usual = (comparepar->layout()->bottomsep * defaultRowHeight());
- comparepar = comparepar->depthHook(nextpar->getDepth());
- if (comparepar->layout()!= nextpar->layout()
- || nextpar->getLabelWidthString() !=
- comparepar->getLabelWidthString())
+ if (comparepit->getDepth() > nextpit->getDepth()) {
+ usual = (comparepit->layout()->bottomsep * defaultRowHeight());
+ comparepit = comparepit->depthHook(nextpit->getDepth());
+ if (comparepit->layout()!= nextpit->layout()
+ || nextpit->getLabelWidthString() !=
+ comparepit->getLabelWidthString())
{
- unusual = (comparepar->layout()->bottomsep * defaultRowHeight());
+ unusual = (comparepit->layout()->bottomsep * defaultRowHeight());
}
if (unusual > usual)
layoutdesc = unusual;
else
layoutdesc = usual;
- } else if (comparepar->getDepth() == nextpar->getDepth()) {
+ } else if (comparepit->getDepth() == nextpit->getDepth()) {
- if (comparepar->layout() != nextpar->layout()
- || nextpar->getLabelWidthString() !=
- comparepar->getLabelWidthString())
- layoutdesc = int(comparepar->layout()->bottomsep * defaultRowHeight());
+ if (comparepit->layout() != nextpit->layout()
+ || nextpit->getLabelWidthString() !=
+ comparepit->getLabelWidthString())
+ layoutdesc = int(comparepit->layout()->bottomsep * defaultRowHeight());
}
}
}
// incalculate the layout spaces
- maxasc += int(layoutasc * 2 / (2 + firstpar->getDepth()));
- maxdesc += int(layoutdesc * 2 / (2 + firstpar->getDepth()));
+ maxasc += int(layoutasc * 2 / (2 + firstpit->getDepth()));
+ maxdesc += int(layoutdesc * 2 / (2 + firstpit->getDepth()));
// calculate the new height of the text
height -= rit->height();
}
// center displayed insets
- Inset * inset;
+ Inset * inset = 0;
if (rit->pos() < rit->par()->size()
&& rit->par()->isInset(rit->pos())
&& (inset = rit->par()->getInset(rit->pos()))
(body_pos - 1 > last ||
!rit->par()->isLineSeparator(body_pos - 1))) {
x += font_metrics::width(layout->labelsep,
- getLabelFont(bv()->buffer(), rit->par()));
+ getLabelFont(bv()->buffer(),
+ &*rit->par()));
if (body_pos - 1 <= last)
x += fill_label_hfill;
}
for (; par != end; ++par) {
insertParagraph(&*par, rowlist_.end());
}
- setCursorIntern(rowlist_.begin()->par(), 0);
+ setCursorIntern(&*rowlist_.begin()->par(), 0);
selection.cursor = cursor;
updateCounters();
// remove all following rows of the paragraph of the specified row.
void LyXText::removeParagraph(RowList::iterator rit)
{
- Paragraph * tmppar = rit->par();
+ ParagraphList::iterator tmppit = rit->par();
++rit;
- while (rit != rows().end() && rit->par() == tmppar) {
+ while (rit != rows().end() && rit->par() == tmppit) {
RowList::iterator tmprit = boost::next(rit);
removeRow(rit);
rit = tmprit;
}
+#warning FIXME Convert this to ParagraphList::iterator
void LyXText::insertParagraph(Paragraph * par, RowList::iterator rowit)
{
// insert a new row, starting at position 0
// and the specified par
// This function is needed after SetLayout and SetFont etc.
void LyXText::redoParagraphs(LyXCursor const & cur,
- Paragraph const * endpar)
+ Paragraph const * ep)
{
RowList::iterator tmprit = cur.row();
-
+ ParagraphList::iterator endpit(const_cast<Paragraph*>(ep));
int y = cur.y() - tmprit->baseline();
- Paragraph * first_phys_par;
+ ParagraphList::iterator first_phys_pit;
if (tmprit == rows().begin()) {
// A trick/hack for UNDO.
// This is needed because in an UNDO/REDO we could have
// changed the ownerParagrah() so the paragraph inside
// the row is NOT my really first par anymore.
// Got it Lars ;) (Jug 20011206)
- first_phys_par = &*ownerParagraphs().begin();
+ first_phys_pit = ownerParagraphs().begin();
#warning FIXME
// In here prevrit could be set to rows().end(). (Lgb)
} else {
- first_phys_par = tmprit->par();
+ first_phys_pit = tmprit->par();
while (tmprit != rows().begin()
- && boost::prior(tmprit)->par() == first_phys_par)
+ && boost::prior(tmprit)->par() == first_phys_pit)
{
--tmprit;
y -= tmprit->height();
}
// remove it
- while (tmprit != rows().end() && tmprit->par() != endpar) {
+ while (tmprit != rows().end() && tmprit->par() != endpit) {
RowList::iterator tmprit2 = tmprit++;
removeRow(tmprit2);
}
// Reinsert the paragraphs.
- Paragraph * tmppar = first_phys_par;
+ ParagraphList::iterator tmppit = first_phys_pit;
#warning FIXME
// See if this loop can be rewritten as a while loop instead.
// That should also make the code a bit easier to read. (Lgb)
do {
- if (tmppar) {
- insertParagraph(tmppar, tmprit);
+ if (tmppit != ownerParagraphs().end()) {
+ insertParagraph(&*tmppit, tmprit);
while (tmprit != rows().end()
- && tmprit->par() == tmppar) {
+ && tmprit->par() == tmppit) {
++tmprit;
}
- tmppar = tmppar->next();
+ ++tmppit;
}
- } while (tmppar && tmppar != endpar);
+ } while (tmppit != ownerParagraphs().end() && tmppit != endpit);
#warning FIXME
// If the above changes are done, then we can compare prevrit
void LyXText::updateCounters()
{
RowList::iterator rowit = rows().begin();
- Paragraph * par = rowit->par();
+ ParagraphList::iterator pit = rowit->par();
// CHECK if this is really needed. (Lgb)
bv()->buffer()->params.getLyXTextClass().counters().reset();
- while (par) {
- while (rowit->par() != par)
+ while (pit != ownerParagraphs().end()) {
+ while (rowit->par() != pit)
++rowit;
- string const oldLabel = par->params().labelString();
+ string const oldLabel = pit->params().labelString();
// setCounter can potentially change the labelString.
- setCounter(bv()->buffer(), par);
+ setCounter(bv()->buffer(), &*pit);
- string const & newLabel = par->params().labelString();
+ string const & newLabel = pit->params().labelString();
if (oldLabel.empty() && !newLabel.empty()) {
removeParagraph(rowit);
appendParagraph(rowit);
}
- par = par->next();
+ ++pit;
}
}
font_metrics::width(
rit->par()->layout()->labelsep,
getLabelFont(bv()->buffer(),
- rit->par()));
+ &*rit->par()));
if (rit->par()->isLineSeparator(body_pos - 1))
- x -= singleWidth(rit->par(), body_pos - 1);
+ x -= singleWidth(&*rit->par(), body_pos - 1);
}
if (hfillExpansion(*this, rit, pos)) {
- x += singleWidth(rit->par(), pos);
+ x += singleWidth(&*rit->par(), pos);
if (pos >= body_pos)
x += fill_hfill;
else
x += fill_label_hfill;
} else if (rit->par()->isSeparator(pos)) {
- x += singleWidth(rit->par(), pos);
+ x += singleWidth(&*rit->par(), pos);
if (pos >= body_pos)
x += fill_separator;
} else
- x += singleWidth(rit->par(), pos);
+ x += singleWidth(&*rit->par(), pos);
}
return x;
}
if (body_pos > 0 && c == body_pos - 1) {
tmpx += fill_label_hfill +
font_metrics::width(layout->labelsep,
- getLabelFont(bv()->buffer(), rit->par()));
+ getLabelFont(bv()->buffer(), &*rit->par()));
if (rit->par()->isLineSeparator(body_pos - 1))
- tmpx -= singleWidth(rit->par(), body_pos - 1);
+ tmpx -= singleWidth(&*rit->par(), body_pos - 1);
}
if (hfillExpansion(*this, rit, c)) {
- tmpx += singleWidth(rit->par(), c);
+ tmpx += singleWidth(&*rit->par(), c);
if (c >= body_pos)
tmpx += fill_hfill;
else
tmpx += fill_label_hfill;
} else if (rit->par()->isSeparator(c)) {
- tmpx += singleWidth(rit->par(), c);
+ tmpx += singleWidth(&*rit->par(), c);
if (c >= body_pos)
tmpx+= fill_separator;
} else {
- tmpx += singleWidth(rit->par(), c);
+ tmpx += singleWidth(&*rit->par(), c);
}
++vc;
}
bool const rtl = (bidi_level(c) % 2 == 1);
if (left_side == rtl) {
++c;
- boundary = isBoundary(bv()->buffer(), rit->par(), c);
+ boundary = isBoundary(bv()->buffer(), &*rit->par(), c);
}
}
if (rit->pos() <= last && c > last
&& rit->par()->isNewline(last)) {
if (bidi_level(last) % 2 == 0)
- tmpx -= singleWidth(rit->par(), last);
+ tmpx -= singleWidth(&*rit->par(), last);
else
- tmpx += singleWidth(rit->par(), last);
+ tmpx += singleWidth(&*rit->par(), last);
c = last;
}
RowList::iterator row = getRowNearY(y);
bool bound = false;
pos_type const column = getColumnNearX(row, x, bound);
- cur.par(row->par());
+ cur.par(&*row->par());
cur.pos(row->pos() + column);
cur.x(x);
cur.y(y + row->baseline());