> Author: rgheck
> Date: Wed Jul 21 15:19:52 2010
> New Revision: 34993
> URL: http://www.lyx.org/trac/changeset/34993
>
> Log:
> Support for exporting math as images with XHTML. The next step is to
> allow this as a fallback. E.g., if we're unable to export as MathML,
> then we try to export as an image.
>
> There are several ways, I am sure, in which this implementation is not
> ideal.
>

>Modified: lyx-devel/trunk/src/Buffer.h
>==============================================================================
>--- lyx-devel/trunk/src/Buffer.h        Wed Jul 21 06:59:05 2010        
>(r34992)
>+++ lyx-devel/trunk/src/Buffer.h        Wed Jul 21 15:19:52 2010        
>(r34993)
>@@ -427,7 +427,7 @@
>       // Macro handling
>       //
>       /// Collect macro definitions in paragraphs
>-       void updateMacros() const;
>+       void updateMacros(bool record_docit = false) const;
>       /// Iterate through the whole buffer and try to resolve macros
>       void updateMacroInstances() const;
>

I don't like adding a parameter to updateMacros() for one very
specific rarely used usecase.


>+       if (!isClone())
>+               thePreviews().removeLoader(*this);

It looks wrong to depend on isClone().

>+       // For XHTML image export, we need to control the background
>+       // color here.
>+       ColorCode bg = buffer_.isClone()
>+                      ? Color_white : PreviewLoader::backgroundColor();

Dito. It's strange to conclude we are exporting XHTML because the
buffer is a clone.


There is no comment at all that describes the "wait" and
"record_docit" parameters.


I'm afraid it will cost a lot of time to get rid of the magic
parameters at a later time.

Vincent

Reply via email to