Angus Leeming wrote:

> Is this not cleaner (want to check it's still correct)


a question of philosophy ...

> 
> class PreviewLoader::Impl {
>       /// Per buffer, since different buffers have different class files.
>       double scale_to_fit_;
> };
> 
> double PreviewLoader::Impl::scaleToFitLyXView()
> {
>       static double const lyxrc_preview_scale_factor = 0.9;
> 
>       if (scale_to_fit_ > 0.01)
>               return scale_to_fit_;


I do not understand the sense of this if.

>       // For goodness sake! (Isn't Buffer crap!)
>       Buffer & tmp = const_cast<Buffer &>(buffer_);
> 
>       // Has the font size been set explicitly?
>       string const fontsize(tmp.params.fontsize + "pt");


        string const fontsize(tmp.params.fontsize);

>       lyxerr[Debug::GRAPHICS] << "PreviewLoader::scaleToFitLyXView()\n"
>                               << "fontsize  is " << fontsize << endl;
> 

 >       if (isValidLength(fontsize))

        if (isStrUnsignedInt(fontsize))


>               return 10 * lyxrc_preview_scale_factor / strToDbl(fontsize);

> 
>       string const & fontsize = tmp.params.fontsize;
>       if (isStrDbl)
>               return 10 * lyxrc_preview_scale_factor / strToDbl(fontsize);


why this again here?


Herbert




-- 
http://www.lyx.org/help/

Reply via email to