Jose' Matos wrote:
>> >   In this cases the changes only affect the docbook export.
>>
>> Please hang on. The code currently leaks memory. I'm about to post a
>> 'better' version.
> 
>   It was never my intent to commit anything without hearing you. :-)

Ok.

>   My comment was related with the docbook part, and even if we were not
>   in feature freeze I would like to have your opinion on this
>   subject. :-) 

I think that the idea is fine. Questions that I think should be answered:
* Can the user turn off this image generation or does he have to install
preview-latex? I see no lyxrc option.
* What happens if image generation fails?

Other than that, it all seems like a good idea to me. 

Here's the patch back again.

* Everything in a single patch. Merged the ChangeLog entries and
SnippetConversion.[Ch] files into the patch.

* Cleaned-up whitespace.

* Forward-declared SnippetConversion.h in exporter.h.

* Don't store a raw SnippetConversion pointer. Store a boost::shared_ptr.
You are currently leaking memory.

* docbookImageObject: remove the default argument from the definition.
(Leave in the declaration.)

* I don't see why splitting stuff out into a new file means that I'm no
longer the author of the original code, so I added myself back there ;-)

As far as I'm concerned, I'm happy for this to go in. I haven't tested the
DocBook stuff at all, but the Previews continue to work (as well as
before).

I'd query this piece of code, however (buffer.C's createBitmaps):

+  snipp->startAndWait(buffer, fore, back, scale);
+  runparams.exportdata->addBitmaps(to_1, snipp);

Surely you should check whether the snippets were generated successfully
before adding them to 'addBitmaps' ?

-- 
Angus

Attachment: snippet_conversion.diff.bz2
Description: BZip2 compressed data

Reply via email to