LaTeXFeatures features(*this, params(), runparams);
validate(features);
updateLabels(UpdateMaster, true);
-
- d->texrow.reset();
+ checkBibInfoCache();
+ d->bibinfo_.collectCitedEntries(*this);
if (!only_body) {
os << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
BiblioInfo const & Buffer::localBibInfo() const
{
- if (d->bibinfoCacheValid_) {
- support::FileNameList const & bibfilesCache = getBibfilesCache();
- // compare the cached timestamps with the actual ones.
- support::FileNameList::const_iterator ei = bibfilesCache.begin();
- support::FileNameList::const_iterator en = bibfilesCache.end();
- for (; ei != en; ++ ei) {
- time_t lastw = ei->lastModified();
- if (lastw != d->bibfileStatus_[*ei]) {
- d->bibinfoCacheValid_ = false;
- d->bibfileStatus_[*ei] = lastw;
- break;
- }
+ checkBibInfoCache();
+ return d->bibinfo_;
+}
+
+
+void Buffer::checkBibInfoCache() const
+{
+ support::FileNameList const & bibfilesCache = getBibfilesCache();
+ // compare the cached timestamps with the actual ones.
+ support::FileNameList::const_iterator ei = bibfilesCache.begin();
+ support::FileNameList::const_iterator en = bibfilesCache.end();
+ for (; ei != en; ++ ei) {
+ time_t lastw = ei->lastModified();
+ time_t prevw = d->bibfileStatus_[*ei];
+ if (lastw != prevw) {
+ d->bibinfoCacheValid_ = false;
+ d->bibfileStatus_[*ei] = lastw;
}
}
for (InsetIterator it = inset_iterator_begin(inset()); it; ++it)
it->fillWithBibKeys(d->bibinfo_, it);
d->bibinfoCacheValid_ = true;
- }
- return d->bibinfo_;
+ }
}
if (!success)
return false;
+ if (d->cloned_buffer_) {
+ // Enable reverse dvi or pdf to work by copying back the texrow
+ // object to the cloned buffer.
+ // FIXME: There is a possibility of concurrent access to texrow
+ // here from the main GUI thread that should be securized.
+ d->cloned_buffer_->d->texrow = d->texrow;
+ }
+
if (put_in_tempdir) {
result_file = tmp_result_file.absFilename();
return true;