X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fcursor_slice.C;h=02e7b4ab6270d82dbd3b3b8976c68a2ac8668b29;hb=35204f8f33d7400a5fefeffea533fb4cb4097211;hp=eda679a2e95750fa10c79da8517003c57dd63ba3;hpb=af5acb6dc7e2f77a1f7a69d4f1bbfa25c7b50ea3;p=lyx.git diff --git a/src/cursor_slice.C b/src/cursor_slice.C index eda679a2e9..02e7b4ab62 100644 --- a/src/cursor_slice.C +++ b/src/cursor_slice.C @@ -18,11 +18,14 @@ #include "lyxtext.h" #include "paragraph.h" -#include "mathed/math_inset.h" -#include "mathed/math_data.h" +#include "mathed/InsetMath.h" +#include "mathed/MathData.h" #include + +namespace lyx { + using std::endl; @@ -40,7 +43,7 @@ CursorSlice::CursorSlice(InsetBase & p) MathArray & CursorSlice::cell() const { - return inset_->asMathInset()->cell(idx_); + return inset_->asInsetMath()->cell(idx_); } @@ -56,30 +59,30 @@ Paragraph const & CursorSlice::paragraph() const } -CursorSlice::pos_type CursorSlice::lastpos() const +pos_type CursorSlice::lastpos() const { BOOST_ASSERT(inset_); - return inset_->asMathInset() ? cell().size() : paragraph().size(); + return inset_->asInsetMath() ? cell().size() : paragraph().size(); } CursorSlice::row_type CursorSlice::row() const { - BOOST_ASSERT(asMathInset()); - return asMathInset()->row(idx_); + BOOST_ASSERT(asInsetMath()); + return asInsetMath()->row(idx_); } CursorSlice::col_type CursorSlice::col() const { - BOOST_ASSERT(asMathInset()); - return asMathInset()->col(idx_); + BOOST_ASSERT(asInsetMath()); + return asInsetMath()->col(idx_); } bool operator==(CursorSlice const & p, CursorSlice const & q) { - return &p.inset() == &q.inset() + return p.inset_ == q.inset_ && p.idx() == q.idx() && p.pit() == q.pit() && p.pos() == q.pos(); @@ -88,7 +91,7 @@ bool operator==(CursorSlice const & p, CursorSlice const & q) bool operator!=(CursorSlice const & p, CursorSlice const & q) { - return &p.inset() != &q.inset() + return p.inset_ != q.inset_ || p.idx() != q.idx() || p.pit() != q.pit() || p.pos() != q.pos(); @@ -134,3 +137,6 @@ std::ostream & operator<<(std::ostream & os, CursorSlice const & item) // << " y: " << item.inset().y() ; } + + +} // namespace lyx