]> git.lyx.org Git - lyx.git/blobdiff - src/Text.cpp
Add Qt's Svg module to the list of used modules. This is required to allow the use...
[lyx.git] / src / Text.cpp
index 1eecee1e30443e9b068a24538508a361de7fac97..eac26ea5d8f5c01c994186d3de6bff2f8a233782 100644 (file)
 #include "support/gettext.h"
 #include "support/lassert.h"
 #include "support/lstrings.h"
+#include "support/lyxalgo.h"
 #include "support/textutils.h"
 
-#include <boost/next_prior.hpp>
-
 #include <limits>
 #include <sstream>
 
@@ -137,7 +136,7 @@ void breakParagraphConservative(BufferParams const & bparams,
        ParagraphList & pars, pit_type par_offset, pos_type pos)
 {
        // create a new paragraph
-       Paragraph & tmp = *pars.insert(boost::next(pars.begin(), par_offset + 1),
+       Paragraph & tmp = *pars.insert(next(pars.begin(), par_offset + 1),
                                       Paragraph());
        Paragraph & par = pars[par_offset];
 
@@ -193,7 +192,7 @@ void mergeParagraph(BufferParams const & bparams,
        // move the change of the end-of-paragraph character
        par.setChange(par.size(), change);
 
-       pars.erase(boost::next(pars.begin(), par_offset + 1));
+       pars.erase(lyx::next(pars.begin(), par_offset + 1));
 }
 
 
@@ -663,7 +662,7 @@ static void breakParagraph(Text & text, pit_type par_offset, pos_type pos,
        ParagraphList & pars = text.paragraphs();
        // create a new paragraph, and insert into the list
        ParagraphList::iterator tmp =
-               pars.insert(boost::next(pars.begin(), par_offset + 1),
+               pars.insert(next(pars.begin(), par_offset + 1),
                            Paragraph());
 
        Paragraph & par = pars[par_offset];
@@ -848,7 +847,7 @@ void Text::insertStringAsLines(Cursor & cur, docstring const & str,
                        } else {
                                continue;
                        }
-                       // do not insert consecutive spaces if !free_spacing
+               // do not insert consecutive spaces if !free_spacing
                } else if ((*cit == ' ' || *cit == '\t') &&
                           space_inserted && !par.isFreeSpacing()) {
                        continue;
@@ -1115,7 +1114,7 @@ bool Text::cursorForwardOneWord(Cursor & cur)
        if (lyxrc.mac_like_cursor_movement) {
                // Skip through trailing punctuation and spaces.
                while (pos != lastpos && (par.isChar(pos) || par.isSpace(pos)))
-                        ++pos;
+                       ++pos;
 
                // Skip over either a non-char inset or a full word
                if (pos != lastpos && par.isWordSeparator(pos))
@@ -1641,14 +1640,14 @@ bool Text::backspacePos0(Cursor & cur)
        if (cur.lastpos() == 0
            || (cur.lastpos() == 1 && par.isSeparator(0))) {
                cur.recordUndo(prevcur.pit());
-               plist.erase(boost::next(plist.begin(), cur.pit()));
+               plist.erase(next(plist.begin(), cur.pit()));
                needsUpdate = true;
        }
        // is previous par empty?
        else if (prevcur.lastpos() == 0
                 || (prevcur.lastpos() == 1 && prevpar.isSeparator(0))) {
                cur.recordUndo(prevcur.pit());
-               plist.erase(boost::next(plist.begin(), prevcur.pit()));
+               plist.erase(next(plist.begin(), prevcur.pit()));
                needsUpdate = true;
        }
        // Pasting is not allowed, if the paragraphs have different