mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 19:07:45 +00:00
* 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:
parent
474979d32d
commit
2c0eaab164
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user