Jean-Marc Lasgouttes wrote:

> So as a preamble, is there a reason why getOUtputFormat, instead of
> looking
> at various hardcoded variables, could not be written like the following?
> 
> string Buffer::getDefaultOutputFormat() const
> {
> string format = lyxrc.default_view_format;
> if (!params().defaultOutputFormat.empty()
> && params().defaultOutputFormat != "default")
> format = params().defaultOutputFormat;
> if (isExportable(format))
> return format;
> 
> typedef vector<Format const *> Formats;
> Formats const formats = exportableFormats(true);
> if (formats.empty())
> return string();
> // return the first we find
> return formats.front()->name();
> }
> 

Without re-viewing the code: yes, sure.

Jürgen


Reply via email to