mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-24 21:55:29 +00:00
Add ResetsFont tag to InsetLayout, toward fixing bug #5657.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35626 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
a08ab87d1e
commit
85904c550d
@ -104,6 +104,9 @@ import os, re, string, sys
|
||||
# Changed Custom:Style, CharStyle:Style, and Element:Style
|
||||
# uniformly to Flex:Style.
|
||||
|
||||
# Incremented to format 30, 13 August 2010 by rgh
|
||||
# Introduced ResetsFont tag for InsetLayout.
|
||||
|
||||
# Do not forget to document format change in Customization
|
||||
# Manual (section "Declaring a new text class").
|
||||
|
||||
@ -111,7 +114,7 @@ import os, re, string, sys
|
||||
# development/tools/updatelayouts.sh script to update all
|
||||
# layout files to the new format.
|
||||
|
||||
currentFormat = 29
|
||||
currentFormat = 30
|
||||
|
||||
|
||||
def usage(prog_name):
|
||||
@ -286,6 +289,11 @@ def convert(lines):
|
||||
i += 1
|
||||
continue
|
||||
|
||||
# Only new features
|
||||
if format == 29:
|
||||
i += 1
|
||||
continue
|
||||
|
||||
if format == 28:
|
||||
match = re_InsetLayout.match(lines[i])
|
||||
if match:
|
||||
|
@ -60,7 +60,7 @@ namespace lyx {
|
||||
// development/updatelayouts.sh script, to update the format of
|
||||
// all of our layout files.
|
||||
//
|
||||
int const LAYOUT_FORMAT = 29;
|
||||
int const LAYOUT_FORMAT = 30;
|
||||
|
||||
namespace {
|
||||
|
||||
|
@ -38,7 +38,8 @@ InsetLayout::InsetLayout() :
|
||||
multipar_(true), custompars_(true), forceplain_(false),
|
||||
passthru_(false), parbreakisnewline_(false), freespacing_(false),
|
||||
keepempty_(false), forceltr_(false),
|
||||
needprotect_(false), intoc_(false), spellcheck_(true)
|
||||
needprotect_(false), intoc_(false), spellcheck_(true),
|
||||
resetsfont_(true)
|
||||
{
|
||||
labelfont_.setColor(Color_error);
|
||||
}
|
||||
@ -109,6 +110,7 @@ bool InsetLayout::read(Lexer & lex, TextClass const & tclass)
|
||||
IL_REQUIRES,
|
||||
IL_SPELLCHECK,
|
||||
IL_REFPREFIX,
|
||||
IL_RESETSFONT,
|
||||
IL_END
|
||||
};
|
||||
|
||||
@ -149,6 +151,7 @@ bool InsetLayout::read(Lexer & lex, TextClass const & tclass)
|
||||
{ "preamble", IL_PREAMBLE },
|
||||
{ "refprefix", IL_REFPREFIX },
|
||||
{ "requires", IL_REQUIRES },
|
||||
{ "resetsfont", IL_RESETSFONT },
|
||||
{ "spellcheck", IL_SPELLCHECK }
|
||||
};
|
||||
|
||||
@ -339,6 +342,9 @@ bool InsetLayout::read(Lexer & lex, TextClass const & tclass)
|
||||
case IL_SPELLCHECK:
|
||||
lex >> spellcheck_;
|
||||
break;
|
||||
case IL_RESETSFONT:
|
||||
lex >> resetsfont_;
|
||||
break;
|
||||
case IL_END:
|
||||
getout = true;
|
||||
break;
|
||||
|
@ -142,6 +142,8 @@ public:
|
||||
bool isInToc() const { return intoc_; }
|
||||
///
|
||||
bool spellcheck() const { return spellcheck_; }
|
||||
///
|
||||
bool resetsFont() const { return resetsfont_; }
|
||||
private:
|
||||
///
|
||||
void makeDefaultCSS() const;
|
||||
@ -228,6 +230,8 @@ private:
|
||||
bool intoc_;
|
||||
/// check spelling of this inset?
|
||||
bool spellcheck_;
|
||||
///
|
||||
bool resetsfont_;
|
||||
};
|
||||
|
||||
///
|
||||
|
Loading…
Reference in New Issue
Block a user