mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Command line option to ignore error msgs
Needed by the test framework
This commit is contained in:
parent
d221d1734a
commit
96ffb70cd5
@ -18,6 +18,7 @@
|
||||
#include "BufferList.h"
|
||||
#include "LaTeX.h"
|
||||
#include "LyXRC.h"
|
||||
#include "LyX.h"
|
||||
#include "DepTable.h"
|
||||
|
||||
#include "support/debug.h"
|
||||
@ -899,8 +900,9 @@ int LaTeX::scanLogFile(TeXErrors & terr)
|
||||
from_local8bit("pdfTeX Error"),
|
||||
from_local8bit(token),
|
||||
child_name);
|
||||
} else if (prefixIs(token, "Missing character: There is no ")
|
||||
&& !contains(token, "nullfont")) {
|
||||
} else if (!ignore_missing_glyphs
|
||||
&& prefixIs(token, "Missing character: There is no ")
|
||||
&& !contains(token, "nullfont")) {
|
||||
// Warning about missing glyph in selected font
|
||||
// may be dataloss (bug 9610)
|
||||
// but can be ignored for 'nullfont' (bug 10394).
|
||||
|
22
src/LyX.cpp
22
src/LyX.cpp
@ -98,6 +98,13 @@ bool use_gui = true;
|
||||
bool verbose = false;
|
||||
|
||||
|
||||
// Do not treat the "missing glyphs" warning of fontspec as an error message.
|
||||
// The default is false and can be changed with the option
|
||||
// --ignore-error-message missing_glyphs
|
||||
// This is used in automated testing.
|
||||
bool ignore_missing_glyphs = false;
|
||||
|
||||
|
||||
// We default to open documents in an already running instance, provided that
|
||||
// the lyxpipe has been setup. This can be overridden either on the command
|
||||
// line or through preference settings.
|
||||
@ -1161,6 +1168,10 @@ int parse_help(string const &, string const &, string &)
|
||||
" specifying whether all files, main file only, or no files,\n"
|
||||
" respectively, are to be overwritten during a batch export.\n"
|
||||
" Anything else is equivalent to `all', but is not consumed.\n"
|
||||
"\t--ignore-error-message which\n"
|
||||
" allows you to ignore specific LaTeX error messages.\n"
|
||||
" Do not use for final documents! Currently supported values:\n"
|
||||
" * missing_glyphs: Fontspec `missing glyphs' error.\n"
|
||||
"\t-n [--no-remote]\n"
|
||||
" open documents in a new instance\n"
|
||||
"\t-r [--remote]\n"
|
||||
@ -1309,6 +1320,16 @@ int parse_verbose(string const &, string const &, string &)
|
||||
}
|
||||
|
||||
|
||||
int parse_ignore_error_message(string const & arg1, string const &, string &)
|
||||
{
|
||||
if (arg1 == "missing_glyphs") {
|
||||
ignore_missing_glyphs = true;
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int parse_force(string const & arg, string const &, string &)
|
||||
{
|
||||
if (arg == "all") {
|
||||
@ -1358,6 +1379,7 @@ void LyX::easyParse(int & argc, char * argv[])
|
||||
cmdmap["--remote"] = parse_remote;
|
||||
cmdmap["-v"] = parse_verbose;
|
||||
cmdmap["--verbose"] = parse_verbose;
|
||||
cmdmap["--ignore-error-message"] = parse_ignore_error_message;
|
||||
|
||||
for (int i = 1; i < argc; ++i) {
|
||||
map<string, cmd_helper>::const_iterator it
|
||||
|
Loading…
Reference in New Issue
Block a user