Author: rgheck
Date: Wed Jul 21 23:58:54 2010
New Revision: 35000
URL: http://www.lyx.org/trac/changeset/35000
Log:
Next step in fixing problems noted by Vincent: Remove magic boolean from
updateMacros().
Modified:
lyx-devel/trunk/src/Buffer.cpp
lyx-devel/trunk/src/Buffer.h
Modified: lyx-devel/trunk/src/Buffer.cpp
==============================================================================
--- lyx-devel/trunk/src/Buffer.cpp Wed Jul 21 23:51:33 2010 (r34999)
+++ lyx-devel/trunk/src/Buffer.cpp Wed Jul 21 23:58:54 2010 (r35000)
@@ -164,8 +164,7 @@
/// Update macro table starting with position of it \param it in some
/// text inset.
- void updateMacros(DocIterator & it, DocIterator & scope,
- bool record_docits = false);
+ void updateMacros(DocIterator & it, DocIterator & scope);
///
void setLabel(ParIterator & it, UpdateType utype) const;
///
@@ -1576,7 +1575,7 @@
updateBuffer(UpdateMaster, OutputUpdate);
checkBibInfoCache();
d->bibinfo_.makeCitationLabels(*this);
- updateMacros(true);
+ updateMacros();
updateMacroInstances();
if (!only_body) {
@@ -2668,8 +2667,7 @@
}
-void Buffer::Impl::updateMacros(DocIterator & it, DocIterator & scope,
- bool record_docits)
+void Buffer::Impl::updateMacros(DocIterator & it, DocIterator & scope)
{
pit_type const lastpit = it.lastpit();
@@ -2723,7 +2721,7 @@
continue;
}
- if (record_docits && iit->inset->asInsetMath()) {
+ if (doing_export && iit->inset->asInsetMath()) {
InsetMath * im = static_cast<InsetMath
*>(iit->inset);
if (im->asHullInset()) {
InsetMathHull * hull =
static_cast<InsetMathHull *>(im);
@@ -2762,7 +2760,7 @@
}
-void Buffer::updateMacros(bool record_docit) const
+void Buffer::updateMacros() const
{
if (d->macro_lock)
return;
@@ -2781,7 +2779,7 @@
DocIterator it = par_iterator_begin();
DocIterator outerScope = it;
outerScope.pit() = outerScope.lastpit() + 2;
- d->updateMacros(it, outerScope, record_docit);
+ d->updateMacros(it, outerScope);
}
Modified: lyx-devel/trunk/src/Buffer.h
==============================================================================
--- lyx-devel/trunk/src/Buffer.h Wed Jul 21 23:51:33 2010 (r34999)
+++ lyx-devel/trunk/src/Buffer.h Wed Jul 21 23:58:54 2010 (r35000)
@@ -427,7 +427,7 @@
// Macro handling
//
/// Collect macro definitions in paragraphs
- void updateMacros(bool record_docit = false) const;
+ void updateMacros() const;
/// Iterate through the whole buffer and try to resolve macros
void updateMacroInstances() const;