X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FCompare.cpp;h=82236aa8de7f5eea7af0d69ec15d2ff8bf2b6290;hb=4ed0312c51704780af1c452d3a82a84171b3725a;hp=aaadf8258a11a1c23c6711da81d7f9a8da168439;hpb=715b8cda54a2aded29260b57ff201b16fd906f21;p=lyx.git diff --git a/src/Compare.cpp b/src/Compare.cpp index aaadf8258a..82236aa8de 100644 --- a/src/Compare.cpp +++ b/src/Compare.cpp @@ -13,6 +13,7 @@ #include "Compare.h" #include "Author.h" +#include "Buffer.h" #include "BufferParams.h" #include "Changes.h" #include "CutAndPaste.h" @@ -23,7 +24,6 @@ #include "support/docstream.h" #include "support/lassert.h" -#include "support/lyxalgo.h" #include "support/qstring_helpers.h" using namespace std; @@ -103,11 +103,11 @@ public: DocPair() {} - DocPair(DocIterator o_, DocIterator n_) + DocPair(DocIterator const & o_, DocIterator const & n_) : o(o_), n(n_) {} - bool operator!=(DocPair const & rhs) + bool operator!=(DocPair const & rhs) const { // this might not be intuitive but correct for our purpose return o != rhs.o && n != rhs.n; @@ -396,7 +396,7 @@ void Compare::run() dest_buffer->params().documentClassPtr(); // We do not want to share the DocumentClass with the other Buffer. // See bug #10295. - dest_buffer->params().makeDocumentClass(); + dest_buffer->params().makeDocumentClass(dest_buffer->isClone(), dest_buffer->isInternal()); doStatusMessage(); // Do the real work @@ -407,10 +407,9 @@ void Compare::run() // new buffer with the document class from wherever they came from. // So we need to reset the document class of all the paragraphs. // See bug #10295. - ErrorList el; cap::switchBetweenClasses( olddc, dest_buffer->params().documentClassPtr(), - static_cast(dest_buffer->inset()), el); + static_cast(dest_buffer->inset())); finished(pimpl_->abort_); } @@ -867,7 +866,7 @@ void Compare::Impl::writeToDestBuffer(DocRange const & range, // Set the change ParagraphList::iterator it = pars.begin(); for (; it != pars.end(); ++it) { - it->setChange(Change(type)); + it->setChange(Change(type, compare_.options_.author)); size += it->size(); }