mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-24 01:01:57 +00:00
* Buffer::changeRefsIfUnique(): Only used for CITE_CODE now.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23538 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
af3852b12c
commit
01d218fd0f
@ -2107,25 +2107,19 @@ void Buffer::changeRefsIfUnique(docstring const & from, docstring const & to,
|
|||||||
InsetCode code)
|
InsetCode code)
|
||||||
{
|
{
|
||||||
//FIXME: This does not work for child documents yet.
|
//FIXME: This does not work for child documents yet.
|
||||||
BOOST_ASSERT(code == CITE_CODE || code == REF_CODE);
|
BOOST_ASSERT(code == CITE_CODE);
|
||||||
// Check if the label 'from' appears more than once
|
// Check if the label 'from' appears more than once
|
||||||
vector<docstring> labels;
|
vector<docstring> labels;
|
||||||
|
|
||||||
string paramName;
|
string paramName;
|
||||||
if (code == CITE_CODE) {
|
BiblioInfo keys;
|
||||||
BiblioInfo keys;
|
keys.fillWithBibKeys(this);
|
||||||
keys.fillWithBibKeys(this);
|
BiblioInfo::const_iterator bit = keys.begin();
|
||||||
BiblioInfo::const_iterator bit = keys.begin();
|
BiblioInfo::const_iterator bend = keys.end();
|
||||||
BiblioInfo::const_iterator bend = keys.end();
|
|
||||||
|
|
||||||
for (; bit != bend; ++bit)
|
for (; bit != bend; ++bit)
|
||||||
// FIXME UNICODE
|
// FIXME UNICODE
|
||||||
labels.push_back(bit->first);
|
labels.push_back(bit->first);
|
||||||
paramName = "key";
|
paramName = "key";
|
||||||
} else {
|
|
||||||
getLabelList(labels);
|
|
||||||
paramName = "reference";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (count(labels.begin(), labels.end(), from) > 1)
|
if (count(labels.begin(), labels.end(), from) > 1)
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user