Moves textRow() from DocIterator to cursor.C where it belongs.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16332 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2006-12-19 13:39:46 +00:00
parent 828d077a9a
commit 4eb12c683b
4 changed files with 18 additions and 18 deletions

View File

@ -403,6 +403,20 @@ void LCursor::getPos(int & x, int & y) const
}
Row & LCursor::textRow()
{
BOOST_ASSERT(!paragraph().rows().empty());
return paragraph().getRow(pos(), boundary());
}
Row const & LCursor::textRow() const
{
BOOST_ASSERT(!paragraph().rows().empty());
return paragraph().getRow(pos(), boundary());
}
void LCursor::resetAnchor()
{
anchor_ = *this;

View File

@ -102,6 +102,10 @@ public:
bool & macromode() { return macromode_; }
/// returns x,y position
void getPos(int & x, int & y) const;
/// the row in the paragraph we're in
Row & textRow();
/// the row in the paragraph we're in
Row const & textRow() const;
//
// common part

View File

@ -170,20 +170,6 @@ Paragraph const & DocIterator::paragraph() const
}
Row & DocIterator::textRow()
{
BOOST_ASSERT(!paragraph().rows().empty());
return paragraph().getRow(pos(), boundary_);
}
Row const & DocIterator::textRow() const
{
BOOST_ASSERT(!paragraph().rows().empty());
return paragraph().getRow(pos(), boundary_);
}
pit_type DocIterator::lastpit() const
{
return inMathed() ? 0 : text()->paragraphs().size() - 1;

View File

@ -154,10 +154,6 @@ public:
Paragraph & paragraph();
/// the paragraph we're in
Paragraph const & paragraph() const;
/// the row in the paragraph we're in
Row & textRow();
/// the row in the paragraph we're in
Row const & textRow() const;
///
LyXText * text();
///