mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 21:40:19 +00:00
Fix bug, and introduce MultiPar parameter for flex insets
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20869 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
89c7ca6a28
commit
5a2deb94c3
@ -620,6 +620,7 @@ enum InsetLayoutTags {
|
|||||||
IL_LATEXPARAM,
|
IL_LATEXPARAM,
|
||||||
IL_LATEXTYPE,
|
IL_LATEXTYPE,
|
||||||
IL_LYXTYPE,
|
IL_LYXTYPE,
|
||||||
|
IL_MULTIPAR,
|
||||||
IL_PREAMBLE,
|
IL_PREAMBLE,
|
||||||
IL_END
|
IL_END
|
||||||
};
|
};
|
||||||
@ -638,6 +639,7 @@ void TextClass::readInsetLayout(Lexer & lexrc, docstring const & name)
|
|||||||
{ "latexparam", IL_LATEXPARAM },
|
{ "latexparam", IL_LATEXPARAM },
|
||||||
{ "latextype", IL_LATEXTYPE },
|
{ "latextype", IL_LATEXTYPE },
|
||||||
{ "lyxtype", IL_LYXTYPE },
|
{ "lyxtype", IL_LYXTYPE },
|
||||||
|
{ "multipar", IL_MULTIPAR },
|
||||||
{ "preamble", IL_PREAMBLE }
|
{ "preamble", IL_PREAMBLE }
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -649,10 +651,11 @@ void TextClass::readInsetLayout(Lexer & lexrc, docstring const & name)
|
|||||||
string decoration;
|
string decoration;
|
||||||
string latexname;
|
string latexname;
|
||||||
string latexparam;
|
string latexparam;
|
||||||
Font font(Font::ALL_INHERIT);
|
Font font(defaultfont());
|
||||||
Font labelfont(Font::ALL_INHERIT);
|
Font labelfont(defaultfont());
|
||||||
Color::color bgcolor(Color::background);
|
Color::color bgcolor(Color::background);
|
||||||
string preamble;
|
string preamble;
|
||||||
|
bool multipar(false);
|
||||||
|
|
||||||
bool getout = false;
|
bool getout = false;
|
||||||
while (!getout && lexrc.isOK()) {
|
while (!getout && lexrc.isOK()) {
|
||||||
@ -692,6 +695,10 @@ void TextClass::readInsetLayout(Lexer & lexrc, docstring const & name)
|
|||||||
labelfont.lyxRead(lexrc);
|
labelfont.lyxRead(lexrc);
|
||||||
labelfont.realize(defaultfont());
|
labelfont.realize(defaultfont());
|
||||||
break;
|
break;
|
||||||
|
case IL_MULTIPAR:
|
||||||
|
lexrc.next();
|
||||||
|
multipar = lexrc.getBool();
|
||||||
|
break;
|
||||||
case IL_FONT:
|
case IL_FONT:
|
||||||
font.lyxRead(lexrc);
|
font.lyxRead(lexrc);
|
||||||
font.realize(defaultfont());
|
font.realize(defaultfont());
|
||||||
@ -724,6 +731,7 @@ void TextClass::readInsetLayout(Lexer & lexrc, docstring const & name)
|
|||||||
il.latextype = latextype;
|
il.latextype = latextype;
|
||||||
il.latexname = latexname;
|
il.latexname = latexname;
|
||||||
il.latexparam = latexparam;
|
il.latexparam = latexparam;
|
||||||
|
il.multipar = multipar;
|
||||||
il.font = font;
|
il.font = font;
|
||||||
il.labelfont = labelfont;
|
il.labelfont = labelfont;
|
||||||
il.bgcolor = bgcolor;
|
il.bgcolor = bgcolor;
|
||||||
|
@ -45,6 +45,7 @@ public:
|
|||||||
Font labelfont;
|
Font labelfont;
|
||||||
Color::color bgcolor;
|
Color::color bgcolor;
|
||||||
std::string preamble;
|
std::string preamble;
|
||||||
|
bool multipar;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -137,7 +137,7 @@ bool InsetFlex::getStatus(Cursor & cur, FuncRequest const & cmd,
|
|||||||
// paragraph breaks not allowed in flex insets
|
// paragraph breaks not allowed in flex insets
|
||||||
case LFUN_BREAK_PARAGRAPH:
|
case LFUN_BREAK_PARAGRAPH:
|
||||||
case LFUN_BREAK_PARAGRAPH_SKIP:
|
case LFUN_BREAK_PARAGRAPH_SKIP:
|
||||||
status.enabled(false);
|
status.enabled(layout_.multipar);
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user