* src/TextClass.cpp:

- allow for multiple subsequent Requires class tags.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22428 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Spitzmüller 2008-01-08 07:29:47 +00:00
parent 474979d32d
commit 2c0eaab164

View File

@ -35,6 +35,7 @@
#include <sstream>
using namespace std;
using namespace lyx::support;
@ -396,7 +397,16 @@ bool TextClass::read(FileName const & filename, ReadType rt)
case TC_REQUIRES: {
lexrc.eatLine();
string const packages = lexrc.getString();
requires_ = getVectorFromString(packages);
vector<string> req = getVectorFromString(packages);
if (requires_.empty()) {
requires_ = req;
break;
}
for (vector<string>::const_iterator it = req.begin();
it != req.end(); ++it) {
if (find(requires_.begin(), requires_.end(), *it) == requires_.end())
requires_.push_back(*it);
}
break;
}