From 56c500bae5dac70c1ebf3d59ed6b939438a86c8f Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Thu, 29 Jul 2010 16:55:02 +0000 Subject: [PATCH] Update comments a bit. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35035 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/mathed/InsetMathHull.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/mathed/InsetMathHull.cpp b/src/mathed/InsetMathHull.cpp index 46ebb31a3c..980801d84d 100644 --- a/src/mathed/InsetMathHull.cpp +++ b/src/mathed/InsetMathHull.cpp @@ -1893,9 +1893,15 @@ docstring InsetMathHull::xhtml(XHTMLStream & xs, OutputParams const & op) const } } - // the logic here is ugly, but it's meant to mean: if we've failed with - // one of the earlier attempts OR the mathtype IS Image, then try to - // export an image. + // what we actually want is this: + // if ( + // ((mathtype == BufferParams::MathML || mathtype == BufferParams::HTML) + // && !success) + // || mathtype == BufferParams::Images + // ) + // but what follows is equivalent, since we'll enter only if either (a) we + // tried and failed with MathML or HTML or (b) didn't try yet at all but + // aren't doing LaTeX, in which case we are doing Images. if (!success && mathtype != BufferParams::LaTeX) { loadPreview(docit_); graphics::PreviewImage const * pimage = preview_->getPreviewImage(buffer()); @@ -1916,7 +1922,7 @@ docstring InsetMathHull::xhtml(XHTMLStream & xs, OutputParams const & op) const // so we'll pass this test if we've failed everything else, or // if mathtype was LaTeX, since we won't have entered any of the // earlier branches - if (!success) { + if (!success /* || mathtype != BufferParams::LaTeX */) { string const tag = (getType() == hullSimple) ? "span" : "div"; // Unfortunately, we cannot use latexString() because we do not want // $...$ or whatever. -- 2.39.2