Remove obsolete layout tags.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38096 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2011-03-28 15:11:57 +00:00
parent de3c1f58a6
commit a72642a174
4 changed files with 13 additions and 20 deletions

View File

@ -116,6 +116,9 @@ import os, re, string, sys
# Incremented to format 33, 2 February 2011 by rgh
# Changed NeedsFloatPkg to UsesFloatPkg
# Incremented to format 34, 28 March 2011 by rgh
# Remove obsolete Fill_(Top|Bottom) tags
# Do not forget to document format change in Customization
# Manual (section "Declaring a new text class").
@ -123,7 +126,7 @@ import os, re, string, sys
# development/tools/updatelayouts.sh script to update all
# layout files to the new format.
currentFormat = 33
currentFormat = 34
def usage(prog_name):
@ -213,6 +216,7 @@ def convert(lines):
re_InsetLayout_CopyStyle = re.compile(r'^\s*CopyStyle\s+(?:Custom|CharStyle|Element):(\S+)\s*$')
re_QInsetLayout_CopyStyle = re.compile(r'^\s*CopyStyle\s+"(?:Custom|CharStyle|Element):([^"]+)"\s*$')
re_NeedsFloatPkg = re.compile(r'^(\s*)NeedsFloatPkg\s+(\w+)\s*$')
re_Fill = re.compile(r'^\s*Fill_(?:Top|Bottom).*$')
# counters for sectioning styles (hardcoded in 1.3)
counters = {"part" : "\\Roman{part}",
@ -301,6 +305,13 @@ def convert(lines):
i += 1
continue
if format == 33:
m = re_Fill.match(lines[i])
if m:
lines[i] = ""
i += 1
continue
if format == 32:
match = re_NeedsFloatPkg.match(lines[i])
if match:

View File

@ -51,8 +51,6 @@ enum LayoutTags {
LT_END,
//LT_ENVIRONMENT_DEFAULT,
//LT_FANCYHDR,
LT_FILL_BOTTOM,
LT_FILL_TOP,
//LT_FIRST_COUNTER,
LT_FONT,
LT_FREE_SPACING,
@ -141,8 +139,6 @@ Layout::Layout()
endlabeltype = END_LABEL_NO_LABEL;
// Should or should not. That is the question.
// spacing.set(Spacing::OneHalf);
fill_top = false;
fill_bottom = false;
newline_allowed = true;
free_spacing = false;
pass_thru = false;
@ -173,8 +169,6 @@ bool Layout::read(Lexer & lex, TextClass const & tclass)
{ "end", LT_END },
{ "endlabelstring", LT_ENDLABELSTRING },
{ "endlabeltype", LT_ENDLABELTYPE },
{ "fill_bottom", LT_FILL_BOTTOM },
{ "fill_top", LT_FILL_TOP },
{ "font", LT_FONT },
{ "freespacing", LT_FREE_SPACING },
{ "htmlattr", LT_HTMLATTR },
@ -450,14 +444,6 @@ bool Layout::read(Lexer & lex, TextClass const & tclass)
lex >> parsep;
break;
case LT_FILL_TOP: // fill top flag
lex >> fill_top;
break;
case LT_FILL_BOTTOM: // fill bottom flag
lex >> fill_bottom;
break;
case LT_NEWLINE: // newlines allowed?
lex >> newline_allowed;
break;

View File

@ -214,10 +214,6 @@ public:
///
MarginType margintype;
///
bool fill_top;
///
bool fill_bottom;
///
bool newline_allowed;
///
bool nextnoindent;

View File

@ -60,7 +60,7 @@ namespace lyx {
// development/updatelayouts.sh script, to update the format of
// all of our layout files.
//
int const LAYOUT_FORMAT = 33;
int const LAYOUT_FORMAT = 34;
namespace {