mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-21 23:09:40 +00:00
read 'environment' tag in layout files
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6552 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
2307777829
commit
0f59ec1296
@ -1,3 +1,8 @@
|
||||
|
||||
2003-03-21 André Pönitz <poenitz@gmx.net>
|
||||
|
||||
* lyxtextclass.C: read 'environment' tag.
|
||||
|
||||
2003-03-20 Alfredo Braunstein <abraunst@libero.it>
|
||||
|
||||
* text2.C (removeRow): fix bug 964
|
||||
|
@ -92,6 +92,7 @@ enum TextClassTags {
|
||||
TC_INPUT,
|
||||
TC_STYLE,
|
||||
TC_DEFAULTSTYLE,
|
||||
TC_ENVIRONMENT,
|
||||
TC_NOSTYLE,
|
||||
TC_COLUMNS,
|
||||
TC_SIDES,
|
||||
@ -112,8 +113,7 @@ enum TextClassTags {
|
||||
TC_COUNTER,
|
||||
TC_NOFLOAT,
|
||||
TC_TITLELATEXNAME,
|
||||
TC_TITLELATEXTYPE,
|
||||
TC_ENVIRONMENT
|
||||
TC_TITLELATEXTYPE
|
||||
};
|
||||
|
||||
// Reads a textclass structure from file.
|
||||
@ -125,6 +125,7 @@ bool LyXTextClass::Read(string const & filename, bool merge)
|
||||
{ "counter", TC_COUNTER },
|
||||
{ "defaultfont", TC_DEFAULTFONT },
|
||||
{ "defaultstyle", TC_DEFAULTSTYLE },
|
||||
{ "environment", TC_ENVIRONMENT },
|
||||
{ "float", TC_FLOAT },
|
||||
{ "input", TC_INPUT },
|
||||
{ "leftmargin", TC_LEFTMARGIN },
|
||||
@ -156,7 +157,8 @@ bool LyXTextClass::Read(string const & filename, bool merge)
|
||||
<< MakeDisplayPath(filename)
|
||||
<< endl;
|
||||
|
||||
LyXLex lexrc(textClassTags, TC_TITLELATEXTYPE);
|
||||
LyXLex lexrc(textClassTags,
|
||||
sizeof(textClassTags) / sizeof(textClassTags[0]));
|
||||
bool error = false;
|
||||
|
||||
lexrc.setFile(filename);
|
||||
@ -218,7 +220,8 @@ bool LyXTextClass::Read(string const & filename, bool merge)
|
||||
LyXLayout lay;
|
||||
lay.setName(name);
|
||||
if (!(error = do_readStyle(lexrc, lay)))
|
||||
layoutlist_.push_back(boost::shared_ptr<LyXLayout>(new LyXLayout(lay)));
|
||||
layoutlist_.push_back
|
||||
(boost::shared_ptr<LyXLayout>(new LyXLayout(lay)));
|
||||
if (defaultlayout_.empty()) {
|
||||
// We do not have a default
|
||||
// layout yet, so we choose
|
||||
|
Loading…
x
Reference in New Issue
Block a user