while (doitonetime || ((x < width) && (i < last))) {
doitonetime = false;
char const c = par->getChar(i);
+ Inset * in = 0;
+ if (c == Paragraph::META_INSET)
+ in = par->getInset(i);
if (IsNewlineChar(c)) {
last_separator = i;
x = width; // this means break
- } else if (c == Paragraph::META_INSET &&
- par->getInset(i)) {
-
+ } else if (in && !in->isChar()) {
// check wether a Display() inset is
// valid here. if not, change it to
// non-display
- if (par->getInset(i)->display() &&
+ if (in->display() &&
(layout.isCommand() ||
(layout.labeltype == LABEL_MANUAL
&& i < beginningOfMainBody(bview->buffer(), par))))
{
// display istn't allowd
- par->getInset(i)->display(false);
+ in->display(false);
x += singleWidth(bview, par, i, c);
- } else if (par->getInset(i)->display() ||
- par->getInset(i)->needFullRow())
- {
+ } else if (in->display() || in->needFullRow()) {
// So break the line here
if (i == pos) {
if (pos < last-1) {
last_separator = i - 1;
}
} else {
- if (IsLineSeparatorChar(c))
+ if (IsLineSeparatorChar(c, in))
last_separator = i;
x += singleWidth(bview, par, i, c);
}
float x = 0;
if (layout.margintype != MARGIN_RIGHT_ADDRESS_BOX) {
float dummy;
+ // this IS needed
+ row_ptr->width(maxwidth);
prepareToPrint(bview, row_ptr, x, dummy, dummy, dummy, false);
}
row_ptr->width(int(maxwidth + x));
fill_separator = 0;
fill_label_hfill = 0;
- bool const is_rtl =
+ bool const is_rtl =
row->par()->isRightToLeftPar(bview->buffer()->params);
if (is_rtl) {
x = (workWidth(bview) > 0)
if (nh) {
if (w > 0)
fill_hfill = w / nh;
- } else {
+ // we don't have to look at the alignment if it is ALIGN_LEFT and
+ // if the row is already larger then the permitted width as then
+ // we force the LEFT_ALIGN'edness!
+ } else if (static_cast<int>(row->width()) < workWidth(bview)) {
// is it block, flushleft or flushright?
// set x how you need it
int align;
value += float(cursor.y())/float(height);
return str;
}
-#warning Dekel please have a look on this one RTL? (Jug)
-#warning DEKEL!
- // we have to go on checking so move cusor to the right
+ // we have to go on checking so move cusor to the next char
if (cursor.pos() == cursor.par()->size()) {
if (!cursor.par()->next())
return str;