#include "support/lassert.h"
#include "support/lstrings.h"
-#include <boost/bind.hpp>
+#include "support/bind.h"
using namespace std;
using namespace lyx::support;
}
-void RenderPreview::startLoading(Buffer const & buffer) const
+void RenderPreview::startLoading(Buffer const & buffer, bool forexport) const
{
- if (status() == LyXRC::PREVIEW_OFF || snippet_.empty())
+ if (!forexport && (status() == LyXRC::PREVIEW_OFF || snippet_.empty()))
return;
graphics::PreviewLoader const & loader = getPreviewLoader(buffer);
- loader.startLoading();
+ loader.startLoading(forexport);
}
void RenderPreview::addPreview(docstring const & latex_snippet,
- Buffer const & buffer)
+ Buffer const & buffer,
+ bool ignore_lyxrc)
{
- if (status() == LyXRC::PREVIEW_OFF)
+ if (status() == LyXRC::PREVIEW_OFF && !ignore_lyxrc)
return;
graphics::PreviewLoader & loader = getPreviewLoader(buffer);
- addPreview(latex_snippet, loader);
+ addPreview(latex_snippet, loader, ignore_lyxrc);
}
void RenderPreview::addPreview(docstring const & latex_snippet,
- graphics::PreviewLoader & ploader)
+ graphics::PreviewLoader & ploader,
+ bool ignore_lyxrc)
{
- if (status() == LyXRC::PREVIEW_OFF)
+ if (status() == LyXRC::PREVIEW_OFF && !ignore_lyxrc)
return;
// FIXME UNICODE
// is ready for loading.
if (!ploader_connection_.connected()) {
ploader_connection_ = ploader.connect(
- boost::bind(&RenderPreview::imageReady, this, _1));
+ bind(&RenderPreview::imageReady, this, _1));
}
ploader.add(snippet_);