On Mon, Feb 8, 2010 at 3:12 PM, Jürgen Spitzmüller <sp...@lyx.org> wrote:
> John McCabe-Dansted wrote:
>> It is just a missing "d->texrow.newline();".
>>
>> The attached patch adds this back in. I've tested this patch against
>> branch and trunk. Shall we apply this to trunk now?
>
> Looks much better.
>
> However, instead of inserting this line, shouldn't we rather do as elsewhere.
> i.e. let MathMacroTemplate::write return the number of newlines? This prevents
> from further changes in the code.

Sure. I am not sure how to do this the LyX way. Most of the write
functions are void like M.M.T:write.

Do you mean something like the writeLaTeX function in BufferParams.cpp
that has TexRow passed in, and itself calls "texrow.newline();"?

       bool writeLaTeX(odocstream &, LaTeXFeatures &, TexRow &,
                        support::FileName const &) const;

, giving us a funtion that looks like:

   void MathMacroTemplate::write(WriteStream & os, bool
overwriteRedefinition, TexRow & texrow) const

Also... I was thinking that it should be possible to define a
texrowStream object encapsulates an odocstream and a TeXRow and
automatically calls newline() whenever a newline is written to it, but
presumably there is some reason why this approach was not taken.

>
> Jürgen
>

-- 
John C. McCabe-Dansted

Reply via email to