> Author: spitz > Date: Tue Dec 7 09:36:42 2010 > New Revision: 36758 > URL: http://www.lyx.org/trac/changeset/36758 > > Log: > * Use default output flavor for View Source. >
> @@ -662,6 +666,10 @@ > + /// A cache for the default flavors > + typedef std::map<std::string, OutputParams::FLAVOR> > DefaultFlavorCache; > + /// > + DefaultFlavorCache default_flavors_; If you make this cache mutable ? > @@ -552,7 +554,7 @@ > void getSourceCode(odocstream & os, pit_type par_begin, pit_type > par_end, > - bool full_source) const; > + bool full_source); Then this can be const ? > @@ -600,6 +602,8 @@ > + /// return the default output flavor > + OutputParams::FLAVOR getDefaultOutputFlavor(); and this can be const ? > - view->buffer().getSourceCode(ostr, par_begin, par_end + 1, > fullSource); > + const_cast<BufferView *>(view)->buffer().getSourceCode( > + ostr, par_begin, par_end + 1, fullSource); Then this const_cast is not necessary ? Vincent