X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FCutAndPaste.C;h=36c863428ff1f183dce6c9092f39c18c789aea12;hb=09e01879979643949f1f2c7216023f1f35d5ada2;hp=f1057254e522d9a0f7513980a2a466d7c1a15ebc;hpb=cc7aad9324c07b54d3720189a0c8a18f20b449a6;p=lyx.git diff --git a/src/CutAndPaste.C b/src/CutAndPaste.C index f1057254e5..36c863428f 100644 --- a/src/CutAndPaste.C +++ b/src/CutAndPaste.C @@ -2,8 +2,9 @@ * This file is part of LyX, the document processor. * Licence details can be found in the file COPYING. * - * \author Jurgen Vigna + * \author Juergen Vigna * \author Lars Gullik Bjønnes + * \author Alfredo Braunstein * * Full author contact details are available in file CREDITS */ @@ -37,6 +38,7 @@ using std::make_pair; using std::for_each; using std::vector; +using namespace lyx::support; using lyx::pos_type; using lyx::textclass_type; @@ -49,7 +51,8 @@ CutStack cuts(10); } // namespace anon -vector + +std::vector CutAndPaste::availableSelections(Buffer const & buffer) { vector selList; @@ -178,11 +181,9 @@ bool CutAndPaste::copySelection(ParagraphList::iterator startpit, ParagraphList::iterator endpit, int start, int end, textclass_type tc) { - lyx::Assert(&*startpit); - lyx::Assert(&*endpit); - lyx::Assert(0 <= start && start <= startpit->size()); - lyx::Assert(0 <= end && end <= endpit->size()); - lyx::Assert(startpit != endpit || start <= end); + Assert(0 <= start && start <= startpit->size()); + Assert(0 <= end && end <= endpit->size()); + Assert(startpit != endpit || start <= end); ParagraphList paragraphs; @@ -227,7 +228,7 @@ CutAndPaste::pasteSelection(Buffer const & buffer, if (!checkPastePossible()) return make_pair(PitPosPair(pit, pos), pit); - lyx::Assert (pos <= pit->size()); + Assert (pos <= pit->size()); // Make a copy of the CaP paragraphs. ParagraphList simple_cut_clone = cuts[cut_index].first; @@ -299,7 +300,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(lit->inset); InsetInclude::Params ip = ii->params(); ip.masterFilename_ = buffer.fileName(); @@ -307,7 +308,7 @@ CutAndPaste::pasteSelection(Buffer const & buffer, break; } - case Inset::TABULAR_CODE: { + case InsetOld::TABULAR_CODE: { InsetTabular * it = static_cast(lit->inset); it->buffer(const_cast(&buffer)); break; @@ -382,7 +383,7 @@ int CutAndPaste::SwitchLayoutsBetweenClasses(textclass_type c1, ParagraphList & pars, ErrorList & errorlist) { - lyx::Assert(!pars.empty()); + Assert(!pars.empty()); int ret = 0; if (c1 == c2)