mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-10 18:58:10 +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_HTMLFORCECSS,
|
||||||
LT_INPREAMBLE,
|
LT_INPREAMBLE,
|
||||||
LT_HTMLTITLE,
|
LT_HTMLTITLE,
|
||||||
|
LT_SPELLCHECK,
|
||||||
LT_INTITLE // keep this last!
|
LT_INTITLE // keep this last!
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -146,6 +147,7 @@ Layout::Layout()
|
|||||||
htmllabelfirst_ = false;
|
htmllabelfirst_ = false;
|
||||||
htmlforcecss_ = false;
|
htmlforcecss_ = false;
|
||||||
htmltitle_ = false;
|
htmltitle_ = false;
|
||||||
|
spellcheck = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -213,6 +215,7 @@ bool Layout::read(Lexer & lex, TextClass const & tclass)
|
|||||||
{ "requires", LT_REQUIRES },
|
{ "requires", LT_REQUIRES },
|
||||||
{ "rightmargin", LT_RIGHTMARGIN },
|
{ "rightmargin", LT_RIGHTMARGIN },
|
||||||
{ "spacing", LT_SPACING },
|
{ "spacing", LT_SPACING },
|
||||||
|
{ "spellcheck", LT_SPELLCHECK },
|
||||||
{ "textfont", LT_TEXTFONT },
|
{ "textfont", LT_TEXTFONT },
|
||||||
{ "toclevel", LT_TOCLEVEL },
|
{ "toclevel", LT_TOCLEVEL },
|
||||||
{ "topsep", LT_TOPSEP }
|
{ "topsep", LT_TOPSEP }
|
||||||
@ -537,6 +540,10 @@ bool Layout::read(Lexer & lex, TextClass const & tclass)
|
|||||||
case LT_HTMLTITLE:
|
case LT_HTMLTITLE:
|
||||||
lex >> htmltitle_;
|
lex >> htmltitle_;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case LT_SPELLCHECK:
|
||||||
|
lex >> spellcheck;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
lex.popTable();
|
lex.popTable();
|
||||||
|
@ -253,6 +253,9 @@ public:
|
|||||||
/// until it has proper support for the caption inset (JMarc)
|
/// until it has proper support for the caption inset (JMarc)
|
||||||
static Layout * forCaption();
|
static Layout * forCaption();
|
||||||
|
|
||||||
|
/// Is this spellchecked?
|
||||||
|
bool spellcheck;
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/// generates the default CSS for this layout
|
/// generates the default CSS for this layout
|
||||||
|
@ -3165,7 +3165,7 @@ bool Paragraph::spellCheck(pos_type & from, pos_type & to, WordLangTuple & wl,
|
|||||||
if (!speller)
|
if (!speller)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (!inInset().allowSpellCheck())
|
if (!d->layout_->spellcheck || !inInset().allowSpellCheck())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
locateWord(from, to, WHOLE_WORD);
|
locateWord(from, to, WHOLE_WORD);
|
||||||
|
Loading…
Reference in New Issue
Block a user