mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-03 08:28:25 +00:00
Revert r35106.
Help needed here. Why isn't this equivalent? git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35108 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
9d09dca920
commit
350b82fd62
@ -1801,7 +1801,7 @@ void Buffer::checkBibInfoCache() const
|
|||||||
if (!d->bibinfo_cache_valid_) {
|
if (!d->bibinfo_cache_valid_) {
|
||||||
d->bibinfo_.clear();
|
d->bibinfo_.clear();
|
||||||
for (InsetIterator it = inset_iterator_begin(inset()); it; ++it)
|
for (InsetIterator it = inset_iterator_begin(inset()); it; ++it)
|
||||||
it->fillWithBibKeys(d->bibinfo_);
|
it->fillWithBibKeys(d->bibinfo_, it);
|
||||||
d->bibinfo_cache_valid_ = true;
|
d->bibinfo_cache_valid_ = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -478,7 +478,7 @@ public:
|
|||||||
/// pit is the ParConstIterator of the paragraph containing the inset
|
/// pit is the ParConstIterator of the paragraph containing the inset
|
||||||
virtual void addToToc(DocIterator const &) {}
|
virtual void addToToc(DocIterator const &) {}
|
||||||
/// Fill keys with BibTeX information
|
/// Fill keys with BibTeX information
|
||||||
virtual void fillWithBibKeys(BiblioInfo &) const {}
|
virtual void fillWithBibKeys(BiblioInfo &, InsetIterator const &) const {}
|
||||||
/// Update the counters of this inset and of its contents.
|
/// Update the counters of this inset and of its contents.
|
||||||
/// The boolean indicates whether we are preparing for output, e.g.,
|
/// The boolean indicates whether we are preparing for output, e.g.,
|
||||||
/// of XHTML.
|
/// of XHTML.
|
||||||
|
@ -258,17 +258,11 @@ docstring bibitemWidest(Buffer const & buffer, OutputParams const & runparams)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void InsetBibitem::fillWithBibKeys(BiblioInfo & keys) const
|
void InsetBibitem::fillWithBibKeys(BiblioInfo & keys, InsetIterator const & it) const
|
||||||
{
|
{
|
||||||
docstring const key = getParam("key");
|
docstring const key = getParam("key");
|
||||||
// false means it's not BibTeX
|
|
||||||
BibTeXInfo keyvalmap(false);
|
BibTeXInfo keyvalmap(false);
|
||||||
keyvalmap.label(bibLabel());
|
keyvalmap.label(bibLabel());
|
||||||
// The indirection here is a little annoying, but
|
|
||||||
// DocIterator(Buffer *, Inset *)
|
|
||||||
// is private.
|
|
||||||
InsetBibitem & me = const_cast<InsetBibitem &>(*this);
|
|
||||||
InsetIterator it(me);
|
|
||||||
DocIterator doc_it(it);
|
DocIterator doc_it(it);
|
||||||
doc_it.forwardPos();
|
doc_it.forwardPos();
|
||||||
keyvalmap[from_ascii("ref")] = doc_it.paragraph().asString();
|
keyvalmap[from_ascii("ref")] = doc_it.paragraph().asString();
|
||||||
|
@ -63,7 +63,7 @@ private:
|
|||||||
///
|
///
|
||||||
docstring xhtml(XHTMLStream &, OutputParams const &) const;
|
docstring xhtml(XHTMLStream &, OutputParams const &) const;
|
||||||
///
|
///
|
||||||
virtual void fillWithBibKeys(BiblioInfo &) const;
|
virtual void fillWithBibKeys(BiblioInfo &, InsetIterator const &) const;
|
||||||
/// Update the counter of this inset
|
/// Update the counter of this inset
|
||||||
void updateBuffer(ParIterator const &, UpdateType);
|
void updateBuffer(ParIterator const &, UpdateType);
|
||||||
///
|
///
|
||||||
|
@ -662,7 +662,8 @@ namespace {
|
|||||||
|
|
||||||
|
|
||||||
// This method returns a comma separated list of Bibtex entries
|
// This method returns a comma separated list of Bibtex entries
|
||||||
void InsetBibtex::fillWithBibKeys(BiblioInfo & keylist) const
|
void InsetBibtex::fillWithBibKeys(BiblioInfo & keylist,
|
||||||
|
InsetIterator const & /*di*/) const
|
||||||
{
|
{
|
||||||
// This bibtex parser is a first step to parse bibtex files
|
// This bibtex parser is a first step to parse bibtex files
|
||||||
// more precisely.
|
// more precisely.
|
||||||
|
@ -42,7 +42,7 @@ public:
|
|||||||
///
|
///
|
||||||
int latex(odocstream &, OutputParams const &) const;
|
int latex(odocstream &, OutputParams const &) const;
|
||||||
///
|
///
|
||||||
void fillWithBibKeys(BiblioInfo &) const;
|
void fillWithBibKeys(BiblioInfo &, InsetIterator const &) const;
|
||||||
///
|
///
|
||||||
support::FileNameList getBibFiles() const;
|
support::FileNameList getBibFiles() const;
|
||||||
///
|
///
|
||||||
|
@ -830,13 +830,12 @@ void InsetInclude::validate(LaTeXFeatures & features) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void InsetInclude::fillWithBibKeys(BiblioInfo & keys) const
|
void InsetInclude::fillWithBibKeys(BiblioInfo & keys,
|
||||||
|
InsetIterator const & /*di*/) const
|
||||||
{
|
{
|
||||||
if (loadIfNeeded()) {
|
if (loadIfNeeded()) {
|
||||||
string const included_file =
|
string const included_file = includedFileName(buffer(), params()).absFileName();
|
||||||
includedFileName(buffer(), params()).absFileName();
|
Buffer * tmp = theBufferList().getBuffer(FileName(included_file));
|
||||||
Buffer * tmp =
|
|
||||||
theBufferList().getBuffer(FileName(included_file));
|
|
||||||
BiblioInfo const & newkeys = tmp->localBibInfo();
|
BiblioInfo const & newkeys = tmp->localBibInfo();
|
||||||
keys.mergeBiblioInfo(newkeys);
|
keys.mergeBiblioInfo(newkeys);
|
||||||
}
|
}
|
||||||
|
@ -59,7 +59,7 @@ public:
|
|||||||
* \param keys the list of bibkeys in the child buffer.
|
* \param keys the list of bibkeys in the child buffer.
|
||||||
* \param it not used here
|
* \param it not used here
|
||||||
*/
|
*/
|
||||||
void fillWithBibKeys(BiblioInfo & keys) const;
|
void fillWithBibKeys(BiblioInfo & keys, InsetIterator const & it) const;
|
||||||
|
|
||||||
///
|
///
|
||||||
bool hasSettings() const { return true; }
|
bool hasSettings() const { return true; }
|
||||||
|
Loading…
Reference in New Issue
Block a user