]> git.lyx.org Git - lyx.git/blobdiff - src/paragraph_funcs.cpp
* Paragraph: erase unused some method and move some members to Paragraph::Private.
[lyx.git] / src / paragraph_funcs.cpp
index 03bc9e69100695765656887fe56d24e7b7ff4320..0dbacb46ace5839809db731c544c71b2844f3316 100644 (file)
 #include "paragraph_funcs.h"
 
 #include "BufferParams.h"
+#include "Changes.h"
 #include "debug.h"
+#include "InsetList.h"
 #include "Layout.h"
-#include "Text.h"
 #include "Paragraph.h"
 #include "ParagraphParameters.h"
+#include "Text.h"
 
 #include <boost/next_prior.hpp>
 
@@ -41,11 +43,9 @@ static bool moveItem(Paragraph & fromPar, pos_type fromPos,
                Inset * tmpInset = 0;
                if (fromPar.getInset(fromPos)) {
                        // the inset is not in the paragraph any more
-                       tmpInset = fromPar.insetlist.release(fromPos);
+                       tmpInset = fromPar.releaseInset(fromPos);
                }
 
-               fromPar.eraseChar(fromPos, false);
-
                if (!toPar.insetAllowed(tmpInset->lyxCode())) {
                        delete tmpInset;
                        return false;
@@ -308,21 +308,6 @@ Font const outerFont(pit_type par_offset, ParagraphList const & pars)
 }
 
 
-/// return the number of InsetOptArg in a paragraph
-int numberOfOptArgs(Paragraph const & par)
-{
-       int num = 0;
-
-       InsetList::const_iterator it = par.insetlist.begin();
-       InsetList::const_iterator end = par.insetlist.end();
-       for (; it != end ; ++it) {
-               if (it->inset->lyxCode() == Inset::OPTARG_CODE)
-                       ++num;
-       }
-       return num;
-}
-
-
 void acceptChanges(ParagraphList & pars, BufferParams const & bparams)
 {
        pit_type pars_size = static_cast<pit_type>(pars.size());