mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-23 02:14:50 +00:00
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:
parent
828d077a9a
commit
4eb12c683b
14
src/cursor.C
14
src/cursor.C
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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();
|
||||
///
|
||||
|
Loading…
Reference in New Issue
Block a user