mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-23 18:24:48 +00:00
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:
parent
e6283be75a
commit
14f8faa01a
@ -407,6 +407,7 @@ Buffer * Buffer::clone() const
|
|||||||
child_clone->d->setParent(buffer_clone);
|
child_clone->d->setParent(buffer_clone);
|
||||||
buffer_clone->setChild(dit, child_clone);
|
buffer_clone->setChild(dit, child_clone);
|
||||||
}
|
}
|
||||||
|
buffer_clone->d->macro_lock = false;
|
||||||
return buffer_clone;
|
return buffer_clone;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1490,6 +1491,8 @@ void Buffer::writeLyXHTMLSource(odocstream & os,
|
|||||||
updateLabels(UpdateMaster, true);
|
updateLabels(UpdateMaster, true);
|
||||||
checkBibInfoCache();
|
checkBibInfoCache();
|
||||||
d->bibinfo_.makeCitationLabels(*this);
|
d->bibinfo_.makeCitationLabels(*this);
|
||||||
|
updateMacros();
|
||||||
|
updateMacroInstances();
|
||||||
|
|
||||||
if (!only_body) {
|
if (!only_body) {
|
||||||
os << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
|
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
|
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
|
// look for macros in each paragraph
|
||||||
while (it.pit() <= lastpit) {
|
while (it.pit() <= lastpit) {
|
||||||
|
Loading…
Reference in New Issue
Block a user