]> git.lyx.org Git - lyx.git/blobdiff - src/CutAndPaste.C
Point fix, earlier forgotten
[lyx.git] / src / CutAndPaste.C
index cf6ba8e8ff21501b1f79bdfb35c1c7aaf52d2c2b..627067bcee7ae07c9e1d535cabe92596084643ce 100644 (file)
@@ -1,4 +1,5 @@
-/* \file CutAndPaste.C
+/*
+ * \file CutAndPaste.C
  * This file is part of LyX, the document processor.
  * Licence details can be found in the file COPYING.
  *
@@ -6,7 +7,7 @@
  * \author Lars Gullik Bjønnes
  * \author Alfredo Braunstein
  *
- * Full author contact details are available in file CREDITS
+ * Full author contact details are available in file CREDITS.
  */
 
 #include <config.h>
@@ -67,7 +68,7 @@ CutAndPaste::availableSelections(Buffer const & buffer)
                ParagraphList::const_iterator pit = pars.begin();
                ParagraphList::const_iterator pend = pars.end();
                for (; pit != pend; ++pit) {
-                       asciiSel += pit->asString(&buffer, false);
+                       asciiSel += pit->asString(buffer, false);
                        if (asciiSel.size() > 25) {
                                asciiSel.replace(22, string::npos, "...");
                                break;
@@ -181,8 +182,6 @@ bool CutAndPaste::copySelection(ParagraphList::iterator startpit,
                                ParagraphList::iterator endpit,
                                int start, int end, textclass_type tc)
 {
-       Assert(&*startpit);
-       Assert(&*endpit);
        Assert(0 <= start && start <= startpit->size());
        Assert(0 <= end && end <= endpit->size());
        Assert(startpit != endpit || start <= end);
@@ -302,7 +301,7 @@ CutAndPaste::pasteSelection(Buffer const & buffer,
 
                for (; lit != eit; ++lit) {
                        switch (lit->inset->lyxCode()) {
-                       case Inset::INCLUDE_CODE: {
+                       case InsetOld::INCLUDE_CODE: {
                                InsetInclude * ii = static_cast<InsetInclude*>(lit->inset);
                                InsetInclude::Params ip = ii->params();
                                ip.masterFilename_ = buffer.fileName();
@@ -310,7 +309,7 @@ CutAndPaste::pasteSelection(Buffer const & buffer,
                                break;
                        }
 
-                       case Inset::TABULAR_CODE: {
+                       case InsetOld::TABULAR_CODE: {
                                InsetTabular * it = static_cast<InsetTabular*>(lit->inset);
                                it->buffer(const_cast<Buffer*>(&buffer));
                                break;