]> git.lyx.org Git - features.git/commitdiff
Update comments a bit.
authorRichard Heck <rgheck@comcast.net>
Thu, 29 Jul 2010 16:55:02 +0000 (16:55 +0000)
committerRichard Heck <rgheck@comcast.net>
Thu, 29 Jul 2010 16:55:02 +0000 (16:55 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35035 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/InsetMathHull.cpp

index 46ebb31a3c690d071acd9cdf366a1a1cfb850710..980801d84d6f171318f03d30cd3c6120abf2c37c 100644 (file)
@@ -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.