]> git.lyx.org Git - lyx.git/blobdiff - src/TextMetrics.cpp
* Paragraph: erase unused some method and move some members to Paragraph::Private.
[lyx.git] / src / TextMetrics.cpp
index 3dd79c234fc7510d31b0388513eee7aaf2db8630..39fddf750290c3d1b46bfe48dc17b45282bbb96a 100644 (file)
@@ -29,6 +29,7 @@
 #include "debug.h"
 #include "FontIterator.h"
 #include "FuncRequest.h"
+#include "InsetList.h"
 #include "Layout.h"
 #include "Length.h"
 #include "LyXRC.h"
@@ -381,8 +382,8 @@ bool TextMetrics::redoParagraph(pit_type const pit)
        // FIXME: We should always use getFont(), see documentation of
        // noFontChange() in Inset.h.
        Font const bufferfont = buffer.params().getFont();
-       InsetList::const_iterator ii = par.insetlist.begin();
-       InsetList::const_iterator iend = par.insetlist.end();
+       InsetList::const_iterator ii = par.insetList().begin();
+       InsetList::const_iterator iend = par.insetList().end();
        for (; ii != iend; ++ii) {
                Dimension dim;
                int const w = max_width_ - leftMargin(max_width_, pit, ii->pos)
@@ -863,8 +864,8 @@ boost::tuple<int, int> TextMetrics::rowHeight(pit_type const pit, pos_type const
 
        // insets may be taller
        ParagraphMetrics const & pm = par_metrics_[pit];
-       InsetList::const_iterator ii = par.insetlist.begin();
-       InsetList::const_iterator iend = par.insetlist.end();
+       InsetList::const_iterator ii = par.insetList().begin();
+       InsetList::const_iterator iend = par.insetList().end();
        for ( ; ii != iend; ++ii) {
                Dimension const & dim = pm.insetDimension(ii->inset);
                if (ii->pos >= first && ii->pos < end) {
@@ -1411,8 +1412,8 @@ Inset * TextMetrics::checkInsetHit(int x, int y)
                << " y: " << y
                << "  pit: " << pit
                << endl;
-       InsetList::const_iterator iit = par.insetlist.begin();
-       InsetList::const_iterator iend = par.insetlist.end();
+       InsetList::const_iterator iit = par.insetList().begin();
+       InsetList::const_iterator iend = par.insetList().end();
        for (; iit != iend; ++iit) {
                Inset * inset = iit->inset;
 
@@ -1654,8 +1655,8 @@ void TextMetrics::deleteLineForward(Cursor & cur)
 {
        BOOST_ASSERT(text_ == cur.text());
        if (cur.lastpos() == 0) {
-               // Paragraph is empty, so we just go to the right
-               text_->cursorRight(cur);
+               // Paragraph is empty, so we just go forward
+               text_->cursorForward(cur);
        } else {
                cur.resetAnchor();
                cur.selection() = true; // to avoid deletion
@@ -2079,9 +2080,9 @@ void TextMetrics::drawRowSelection(PainterInfo & pi, int x, Row const & row,
        while (cur < end) {
                bool drawNow = false;
                
-               // simplified cursorRight code below which does not
+               // simplified cursorForward code below which does not
                // descend into insets and which does not go into the
-               // next line. Compare the logic with the original cursorRight
+               // next line. Compare the logic with the original cursorForward
                
                // if left of boundary -> just jump to right side
                // but for RTL boundaries don't, because: abc|DDEEFFghi -> abcDDEEF|Fghi