remove commented same_id functions, and also remove some const_casts

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7061 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Lars Gullik Bjønnes 2003-05-28 23:09:16 +00:00
parent a7c203c2ec
commit b2284c1a07
61 changed files with 30 additions and 524 deletions

View File

@ -1,3 +1,7 @@
2003-05-29 Lars Gullik Bjønnes <larsbj@gullik.net>
* tabular.[Ch]: delete commented same_id functions
2003-05-28 John Levon <levon@movementarian.org>
* lyxfunc.C: fix LFUN_ESCAPE (bug 1055)

View File

@ -1,3 +1,21 @@
2003-05-29 Lars Gullik Bjønnes <larsbj@gullik.net>
* insetwrap.C (clone): remove const_cast
* insetnote.C (clone): remove const_cast
* insetminipage.C (clone): remove const_cast
* insetmarginal.C (clone): remove const_cast
* insetfoot.C (clone): remove const_cast
* insetfloat.C (clone): remove const_cast
* insetert.C (clone): remove const_cast
* delete commented same_id functions from a lot of files.
2003-05-28 John Levon <levon@movementarian.org>
* insetcite.C:

View File

@ -47,18 +47,6 @@ Inset::Inset(Inset const & in)
}
// Inset::Inset(Inset const & in, bool same_id)
// : InsetBase(),
// top_x(0), top_baseline(0), scx(0), owner_(0),
// name_(in.name_), background_color_(in.background_color_)
// {
// if (same_id)
// id_ = in.id();
// else
// id_ = inset_id++;
// }
bool Inset::directWrite() const
{
return false;

View File

@ -160,8 +160,6 @@ public:
///
Inset(Inset const & in);
///
//Inset(Inset const & in, bool same_id);
///
virtual void dimension(BufferView *, LyXFont const &, Dimension &) const = 0;
///
int ascent(BufferView *, LyXFont const &) const;
@ -212,8 +210,6 @@ public:
///
virtual Inset * clone(Buffer const &) const = 0;
///
//virtual Inset * clone(Buffer const &, bool same_ids) const = 0;
/// returns true to override begin and end inset in file
virtual bool directWrite() const;

View File

@ -31,8 +31,6 @@ public:
///
Inset * clone(Buffer const &) const;
///
//Inset * clone(Buffer const &, bool same_id) const;
///
virtual dispatch_result localDispatch(FuncRequest const & cmd);
/** Currently \bibitem is used as a LyX2.x command,
so we need this method.

View File

@ -25,17 +25,11 @@ public:
///
InsetBibtex(InsetCommandParams const &);
///
//InsetBibtex(InsetCommandParams const &, bool same_id);
///
~InsetBibtex();
///
Inset * clone(Buffer const &) const {
return new InsetBibtex(params());
}
///
//Inset * clone(Buffer const &, bool same_id) const {
// return new InsetBibtex(params(), same_id);
//}
/// small wrapper for the time being
virtual dispatch_result localDispatch(FuncRequest const & cmd);
///

View File

@ -23,18 +23,12 @@ public:
///
InsetCitation(InsetCommandParams const &);
///
//InsetCitation(InsetCommandParams const &, bool same_id);
///
~InsetCitation();
///
Inset * clone(Buffer const &) const {
return new InsetCitation(params());
}
///
//Inset * clone(Buffer const &, bool same_id) const {
// return new InsetCitation(params(), same_id);
//}
///
string const getScreenLabel(Buffer const *) const;
///
EDITABLE editable() const { return IS_EDITABLE; }

View File

@ -71,21 +71,6 @@ InsetCollapsable::InsetCollapsable(InsetCollapsable const & in)
}
// InsetCollapsable::InsetCollapsable(InsetCollapsable const & in, bool same_id)
// : UpdatableInset(in, same_id), collapsed_(in.collapsed_),
// framecolor(in.framecolor), labelfont(in.labelfont), inset(in.inset),
// button_length(0), button_top_y(0), button_bottom_y(0),
// label(in.label),
// #if 0
// autocollapse(in.autocollapse),
// #endif
// oldWidth(0), in_update(false), first_after_edit(false)
// {
// inset.init(&(in.inset), same_id);
// inset.setOwner(this);
// }
bool InsetCollapsable::insertInset(BufferView * bv, Inset * in)
{
if (!insetAllowed(in->lyxCode())) {

View File

@ -41,8 +41,6 @@ public:
///
InsetCollapsable(InsetCollapsable const & in);
///
//InsetCollapsable(InsetCollapsable const & in, bool same_id);
///
void read(Buffer const *, LyXLex &);
///
void write(Buffer const *, std::ostream &) const;

View File

@ -33,9 +33,6 @@ public:
explicit
InsetCommand(InsetCommandParams const &);
///
//explicit
//InsetCommand(InsetCommandParams const &, bool same_id);
///
void write(Buffer const *, std::ostream & os) const
{ p_.write(os); }
///

View File

@ -40,23 +40,12 @@ InsetEnvironment::InsetEnvironment(InsetEnvironment const & in)
{}
// InsetEnvironment::InsetEnvironment(InsetEnvironment const & in, bool same_id)
// : InsetText(in, same_id), layout_(in.layout_)
// {}
Inset * InsetEnvironment::clone(Buffer const &) const
{
return new InsetEnvironment(*this);
}
// Inset * InsetEnvironment::clone(Buffer const &, bool same_id) const
// {
// return new InsetEnvironment(*this, same_id);
// }
void InsetEnvironment::write(Buffer const * buf, ostream & os) const
{
os << "Environment " << getInsetName() << "\n";

View File

@ -22,16 +22,12 @@ public:
///
InsetEnvironment(InsetEnvironment const &);
///
//InsetEnvironment(InsetEnvironment const &, bool same_id);
///
void write(Buffer const * buf, std::ostream & os) const;
///
void read(Buffer const * buf, LyXLex & lex);
///
Inset * clone(Buffer const &) const;
///
//Inset * clone(Buffer const &, bool same_id) const;
///
Inset::Code lyxCode() const { return Inset::ENVIRONMENT_CODE; }
///
int latex(Buffer const *, std::ostream &,

View File

@ -26,9 +26,6 @@ public:
explicit
InsetError(string const &);
///
//explicit
//InsetError(string const &, bool same_id);
///
~InsetError();
///
virtual dispatch_result localDispatch(FuncRequest const & cmd);
@ -60,10 +57,6 @@ public:
return new InsetError(contents);
}
///
//Inset * clone(Buffer const &, bool same_id) const {
// return new InsetError(contents, same_id);
//}
///
Inset::Code lyxCode() const { return Inset::ERROR_CODE; }
/// We don't want "begin" and "end inset" in lyx-file
bool directWrite() const { return true; };

View File

@ -70,25 +70,12 @@ InsetERT::InsetERT(InsetERT const & in)
}
// InsetERT::InsetERT(InsetERT const & in, bool same_id)
// : InsetCollapsable(in, same_id), status_(in.status_)
// {
// init();
// }
Inset * InsetERT::clone(Buffer const &) const
{
return new InsetERT(*const_cast<InsetERT *>(this));
return new InsetERT(*this);
}
// Inset * InsetERT::clone(Buffer const &, bool same_id) const
// {
// return new InsetERT(*const_cast<InsetERT *>(this), same_id);
// }
InsetERT::InsetERT(BufferParams const & bp,
Language const * l, string const & contents, bool collapsed)
: InsetCollapsable(bp, collapsed)

View File

@ -40,12 +40,8 @@ public:
///
InsetERT(InsetERT const &);
///
//InsetERT(InsetERT const &, bool same_id);
///
Inset * clone(Buffer const &) const;
///
//Inset * clone(Buffer const &, bool same_id) const;
///
InsetERT(BufferParams const &,
Language const *, string const & contents, bool collapsed);
///

View File

@ -232,17 +232,6 @@ Inset * InsetExternal::clone(Buffer const &) const
}
// Inset * InsetExternal::clone(Buffer const &, bool same_id) const
// {
// InsetExternal * inset = new InsetExternal;
// inset->params_ = params_;
// inset->view_ = view_;
// if (same_id)
// inset->id_ = id_;
// return inset;
// }
string const InsetExternal::getScreenLabel(Buffer const *) const
{
ExternalTemplate const & et = params_.templ;

View File

@ -70,8 +70,6 @@ public:
///
virtual Inset * clone(Buffer const &) const;
///
//virtual Inset * clone(Buffer const &, bool same_id) const;
/// returns the text of the button
virtual string const getScreenLabel(Buffer const *) const;

View File

@ -150,11 +150,6 @@ InsetFloat::InsetFloat(InsetFloat const & in)
{}
// InsetFloat::InsetFloat(InsetFloat const & in, bool same_id)
// : InsetCollapsable(in, same_id), params_(in.params_)
// {}
InsetFloat::~InsetFloat()
{
InsetFloatMailer mailer(*this);
@ -266,16 +261,10 @@ void InsetFloat::validate(LaTeXFeatures & features) const
Inset * InsetFloat::clone(Buffer const &) const
{
return new InsetFloat(*const_cast<InsetFloat *>(this));
return new InsetFloat(*this);
}
// Inset * InsetFloat::clone(Buffer const &, bool same_id) const
// {
// return new InsetFloat(*const_cast<InsetFloat *>(this), same_id);
// }
string const InsetFloat::editMessage() const
{
return _("Opened Float Inset");

View File

@ -43,8 +43,6 @@ public:
///
InsetFloat(InsetFloat const &);
///
//InsetFloat(InsetFloat const &, bool same_id);
///
~InsetFloat();
///
virtual dispatch_result localDispatch(FuncRequest const & cmd);
@ -57,8 +55,6 @@ public:
///
Inset * clone(Buffer const &) const;
///
//Inset * clone(Buffer const &, bool same_id) const;
///
Inset::Code lyxCode() const { return Inset::FLOAT_CODE; }
///
int latex(Buffer const *, std::ostream &,

View File

@ -46,26 +46,12 @@ InsetFoot::InsetFoot(InsetFoot const & in)
}
// InsetFoot::InsetFoot(InsetFoot const & in, bool same_id)
// : InsetFootlike(in, same_id)
// {
// setLabel(_("foot"));
// setInsetName("Foot");
// }
Inset * InsetFoot::clone(Buffer const &) const
{
return new InsetFoot(*const_cast<InsetFoot *>(this));
return new InsetFoot(*this);
}
// Inset * InsetFoot::clone(Buffer const &, bool same_id) const
// {
// return new InsetFoot(*const_cast<InsetFoot *>(this), same_id);
// }
string const InsetFoot::editMessage() const
{
return _("Opened Footnote Inset");

View File

@ -27,12 +27,8 @@ public:
///
InsetFoot(InsetFoot const &);
///
//InsetFoot(InsetFoot const &, bool same_id);
///
Inset * clone(Buffer const &) const;
///
//Inset * clone(Buffer const &, bool same_id) const;
///
Inset::Code lyxCode() const { return Inset::FOOT_CODE; }
///
int latex(Buffer const *, std::ostream &,

View File

@ -43,17 +43,6 @@ InsetFootlike::InsetFootlike(InsetFootlike const & in)
}
// InsetFootlike::InsetFootlike(InsetFootlike const & in, bool same_id)
// : InsetCollapsable(in, same_id)
// {
// LyXFont font(LyXFont::ALL_SANE);
// font.decSize();
// font.decSize();
// font.setColor(LColor::collapsable);
// setLabelFont(font);
// }
void InsetFootlike::write(Buffer const * buf, ostream & os) const
{
os << getInsetName() << "\n";

View File

@ -24,8 +24,6 @@ public:
///
InsetFootlike(InsetFootlike const &);
///
//InsetFootlike(InsetFootlike const &, bool same_id);
///
void write(Buffer const * buf, std::ostream & os) const;
///
bool insetAllowed(Inset::Code) const;

View File

@ -202,29 +202,12 @@ InsetGraphics::InsetGraphics(InsetGraphics const & ig,
}
// InsetGraphics::InsetGraphics(InsetGraphics const & ig,
// string const & filepath,
// bool same_id)
// : Inset(ig, same_id),
// graphic_label(uniqueID()),
// cache_(new Cache(*this))
// {
// setParams(ig.params(), filepath);
// }
Inset * InsetGraphics::clone(Buffer const & buffer) const
{
return new InsetGraphics(*this, buffer.filePath());
}
// Inset * InsetGraphics::clone(Buffer const & buffer, bool same_id) const
// {
// return new InsetGraphics(*this, buffer.filePath(), same_id);
// }
InsetGraphics::~InsetGraphics()
{
InsetGraphicsMailer mailer(*this);

View File

@ -30,9 +30,6 @@ public:
///
InsetGraphics(InsetGraphics const &, string const & filepath);
///
//InsetGraphics(InsetGraphics const &, string const & filepath,
// bool same_id);
///
~InsetGraphics();
///
virtual dispatch_result localDispatch(FuncRequest const & cmd);
@ -70,8 +67,6 @@ public:
///
virtual Inset * clone(Buffer const &) const;
///
//virtual Inset * clone(Buffer const &, bool same_id) const;
/** Set the inset parameters, used by the GUIndependent dialog.
Return true of new params are different from what was so far.

View File

@ -21,13 +21,9 @@ public:
InsetHFill();
///
virtual Inset * clone(Buffer const &) const {
return new InsetHFill();
return new InsetHFill;
}
///
//virtual Inset * clone(Buffer const &, bool /*same_id*/) const {
// return new InsetHFill();
//}
///
string const getScreenLabel(Buffer const *) const { return getContents(); }
///
Inset::Code lyxCode() const { return Inset::HFILL_CODE; }

View File

@ -76,8 +76,6 @@ public:
///
virtual Inset * clone(Buffer const &) const;
///
//virtual Inset * clone(Buffer const &, bool same_id) const;
///
Inset::Code lyxCode() const { return Inset::INCLUDE_CODE; }
/// This returns the list of labels on the child buffer
std::vector<string> const getLabelList() const;

View File

@ -24,18 +24,12 @@ public:
///
InsetIndex(InsetCommandParams const &);
///
//InsetIndex(InsetCommandParams const &, bool same_id);
///
~InsetIndex();
///
virtual Inset * clone(Buffer const &) const {
return new InsetIndex(params());
}
///
//virtual Inset * clone(Buffer const &, bool same_id) const {
// return new InsetIndex(params(), same_id);
//}
///
dispatch_result localDispatch(FuncRequest const & cmd);
///
string const getScreenLabel(Buffer const *) const;
@ -53,18 +47,12 @@ public:
///
InsetPrintIndex(InsetCommandParams const &);
///
//InsetPrintIndex(InsetCommandParams const &, bool same_id);
///
~InsetPrintIndex();
///
Inset * clone(Buffer const &) const {
return new InsetPrintIndex(params());
}
///
//Inset * clone(Buffer const &, bool same_id) const {
// return new InsetPrintIndex(params(), same_id);
//}
///
//dispatch_result localDispatch(FuncRequest const & cmd);
/// Updates needed features for this inset.
void validate(LaTeXFeatures & features) const;

View File

@ -20,18 +20,12 @@ public:
///
InsetLabel(InsetCommandParams const &);
///
//InsetLabel(InsetCommandParams const &, bool same_id);
///
~InsetLabel();
///
virtual Inset * clone(Buffer const &) const {
return new InsetLabel(params());
}
///
//virtual Inset * clone(Buffer const &, bool same_id) const {
// return new InsetLabel(params(), same_id);
//}
///
virtual dispatch_result localDispatch(FuncRequest const & cmd);
///
string const getScreenLabel(Buffer const *) const { return getContents(); }

View File

@ -62,8 +62,6 @@ public:
///
virtual Inset * clone(Buffer const &) const;
///
//virtual Inset * clone(Buffer const &, bool same_id) const;
///
Inset::Code lyxCode()const;
///
inline bool canDisplay();

View File

@ -41,26 +41,12 @@ InsetMarginal::InsetMarginal(InsetMarginal const & in)
}
// InsetMarginal::InsetMarginal(InsetMarginal const & in, bool same_id)
// : InsetFootlike(in, same_id)
// {
// setLabel(_("margin"));
// setInsetName("Marginal");
// }
Inset * InsetMarginal::clone(Buffer const &) const
{
return new InsetMarginal(*const_cast<InsetMarginal *>(this));
return new InsetMarginal(*this);
}
// Inset * InsetMarginal::clone(Buffer const &, bool same_id) const
// {
// return new InsetMarginal(*const_cast<InsetMarginal *>(this), same_id);
// }
string const InsetMarginal::editMessage() const
{
return _("Opened Marginal Note Inset");

View File

@ -26,12 +26,8 @@ public:
///
InsetMarginal(InsetMarginal const &);
///
//InsetMarginal(InsetMarginal const &, bool same_id);
///
Inset * clone(Buffer const &) const;
///
//Inset * clone(Buffer const &, bool same_id) const;
///
Inset::Code lyxCode() const { return Inset::MARGIN_CODE; }
///
int latex(Buffer const *, std::ostream &,

View File

@ -93,23 +93,12 @@ InsetMinipage::InsetMinipage(InsetMinipage const & in)
{}
// InsetMinipage::InsetMinipage(InsetMinipage const & in, bool same_id)
// : InsetCollapsable(in, same_id), params_(in.params_)
// {}
Inset * InsetMinipage::clone(Buffer const &) const
{
return new InsetMinipage(*const_cast<InsetMinipage *>(this));
return new InsetMinipage(*this);
}
// Inset * InsetMinipage::clone(Buffer const &, bool same_id) const
// {
// return new InsetMinipage(*const_cast<InsetMinipage *>(this), same_id);
// }
InsetMinipage::~InsetMinipage()
{
InsetMinipageMailer mailer(*this);

View File

@ -58,8 +58,6 @@ public:
///
InsetMinipage(InsetMinipage const &);
///
//InsetMinipage(InsetMinipage const &, bool same_id);
///
~InsetMinipage();
///
virtual dispatch_result localDispatch(FuncRequest const & cmd);
@ -70,8 +68,6 @@ public:
///
Inset * clone(Buffer const &) const;
///
//Inset * clone(Buffer const &, bool same_id) const;
///
void dimension(BufferView *, LyXFont const &, Dimension &) const;
///
Inset::Code lyxCode() const { return Inset::MINIPAGE_CODE; }

View File

@ -24,11 +24,6 @@ public:
return new InsetNewline;
}
//virtual Inset * clone(Buffer const &, bool same_id) const {
// return new InsetNewline;
//}
Inset::Code lyxCode() const { return Inset::NEWLINE_CODE; }
void dimension(BufferView *, LyXFont const &, Dimension &) const;

View File

@ -53,25 +53,12 @@ InsetNote::InsetNote(InsetNote const & in)
}
// InsetNote::InsetNote(InsetNote const & in, bool same_id)
// : InsetCollapsable(in, same_id)
// {
// init();
// }
Inset * InsetNote::clone(Buffer const &) const
{
return new InsetNote(*const_cast<InsetNote *>(this));
return new InsetNote(*this);
}
// Inset * InsetNote::clone(Buffer const &, bool same_id) const
// {
// return new InsetNote(*const_cast<InsetNote *>(this), same_id);
// }
string const InsetNote::editMessage() const
{
return _("Opened Note Inset");

View File

@ -25,12 +25,8 @@ public:
///
InsetNote(InsetNote const &);
///
//InsetNote(InsetNote const &, bool same_id);
///
Inset * clone(Buffer const &) const;
///
//Inset * clone(Buffer const &, bool same_id) const;
///
string const editMessage() const;
///
Inset::Code lyxCode() const { return Inset::NOTE_CODE; }

View File

@ -47,28 +47,12 @@ InsetOptArg::InsetOptArg(InsetOptArg const & in)
}
// InsetOptArg::InsetOptArg(InsetOptArg const & in, bool same_id)
// : InsetCollapsable(in, same_id)
// {
// LyXFont font(LyXFont::ALL_SANE);
// font.setColor(LColor::collapsable);
// setLabelFont(font);
// setLabel(_("opt"));
// }
Inset * InsetOptArg::clone(Buffer const &) const
{
return new InsetOptArg(*this);
}
// Inset * InsetOptArg::clone(Buffer const &, bool same_id) const
// {
// return new InsetOptArg(*this, same_id);
// }
string const InsetOptArg::editMessage() const
{
return _("Opened Optional Argument Inset");

View File

@ -26,13 +26,8 @@ public:
InsetOptArg(BufferParams const &);
InsetOptArg(InsetOptArg const &);
//InsetOptArg(InsetOptArg const &, bool same_id);
/// make a duplicate of this inset
Inset * clone(Buffer const &) const;
/// make a duplicate of this inset
//Inset * clone(Buffer const &, bool same_id) const;
/// this inset is editable
EDITABLE editable() const { return IS_EDITABLE; }
/// code of the inset

View File

@ -27,16 +27,10 @@ public:
///
InsetParent(InsetCommandParams const &, Buffer const &);
///
//InsetParent(InsetCommandParams const &, Buffer const &, bool same_id);
///
virtual Inset * clone(Buffer const & buffer) const {
return new InsetParent(params(), buffer);
}
///
//virtual Inset * clone(Buffer const & buffer, bool same_id) const {
// return new InsetParent(params(), buffer, same_id);
//}
///
dispatch_result localDispatch(FuncRequest const & cmd);
///
string const getScreenLabel(Buffer const *) const;

View File

@ -69,9 +69,6 @@ public:
InsetQuotes(char c, BufferParams const & params);
///
Inset * clone(Buffer const &) const;
///
//Inset * clone(Buffer const &, bool same_id) const;
///
void dimension(BufferView *, LyXFont const &, Dimension &) const;
///

View File

@ -38,18 +38,12 @@ public:
///
InsetRef(InsetCommandParams const &, Buffer const &);
///
//InsetRef(InsetCommandParams const &, Buffer const &, bool same_id);
///
~InsetRef();
///
virtual Inset * clone(Buffer const & buffer) const {
return new InsetRef(params(), buffer);
}
///
//virtual Inset * clone(Buffer const & buffer, bool same_id) const {
// return new InsetRef(params(), buffer, same_id);
//}
///
dispatch_result localDispatch(FuncRequest const & cmd);
///
string const getScreenLabel(Buffer const *) const;

View File

@ -73,8 +73,6 @@ public:
///
virtual Inset * clone(Buffer const &) const;
///
//virtual Inset * clone(Buffer const &, bool same_id) const;
///
Inset::Code lyxCode() const { return Inset::SPACE_CODE; }
/// We don't need \begin_inset and \end_inset
bool directWrite() const { return true; }

View File

@ -65,8 +65,6 @@ public:
///
virtual Inset * clone(Buffer const &) const;
///
//virtual Inset * clone(Buffer const &, bool same_id) const;
///
Inset::Code lyxCode() const { return Inset::SPECIALCHAR_CODE; }
/// We don't need \begin_inset and \end_inset
bool directWrite() const { return true; }

View File

@ -193,26 +193,6 @@ InsetTabular::InsetTabular(InsetTabular const & tab, Buffer const & buf)
}
// InsetTabular::InsetTabular(InsetTabular const & tab, Buffer const & buf,
// bool same_id)
// : UpdatableInset(tab, same_id), buffer(&buf)
// {
// tabular.reset(new LyXTabular(buf.params,
// this, *(tab.tabular), same_id));
// the_locking_inset = 0;
// old_locking_inset = 0;
// locked = false;
// oldcell = -1;
// actrow = actcell = 0;
// clearSelection();
// need_update = INIT;
// in_update = false;
// in_reset_pos = 0;
// inset_x = 0;
// inset_y = 0;
// }
InsetTabular::~InsetTabular()
{
InsetTabularMailer mailer(*this);
@ -226,12 +206,6 @@ Inset * InsetTabular::clone(Buffer const & buf) const
}
// Inset * InsetTabular::clone(Buffer const & buf, bool same_id) const
// {
// return new InsetTabular(*this, buf, same_id);
// }
BufferView * InsetTabular::view() const
{
return buffer->getUser();

View File

@ -78,14 +78,10 @@ public:
///
InsetTabular(InsetTabular const &, Buffer const &);
///
//InsetTabular(InsetTabular const &, Buffer const &, bool same_id);
///
~InsetTabular();
///
Inset * clone(Buffer const &) const;
///
//Inset * clone(Buffer const &, bool same_id) const;
///
void read(Buffer const *, LyXLex &);
///
void write(Buffer const *, std::ostream &) const;

View File

@ -155,14 +155,6 @@ InsetText::InsetText(InsetText const & in)
}
// InsetText::InsetText(InsetText const & in, bool same_id)
// : UpdatableInset(in, same_id), lt(0), in_update(false), do_resize(0),
// do_reinit(false)
// {
// init(&in, same_id);
// }
InsetText & InsetText::operator=(InsetText const & it)
{
init(&it);
@ -201,39 +193,6 @@ void InsetText::init(InsetText const * ins)
}
// void InsetText::init(InsetText const * ins, bool same_id)
// {
// if (ins) {
// setParagraphData(ins->paragraphs, same_id);
// autoBreakRows = ins->autoBreakRows;
// drawFrame_ = ins->drawFrame_;
// frame_color = ins->frame_color;
// if (same_id)
// id_ = ins->id_;
// } else {
// for_each(paragraphs.begin(), paragraphs.end(),
// boost::bind(&Paragraph::setInsetOwner, _1, this));
// the_locking_inset = 0;
// drawFrame_ = NEVER;
// frame_color = LColor::insetframe;
// autoBreakRows = false;
// }
// top_y = 0;
// old_max_width = 0;
// no_selection = true;
// need_update = FULL;
// drawTextXOffset = 0;
// drawTextYOffset = 0;
// locked = false;
// old_par = 0;
// last_drawn_width = -1;
// cached_bview = 0;
// sstate.lpar = 0;
// in_insetAllowed = false;
// }
InsetText::~InsetText()
{
paragraphs.clear();
@ -271,12 +230,6 @@ Inset * InsetText::clone(Buffer const &) const
}
// Inset * InsetText::clone(Buffer const &, bool same_id) const
// {
// return new InsetText(*this, same_id);
// }
void InsetText::write(Buffer const * buf, ostream & os) const
{
os << "Text\n";
@ -2008,46 +1961,6 @@ void InsetText::setParagraphData(ParagraphList const & plist)
}
// void InsetText::setParagraphData(ParagraphList const & plist, bool same_id)
// {
// // we have to unlock any locked inset otherwise we're in troubles
// the_locking_inset = 0;
// #warning CHECK not adhering to same_id here might wreck havoc (Lgb)
// // But it it makes no difference that is a lot better.
// if (same_id) {
// lyxerr << "Same_id called with 'true'" << endl;
// lyxerr << "Please report this to the list." << endl;
// paragraphs.clear();
// ParagraphList::iterator it = plist.begin();
// ParagraphList::iterator end = plist.end();
// for (; it != end; ++it) {
// int const id = it->id();
// paragraphs.push_back(*it);
// Paragraph & tmp = paragraphs.back();
// tmp.setInsetOwner(this);
// tmp.id(id);
// }
// } else {
// #warning FIXME.
// // See if this can be simplified when std::list is in effect.
// paragraphs.clear();
// ParagraphList::iterator it = plist.begin();
// ParagraphList::iterator end = plist.end();
// for (; it != end; ++it) {
// paragraphs.push_back(*it);
// Paragraph & tmp = paragraphs.back();
// tmp.setInsetOwner(this);
// }
// }
// reinitLyXText();
// need_update = INIT;
// }
void InsetText::markNew(bool track_changes)
{
ParagraphList::iterator pit = paragraphs.begin();

View File

@ -75,15 +75,10 @@ public:
explicit
InsetText(InsetText const &);
///
//explicit
//InsetText(InsetText const &, bool same_id);
///
~InsetText();
///
Inset * clone(Buffer const &) const;
///
//Inset * clone(Buffer const &, bool same_id) const;
///
InsetText & operator=(InsetText const & it);
/// empty inset to empty par, or just mark as erased
void clear(bool just_mark_erased);
@ -154,14 +149,10 @@ public:
///
void init(InsetText const * ins);
///
//void init(InsetText const * ins, bool same_id);
///
void writeParagraphData(Buffer const *, std::ostream &) const;
///
void setParagraphData(ParagraphList const &);
///
//void setParagraphData(ParagraphList const &, bool same_id);
///
void setText(string const &, LyXFont const &);
///
void setAutoBreakRows(bool);

View File

@ -27,8 +27,6 @@ public:
///
virtual Inset * clone(Buffer const &) const;
///
//virtual Inset * clone(Buffer const &, bool same_id) const;
///
Inset::Code lyxCode() const { return Inset::THEOREM_CODE; }
///
bool display() const { return true; }

View File

@ -28,11 +28,6 @@ InsetTOC::InsetTOC(InsetCommandParams const & p)
{}
// InsetTOC::InsetTOC(InsetCommandParams const & p, bool same_id)
// : InsetCommand(p, same_id)
// {}
InsetTOC::~InsetTOC()
{
InsetCommandMailer mailer("toc", *this);

View File

@ -22,18 +22,12 @@ public:
///
InsetTOC(InsetCommandParams const &);
///
//InsetTOC(InsetCommandParams const &, bool same_id);
///
~InsetTOC();
///
virtual Inset * clone(Buffer const &) const {
return new InsetTOC(params());
}
///
//virtual Inset * clone(Buffer const &, bool same_id) const {
// return new InsetTOC(params(), same_id);
//}
///
dispatch_result localDispatch(FuncRequest const & cmd);
///
string const getScreenLabel(Buffer const *) const;

View File

@ -25,19 +25,12 @@ public:
explicit
InsetUrl(InsetCommandParams const &);
///
//explicit
//InsetUrl(InsetCommandParams const &, bool same_id);
///
~InsetUrl();
///
virtual Inset * clone(Buffer const &) const {
return new InsetUrl(params());
}
///
//virtual Inset * clone(Buffer const &, bool same_id) const {
// return new InsetUrl(params(), same_id);
//}
///
dispatch_result localDispatch(FuncRequest const & cmd);
///
Inset::Code lyxCode() const { return Inset::URL_CODE; }

View File

@ -80,11 +80,6 @@ InsetWrap::InsetWrap(InsetWrap const & in)
{}
// InsetWrap::InsetWrap(InsetWrap const & in, bool same_id)
// : InsetCollapsable(in, same_id), params_(in.params_)
// {}
InsetWrap::~InsetWrap()
{
InsetWrapMailer mailer(*this);
@ -187,16 +182,10 @@ void InsetWrap::validate(LaTeXFeatures & features) const
Inset * InsetWrap::clone(Buffer const &) const
{
return new InsetWrap(*const_cast<InsetWrap *>(this));
return new InsetWrap(*this);
}
// Inset * InsetWrap::clone(Buffer const &, bool same_id) const
// {
// return new InsetWrap(*const_cast<InsetWrap *>(this), same_id);
// }
string const InsetWrap::editMessage() const
{
return _("Opened Wrap Inset");

View File

@ -41,8 +41,6 @@ public:
///
InsetWrap(InsetWrap const &);
///
//InsetWrap(InsetWrap const &, bool same_id);
///
~InsetWrap();
///
virtual dispatch_result localDispatch(FuncRequest const & cmd);
@ -55,8 +53,6 @@ public:
///
Inset * clone(Buffer const &) const;
///
//Inset * clone(Buffer const &, bool same_id) const;
///
Inset::Code lyxCode() const { return Inset::WRAP_CODE; }
///
int latex(Buffer const *, std::ostream &,

View File

@ -35,11 +35,6 @@ UpdatableInset::UpdatableInset(UpdatableInset const & in)
{}
// UpdatableInset::UpdatableInset(UpdatableInset const & in, bool same_id)
// : Inset(in, same_id), block_drawing_(false)
// {}
void UpdatableInset::insetUnlock(BufferView *)
{
lyxerr[Debug::INFO] << "Inset Unlock" << std::endl;

View File

@ -50,8 +50,6 @@ public:
UpdatableInset();
///
UpdatableInset(UpdatableInset const & in);
///
//UpdatableInset(UpdatableInset const & in, bool same_id);
/// check if the font of the char we want inserting is correct
/// and modify it if it is not.

View File

@ -56,8 +56,6 @@ public:
///
Inset * clone(Buffer const &) const;
///
//Inset * clone(Buffer const &, bool same_id) const;
///
void validate(LaTeXFeatures & features) const;
///
Inset::Code lyxCode() const;

View File

@ -32,8 +32,6 @@ public:
///
Inset * clone(Buffer const &) const = 0;
///
//Inset * clone(Buffer const &, bool same_id) const = 0;
///
virtual void draw(BufferView *,LyXFont const &, int, float &) const = 0;
/// lowest x coordinate
virtual int xlow() const;

View File

@ -54,8 +54,6 @@ public:
///
Inset * clone(Buffer const &) const;
///
//Inset * clone(Buffer const &, bool same_id) const;
///
Inset::Code lyxCode() const;
///
MathAtom const & par() const;

View File

@ -131,33 +131,6 @@ LyXTabular::LyXTabular(BufferParams const & bp,
}
// LyXTabular::LyXTabular(BufferParams const & bp,
// InsetTabular * inset, LyXTabular const & lt,
// bool same_id)
// {
// owner_ = inset;
// cur_cell = -1;
// Init(bp, lt.rows_, lt.columns_, &lt);
// // we really should change again to have InsetText as a pointer
// // and allocate it then we would not have to do this stuff all
// // double!
// if (same_id) {
// for (int i = 0; i < rows_; ++i) {
// for (int j = 0; j < columns_; ++j) {
// cell_info[i][j].inset.id(lt.cell_info[i][j].inset.id());
// cell_info[i][j].inset.setParagraphData(lt.cell_info[i][j].inset.paragraphs, true);
// }
// }
// }
// #if 0
// #ifdef WITH_WARNINGS
// #warning Jürgen, can you make it the other way round. So that copy assignment depends on the copy constructor and not the other way. (Lgb)
// #endif
// operator=(lt);
// #endif
// }
LyXTabular::LyXTabular(Buffer const * buf, InsetTabular * inset, LyXLex & lex)
{
owner_ = inset;
@ -209,24 +182,6 @@ LyXTabular * LyXTabular::clone(BufferParams const & bp,
}
// LyXTabular * LyXTabular::clone(BufferParams const & bp,
// InsetTabular * inset, bool same_id)
// {
// LyXTabular * result = new LyXTabular(bp, inset, *this, same_id);
// #if 0
// // don't know if this is good but I need to Clone also
// // the text-insets here, this is for the Undo-facility!
// for (int i = 0; i < rows_; ++i) {
// for (int j = 0; j < columns_; ++j) {
// result->cell_info[i][j].inset = cell_info[i][j].inset;
// result->cell_info[i][j].inset.setOwner(inset);
// }
// }
// #endif
// return result;
// }
/* activates all lines and sets all widths to 0 */
void LyXTabular::Init(BufferParams const & bp,
int rows_arg, int columns_arg, LyXTabular const * lt)

View File

@ -182,18 +182,12 @@ public:
LyXTabular(BufferParams const &,
InsetTabular *, LyXTabular const &);
///
//LyXTabular(BufferParams const &,
// InsetTabular *, LyXTabular const &, bool same_id = false);
///
explicit
LyXTabular(Buffer const *, InsetTabular *, LyXLex & lex);
///
LyXTabular & operator=(LyXTabular const &);
///
LyXTabular * clone(BufferParams const &, InsetTabular *);
///
//LyXTabular * clone(BufferParams const &,
// InsetTabular *, bool same_id = false);
/// Returns true if there is a topline, returns false if not
bool TopLine(int cell, bool onlycolumn = false) const;