From 01d218fd0f568d20b3af070b236cd55b9fb71c78 Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Fri, 7 Mar 2008 13:45:48 +0000 Subject: [PATCH] * 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 --- src/Buffer.cpp | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/src/Buffer.cpp b/src/Buffer.cpp index 2fa90f920c..67291703c9 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -2107,25 +2107,19 @@ void Buffer::changeRefsIfUnique(docstring const & from, docstring const & to, InsetCode code) { //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 vector labels; - string paramName; - if (code == CITE_CODE) { - BiblioInfo keys; - keys.fillWithBibKeys(this); - BiblioInfo::const_iterator bit = keys.begin(); - BiblioInfo::const_iterator bend = keys.end(); + BiblioInfo keys; + keys.fillWithBibKeys(this); + BiblioInfo::const_iterator bit = keys.begin(); + BiblioInfo::const_iterator bend = keys.end(); - for (; bit != bend; ++bit) - // FIXME UNICODE - labels.push_back(bit->first); - paramName = "key"; - } else { - getLabelList(labels); - paramName = "reference"; - } + for (; bit != bend; ++bit) + // FIXME UNICODE + labels.push_back(bit->first); + paramName = "key"; if (count(labels.begin(), labels.end(), from) > 1) return; -- 2.39.2