X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fbuffer.C;h=e81bcc1d5f4f95306e3b5b4db7baf27e9ed6c951;hb=e4c3ce462791c85922d919f8859e3408f57d10fa;hp=691cd5fa178b957c5bf0b126e30733fcc9594c4f;hpb=21b0a4ab9b3694c223adfae8c943de651a94f81f;p=lyx.git diff --git a/src/buffer.C b/src/buffer.C index 691cd5fa17..e81bcc1d5f 100644 --- a/src/buffer.C +++ b/src/buffer.C @@ -1210,7 +1210,7 @@ void Buffer::getLabelList(vector & list) const // This is also a buffer property (ale) -void Buffer::fillWithBibKeys(vector > & keys) +void Buffer::fillWithBibKeys(vector > & keys) const { /// if this is a child document and the parent is already loaded @@ -1234,11 +1234,12 @@ void Buffer::fillWithBibKeys(vector > & keys) } else if (it->lyxCode() == InsetBase::BIBITEM_CODE) { InsetBibitem const & inset = dynamic_cast(*it); - string const key = inset.getContents(); - string const opt = inset.getOptions(); - string const ref; // = pit->asString(this, false); - string const info = opt + "TheBibliographyRef" + ref; - keys.push_back(pair(key, info)); + // FIXME UNICODE + string const key = to_utf8(inset.getParam("key")); + docstring const label = inset.getParam("label"); + docstring const ref; // = pit->asString(this, false); + docstring const info = label + "TheBibliographyRef" + ref; + keys.push_back(pair(key, info)); } } } @@ -1617,10 +1618,10 @@ void Buffer::changeRefsIfUnique(docstring const & from, docstring const & to, vector labels; if (code == InsetBase::CITE_CODE) { - vector > keys; + vector > keys; fillWithBibKeys(keys); - vector >::const_iterator bit = keys.begin(); - vector >::const_iterator bend = keys.end(); + vector >::const_iterator bit = keys.begin(); + vector >::const_iterator bend = keys.end(); for (; bit != bend; ++bit) // FIXME UNICODE @@ -1681,7 +1682,7 @@ void Buffer::getSourceCode(odocstream & os, pit_type par_begin, ErrorList const & Buffer::errorList(string const & type) const { static ErrorList const emptyErrorList; - std::map::const_iterator I = errorLists_.find(type); + std::map::const_iterator I = errorLists_.find(type); if (I == errorLists_.end()) return emptyErrorList;