A couple changes related to cloning:

(i) release the macro lock after we've cloned, so that...
(ii) we can regenerate the macro caches before doing XHTML output.
It may be worth doing the regeneration in the clone() routine itself,
but it appears that the export routines now all do it anyway.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32983 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2010-01-12 15:25:04 +00:00
parent e6283be75a
commit 14f8faa01a

View File

@ -407,6 +407,7 @@ Buffer * Buffer::clone() const
child_clone->d->setParent(buffer_clone);
buffer_clone->setChild(dit, child_clone);
}
buffer_clone->d->macro_lock = false;
return buffer_clone;
}
@ -1490,6 +1491,8 @@ void Buffer::writeLyXHTMLSource(odocstream & os,
updateLabels(UpdateMaster, true);
checkBibInfoCache();
d->bibinfo_.makeCitationLabels(*this);
updateMacros();
updateMacroInstances();
if (!only_body) {
os << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
@ -2555,7 +2558,7 @@ MacroData const * Buffer::getMacro(docstring const & name,
void Buffer::updateMacros(DocIterator & it, DocIterator & scope) const
{
pit_type lastpit = it.lastpit();
pit_type const lastpit = it.lastpit();
// look for macros in each paragraph
while (it.pit() <= lastpit) {