#include "LayoutModuleList.h"
#include "ModuleList.h"
#include "Preamble.h"
-#include "TextClass.h"
#include "support/ConsoleApplication.h"
#include "support/convert.h"
+#include "support/debug.h"
#include "support/ExceptionMessage.h"
#include "support/filetools.h"
#include "support/lassert.h"
if (ilay.second.latexname() == name &&
(latexparam.empty() ||
(!ilay.second.latexparam().empty() && suffixIs(latexparam, ilay.second.latexparam()))) &&
- ((command && ilay.second.latextype() == InsetLayout::COMMAND) ||
- (!command && ilay.second.latextype() == InsetLayout::ENVIRONMENT)))
+ ((command && ilay.second.latextype() == InsetLaTeXType::COMMAND) ||
+ (!command && ilay.second.latextype() == InsetLaTeXType::ENVIRONMENT)))
return &(ilay.second);
}
return 0;
if (layout) {
found_style = true;
dpre = layout->preamble();
- std::set<std::string> lreqs = layout->requires();
+ std::set<std::string> const & lreqs = layout->required();
if (!lreqs.empty())
cmd_reqs.insert(lreqs.begin(), lreqs.end());
} else if (insetlayout) {
found_style = true;
dpre = insetlayout->preamble();
- std::set<std::string> lreqs = insetlayout->requires();
+ std::set<std::string> lreqs = insetlayout->required();
if (!lreqs.empty())
cmd_reqs.insert(lreqs.begin(), lreqs.end());
}
bool const package_cmd = dpre.empty();
bool match_req = false;
if (package_cmd) {
- std::set<std::string> mreqs = it->second->requires();
+ std::set<std::string> mreqs = it->second->required();
if (!mreqs.empty())
cmd_reqs.insert(mreqs.begin(), mreqs.end());
for (auto const & pack : cmd_reqs) {
argc_(argc), argv_(argv)
{
}
- void doExec()
+ void doExec() override
{
try {
int const exit_status = run();
// class may not be known before. It neds to be done before parsing
// body, since otherwise the commands/environments provided by the
// modules would be parsed as ERT.
- for (size_t i = 0; i < preloaded_modules.size(); ++i) {
- if (!addModule(preloaded_modules[i])) {
+ for (auto const & module : preloaded_modules) {
+ if (!addModule(module)) {
cerr << "Error: Could not load module \""
- << preloaded_modules[i] << "\"." << endl;
+ << module << "\"." << endl;
return false;
}
}
// actual encoding is different (bug 7509).
if (encoding.empty()) {
Encoding const * enc = 0;
- if (preamble.inputencoding() == "auto") {
+ if (preamble.inputencoding() == "auto-legacy") {
ifdocstream is(setEncoding("ISO-8859-1"));
// forbid buffering on this stream
is.rdbuf()->pubsetbuf(0, 0);