mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-02 08:10:39 +00:00
Small fixes (to earlier fixes ;)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1068 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
52f5cdce06
commit
aa0f850e5d
@ -1,3 +1,11 @@
|
||||
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
|
||||
|
@ -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
|
||||
|
@ -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) +
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
11
src/screen.C
11
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;
|
||||
|
Loading…
Reference in New Issue
Block a user