void Buffer::getSourceCode(odocstream & os, pit_type par_begin,
- pit_type par_end, bool full_source)
+ pit_type par_end, bool full_source) const
{
OutputParams runparams(¶ms().encoding());
runparams.nice = true;
}
-OutputParams::FLAVOR Buffer::getDefaultOutputFlavor()
+OutputParams::FLAVOR Buffer::getDefaultOutputFlavor() const
{
string const dformat = getDefaultOutputFormat();
DefaultFlavorCache::const_iterator it =
/// get source code (latex/docbook) for some paragraphs, or all paragraphs
/// including preamble
void getSourceCode(odocstream & os, pit_type par_begin, pit_type par_end,
- bool full_source);
+ bool full_source) const;
/// Access to error list.
/// This method is used only for GUI visualisation of Buffer related
/// return the default output format of the current backend
std::string getDefaultOutputFormat() const;
/// return the default output flavor
- OutputParams::FLAVOR getDefaultOutputFlavor();
+ OutputParams::FLAVOR getDefaultOutputFlavor() const;
///
bool doExport(std::string const & format, bool put_in_tempdir,
/// A cache for the default flavors
typedef std::map<std::string, OutputParams::FLAVOR> DefaultFlavorCache;
///
- DefaultFlavorCache default_flavors_;
+ mutable DefaultFlavorCache default_flavors_;
///
void getLanguages(std::set<Language const *> &) const;
/// Checks whether any of the referenced bibfiles have changed since the
if (par_begin > par_end)
swap(par_begin, par_end);
odocstringstream ostr;
- const_cast<BufferView *>(view)->buffer().getSourceCode(
- ostr, par_begin, par_end + 1, fullSource);
+ view->buffer().getSourceCode(ostr, par_begin, par_end + 1, fullSource);
docstring s = ostr.str();
static size_t crc = 0;
size_t newcrc = crcCheck(s);