mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-05 08:57:35 +00:00
Fix loop variable, amend d8e8a93a58
This commit is contained in:
parent
43477730a4
commit
0a8d3c9887
@ -2500,19 +2500,17 @@ static bool import(GuiView * lv, FileName const & filename,
|
|||||||
string loader_format;
|
string loader_format;
|
||||||
vector<string> loaders = theConverters().loaders();
|
vector<string> loaders = theConverters().loaders();
|
||||||
if (find(loaders.begin(), loaders.end(), format) == loaders.end()) {
|
if (find(loaders.begin(), loaders.end(), format) == loaders.end()) {
|
||||||
vector<string>::const_iterator it = loaders.begin();
|
|
||||||
vector<string>::const_iterator en = loaders.end();
|
|
||||||
for (string const & loader : loaders) {
|
for (string const & loader : loaders) {
|
||||||
if (!theConverters().isReachable(format, loader))
|
if (!theConverters().isReachable(format, loader))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
string const tofile =
|
string const tofile =
|
||||||
support::changeExtension(filename.absFileName(),
|
support::changeExtension(filename.absFileName(),
|
||||||
theFormats().extension(*it));
|
theFormats().extension(loader));
|
||||||
if (theConverters().convert(nullptr, filename, FileName(tofile),
|
if (theConverters().convert(nullptr, filename, FileName(tofile),
|
||||||
filename, format, *it, errorList) != Converters::SUCCESS)
|
filename, format, loader, errorList) != Converters::SUCCESS)
|
||||||
return false;
|
return false;
|
||||||
loader_format = *it;
|
loader_format = loader;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (loader_format.empty()) {
|
if (loader_format.empty()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user