From: Jürgen Vigna Date: Mon, 2 Oct 2000 11:50:36 +0000 (+0000) Subject: Small fixes (to earlier fixes ;) X-Git-Tag: 1.6.10~21948 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=aa0f850e5dc6bd41266edc47eb58bfbf2c504abd;p=features.git Small fixes (to earlier fixes ;) git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1068 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/ChangeLog b/ChangeLog index a967e59156..e9d5589d5a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2000-10-02 Juergen Vigna + + * 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 * boost/.cvsignore: ignore Makefile as well diff --git a/po/POTFILES.in b/po/POTFILES.in index f9dcbb6ad1..dc947f955b 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -64,6 +64,19 @@ src/frontends/xforms/FormPrint.C 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 diff --git a/src/insets/insettabular.C b/src/insets/insettabular.C index 8fe7d70f65..35145299ee 100644 --- a/src/insets/insettabular.C +++ b/src/insets/insettabular.C @@ -280,16 +280,18 @@ void InsetTabular::draw(BufferView * bv, LyXFont const & font, int baseline, } 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; @@ -1019,7 +1021,7 @@ void InsetTabular::setPos(BufferView * bv, int x, int y) const 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())) { @@ -1033,7 +1035,7 @@ void InsetTabular::setPos(BufferView * bv, int x, int y) const 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) + diff --git a/src/insets/insettext.C b/src/insets/insettext.C index 9040338c60..bf2221af91 100644 --- a/src/insets/insettext.C +++ b/src/insets/insettext.C @@ -273,7 +273,7 @@ void InsetText::draw(BufferView * bv, LyXFont const & f, 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) { @@ -1225,7 +1225,18 @@ UpdatableInset * InsetText::GetFirstLockingInsetOfType(Inset::Code c) 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); } diff --git a/src/screen.C b/src/screen.C index 477dba0279..8887775dac 100644 --- a/src/screen.C +++ b/src/screen.C @@ -125,9 +125,10 @@ void LyXScreen::DrawOneRow(LyXText * text, Row * row, int y_text, 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 { @@ -222,14 +223,14 @@ bool LyXScreen::FitManualCursor(LyXText * text, 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;