simple factory extension

fix bug noticed by Angus


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6480 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
André Pönitz 2003-03-13 11:00:31 +00:00
parent a915be94cb
commit e9c09e42d7
3 changed files with 11 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2003-03-13 André Pönitz <poenitz@gmx.net>
* factory.C: make it aware of InsetEnv
2003-03-13 Lars Gullik Bjønnes <larsbj@gullik.net> 2003-03-13 Lars Gullik Bjønnes <larsbj@gullik.net>
* text2.C (setCursor): never ask for one past last * text2.C (setCursor): never ask for one past last
@ -141,7 +146,7 @@
2003-03-11 André Pönitz <poenitz@gmx.net> 2003-03-11 André Pönitz <poenitz@gmx.net>
* factory.C: make it aware of InsetHFill (not active yet) * factory.C: make it aware of InsetHFill
2003-03-10 Lars Gullik Bjønnes <larsbj@birdstep.com> 2003-03-10 Lars Gullik Bjønnes <larsbj@birdstep.com>

View File

@ -23,6 +23,7 @@
#include "insets/insetbibtex.h" #include "insets/insetbibtex.h"
#include "insets/insetcaption.h" #include "insets/insetcaption.h"
#include "insets/insetcite.h" #include "insets/insetcite.h"
#include "insets/insetenv.h"
#include "insets/insetert.h" #include "insets/insetert.h"
#include "insets/insetexternal.h" #include "insets/insetexternal.h"
#include "insets/insetfloat.h" #include "insets/insetfloat.h"
@ -160,6 +161,9 @@ Inset * createInset(FuncRequest const & cmd)
return new InsetParent( return new InsetParent(
InsetCommandParams("lyxparent", cmd.argument), *bv->buffer()); InsetCommandParams("lyxparent", cmd.argument), *bv->buffer());
case LFUN_ENVIRONMENT_INSERT:
return new InsetEnvironment(params, cmd.argument);
#if 0 #if 0
case LFUN_INSET_LIST: case LFUN_INSET_LIST:
return new InsetList; return new InsetList;

View File

@ -51,7 +51,7 @@ Inset * InsetEnvironment::clone(Buffer const &, bool same_id) const
void InsetEnvironment::write(Buffer const * buf, ostream & os) const void InsetEnvironment::write(Buffer const * buf, ostream & os) const
{ {
os << "Environment" << getInsetName() << "\"\n"; os << "Environment " << getInsetName() << "\"\n";
InsetCollapsable::write(buf, os); InsetCollapsable::write(buf, os);
} }