3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
6 * \author Vincent van Ravesteijn
8 * Full author contact details are available in file CREDITS.
16 #include "BufferParams.h"
20 using namespace lyx::support;
26 * The implementation of the algorithm that does the comparison
27 * between two documents.
32 Impl(Compare const & compare)
33 : compare_(compare), abort_(false)
39 /// Set to true to abort the algorithm
43 /// The thread object, used to emit signals to the GUI
44 Compare const & compare_;
48 Compare::Compare(Buffer const * new_buf, Buffer const * old_buf,
49 Buffer * const dest_buf, CompareOptions const & options)
50 : new_buffer(new_buf), old_buffer(old_buf), dest_buffer(dest_buf),
51 options_(options), pimpl_(new Impl(*this))
58 if (!dest_buffer || !new_buffer || !old_buffer) {
63 // Copy the buffer params to the new buffer
64 dest_buffer->params() = options_.settings_from_new
65 ? new_buffer->params() : old_buffer->params();
71 finished(pimpl_->abort_);
78 pimpl_->abort_ = true;
81 pimpl_->abort_ = false;
85 int Compare::doCompare()
91 #include "moc_Compare.cpp"