commit 997f0621c5346bb623cf86713c4fe1be0c941104
Author: Thibaut Cuvelier <tcuvel...@lyx.org>
Date:   Sun Feb 27 20:35:58 2022 +0100

    Rename LATEX debug level to OUTFILE and use it for DocBook, HTML, and XML 
messages.
---
 src/Buffer.cpp                     |   16 ++++----
 src/BufferView.cpp                 |    2 +-
 src/Floating.cpp                   |    4 +-
 src/Font.cpp                       |   28 +++++++-------
 src/LaTeX.cpp                      |   70 ++++++++++++++++++------------------
 src/Paragraph.cpp                  |    4 +-
 src/Paragraph.h                    |    2 +-
 src/TexRow.cpp                     |    4 +-
 src/frontends/qt/GuiView.cpp       |    2 +-
 src/frontends/qt/GuiViewSource.cpp |    2 +-
 src/graphics/PreviewLoader.cpp     |    4 +-
 src/insets/Inset.h                 |    2 +-
 src/insets/InsetInclude.cpp        |    8 ++--
 src/output_docbook.cpp             |    2 +-
 src/output_latex.cpp               |   14 ++++----
 src/support/debug.cpp              |    3 +-
 src/support/debug.h                |    2 +-
 src/support/filetools.cpp          |    4 +-
 src/support/os_win32.cpp           |    4 +-
 src/xml.cpp                        |    8 ++--
 20 files changed, 93 insertions(+), 92 deletions(-)

diff --git a/src/Buffer.cpp b/src/Buffer.cpp
index d3dbc86..0f7ecb0 100644
--- a/src/Buffer.cpp
+++ b/src/Buffer.cpp
@@ -1739,7 +1739,7 @@ Buffer::ExportStatus Buffer::makeLaTeXFile(FileName const 
& fname,
        OutputParams runparams = runparams_in;
 
        string const encoding = runparams.encoding->iconvName();
-       LYXERR(Debug::LATEX, "makeLaTeXFile encoding: " << encoding << ", 
fname=" << fname.realPath());
+       LYXERR(Debug::OUTFILE, "makeLaTeXFile encoding: " << encoding << ", 
fname=" << fname.realPath());
 
        ofdocstream ofs;
        try { ofs.reset(encoding); }
@@ -1851,7 +1851,7 @@ Buffer::ExportStatus Buffer::writeLaTeXSource(otexstream 
& os,
        BufferEncodings::initUnicodeMath(*this);
 
        // validate the buffer.
-       LYXERR(Debug::LATEX, "  Validating buffer...");
+       LYXERR(Debug::OUTFILE, "  Validating buffer...");
        LaTeXFeatures features(*this, params(), runparams);
        validate(features);
        // This is only set once per document (in master)
@@ -1860,7 +1860,7 @@ Buffer::ExportStatus Buffer::writeLaTeXSource(otexstream 
& os,
                runparams.use_hyperref = features.isRequired("hyperref");
                runparams.use_CJK = features.mustProvide("CJK");
        }
-       LYXERR(Debug::LATEX, "  Buffer validation done.");
+       LYXERR(Debug::OUTFILE, "  Buffer validation done.");
 
        bool const output_preamble =
                output == FullSource || output == OnlyPreamble;
@@ -2079,9 +2079,9 @@ Buffer::ExportStatus Buffer::writeLaTeXSource(otexstream 
& os,
 
        if (output_preamble) {
                os << "\\end{document}\n";
-               LYXERR(Debug::LATEX, "makeLaTeXFile...done");
+               LYXERR(Debug::OUTFILE, "makeLaTeXFile...done");
        } else {
-               LYXERR(Debug::LATEX, "LaTeXFile for inclusion made.");
+               LYXERR(Debug::OUTFILE, "LaTeXFile for inclusion made.");
        }
        runparams_in.encoding = runparams.encoding;
 
@@ -2095,7 +2095,7 @@ Buffer::ExportStatus Buffer::makeDocBookFile(FileName 
const & fname,
                              OutputParams const & runparams,
                              OutputWhat output) const
 {
-       LYXERR(Debug::LATEX, "makeDocBookFile...");
+       LYXERR(Debug::OUTFILE, "makeDocBookFile...");
 
        ofdocstream ofs;
        if (!openFileWrite(ofs, fname))
@@ -2185,7 +2185,7 @@ Buffer::ExportStatus 
Buffer::writeDocBookSource(odocstream & os,
 Buffer::ExportStatus Buffer::makeLyXHTMLFile(FileName const & fname,
                              OutputParams const & runparams) const
 {
-       LYXERR(Debug::LATEX, "makeLyXHTMLFile...");
+       LYXERR(Debug::OUTFILE, "makeLyXHTMLFile...");
 
        ofdocstream ofs;
        if (!openFileWrite(ofs, fname))
@@ -2383,7 +2383,7 @@ void Buffer::validate(LaTeXFeatures & features) const
        for (Paragraph const & p : paragraphs())
                p.validate(features);
 
-       if (lyxerr.debugging(Debug::LATEX)) {
+       if (lyxerr.debugging(Debug::OUTFILE)) {
                features.showStruct();
        }
 }
diff --git a/src/BufferView.cpp b/src/BufferView.cpp
index 023301d..32c890c 100644
--- a/src/BufferView.cpp
+++ b/src/BufferView.cpp
@@ -2621,7 +2621,7 @@ bool BufferView::setCursorFromRow(int row)
 {
        TexRow::TextEntry start, end;
        tie(start,end) = buffer_.texrow().getEntriesFromRow(row);
-       LYXERR(Debug::LATEX,
+       LYXERR(Debug::OUTFILE,
               "setCursorFromRow: for row " << row << ", TexRow has found "
               "start (id=" << start.id << ",pos=" << start.pos << "), "
               "end (id=" << end.id << ",pos=" << end.pos << ")");
diff --git a/src/Floating.cpp b/src/Floating.cpp
index 8554503..df48a2b 100644
--- a/src/Floating.cpp
+++ b/src/Floating.cpp
@@ -69,7 +69,7 @@ Floating::Floating(string const & type, string const & 
placement,
                        docbook_float_type_ = "video";
                } else {
                        // If nothing matches, return something that will not 
be valid.
-                       LYXERR0("Float type '" + floattype_ + "' unknown to 
DocBook!");
+                       LYXERR(Debug::OUTFILE, "Float type '" + floattype_ + "' 
unknown to DocBook!");
                        docbook_float_type_ = "unknown";
                }
        }
@@ -159,7 +159,7 @@ string Floating::docbookTag(bool hasTitle) const
                return hasTitle ? "table" : "informaltable";
        } else {
                // If nothing matches, return something that will not be valid.
-               LYXERR0("Float type '" + floattype() + "' unknown to DocBook!");
+               LYXERR(Debug::OUTFILE, "Float type '" + floattype() + "' 
unknown to DocBook!");
                return "float";
        }
 }
diff --git a/src/Font.cpp b/src/Font.cpp
index 3ba04eb..514bf03 100644
--- a/src/Font.cpp
+++ b/src/Font.cpp
@@ -758,34 +758,34 @@ void Font::validate(LaTeXFeatures & features) const
        Language const * doc_language = bparams.language;
 
        if (bits_.noun() == FONT_ON) {
-               LYXERR(Debug::LATEX, "font.noun: " << bits_.noun());
+               LYXERR(Debug::OUTFILE, "font.noun: " << bits_.noun());
                features.require("noun");
-               LYXERR(Debug::LATEX, "Noun enabled. Font: " << 
to_utf8(stateText()));
+               LYXERR(Debug::OUTFILE, "Noun enabled. Font: " << 
to_utf8(stateText()));
        }
        if (bits_.underbar() == FONT_ON) {
-               LYXERR(Debug::LATEX, "font.underline: " << bits_.underbar());
+               LYXERR(Debug::OUTFILE, "font.underline: " << bits_.underbar());
                features.require("ulem");
-               LYXERR(Debug::LATEX, "Underline enabled. Font: " << 
to_utf8(stateText()));
+               LYXERR(Debug::OUTFILE, "Underline enabled. Font: " << 
to_utf8(stateText()));
        }
        if (bits_.strikeout() == FONT_ON) {
-               LYXERR(Debug::LATEX, "font.strikeout: " << bits_.strikeout());
+               LYXERR(Debug::OUTFILE, "font.strikeout: " << bits_.strikeout());
                features.require("ulem");
-               LYXERR(Debug::LATEX, "Strike out enabled. Font: " << 
to_utf8(stateText()));
+               LYXERR(Debug::OUTFILE, "Strike out enabled. Font: " << 
to_utf8(stateText()));
        }
        if (bits_.xout() == FONT_ON) {
-               LYXERR(Debug::LATEX, "font.xout: " << bits_.xout());
+               LYXERR(Debug::OUTFILE, "font.xout: " << bits_.xout());
                features.require("ulem");
-               LYXERR(Debug::LATEX, "Cross out enabled. Font: " << 
to_utf8(stateText()));
+               LYXERR(Debug::OUTFILE, "Cross out enabled. Font: " << 
to_utf8(stateText()));
        }
        if (bits_.uuline() == FONT_ON) {
-               LYXERR(Debug::LATEX, "font.uuline: " << bits_.uuline());
+               LYXERR(Debug::OUTFILE, "font.uuline: " << bits_.uuline());
                features.require("ulem");
-               LYXERR(Debug::LATEX, "Double underline enabled. Font: " << 
to_utf8(stateText()));
+               LYXERR(Debug::OUTFILE, "Double underline enabled. Font: " << 
to_utf8(stateText()));
        }
        if (bits_.uwave() == FONT_ON) {
-               LYXERR(Debug::LATEX, "font.uwave: " << bits_.uwave());
+               LYXERR(Debug::OUTFILE, "font.uwave: " << bits_.uwave());
                features.require("ulem");
-               LYXERR(Debug::LATEX, "Wavy underline enabled. Font: " << 
to_utf8(stateText()));
+               LYXERR(Debug::OUTFILE, "Wavy underline enabled. Font: " << 
to_utf8(stateText()));
        }
        switch (bits_.color()) {
                case Color_none:
@@ -811,7 +811,7 @@ void Font::validate(LaTeXFeatures & features) const
                        break;
                default:
                        features.require("color");
-                       LYXERR(Debug::LATEX, "Color enabled. Font: " << 
to_utf8(stateText()));
+                       LYXERR(Debug::OUTFILE, "Color enabled. Font: " << 
to_utf8(stateText()));
        }
 
        // FIXME: Do something for background and soul package?
@@ -823,7 +823,7 @@ void Font::validate(LaTeXFeatures & features) const
            && lang_ != latex_language)
        {
                features.useLanguage(lang_);
-               LYXERR(Debug::LATEX, "Found language " << lang_->lang());
+               LYXERR(Debug::OUTFILE, "Found language " << lang_->lang());
        }
 }
 
diff --git a/src/LaTeX.cpp b/src/LaTeX.cpp
index e0df744..917d129 100644
--- a/src/LaTeX.cpp
+++ b/src/LaTeX.cpp
@@ -135,7 +135,7 @@ LaTeX::LaTeX(string const & latex, OutputParams const & rp,
 
 void LaTeX::removeAuxiliaryFiles() const
 {
-       LYXERR(Debug::LATEX, "Removing auxiliary files");
+       LYXERR(Debug::OUTFILE, "Removing auxiliary files");
        // Note that we do not always call this function when there is an error.
        // For example, if there is an error but an output file is produced we
        // still would like to output (export/view) the file.
@@ -280,7 +280,7 @@ int LaTeX::run(TeXErrors & terr)
                bibtex_info_old = scanAuxFiles(aux_file, 
runparams.only_childbibs);
 
        ++count;
-       LYXERR(Debug::LATEX, "Run #" << count);
+       LYXERR(Debug::OUTFILE, "Run #" << count);
        message(runMessage(count));
 
        int exit_code = startscript();
@@ -289,7 +289,7 @@ int LaTeX::run(TeXErrors & terr)
 
        scanres = scanLogFile(terr);
        if (scanres & ERROR_RERUN) {
-               LYXERR(Debug::LATEX, "Rerunning LaTeX");
+               LYXERR(Debug::OUTFILE, "Rerunning LaTeX");
                terr.clearErrors();
                exit_code = startscript();
                if (exit_code == Systemcall::KILLED || exit_code == 
Systemcall::TIMEOUT)
@@ -324,7 +324,7 @@ int LaTeX::run(TeXErrors & terr)
                // "\bibdata" and/or "\bibstyle". If one of those
                // tags is found -> run bibtex and set rerun = true;
                // no checks for now
-               LYXERR(Debug::LATEX, "Running Bibliography Processor.");
+               LYXERR(Debug::OUTFILE, "Running Bibliography Processor.");
                message(_("Running Bibliography Processor."));
                updateBibtexDependencies(head, bibtex_info);
                int exit_code;
@@ -357,7 +357,7 @@ int LaTeX::run(TeXErrors & terr)
                rerun = false;
                ++count;
                LYXERR(Debug::DEPEND, "Dep. file has changed or rerun 
requested");
-               LYXERR(Debug::LATEX, "Run #" << count);
+               LYXERR(Debug::OUTFILE, "Run #" << count);
                message(runMessage(count));
                int exit_code = startscript();
                if (exit_code == Systemcall::KILLED || exit_code == 
Systemcall::TIMEOUT)
@@ -385,7 +385,7 @@ int LaTeX::run(TeXErrors & terr)
                // "\bibdata" and/or "\bibstyle". If one of those
                // tags is found -> run bibtex and set rerun = true;
                // no checks for now
-               LYXERR(Debug::LATEX, "Re-Running Bibliography Processor.");
+               LYXERR(Debug::OUTFILE, "Re-Running Bibliography Processor.");
                message(_("Re-Running Bibliography Processor."));
                updateBibtexDependencies(head, bibtex_info);
                int exit_code;
@@ -411,7 +411,7 @@ int LaTeX::run(TeXErrors & terr)
                        // MAX_RUNS are reached.
                        rerun = false;
                        ++count;
-                       LYXERR(Debug::LATEX, "Run #" << count);
+                       LYXERR(Debug::OUTFILE, "Run #" << count);
                        message(runMessage(count));
                        startscript();
                        scanres = scanLogFile(terr);
@@ -425,7 +425,7 @@ int LaTeX::run(TeXErrors & terr)
        // Now that we have final pagination, run the index and nomencl 
processors
        if (idxfile.exists()) {
                // no checks for now
-               LYXERR(Debug::LATEX, "Running Index Processor.");
+               LYXERR(Debug::OUTFILE, "Running Index Processor.");
                message(_("Running Index Processor."));
                // onlyFileName() is needed for cygwin
                int const ret = 
@@ -480,7 +480,7 @@ int LaTeX::run(TeXErrors & terr)
                // MAX_RUNS are reached.
                rerun = false;
                ++count;
-               LYXERR(Debug::LATEX, "Run #" << count);
+               LYXERR(Debug::OUTFILE, "Run #" << count);
                message(runMessage(count));
                startscript();
                scanres = scanLogFile(terr);
@@ -499,7 +499,7 @@ int LaTeX::run(TeXErrors & terr)
                scanres |= NONZERO_ERROR;
        }
 
-       LYXERR(Debug::LATEX, "Done.");
+       LYXERR(Debug::OUTFILE, "Done.");
 
        if (bscanres & ERRORS)
                return bscanres; // return on error
@@ -569,7 +569,7 @@ int LaTeX::runMakeIndex(string const & f, OutputParams 
const & rp,
                tmp = subst(tmp, "$$b", removeExtension(f));
        }
 
-       LYXERR(Debug::LATEX,
+       LYXERR(Debug::OUTFILE,
                "idx file has been made, running index processor ("
                << tmp << ") on file " << f);
 
@@ -579,7 +579,7 @@ int LaTeX::runMakeIndex(string const & f, OutputParams 
const & rp,
        }
        if (rp.use_indices) {
                tmp = lyxrc.splitindex_command + " -m " + quoteName(tmp);
-               LYXERR(Debug::LATEX,
+               LYXERR(Debug::OUTFILE,
                "Multiple indices. Using splitindex command: " << tmp);
        }
        tmp += ' ';
@@ -595,7 +595,7 @@ int LaTeX::runMakeIndex(string const & f, OutputParams 
const & rp,
 int LaTeX::runMakeIndexNomencl(FileName const & fname,
                string const & nlo, string const & nls)
 {
-       LYXERR(Debug::LATEX, "Running Nomenclature Processor.");
+       LYXERR(Debug::OUTFILE, "Running Nomenclature Processor.");
        message(_("Running Nomenclature Processor."));
        string tmp = lyxrc.nomencl_command + ' ';
        // onlyFileName() is needed for cygwin
@@ -654,7 +654,7 @@ AuxInfo const LaTeX::scanAuxFile(FileName const & fname)
 
 void LaTeX::scanAuxFile(FileName const & fname, AuxInfo & aux_info)
 {
-       LYXERR(Debug::LATEX, "Scanning aux file: " << fname);
+       LYXERR(Debug::OUTFILE, "Scanning aux file: " << fname);
 
        ifstream ifs(fname.toFilesystemEncoding().c_str());
        string token;
@@ -674,7 +674,7 @@ void LaTeX::scanAuxFile(FileName const & fname, AuxInfo & 
aux_info)
                        while (!data.empty()) {
                                string citation;
                                data = split(data, citation, ',');
-                               LYXERR(Debug::LATEX, "Citation: " << citation);
+                               LYXERR(Debug::OUTFILE, "Citation: " << 
citation);
                                aux_info.citations.insert(citation);
                        }
                } else if (regex_match(token, sub, reg2)) {
@@ -685,7 +685,7 @@ void LaTeX::scanAuxFile(FileName const & fname, AuxInfo & 
aux_info)
                                string database;
                                data = split(data, database, ',');
                                database = changeExtension(database, "bib");
-                               LYXERR(Debug::LATEX, "BibTeX database: `" << 
database << '\'');
+                               LYXERR(Debug::OUTFILE, "BibTeX database: `" << 
database << '\'');
                                aux_info.databases.insert(database);
                        }
                } else if (regex_match(token, sub, reg3)) {
@@ -693,7 +693,7 @@ void LaTeX::scanAuxFile(FileName const & fname, AuxInfo & 
aux_info)
                        // token is now the style file
                        // pass it to the helper
                        style = changeExtension(style, "bst");
-                       LYXERR(Debug::LATEX, "BibTeX style: `" << style << 
'\'');
+                       LYXERR(Debug::OUTFILE, "BibTeX style: `" << style << 
'\'');
                        aux_info.styles.insert(style);
                } else if (regex_match(token, sub, reg4)) {
                        string const file2 = sub.str(1);
@@ -782,7 +782,7 @@ int LaTeX::scanLogFile(TeXErrors & terr)
        int retval = NO_ERRORS;
        string tmp =
                onlyFileName(changeExtension(file.absFileName(), ".log"));
-       LYXERR(Debug::LATEX, "Log file: " << tmp);
+       LYXERR(Debug::OUTFILE, "Log file: " << tmp);
        FileName const fn = makeAbsPath(tmp);
        // FIXME we should use an ifdocstream here and a docstring for token
        // below. The encoding of the log file depends on the _output_ (font)
@@ -813,7 +813,7 @@ int LaTeX::scanLogFile(TeXErrors & terr)
                token = subst(token, "\r", "");
                smatch sub;
 
-               LYXERR(Debug::LATEX, "Log line: " << token);
+               LYXERR(Debug::OUTFILE, "Log line: " << token);
 
                if (token.empty())
                        continue;
@@ -869,24 +869,24 @@ int LaTeX::scanLogFile(TeXErrors & terr)
                        // Here shall we handle different
                        // types of warnings
                        retval |= LATEX_WARNING;
-                       LYXERR(Debug::LATEX, "LaTeX Warning.");
+                       LYXERR(Debug::OUTFILE, "LaTeX Warning.");
                        if (contains(token, "Rerun to get cross-references")) {
                                retval |= RERUN;
-                               LYXERR(Debug::LATEX, "We should rerun.");
+                               LYXERR(Debug::OUTFILE, "We should rerun.");
                        // package clefval needs 2 latex runs before bibtex
                        } else if (contains(token, "Value of")
                                   && contains(token, "on page")
                                   && contains(token, "undefined")) {
                                retval |= ERROR_RERUN;
-                               LYXERR(Debug::LATEX, "Force rerun.");
+                               LYXERR(Debug::OUTFILE, "Force rerun.");
                        // package etaremune
                        } else if (contains(token, "Etaremune labels have 
changed")) {
                                retval |= ERROR_RERUN;
-                               LYXERR(Debug::LATEX, "Force rerun.");
+                               LYXERR(Debug::OUTFILE, "Force rerun.");
                        // package enotez
                        } else if (contains(token, "Endnotes may have changed. 
Rerun")) {
                                retval |= RERUN;
-                               LYXERR(Debug::LATEX, "We should rerun.");
+                               LYXERR(Debug::OUTFILE, "We should rerun.");
                        //"Citation `cit' on page X undefined on input line X."
                        } else if (!runparams.includeall && contains(token, 
"Citation")
                                   //&& contains(token, "on input line") 
//often split to newline
@@ -968,20 +968,20 @@ int LaTeX::scanLogFile(TeXErrors & terr)
                                   contains(token, "Rerun to get")) {
                                // at least longtable.sty and bibtopic.sty
                                // might use this.
-                               LYXERR(Debug::LATEX, "We should rerun.");
+                               LYXERR(Debug::OUTFILE, "We should rerun.");
                                retval |= RERUN;
                        }
                } else if (prefixIs(token, "LETTRE WARNING:")) {
                        if (contains(token, "veuillez recompiler")) {
                                // lettre.cls
-                               LYXERR(Debug::LATEX, "We should rerun.");
+                               LYXERR(Debug::OUTFILE, "We should rerun.");
                                retval |= RERUN;
                        }
                } else if (token[0] == '(') {
                        if (contains(token, "Rerun LaTeX") ||
                            contains(token, "Rerun to get")) {
                                // Used by natbib
-                               LYXERR(Debug::LATEX, "We should rerun.");
+                               LYXERR(Debug::OUTFILE, "We should rerun.");
                                retval |= RERUN;
                        }
                } else if (prefixIs(token, "! ")
@@ -1004,7 +1004,7 @@ int LaTeX::scanLogFile(TeXErrors & terr)
                                if (prefixIs(token, "! File ended while 
scanning use of \\Hy@setref@link.")){
                                        // bug 7344. We must rerun LaTeX if 
hyperref has been toggled.
                                        retval |= ERROR_RERUN;
-                                       LYXERR(Debug::LATEX, "Force rerun.");
+                                       LYXERR(Debug::OUTFILE, "Force rerun.");
                                } else {
                                        // bug 6445. At this point its not 
clear we finish with error.
                                        wait_for_error = desc;
@@ -1021,7 +1021,7 @@ int LaTeX::scanLogFile(TeXErrors & terr)
                        if (prefixIs(token, "! Paragraph ended before 
\\Hy@setref@link was complete.")){
                                        // bug 7344. We must rerun LaTeX if 
hyperref has been toggled.
                                        retval |= ERROR_RERUN;
-                                       LYXERR(Debug::LATEX, "Force rerun.");
+                                       LYXERR(Debug::OUTFILE, "Force rerun.");
                        }
 
                        if (!wait_for_error.empty() && prefixIs(token, "! 
Emergency stop.")){
@@ -1101,8 +1101,8 @@ int LaTeX::scanLogFile(TeXErrors & terr)
                                if (preamble_error)
                                        // Add a note that the error is to be 
found in preamble
                                        errstr += "\n" + to_utf8(_("(NOTE: The 
erroneous command is in the preamble)"));
-                               LYXERR(Debug::LATEX, "line: " << line << '\n'
-                                       << "Desc: " << desc << '\n' << "Text: " 
<< errstr);
+                               LYXERR(Debug::OUTFILE, "line: " << line << '\n'
+                                                               << "Desc: " << 
desc << '\n' << "Text: " << errstr);
                                if (line == last_line)
                                        ++line_count;
                                else {
@@ -1182,7 +1182,7 @@ int LaTeX::scanLogFile(TeXErrors & terr)
                        }
                }
        }
-       LYXERR(Debug::LATEX, "Log line: " << token);
+       LYXERR(Debug::OUTFILE, "Log line: " << token);
        return retval;
 }
 
@@ -1560,7 +1560,7 @@ void LaTeX::deplog(DepTable & head)
 int LaTeX::scanBlgFile(DepTable & dep, TeXErrors & terr)
 {
        FileName const blg_file(changeExtension(file.absFileName(), "blg"));
-       LYXERR(Debug::LATEX, "Scanning blg file: " << blg_file);
+       LYXERR(Debug::OUTFILE, "Scanning blg file: " << blg_file);
 
        ifstream ifs(blg_file.toFilesystemEncoding().c_str());
        string token;
@@ -1583,7 +1583,7 @@ int LaTeX::scanBlgFile(DepTable & dep, TeXErrors & terr)
                if (regex_match(token, sub, reg1)) {
                        string data = sub.str(3);
                        if (!data.empty()) {
-                               LYXERR(Debug::LATEX, "Found bib file: " << 
data);
+                               LYXERR(Debug::OUTFILE, "Found bib file: " << 
data);
                                handleFoundFile(data, dep);
                        }
                }
@@ -1628,7 +1628,7 @@ int LaTeX::scanBlgFile(DepTable & dep, TeXErrors & terr)
 int LaTeX::scanIlgFile(TeXErrors & terr)
 {
        FileName const ilg_file(changeExtension(file.absFileName(), "ilg"));
-       LYXERR(Debug::LATEX, "Scanning ilg file: " << ilg_file);
+       LYXERR(Debug::OUTFILE, "Scanning ilg file: " << ilg_file);
 
        ifstream ifs(ilg_file.toFilesystemEncoding().c_str());
        string token;
diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp
index 9a1171f..b9ac139 100644
--- a/src/Paragraph.cpp
+++ b/src/Paragraph.cpp
@@ -2510,7 +2510,7 @@ void Paragraph::latex(BufferParams const & bparams,
        OutputParams const & runparams,
        int start_pos, int end_pos, bool force) const
 {
-       LYXERR(Debug::LATEX, "Paragraph::latex...     " << this);
+       LYXERR(Debug::OUTFILE, "Paragraph::latex...     " << this);
 
        // FIXME This check should not be needed. Perhaps issue an
        // error if it triggers.
@@ -3127,7 +3127,7 @@ void Paragraph::latex(BufferParams const & bparams,
                os << setEncoding(prev_encoding->iconvName());
        }
 
-       LYXERR(Debug::LATEX, "Paragraph::latex... done " << this);
+       LYXERR(Debug::OUTFILE, "Paragraph::latex... done " << this);
 }
 
 
diff --git a/src/Paragraph.h b/src/Paragraph.h
index 01ccd25..ca88dd7 100644
--- a/src/Paragraph.h
+++ b/src/Paragraph.h
@@ -194,7 +194,7 @@ public:
        /// Can we drop the standard paragraph wrapper?
        bool emptyTag() const;
 
-       /// Get the id of the paragraph, usefull for docbook
+       /// Get the id of the paragraph, useful for DocBook
        std::string getID(Buffer const & buf, OutputParams const & runparams) 
const;
 
        /// Output the first word of a paragraph, return the position where it 
left.
diff --git a/src/TexRow.cpp b/src/TexRow.cpp
index 968245b..0d65966 100644
--- a/src/TexRow.cpp
+++ b/src/TexRow.cpp
@@ -251,7 +251,7 @@ TexRow::getEntriesFromRow(int const row) const
        //        correspond to no output by delaying their addition, at the 
level
        //        of otexrowstream, until a character is actually output.
        //
-       LYXERR(Debug::LATEX, "getEntriesFromRow: row " << row << " requested");
+       LYXERR(Debug::OUTFILE, "getEntriesFromRow: row " << row << " 
requested");
 
        // check bounds for row - 1, our target index
        if (row <= 0)
@@ -360,7 +360,7 @@ FuncRequest TexRow::goToFuncFromRow(int const row) const
 {
        TextEntry start, end;
        tie(start,end) = getEntriesFromRow(row);
-       LYXERR(Debug::LATEX,
+       LYXERR(Debug::OUTFILE,
               "goToFuncFromRow: for row " << row << ", TexRow has found "
               "start (id=" << start.id << ",pos=" << start.pos << "), "
               "end (id=" << end.id << ",pos=" << end.pos << ")");
diff --git a/src/frontends/qt/GuiView.cpp b/src/frontends/qt/GuiView.cpp
index 43b835e..8afa3b2 100644
--- a/src/frontends/qt/GuiView.cpp
+++ b/src/frontends/qt/GuiView.cpp
@@ -3998,7 +3998,7 @@ bool GuiView::goToFileRow(string const & argument)
        setBuffer(buf);
        bool success = documentBufferView()->setCursorFromRow(row);
        if (!success) {
-               LYXERR(Debug::LATEX,
+               LYXERR(Debug::OUTFILE,
                       "setCursorFromRow: invalid position for row " << row);
                frontend::Alert::error(_("Inverse Search Failed"),
                                       _("Invalid position requested by inverse 
search.\n"
diff --git a/src/frontends/qt/GuiViewSource.cpp 
b/src/frontends/qt/GuiViewSource.cpp
index f83e020..bcc6da4 100644
--- a/src/frontends/qt/GuiViewSource.cpp
+++ b/src/frontends/qt/GuiViewSource.cpp
@@ -199,7 +199,7 @@ void ViewSourceWidget::updateView(BufferView const * bv)
        if (guiApp->currentView()->develMode()) {
                // output tex<->row correspondences in the source panel if the 
"-dbg latex"
                // option is given.
-               if (texrow_ && lyx::lyxerr.debugging(Debug::LATEX)) {
+               if (texrow_ && lyx::lyxerr.debugging(Debug::OUTFILE)) {
                        QStringList list = qcontent.split(QChar('\n'));
                        docstring_list dlist;
                        for (QStringList::const_iterator it = list.begin(); it 
!= list.end(); ++it)
diff --git a/src/graphics/PreviewLoader.cpp b/src/graphics/PreviewLoader.cpp
index 28a0e0f..5d767b2 100644
--- a/src/graphics/PreviewLoader.cpp
+++ b/src/graphics/PreviewLoader.cpp
@@ -624,7 +624,7 @@ void PreviewLoader::Impl::startLoading(bool wait)
           << from_utf8(changeExtension(buffer_.latexName(), ""))
           << "}\n";
 
-       LYXERR(Debug::LATEX, "Format = " << 
buffer_.params().getDefaultOutputFormat());
+       LYXERR(Debug::OUTFILE, "Format = " << 
buffer_.params().getDefaultOutputFormat());
        string latexparam = "";
        bool docformat = !buffer_.params().default_output_format.empty()
                        && buffer_.params().default_output_format != "default";
@@ -810,7 +810,7 @@ void PreviewLoader::Impl::finishedGenerating(pid_t pid, int 
retval)
 void PreviewLoader::Impl::dumpPreamble(otexstream & os, Flavor flavor) const
 {
        // Dump the preamble only.
-       LYXERR(Debug::LATEX, "dumpPreamble, flavor == " << 
static_cast<int>(flavor));
+       LYXERR(Debug::OUTFILE, "dumpPreamble, flavor == " << 
static_cast<int>(flavor));
        OutputParams runparams(&buffer_.params().encoding());
        runparams.flavor = flavor;
        runparams.nice = true;
diff --git a/src/insets/Inset.h b/src/insets/Inset.h
index 372b95a..5d56c10 100644
--- a/src/insets/Inset.h
+++ b/src/insets/Inset.h
@@ -335,7 +335,7 @@ public:
        /// output, add PLAINTEXT_NEWLINE to the number of chars in the last 
line
        virtual int plaintext(odocstringstream &, OutputParams const &,
                              size_t max_length = INT_MAX) const = 0;
-       /// docbook output
+       /// DocBook output
        virtual void docbook(XMLStream &, OutputParams const &) const;
        /// XHTML output
        /// the inset is expected to write XHTML to the XMLStream
diff --git a/src/insets/InsetInclude.cpp b/src/insets/InsetInclude.cpp
index 10ea52b..30eacd7 100644
--- a/src/insets/InsetInclude.cpp
+++ b/src/insets/InsetInclude.cpp
@@ -618,9 +618,9 @@ void InsetInclude::latex(otexstream & os, OutputParams 
const & runparams) const
        FileName const writefile(makeAbsPath(mangled, runparams.for_preview ?
                                                 buffer().temppath() : 
masterBuffer->temppath()));
 
-       LYXERR(Debug::LATEX, "incfile:" << incfile);
-       LYXERR(Debug::LATEX, "exportfile:" << exportfile);
-       LYXERR(Debug::LATEX, "writefile:" << writefile);
+       LYXERR(Debug::OUTFILE, "incfile:" << incfile);
+       LYXERR(Debug::OUTFILE, "exportfile:" << exportfile);
+       LYXERR(Debug::OUTFILE, "writefile:" << writefile);
 
        string const tex_format = flavor2format(runparams.flavor);
 
@@ -783,7 +783,7 @@ void InsetInclude::latex(otexstream & os, OutputParams 
const & runparams) const
                if (checksum_in != checksum_out) {
                        if (!included_file.copyTo(writefile)) {
                                // FIXME UNICODE
-                               LYXERR(Debug::LATEX,
+                               LYXERR(Debug::OUTFILE,
                                        to_utf8(bformat(_("Could not copy the 
file\n%1$s\n"
                                                                        "into 
the temporary directory."),
                                                         
from_utf8(included_file.absFileName()))));
diff --git a/src/output_docbook.cpp b/src/output_docbook.cpp
index 5458e7a..5e1f6d1 100644
--- a/src/output_docbook.cpp
+++ b/src/output_docbook.cpp
@@ -826,7 +826,7 @@ DocBookInfoTag getParagraphsWithInfo(ParagraphList const 
&paragraphs,
                // There should never be any section here, except for the first 
paragraph (a title can be part of <info>).
                // (Just a sanity check: if this fails, this function could end 
up processing the whole document.)
                if (cpit != bpit && isLayoutSectioningOrSimilar(par.layout())) {
-                       LYXERR0("Assertion failed: section found in potential 
<info> paragraphs.");
+                       LYXERR(Debug::OUTFILE, "Assertion failed: section found 
in potential <info> paragraphs.");
                        break;
                }
 
diff --git a/src/output_latex.cpp b/src/output_latex.cpp
index 03ac2b4..bf841fe 100644
--- a/src/output_latex.cpp
+++ b/src/output_latex.cpp
@@ -409,7 +409,7 @@ void TeXEnvironment(Buffer const & buf, Text const & text,
 {
        ParagraphList const & paragraphs = text.paragraphs();
        ParagraphList::const_iterator ipar = paragraphs.iterator_at(pit);
-       LYXERR(Debug::LATEX, "TeXEnvironment for paragraph " << pit);
+       LYXERR(Debug::OUTFILE, "TeXEnvironment for paragraph " << pit);
 
        Layout const & current_layout = ipar->layout();
        depth_type const current_depth = ipar->params().depth();
@@ -490,7 +490,7 @@ void TeXEnvironment(Buffer const & buf, Text const & text,
        }
 
        if (pit != runparams.par_end)
-               LYXERR(Debug::LATEX, "TeXEnvironment for paragraph " << 
par_begin << " done.");
+               LYXERR(Debug::OUTFILE, "TeXEnvironment for paragraph " << 
par_begin << " done.");
 }
 
 
@@ -800,8 +800,8 @@ void TeXOnePar(Buffer const & buf,
            && !par.empty() && par.isDeleted(0, par.size()) && 
!bparams.output_changes)
                return;
 
-       LYXERR(Debug::LATEX, "TeXOnePar for paragraph " << pit << " ptr " << 
&par << " '"
-               << everypar << "'");
+       LYXERR(Debug::OUTFILE, "TeXOnePar for paragraph " << pit << " ptr " << 
&par << " '"
+                                                         << everypar << "'");
 
        OutputParams runparams = runparams_in;
        runparams.isLastPar = (pit == pit_type(paragraphs.size() - 1));
@@ -1555,8 +1555,8 @@ void TeXOnePar(Buffer const & buf,
        if (intitle_command)
                state->nest_level_ -= 1;
 
-       LYXERR(Debug::LATEX, "TeXOnePar for paragraph " << pit << " done; ptr "
-               << &par << " next " << nextpar);
+       LYXERR(Debug::OUTFILE, "TeXOnePar for paragraph " << pit << " done; ptr 
"
+                                                         << &par << " next " 
<< nextpar);
 
        return;
 }
@@ -1863,7 +1863,7 @@ pair<bool, int> switchEncoding(odocstream & os, 
BufferParams const & bparams,
        // but it is the best we can do.
 
        // change encoding
-       LYXERR(Debug::LATEX, "Changing LaTeX encoding from "
+       LYXERR(Debug::OUTFILE, "Changing LaTeX encoding from "
                   << oldEnc.name() << " to " << newEnc.name());
        os << setEncoding(newEnc.iconvName());
        if (bparams.inputenc == "auto-legacy-plain")
diff --git a/src/support/debug.cpp b/src/support/debug.cpp
index 4e2b5c0..b890741 100644
--- a/src/support/debug.cpp
+++ b/src/support/debug.cpp
@@ -47,7 +47,8 @@ DebugErrorItem errorTags[] = {
        { Debug::PARSER,    "parser",    N_("Lyxlex grammar parser")},
        { Debug::LYXRC,     "lyxrc",     N_("Configuration files reading")},
        { Debug::KBMAP,     "kbmap",     N_("Custom keyboard definition")},
-       { Debug::LATEX,     "latex",     N_("LaTeX generation/execution")},
+       { Debug::OUTFILE,   "outfile",   N_("Output source file 
generation/processing")},
+       { Debug::OUTFILE,   "latex",     N_("Output source file 
generation/processing")},
        { Debug::MATHED,    "mathed",    N_("Math editor")},
        { Debug::FONT,      "font",      N_("Font handling")},
        { Debug::TCLASS,    "tclass",    N_("Textclass files reading")},
diff --git a/src/support/debug.h b/src/support/debug.h
index f12a842..18dd5fa 100644
--- a/src/support/debug.h
+++ b/src/support/debug.h
@@ -55,7 +55,7 @@ namespace Debug {
                ///
                KBMAP      = (1u << 6),   // 64
                ///
-               LATEX      = (1u << 7),   // 128
+               OUTFILE      = (1u << 7),   // 128
                ///
                MATHED     = (1u << 8),   // 256 // Alejandro, please use this.
                ///
diff --git a/src/support/filetools.cpp b/src/support/filetools.cpp
index a3df20a..d554f47 100644
--- a/src/support/filetools.cpp
+++ b/src/support/filetools.cpp
@@ -1207,8 +1207,8 @@ FileName const findtexfile(string const & fil, string 
const & /*format*/,
 
        cmd_ret const c = runCommand(kpsecmd);
 
-       LYXERR(Debug::LATEX, "kpse status = " << c.valid << '\n'
-                << "kpse result = `" << rtrim(c.result, "\n\r") << '\'');
+       LYXERR(Debug::OUTFILE, "kpse status = " << c.valid << '\n'
+                                               << "kpse result = `" << 
rtrim(c.result, "\n\r") << '\'');
        if (c.valid)
                return FileName(rtrim(to_utf8(from_filesystem8bit(c.result)), 
"\n\r"));
        else
diff --git a/src/support/os_win32.cpp b/src/support/os_win32.cpp
index 1d40e56..a10c17e 100644
--- a/src/support/os_win32.cpp
+++ b/src/support/os_win32.cpp
@@ -325,7 +325,7 @@ string external_path(string const & p)
 {
        string const dos_path = subst(p, "/", "\\");
 
-       LYXERR(Debug::LATEX, "<Win32 path correction> ["
+       LYXERR(Debug::OUTFILE, "<Win32 path correction> ["
                << p << "]->>[" << dos_path << ']');
        return dos_path;
 }
@@ -410,7 +410,7 @@ string latex_path(string const & p)
                string const drive = p.substr(0, 2);
                string const cygprefix = cygdrive + "/" + drive.substr(0, 1);
                string const cygpath = subst(subst(p, '\\', '/'), drive, 
cygprefix);
-               LYXERR(Debug::LATEX, "<Path correction for LaTeX> ["
+               LYXERR(Debug::OUTFILE, "<Path correction for LaTeX> ["
                        << p << "]->>[" << cygpath << ']');
                return cygpath;
        }
diff --git a/src/xml.cpp b/src/xml.cpp
index 7c614da..7ee8d91 100644
--- a/src/xml.cpp
+++ b/src/xml.cpp
@@ -166,7 +166,7 @@ bool FontTag::operator==(StartTag const & tag) const
 
 void XMLStream::writeError(std::string const &s)
 {
-       LYXERR0(s);
+       LYXERR(Debug::OUTFILE, s);
        *this << ESCAPE_NONE << from_utf8("<!-- Output Error: " + s + " -->");
        *this << xml::CR();
 }
@@ -174,7 +174,7 @@ void XMLStream::writeError(std::string const &s)
 
 void XMLStream::writeError(docstring const &s)
 {
-       LYXERR0(s);
+       LYXERR(Debug::OUTFILE, s);
        *this << ESCAPE_NONE << from_utf8("<!-- Output Error: ");
        *this << s;
        *this << ESCAPE_NONE << from_utf8(" -->");
@@ -686,9 +686,9 @@ void xml::openTag(odocstream & os, string const & name, 
string const & attribute
     string param = subst(attribute, "<", "\"");
     param = subst(param, ">", "\"");
 
-    // Note: we ignore the name if it empty or if it is a comment "<!-- -->" or
+    // Note: we ignore the name if it is empty or if it is a comment "<!-- 
-->" or
     // if the name is *dummy*.
-    // We ignore dummy because dummy is not a valid docbook element and it is
+    // We ignore dummy because dummy is not a valid DocBook element and it is
     // the internal name given to single paragraphs in the latex output.
     // This allow us to simplify the code a lot and is a reasonable compromise.
     if (!name.empty() && name != "!-- --" && name != "dummy") {
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to