mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Remove InsetEnvironment. This is unfinished decade old stuff.
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg141609.html git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25479 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
13f95530be
commit
20b9e0ba93
@ -966,7 +966,6 @@ src_insets_header_files = Split('''
|
||||
InsetCommand.h
|
||||
InsetCommandParams.h
|
||||
InsetERT.h
|
||||
InsetEnvironment.h
|
||||
InsetExternal.h
|
||||
InsetFlex.h
|
||||
InsetFloat.h
|
||||
@ -1021,7 +1020,6 @@ src_insets_files = Split('''
|
||||
InsetCommand.cpp
|
||||
InsetCommandParams.cpp
|
||||
InsetERT.cpp
|
||||
InsetEnvironment.cpp
|
||||
InsetExternal.cpp
|
||||
InsetFlex.cpp
|
||||
InsetFloat.cpp
|
||||
|
@ -141,7 +141,7 @@ enum FuncCode
|
||||
LFUN_SERVER_NOTIFY,
|
||||
LFUN_SERVER_GOTO_FILE_ROW,
|
||||
LFUN_NOTE_INSERT,
|
||||
LFUN_ENVIRONMENT_INSERT, // unused as of 20060905
|
||||
LFUN_UI_TOGGLE,
|
||||
LFUN_KEYMAP_OFF,
|
||||
// 95
|
||||
LFUN_KEYMAP_PRIMARY,
|
||||
@ -399,7 +399,6 @@ enum FuncCode
|
||||
LFUN_MATH_MACRO_ADD_GREEDY_OPTIONAL_PARAM,
|
||||
LFUN_IN_MATHMACROTEMPLATE,
|
||||
LFUN_SCROLL,
|
||||
LFUN_UI_TOGGLE,
|
||||
LFUN_SPLIT_VIEW,
|
||||
// 310
|
||||
LFUN_COMPLETION_POPUP,
|
||||
|
@ -123,7 +123,6 @@ Layout::Layout()
|
||||
newline_allowed = true;
|
||||
free_spacing = false;
|
||||
pass_thru = false;
|
||||
is_environment = false;
|
||||
toclevel = NOT_IN_TOC;
|
||||
commanddepth = 0;
|
||||
}
|
||||
|
@ -194,14 +194,6 @@ public:
|
||||
bool free_spacing;
|
||||
///
|
||||
bool pass_thru;
|
||||
/**
|
||||
* Whether this layout was declared with "Environment xxx" as opposed
|
||||
* to "Style xxx". This is part of some unfinished generic environment
|
||||
* handling (see also InsetEnvironment) started by Andre. No layout
|
||||
* that is shipped with LyX has this flag set.
|
||||
* Don't confuse this with isEnvironment()!
|
||||
*/
|
||||
bool is_environment;
|
||||
/// show this in toc
|
||||
int toclevel;
|
||||
/// special value of toclevel for non-section layouts
|
||||
|
@ -1071,7 +1071,6 @@ void LyXAction::init()
|
||||
* \endvar
|
||||
*/
|
||||
{ LFUN_DEPTH_INCREMENT, "depth-increment", Noop, Edit },
|
||||
{ LFUN_ENVIRONMENT_INSERT, "environment-insert", Noop, Edit },
|
||||
|
||||
/*!
|
||||
* \var lyx::FuncCode lyx::LFUN_FONT_BOLD
|
||||
|
@ -493,7 +493,6 @@ SOURCEFILESINSETS = \
|
||||
insets/InsetCollapsable.cpp \
|
||||
insets/InsetCommand.cpp \
|
||||
insets/InsetCommandParams.cpp \
|
||||
insets/InsetEnvironment.cpp \
|
||||
insets/InsetERT.cpp \
|
||||
insets/InsetExternal.cpp \
|
||||
insets/InsetFlex.cpp \
|
||||
@ -548,7 +547,6 @@ HEADERFILESINSETS = \
|
||||
insets/InsetCommand.h \
|
||||
insets/InsetCommandParams.h \
|
||||
insets/InsetERT.h \
|
||||
insets/InsetEnvironment.h \
|
||||
insets/InsetExternal.h \
|
||||
insets/InsetFlex.h \
|
||||
insets/InsetFloat.h \
|
||||
|
@ -46,8 +46,6 @@
|
||||
#include "TextMetrics.h"
|
||||
#include "VSpace.h"
|
||||
|
||||
#include "insets/InsetEnvironment.h"
|
||||
|
||||
#include "mathed/InsetMathHull.h"
|
||||
|
||||
#include "support/lassert.h"
|
||||
@ -216,22 +214,6 @@ void Text::setLayout(Buffer const & buffer, pit_type start, pit_type end,
|
||||
void Text::setLayout(Cursor & cur, docstring const & layout)
|
||||
{
|
||||
LASSERT(this == cur.text(), /**/);
|
||||
// special handling of new environment insets
|
||||
BufferView & bv = cur.bv();
|
||||
BufferParams const & params = bv.buffer().params();
|
||||
Layout const & lyxlayout = params.documentClass()[layout];
|
||||
if (lyxlayout.is_environment) {
|
||||
// move everything in a new environment inset
|
||||
LYXERR(Debug::DEBUG, "setting layout " << to_utf8(layout));
|
||||
lyx::dispatch(FuncRequest(LFUN_LINE_BEGIN));
|
||||
lyx::dispatch(FuncRequest(LFUN_LINE_END_SELECT));
|
||||
lyx::dispatch(FuncRequest(LFUN_CUT));
|
||||
Inset * inset = new InsetEnvironment(bv.buffer(), layout);
|
||||
insertInset(cur, inset);
|
||||
//inset->edit(cur, true);
|
||||
//lyx::dispatch(FuncRequest(LFUN_PASTE));
|
||||
return;
|
||||
}
|
||||
|
||||
pit_type start = cur.selBegin().pit();
|
||||
pit_type end = cur.selEnd().pit() + 1;
|
||||
|
@ -1365,7 +1365,6 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
|
||||
case LFUN_LISTING_INSERT:
|
||||
case LFUN_MARGINALNOTE_INSERT:
|
||||
case LFUN_OPTIONAL_INSERT:
|
||||
case LFUN_ENVIRONMENT_INSERT:
|
||||
case LFUN_INDEX_INSERT:
|
||||
// Open the inset, and move the current selection
|
||||
// inside it.
|
||||
@ -1981,9 +1980,6 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & cmd,
|
||||
enable = cur.paragraph().insetList().count(OPTARG_CODE)
|
||||
< cur.paragraph().layout().optionalargs;
|
||||
break;
|
||||
case LFUN_ENVIRONMENT_INSERT:
|
||||
code = BOX_CODE;
|
||||
break;
|
||||
case LFUN_INDEX_INSERT:
|
||||
code = INDEX_CODE;
|
||||
break;
|
||||
|
@ -163,7 +163,6 @@ enum TextClassTags {
|
||||
TC_STYLE,
|
||||
TC_DEFAULTSTYLE,
|
||||
TC_INSETLAYOUT,
|
||||
TC_ENVIRONMENT,
|
||||
TC_NOSTYLE,
|
||||
TC_COLUMNS,
|
||||
TC_SIDES,
|
||||
@ -196,7 +195,6 @@ namespace {
|
||||
{ "counter", TC_COUNTER },
|
||||
{ "defaultfont", TC_DEFAULTFONT },
|
||||
{ "defaultstyle", TC_DEFAULTSTYLE },
|
||||
{ "environment", TC_ENVIRONMENT },
|
||||
{ "float", TC_FLOAT },
|
||||
{ "format", TC_FORMAT },
|
||||
{ "input", TC_INPUT },
|
||||
@ -386,7 +384,6 @@ TextClass::ReturnValues TextClass::read(Lexer & lexrc, ReadType rt)
|
||||
}
|
||||
break;
|
||||
|
||||
case TC_ENVIRONMENT:
|
||||
case TC_STYLE:
|
||||
if (lexrc.next()) {
|
||||
docstring const name = from_utf8(subst(lexrc.getString(),
|
||||
@ -405,8 +402,6 @@ TextClass::ReturnValues TextClass::read(Lexer & lexrc, ReadType rt)
|
||||
} else {
|
||||
Layout layout;
|
||||
layout.setName(name);
|
||||
if (le == TC_ENVIRONMENT)
|
||||
layout.is_environment = true;
|
||||
error = !readStyle(lexrc, layout);
|
||||
if (!error)
|
||||
layoutlist_.push_back(layout);
|
||||
|
@ -25,7 +25,6 @@
|
||||
#include "insets/InsetCaption.h"
|
||||
#include "insets/InsetCitation.h"
|
||||
#include "insets/InsetFlex.h"
|
||||
#include "insets/InsetEnvironment.h"
|
||||
#include "insets/InsetERT.h"
|
||||
#include "insets/InsetListings.h"
|
||||
#include "insets/InsetExternal.h"
|
||||
@ -207,9 +206,6 @@ Inset * createInsetHelper(Buffer & buf, FuncRequest const & cmd)
|
||||
case LFUN_TOC_INSERT:
|
||||
return new InsetTOC(InsetCommandParams(TOC_CODE));
|
||||
|
||||
case LFUN_ENVIRONMENT_INSERT:
|
||||
return new InsetEnvironment(buf, cmd.argument());
|
||||
|
||||
case LFUN_INFO_INSERT: {
|
||||
InsetInfo * inset = new InsetInfo(buf, to_utf8(cmd.argument()));
|
||||
inset->updateInfo();
|
||||
@ -521,9 +517,6 @@ Inset * readInset(Lexer & lex, Buffer const & buf)
|
||||
inset.reset(new InsetFlex(buf, s));
|
||||
} else if (tmptok == "Branch") {
|
||||
inset.reset(new InsetBranch(buf, InsetBranchParams()));
|
||||
} else if (tmptok == "Environment") {
|
||||
lex.next();
|
||||
inset.reset(new InsetEnvironment(buf, lex.getDocString()));
|
||||
} else if (tmptok == "ERT") {
|
||||
inset.reset(new InsetERT(buf));
|
||||
} else if (tmptok == "listings") {
|
||||
|
@ -94,7 +94,6 @@ static TranslatorMap const build_translator()
|
||||
InsetName("index_print", INDEX_PRINT_CODE),
|
||||
InsetName("nomencl_print", NOMENCL_PRINT_CODE),
|
||||
InsetName("optarg", OPTARG_CODE),
|
||||
InsetName("environment", ENVIRONMENT_CODE),
|
||||
InsetName("newline", NEWLINE_CODE),
|
||||
InsetName("line", LINE_CODE),
|
||||
InsetName("branch", BRANCH_CODE),
|
||||
|
@ -85,7 +85,7 @@ enum InsetCode {
|
||||
///
|
||||
OPTARG_CODE,
|
||||
///
|
||||
ENVIRONMENT_CODE,
|
||||
CELL_CODE,
|
||||
///
|
||||
NEWLINE_CODE,
|
||||
///
|
||||
@ -112,8 +112,6 @@ enum InsetCode {
|
||||
INFO_CODE, // 45
|
||||
///
|
||||
COLLAPSABLE_CODE,
|
||||
///
|
||||
CELL_CODE,
|
||||
};
|
||||
|
||||
} // namespace lyx
|
||||
|
@ -654,7 +654,6 @@ bool InsetCollapsable::getStatus(Cursor & cur, FuncRequest const & cmd,
|
||||
case LFUN_CAPTION_INSERT:
|
||||
case LFUN_DEPTH_DECREMENT:
|
||||
case LFUN_DEPTH_INCREMENT:
|
||||
case LFUN_ENVIRONMENT_INSERT:
|
||||
case LFUN_ERT_INSERT:
|
||||
case LFUN_FILE_INSERT:
|
||||
case LFUN_FLEX_INSERT:
|
||||
|
@ -816,10 +816,7 @@ void latexParagraphs(Buffer const & buf,
|
||||
was_title = false;
|
||||
}
|
||||
|
||||
if (layout.is_environment) {
|
||||
par = TeXOnePar(buf, text, par, os, texrow,
|
||||
runparams, everypar);
|
||||
} else if (layout.isEnvironment() ||
|
||||
if (layout.isEnvironment() ||
|
||||
!par->params().leftIndent().zero()) {
|
||||
par = TeXEnvironment(buf, text, par, os,
|
||||
texrow, runparams);
|
||||
|
Loading…
Reference in New Issue
Block a user