]> git.lyx.org Git - lyx.git/blobdiff - src/CutAndPaste.cpp
Make oultliner icons same size as the toolbar icons
[lyx.git] / src / CutAndPaste.cpp
index 86f66907b6b1e2f988c95c9dbe56bec90f348fb9..ccde5878f9255c7eeb0bda2d6d81280b0103e228 100644 (file)
 #include "support/lstrings.h"
 #include "support/lyxalgo.h"
 #include "support/TempFile.h"
+#include "support/unique_ptr.h"
 
 #include "frontends/alert.h"
 #include "frontends/Clipboard.h"
 #include "frontends/Selection.h"
 
-#include <boost/tuple/tuple.hpp>
-
 #include <string>
+#include <tuple>
 
 using namespace std;
 using namespace lyx::support;
@@ -100,11 +100,11 @@ bool checkPastePossible(int index)
 
 
 struct PasteReturnValue {
-       PasteReturnValue(pit_type r_par, pos_type r_pos, bool r_nu) :
-         par(r_par), pos(r_pos), needupdate(r_nu)
+       PasteReturnValue(pit_type r_pit, pos_type r_pos, bool r_nu) :
+         pit(r_pit), pos(r_pos), needupdate(r_nu)
        {}
 
-       pit_type par;
+       pit_type pit;
        pos_type pos;
        bool needupdate;
 };
@@ -875,11 +875,9 @@ void cutSelection(Cursor & cur, bool doclear, bool realcut)
                if (begpit != endpit)
                        cur.screenUpdateFlags(Update::Force | Update::FitCursor);
 
-               boost::tie(endpit, endpos) =
-                       eraseSelectionHelper(bp,
-                               text->paragraphs(),
-                               begpit, endpit,
-                               cur.selBegin().pos(), endpos);
+               tie(endpit, endpos) =
+                       eraseSelectionHelper(bp, text->paragraphs(), begpit, endpit,
+                                            cur.selBegin().pos(), endpos);
 
                // cutSelection can invalidate the cursor so we need to set
                // it anew. (Lgb)
@@ -1055,7 +1053,8 @@ docstring selection(size_t sel_index, DocumentClassConstPtr docclass)
        if (sel_index >= theCuts.size())
                return docstring();
 
-       boost::scoped_ptr<Buffer> buffer(copyToTempBuffer(theCuts[sel_index].first, docclass));
+       unique_ptr<Buffer> buffer(copyToTempBuffer(theCuts[sel_index].first,
+                                                  docclass));
        if (!buffer)
                return docstring();
 
@@ -1074,7 +1073,7 @@ void pasteParagraphList(Cursor & cur, ParagraphList const & parlist,
                        pasteSelectionHelper(cur, parlist, docclass, 0, errorList);
                cur.forceBufferUpdate();
                cur.clearSelection();
-               text->setCursor(cur, prv.par, prv.pos);
+               text->setCursor(cur, prv.pit, prv.pos);
        }
 
        // mathed is handled in InsetMathNest/InsetMathGrid