+2000-10-02 Juergen Vigna <jug@sad.it>
+
+ * src/insets/insettext.C (SetFont): better support.
+
+ * src/insets/insettabular.C (draw): fixed drawing of single cell.
+
+ * src/screen.C (DrawOneRow): some uint refixes!
+
2000-10-02 Allan Rae <rae@lyx.org>
* boost/.cvsignore: ignore Makefile as well
src/frontends/xforms/form_print.C
src/frontends/xforms/FormRef.C
src/frontends/xforms/form_ref.C
+src/frontends/xforms/forms/form_citation.C
+src/frontends/xforms/forms/form_copyright.C
+src/frontends/xforms/forms/form_document.C
+src/frontends/xforms/forms/form_error.C
+src/frontends/xforms/forms/form_graphics.C
+src/frontends/xforms/forms/form_index.C
+src/frontends/xforms/forms/form_paragraph.C
+src/frontends/xforms/forms/form_preferences.C
+src/frontends/xforms/forms/form_print.C
+src/frontends/xforms/forms/form_ref.C
+src/frontends/xforms/forms/form_tabular.C
+src/frontends/xforms/forms/form_toc.C
+src/frontends/xforms/forms/form_url.C
src/frontends/xforms/FormTabular.C
src/frontends/xforms/form_tabular.C
src/frontends/xforms/FormToc.C
} else if (need_update == CELL) {
nx = int(x);
for(i = 0; (cell < actcell) && (i < tabular->rows()); ++i) {
- nx = int(x);
for(j = 0; (cell < actcell) && (j < tabular->columns()); ++j) {
if (tabular->IsPartOfMultiColumn(i, j))
continue;
nx += tabular->GetWidthOfColumn(cell);
++cell;
}
- baseline += tabular->GetDescentOfRow(i) +
- tabular->GetAscentOfRow(i + 1) +
- tabular->GetAdditionalHeight(cell);
+ if (tabular->row_of_cell(cell) > i) {
+ nx = int(x);
+ baseline += tabular->GetDescentOfRow(i) +
+ tabular->GetAscentOfRow(i + 1) +
+ tabular->GetAdditionalHeight(cell);
+ }
}
if (the_locking_inset == tabular->GetCellInset(cell)) {
LyXText::text_status st = bv->text->status;
cursor.pos(0);
actcell = actrow = actcol = 0;
- unsigned int ly = tabular->GetDescentOfRow(actrow);
+ int ly = tabular->GetDescentOfRow(actrow);
// first search the right row
while((ly < y) && (actrow < tabular->rows())) {
actcell = tabular->GetCellNumber(actrow, actcol);
// now search the right column
- unsigned int lx = tabular->GetWidthOfColumn(actcell) -
+ int lx = tabular->GetWidthOfColumn(actcell) -
tabular->GetAdditionalWidth(actcell);
for(; !tabular->IsLastCellInRow(actcell) && (lx < x);
++actcell,lx += tabular->GetWidthOfColumn(actcell) +
if (!cleared && ((need_update==FULL) || (top_x!=int(x)) ||
(top_baseline!=baseline))) {
int w = insetWidth;
- unsigned int h = insetAscent + insetDescent;
+ int h = insetAscent + insetDescent;
int ty = baseline - insetAscent;
if (ty < 0) {
void InsetText::SetFont(BufferView * bv, LyXFont const & font, bool toggleall)
{
+ bv->text->SetUndo(bv->buffer(), Undo::EDIT,
+#ifndef NEW_INSETS
+ bv->text->cursor.par()->ParFromPos(bv->text->cursor.pos())->previous,
+ bv->text->cursor.par()->ParFromPos(bv->text->cursor.pos())->next
+#else
+ bv->text->cursor.par()->previous,
+ bv->text->cursor.par()->next
+#endif
+ );
TEXT(bv)->SetFont(bv, font, toggleall);
+ bv->fitCursor(TEXT(bv));
+ UpdateLocal(bv, CURSOR_PAR, true);
}
int y_offset, int x_offset)
{
int y = y_text - text->first + y_offset;
-
- if (y + row->height() > 0
- && y - row->height() <= owner.height()) {
+
+ if (((y+row->height()) > 0) &&
+ ((y-row->height()) <= (int)owner.height()))
+ {
// ok there is something visible
LyXText::text_status st = text->status;
do {
if (y + desc - text->first >= owner.height())
newtop = y - 3 * owner.height() / 4; // the scroll region must be so big!!
- else if (y - asc < text->first
+ else if (y - asc < (int)text->first
&& text->first > 0) {
newtop = y - owner.height() / 4;
}
newtop = max(newtop, 0); // can newtop ever be < 0? (Lgb)
- if (newtop != text->first) {
+ if (newtop != (int)text->first) {
Draw(text, newtop);
text->first = newtop;
return true;