From 4eb12c683b3bbf2040778af9620904ab53eef29a Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Tue, 19 Dec 2006 13:39:46 +0000 Subject: [PATCH] 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 --- src/cursor.C | 14 ++++++++++++++ src/cursor.h | 4 ++++ src/dociterator.C | 14 -------------- src/dociterator.h | 4 ---- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/cursor.C b/src/cursor.C index 4d95d0de0b..4dacb3674a 100644 --- a/src/cursor.C +++ b/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; diff --git a/src/cursor.h b/src/cursor.h index 46f1834f19..133d6ebb96 100644 --- a/src/cursor.h +++ b/src/cursor.h @@ -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 diff --git a/src/dociterator.C b/src/dociterator.C index 4d93aa7a01..7d86f24a5b 100644 --- a/src/dociterator.C +++ b/src/dociterator.C @@ -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; diff --git a/src/dociterator.h b/src/dociterator.h index 7d4c443968..a452494d68 100644 --- a/src/dociterator.h +++ b/src/dociterator.h @@ -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(); /// -- 2.39.2