From 2c0eaab164a67b09f926c3957b028b12dc7288bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Spitzm=C3=BCller?= Date: Tue, 8 Jan 2008 07:29:47 +0000 Subject: [PATCH] * 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 --- src/TextClass.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/TextClass.cpp b/src/TextClass.cpp index 80798dd502..ae2dd9f220 100644 --- a/src/TextClass.cpp +++ b/src/TextClass.cpp @@ -35,6 +35,7 @@ #include + 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 req = getVectorFromString(packages); + if (requires_.empty()) { + requires_ = req; + break; + } + for (vector::const_iterator it = req.begin(); + it != req.end(); ++it) { + if (find(requires_.begin(), requires_.end(), *it) == requires_.end()) + requires_.push_back(*it); + } break; }