make a copy of Converters because this function is used by our export/preview threads

and the converters is also used by the main thread (getStatus).

LyX.exe!lyx::Buffer::doExport
LyX.exe!lyx::Buffer::preview(
LyX.exe!std::tr1::_Pmf_caller3<
LyX.exe!std::tr1::_Pmf_caller3<
LyX.exe!std::tr1::_Callable_pmf<
LyX.exe!std::tr1::_Bind3<
LyX.exe!std::tr1::_Bind_base<
LyX.exe!lyx::frontend::GuiView::GuiViewPrivate::runAndDestroy<
LyX.exe!lyx::frontend::GuiView::GuiViewPrivate::previewAndDestroy(
LyX.exe!QtConcurrent::StoredFunctorCall3<
LyX.exe!QtConcurrent::RunFunctionTask(
QtCored4.dll!QThreadPoolThread::run(
QtCored4.dll!QThreadPrivate::start(
msvcr100d.dll!_callthreadstartex() 
msvcr100d.dll!_threadstartex(void * ptd)



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37292 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Peter Kümmel 2011-01-22 09:30:03 +00:00
parent da246c7e44
commit 654b342e3f

View File

@ -3477,13 +3477,14 @@ bool Buffer::doExport(string const & format, bool put_in_tempdir,
runparams.linelen = lyxrc.plaintext_linelen;
runparams.includeall = includeall;
vector<string> backs = backends();
Converters converters = theConverters();
if (find(backs.begin(), backs.end(), format) == backs.end()) {
// Get shortest path to format
theConverters().buildGraph();
converters.buildGraph();
Graph::EdgePath path;
for (vector<string>::const_iterator it = backs.begin();
it != backs.end(); ++it) {
Graph::EdgePath p = theConverters().getPath(*it, format);
Graph::EdgePath p = converters.getPath(*it, format);
if (!p.empty() && (path.empty() || p.size() < path.size())) {
backend_format = *it;
path = p;
@ -3499,7 +3500,7 @@ bool Buffer::doExport(string const & format, bool put_in_tempdir,
}
return false;
}
runparams.flavor = theConverters().getFlavor(path);
runparams.flavor = converters.getFlavor(path);
} else {
backend_format = format;
@ -3571,7 +3572,7 @@ bool Buffer::doExport(string const & format, bool put_in_tempdir,
ErrorList & error_list = d->errorLists[error_type];
string const ext = formats.extension(format);
FileName const tmp_result_file(changeExtension(filename, ext));
bool const success = theConverters().convert(this, FileName(filename),
bool const success = converters.convert(this, FileName(filename),
tmp_result_file, FileName(absFileName()), backend_format, format,
error_list);