mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-23 10:18:50 +00:00
more small stuff
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8118 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
62e7385055
commit
34b73170c6
@ -967,33 +967,25 @@ void RowPainter::paint()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int paintRows(BufferView const & bv, LyXText const & text,
|
int paintPars(BufferView const & bv, LyXText const & text,
|
||||||
ParagraphList::iterator pit, RowList::iterator rit,
|
ParagraphList::iterator pit, int xo, int yo, int y)
|
||||||
int xo, int yo, int y)
|
|
||||||
{
|
{
|
||||||
//lyxerr << " paintRows: rit: " << &*rit << endl;
|
//lyxerr << " paintRows: pit: " << &*pit << endl;
|
||||||
int const y2 = bv.painter().paperHeight();
|
int const y2 = bv.painter().paperHeight();
|
||||||
|
|
||||||
ParagraphList::iterator end = text.ownerParagraphs().end();
|
ParagraphList::iterator end = text.ownerParagraphs().end();
|
||||||
bool active = false;
|
|
||||||
|
|
||||||
for ( ; pit != end; ++pit) {
|
for ( ; pit != end; ++pit) {
|
||||||
RowList::iterator row = pit->rows.begin();
|
RowList::iterator row = pit->rows.begin();
|
||||||
RowList::iterator rend = pit->rows.end();
|
RowList::iterator rend = pit->rows.end();
|
||||||
|
|
||||||
for ( ; row != rend; ++row) {
|
for ( ; row != rend; ++row) {
|
||||||
if (row == rit)
|
RowPainter painter(bv, text, pit, row, y + yo, xo, y + bv.top_y());
|
||||||
active = true;
|
painter.paint();
|
||||||
if (active) {
|
y += row->height();
|
||||||
RowPainter painter(bv, text, pit, row, y + yo, xo, y + bv.top_y());
|
|
||||||
painter.paint();
|
|
||||||
y += row->height();
|
|
||||||
} else {
|
|
||||||
//lyxerr << " paintRows: row: " << &*row << " ignored" << endl;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (yo + y >= y2)
|
if (yo + y >= y2)
|
||||||
return y;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return y;
|
return y;
|
||||||
@ -1006,16 +998,14 @@ int paintText(BufferView & bv)
|
|||||||
{
|
{
|
||||||
int const topy = bv.top_y();
|
int const topy = bv.top_y();
|
||||||
ParagraphList::iterator pit;
|
ParagraphList::iterator pit;
|
||||||
RowList::iterator rit = bv.text->getRowNearY(topy, pit);
|
bv.text->getRowNearY(topy, pit);
|
||||||
int const y = pit->y + rit->y_offset() - topy;
|
return paintPars(bv, *bv.text, pit, 0, 0, pit->y - topy);
|
||||||
return paintRows(bv, *bv.text, pit, rit, 0, 0, y);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void paintTextInset(BufferView & bv, LyXText & text, int xo, int yo)
|
void paintTextInset(BufferView & bv, LyXText & text, int xo, int yo)
|
||||||
{
|
{
|
||||||
ParagraphList::iterator pit = text.ownerParagraphs().begin();
|
paintPars(bv, text, text.ownerParagraphs().begin(), xo, yo, 0);
|
||||||
paintRows(bv, text, pit, pit->rows.begin(), xo, yo, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user