mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Add the spellcheck tag also to paragraph styles.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33469 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
bd57d5ea56
commit
947d3ffd80
@ -104,6 +104,7 @@ enum LayoutTags {
|
||||
LT_HTMLFORCECSS,
|
||||
LT_INPREAMBLE,
|
||||
LT_HTMLTITLE,
|
||||
LT_SPELLCHECK,
|
||||
LT_INTITLE // keep this last!
|
||||
};
|
||||
|
||||
@ -146,6 +147,7 @@ Layout::Layout()
|
||||
htmllabelfirst_ = false;
|
||||
htmlforcecss_ = false;
|
||||
htmltitle_ = false;
|
||||
spellcheck = true;
|
||||
}
|
||||
|
||||
|
||||
@ -213,6 +215,7 @@ bool Layout::read(Lexer & lex, TextClass const & tclass)
|
||||
{ "requires", LT_REQUIRES },
|
||||
{ "rightmargin", LT_RIGHTMARGIN },
|
||||
{ "spacing", LT_SPACING },
|
||||
{ "spellcheck", LT_SPELLCHECK },
|
||||
{ "textfont", LT_TEXTFONT },
|
||||
{ "toclevel", LT_TOCLEVEL },
|
||||
{ "topsep", LT_TOPSEP }
|
||||
@ -537,6 +540,10 @@ bool Layout::read(Lexer & lex, TextClass const & tclass)
|
||||
case LT_HTMLTITLE:
|
||||
lex >> htmltitle_;
|
||||
break;
|
||||
|
||||
case LT_SPELLCHECK:
|
||||
lex >> spellcheck;
|
||||
break;
|
||||
}
|
||||
}
|
||||
lex.popTable();
|
||||
|
@ -253,6 +253,9 @@ public:
|
||||
/// until it has proper support for the caption inset (JMarc)
|
||||
static Layout * forCaption();
|
||||
|
||||
/// Is this spellchecked?
|
||||
bool spellcheck;
|
||||
|
||||
|
||||
private:
|
||||
/// generates the default CSS for this layout
|
||||
|
@ -3165,7 +3165,7 @@ bool Paragraph::spellCheck(pos_type & from, pos_type & to, WordLangTuple & wl,
|
||||
if (!speller)
|
||||
return false;
|
||||
|
||||
if (!inInset().allowSpellCheck())
|
||||
if (!d->layout_->spellcheck || !inInset().allowSpellCheck())
|
||||
return false;
|
||||
|
||||
locateWord(from, to, WHOLE_WORD);
|
||||
|
Loading…
Reference in New Issue
Block a user