From dd25d9ffe501ce75e7d788ce651b07a321c92ee2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20P=C3=B6nitz?= Date: Mon, 18 Aug 2003 09:52:17 +0000 Subject: [PATCH] drop one argument from paintRows, add pit argument git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7565 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/screen.C | 8 ++++---- src/insets/insettext.C | 3 +-- src/rowpainter.C | 7 ++++--- src/rowpainter.h | 3 ++- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/frontends/screen.C b/src/frontends/screen.C index f2091f60f3..2302ee3202 100644 --- a/src/frontends/screen.C +++ b/src/frontends/screen.C @@ -352,16 +352,16 @@ void LyXScreen::greyOut() void LyXScreen::drawFromTo(LyXText * text, BufferView * bv) { hideCursor(); - int const y2 = workarea().workHeight(); int const topy = text->top_y(); int y_text = topy; - ParagraphList::iterator dummypit; - RowList::iterator rit = text->getRowNearY(y_text, dummypit); + ParagraphList::iterator pit; + RowList::iterator rit = text->getRowNearY(y_text, pit); int y = y_text - topy; - y = paintRows(*bv, *text, rit, 0, y, y, y2, 0); + y = paintRows(*bv, *text, pit, rit, 0, y, y, 0); // maybe we have to clear the screen at the bottom + int const y2 = workarea().workHeight(); if (y < y2 && !text->isInInset()) { workarea().getPainter().fillRectangle(0, y, workarea().workWidth(), y2 - y, diff --git a/src/insets/insettext.C b/src/insets/insettext.C index 2708f2ab6b..569c7e744a 100644 --- a/src/insets/insettext.C +++ b/src/insets/insettext.C @@ -292,7 +292,6 @@ void InsetText::draw(PainterInfo & pi, int x, int baseline) const ParagraphList::iterator pit = paragraphs.begin(); int y_offset = baseline - rit->ascent_of_text(); - int y2 = pain.paperHeight(); int first = 0; int y = y_offset; while (rit != end && y + rit->height() <= 0) { @@ -311,7 +310,7 @@ void InsetText::draw(PainterInfo & pi, int x, int baseline) const int yo = y_offset + first; - paintRows(*bv, text_, rit, x, 0, yo, y2, yo); + paintRows(*bv, text_, pit, rit, x, 0, yo, yo); if (drawFrame_ == ALWAYS || (drawFrame_ == LOCKED && locked)) drawFrame(pain, int(start_x)); diff --git a/src/rowpainter.C b/src/rowpainter.C index bdf51b2912..6f7a77446e 100644 --- a/src/rowpainter.C +++ b/src/rowpainter.C @@ -1066,13 +1066,14 @@ int getLengthMarkerHeight(BufferView const & bv, VSpace const & vsp) int paintRows(BufferView const & bv, LyXText const & text, - RowList::iterator rit, int xo, int y, int yf, int y2, int yo) + ParagraphList::iterator pit, RowList::iterator rit, + int xo, int y, int yf, int yo) { lyxerr << " paintRows: rit: " << &*rit << endl; const_cast(text).updateRowPositions(); - int yy = yf - y; + int const yy = yf - y; + int const y2 = bv.painter().paperHeight(); - ParagraphList::iterator pit = text.ownerParagraphs().begin(); ParagraphList::iterator end = text.ownerParagraphs().end(); bool active = false; diff --git a/src/rowpainter.h b/src/rowpainter.h index a8ceac5265..dbd9d75ca9 100644 --- a/src/rowpainter.h +++ b/src/rowpainter.h @@ -24,7 +24,8 @@ class VSpace; /// paint the rows // return last used y int paintRows(BufferView const & bv, LyXText const & text, - RowList::iterator rit, int xo, int y, int yf, int y2, int yo); + ParagraphList::iterator pit, + RowList::iterator rit, int xo, int y, int yf, int yo); /// return the pixel height of a space marker before/after a par int getLengthMarkerHeight(BufferView const & bv, VSpace const & vsp); -- 2.39.2