small stuff

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8117 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
André Pönitz 2003-11-21 16:35:46 +00:00
parent f897f21c40
commit 62e7385055
6 changed files with 9 additions and 30 deletions

View File

@ -275,8 +275,3 @@ bool InsetSpace::isSpace() const
{
return true;
}
bool InsetSpace::isLineSeparator() const
{
return false;
}

View File

@ -86,8 +86,6 @@ public:
/// is this equivalent to a space (which is BTW different from
// a line separator)?
bool isSpace() const;
// should we break lines after this inset?
bool isLineSeparator() const;
private:
/// And which kind is this?
Kind kind_;

View File

@ -269,12 +269,6 @@ bool InsetSpecialChar::isLetter() const
}
bool InsetSpecialChar::isSpace() const
{
return false;
}
bool InsetSpecialChar::isLineSeparator() const
{
#if 0

View File

@ -77,9 +77,6 @@ public:
bool isChar() const;
/// is this equivalent to a letter?
bool isLetter() const;
/// is this equivalent to a space (which is BTW different from
// a line separator)?
bool isSpace() const;
// should we break lines after this inset?
bool isLineSeparator() const;
private:

View File

@ -257,9 +257,10 @@ void InsetText::draw(PainterInfo & pi, int x, int y) const
x += scroll();
x += TEXT_TO_INSET_OFFSET;
y -= text_.firstRow()->ascent_of_text();
text_.xo_ = x;
text_.yo_ = y - text_.firstRow()->ascent_of_text() + bv->top_y();
text_.yo_ = y + bv->top_y();
paintTextInset(*bv, text_, x, y);

View File

@ -449,20 +449,16 @@ void RowPainter::paintSelection()
tmpx -= singleWidth(body_pos - 1);
}
tmpx += singleWidth(pos);
if (hfillExpansion(*pit_, row_, pos)) {
tmpx += singleWidth(pos);
if (pos >= body_pos)
tmpx += hfill_;
else
tmpx += label_hfill_;
}
else if (pit_->isSeparator(pos)) {
tmpx += singleWidth(pos);
if (pos >= body_pos)
tmpx += separator_;
} else {
tmpx += singleWidth(pos);
if (pit_->isSeparator(pos) && pos >= body_pos)
tmpx += separator_;
}
if ((startrow != rit_ || text_.selection.start.pos() <= pos) &&
@ -976,7 +972,6 @@ int paintRows(BufferView const & bv, LyXText const & text,
int xo, int yo, int y)
{
//lyxerr << " paintRows: rit: " << &*rit << endl;
int const yy = yo;
int const y2 = bv.painter().paperHeight();
ParagraphList::iterator end = text.ownerParagraphs().end();
@ -997,7 +992,7 @@ int paintRows(BufferView const & bv, LyXText const & text,
//lyxerr << " paintRows: row: " << &*row << " ignored" << endl;
}
}
if (yy + y >= y2)
if (yo + y >= y2)
return y;
}
@ -1017,11 +1012,10 @@ int paintText(BufferView & bv)
}
void paintTextInset(BufferView & bv, LyXText & text, int xo, int baseline)
void paintTextInset(BufferView & bv, LyXText & text, int xo, int yo)
{
RowList::iterator rit = text.firstRow();
ParagraphList::iterator pit = text.ownerParagraphs().begin();
paintRows(bv, text, pit, rit, xo, baseline - rit->ascent_of_text(), 0);
paintRows(bv, text, pit, pit->rows.begin(), xo, yo, 0);
}