commit 25bb51c865b8013e983395122f8a20835b8f1319 Author: Thibaut Cuvelier <cuvelier.thib...@gmail.com> Date: Sun Jul 5 02:31:37 2020 +0200
Remove DOCBOOK enum values, no more used. --- src/BufferParams.cpp | 13 ------------- src/BufferParams.h | 2 -- src/LayoutEnums.h | 2 -- src/TextClass.cpp | 5 ----- src/frontends/qt/Dialog.cpp | 3 ++- src/frontends/qt/Dialog.h | 3 +-- src/frontends/qt/GuiDocument.cpp | 2 +- 7 files changed, 4 insertions(+), 26 deletions(-) diff --git a/src/BufferParams.cpp b/src/BufferParams.cpp index bb59d0d..0d098fe 100644 --- a/src/BufferParams.cpp +++ b/src/BufferParams.cpp @@ -2760,13 +2760,6 @@ string BufferParams::getDefaultOutputFormat() const if (!default_output_format.empty() && default_output_format != "default") return default_output_format; - if (isDocBook()) { - FormatList const & formats = exportableFormats(true); - if (formats.empty()) - return string(); - // return the first we find - return formats.front()->name(); - } if (encoding().package() == Encoding::japanese) return lyxrc.default_platex_view_format; if (useNonTeXFonts) @@ -2805,12 +2798,6 @@ bool BufferParams::isLiterate() const } -bool BufferParams::isDocBook() const -{ - return documentClass().outputType() == DOCBOOK; -} - - void BufferParams::readPreamble(Lexer & lex) { if (lex.getString() != "\\begin_preamble") diff --git a/src/BufferParams.h b/src/BufferParams.h index 84a5e58..4e176c9 100644 --- a/src/BufferParams.h +++ b/src/BufferParams.h @@ -184,8 +184,6 @@ public: /// returns \c true if the buffer contains a LaTeX document bool isLatex() const; - /// returns \c true if the buffer contains a DocBook document - bool isDocBook() const; /// returns \c true if the buffer contains a Wed document bool isLiterate() const; diff --git a/src/LayoutEnums.h b/src/LayoutEnums.h index 969ad1d..48e849f 100644 --- a/src/LayoutEnums.h +++ b/src/LayoutEnums.h @@ -23,8 +23,6 @@ enum OutputType { /// LATEX = 1, /// - DOCBOOK, - /// LITERATE }; diff --git a/src/TextClass.cpp b/src/TextClass.cpp index a39ab34..55e4a9a 100644 --- a/src/TextClass.cpp +++ b/src/TextClass.cpp @@ -456,9 +456,6 @@ TextClass::ReturnValues TextClass::read(Lexer & lexrc, ReadType rt) case LATEX: outputFormat_ = "latex"; break; - case DOCBOOK: - outputFormat_ = "docbook"; - break; case LITERATE: outputFormat_ = "literate"; break; @@ -975,7 +972,6 @@ void TextClass::readTitleType(Lexer & lexrc) void TextClass::readOutputType(Lexer & lexrc) { LexerKeyword outputTypeTags[] = { - { "docbook", DOCBOOK }, { "latex", LATEX }, { "literate", LITERATE } }; @@ -988,7 +984,6 @@ void TextClass::readOutputType(Lexer & lexrc) lexrc.printError("Unknown output type `$$Token'"); return; case LATEX: - case DOCBOOK: case LITERATE: outputType_ = static_cast<OutputType>(le); break; diff --git a/src/frontends/qt/Dialog.cpp b/src/frontends/qt/Dialog.cpp index 1582a80..a646a89 100644 --- a/src/frontends/qt/Dialog.cpp +++ b/src/frontends/qt/Dialog.cpp @@ -106,7 +106,8 @@ KernelDocType Dialog::docType() const if (buffer().params().isLiterate()) return LITERATE; - return DOCBOOK; + // This case should not happen. + return LATEX; } diff --git a/src/frontends/qt/Dialog.h b/src/frontends/qt/Dialog.h index 08a80a3..260eaeb 100644 --- a/src/frontends/qt/Dialog.h +++ b/src/frontends/qt/Dialog.h @@ -41,8 +41,7 @@ class GuiView; enum KernelDocType { LATEX, - LITERATE, - DOCBOOK + LITERATE }; /** \c Dialog collects the different parts of a Model-Controller-View diff --git a/src/frontends/qt/GuiDocument.cpp b/src/frontends/qt/GuiDocument.cpp index 9d8de56..269985c 100644 --- a/src/frontends/qt/GuiDocument.cpp +++ b/src/frontends/qt/GuiDocument.cpp @@ -1595,7 +1595,7 @@ GuiDocument::GuiDocument(GuiView & lv) // tooltip sensu "KOMA-Script Article [Class 'scrartcl']" QString tooltip = toqstr(bformat(_("%1$s [Class '%2$s']"), guiname, from_utf8(tc.latexname()))); if (!available) { - docstring const output_type = (tc.outputType() == lyx::DOCBOOK) ? _("DocBook") : _("LaTeX"); + docstring const output_type = _("LaTeX"); tooltip += '\n' + toqstr(bformat(_("Class not found by LyX. " "Please check if you have the matching %1$s class " "and all required packages (%2$s) installed."), -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs