]> git.lyx.org Git - lyx.git/blobdiff - src/paragraph_funcs.cpp
saner borderline between buffer and exporter
[lyx.git] / src / paragraph_funcs.cpp
index 0de78ee67bd9bc2baf592ab108e14ab502aa648a..baf93995732c7b35a4c4281885f2a8caca4b893a 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;
@@ -313,8 +313,8 @@ int numberOfOptArgs(Paragraph const & par)
 {
        int num = 0;
 
-       InsetList::const_iterator it = par.insetlist.begin();
-       InsetList::const_iterator end = par.insetlist.end();
+       InsetList::const_iterator it = par.insetList().begin();
+       InsetList::const_iterator end = par.insetList().end();
        for (; it != end ; ++it) {
                if (it->inset->lyxCode() == OPTARG_CODE)
                        ++num;