From b5d23021807133bc7cc24027b6a06efb6cb98209 Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Wed, 31 Mar 2010 18:57:20 +0000 Subject: [PATCH] Initialize math_flavor, and introduce an isLaTeX() flavor check. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33968 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/OutputParams.cpp | 9 +++++++-- src/OutputParams.h | 3 +++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/OutputParams.cpp b/src/OutputParams.cpp index 09583d94c8..f216bc6384 100644 --- a/src/OutputParams.cpp +++ b/src/OutputParams.cpp @@ -19,8 +19,8 @@ namespace lyx { OutputParams::OutputParams(Encoding const * enc) - : flavor(LATEX), nice(false), moving_arg(false), inulemcmd(false), - local_font(0), master_language(0), encoding(enc), + : flavor(LATEX), math_flavor(NotApplicable), nice(false), moving_arg(false), + inulemcmd(false), local_font(0), master_language(0), encoding(enc), free_spacing(false), use_babel(false), use_indices(false), use_japanese(false), linelen(0), depth(0), exportdata(new ExportData), @@ -43,4 +43,9 @@ OutputParams::~OutputParams() {} +bool OutputParams::isLaTeX() const +{ + return flavor == LATEX || flavor == PDFLATEX || flavor == XETEX; +} + } // namespace lyx diff --git a/src/OutputParams.h b/src/OutputParams.h index a3d4fbed98..66d10d120c 100644 --- a/src/OutputParams.h +++ b/src/OutputParams.h @@ -39,6 +39,7 @@ public: }; enum MathFlavor { + NotApplicable, MathAsMathML, MathAsHTML, MathAsImages, @@ -64,6 +65,8 @@ public: compile the file. */ FLAVOR flavor; + /// is it some flavor of LaTeX? + bool isLaTeX() const; /// Same, but for math output, which only matter is XHTML output. MathFlavor math_flavor;