* Follow Vincent's advice to keep constness. Thanks Vincent.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36759 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Spitzmüller 2010-12-07 09:00:50 +00:00
parent 2653011613
commit f255f93b9e
3 changed files with 6 additions and 7 deletions

View File

@ -3072,7 +3072,7 @@ void Buffer::changeRefsIfUnique(docstring const & from, docstring const & to,
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(&params().encoding());
runparams.nice = true;
@ -3388,7 +3388,7 @@ string Buffer::getDefaultOutputFormat() const
}
OutputParams::FLAVOR Buffer::getDefaultOutputFlavor()
OutputParams::FLAVOR Buffer::getDefaultOutputFlavor() const
{
string const dformat = getDefaultOutputFormat();
DefaultFlavorCache::const_iterator it =

View File

@ -554,7 +554,7 @@ public:
/// 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
@ -603,7 +603,7 @@ public:
/// 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,
@ -669,7 +669,7 @@ private:
/// 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

View File

@ -102,8 +102,7 @@ static bool getContent(BufferView const * view, bool fullSource, QString & qstr)
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);