mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-21 23:09:40 +00:00
get rid of same_id from function signatures
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7044 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
d1cf27fd88
commit
46e5fe4a67
@ -1,3 +1,7 @@
|
||||
2003-05-26 Lars Gullik Bjønnes <larsbj@gullik.net>
|
||||
|
||||
* remove same_id from function signatures, adjust.
|
||||
|
||||
2003-05-25 Lars Gullik Bjønnes <larsbj@gullik.net>
|
||||
|
||||
* undo_funcs.C (createUndo): use the id functions directly, adjust.
|
||||
|
@ -1,3 +1,7 @@
|
||||
2003-05-26 Lars Gullik Bjønnes <larsbj@gullik.net>
|
||||
|
||||
* remove same_id from function signatures, adjust
|
||||
|
||||
2003-05-24 Lars Gullik Bjønnes <larsbj@gullik.net>
|
||||
|
||||
* insettext.C (InsetText): adjust
|
||||
|
@ -40,18 +40,27 @@ Inset::Inset()
|
||||
{}
|
||||
|
||||
|
||||
Inset::Inset(Inset const & in, bool same_id)
|
||||
Inset::Inset(Inset const & in)
|
||||
: 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++;
|
||||
}
|
||||
|
||||
|
||||
// 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;
|
||||
@ -170,4 +179,3 @@ int Inset::width(BufferView * bv, LyXFont const & font) const
|
||||
dimension(bv, font, dim);
|
||||
return dim.width();
|
||||
}
|
||||
|
||||
|
@ -158,7 +158,9 @@ public:
|
||||
///
|
||||
Inset();
|
||||
///
|
||||
Inset(Inset const & in, bool same_id = false);
|
||||
Inset(Inset const & in);
|
||||
///
|
||||
//Inset(Inset const & in, bool same_id);
|
||||
///
|
||||
virtual void dimension(BufferView *, LyXFont const &, Dimension &) const = 0;
|
||||
///
|
||||
@ -209,7 +211,9 @@ public:
|
||||
}
|
||||
|
||||
///
|
||||
virtual Inset * clone(Buffer const &, bool same_ids = false) const = 0;
|
||||
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;
|
||||
|
@ -43,7 +43,7 @@ InsetBibitem::~InsetBibitem()
|
||||
}
|
||||
|
||||
|
||||
Inset * InsetBibitem::clone(Buffer const &, bool) const
|
||||
Inset * InsetBibitem::clone(Buffer const &) const
|
||||
{
|
||||
InsetBibitem * b = new InsetBibitem(params());
|
||||
b->setCounter(counter);
|
||||
@ -51,6 +51,14 @@ Inset * InsetBibitem::clone(Buffer const &, bool) const
|
||||
}
|
||||
|
||||
|
||||
// Inset * InsetBibitem::clone(Buffer const &, bool) const
|
||||
// {
|
||||
// InsetBibitem * b = new InsetBibitem(params());
|
||||
// b->setCounter(counter);
|
||||
// return b;
|
||||
// }
|
||||
|
||||
|
||||
dispatch_result InsetBibitem::localDispatch(FuncRequest const & cmd)
|
||||
{
|
||||
switch (cmd.action) {
|
||||
|
@ -29,7 +29,9 @@ public:
|
||||
///
|
||||
~InsetBibitem();
|
||||
///
|
||||
Inset * clone(Buffer const &, bool same_id = false) const;
|
||||
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,
|
||||
|
@ -35,11 +35,16 @@ using std::vector;
|
||||
using std::pair;
|
||||
|
||||
|
||||
InsetBibtex::InsetBibtex(InsetCommandParams const & p, bool)
|
||||
InsetBibtex::InsetBibtex(InsetCommandParams const & p)
|
||||
: InsetCommand(p)
|
||||
{}
|
||||
|
||||
|
||||
// InsetBibtex::InsetBibtex(InsetCommandParams const & p, bool)
|
||||
// : InsetCommand(p, false)
|
||||
// {}
|
||||
|
||||
|
||||
InsetBibtex::~InsetBibtex()
|
||||
{
|
||||
InsetCommandMailer mailer("bibtex", *this);
|
||||
|
@ -23,13 +23,19 @@ class Buffer;
|
||||
class InsetBibtex : public InsetCommand {
|
||||
public:
|
||||
///
|
||||
InsetBibtex(InsetCommandParams const &, bool same_id = false);
|
||||
InsetBibtex(InsetCommandParams const &);
|
||||
///
|
||||
//InsetBibtex(InsetCommandParams const &, bool same_id);
|
||||
///
|
||||
~InsetBibtex();
|
||||
///
|
||||
Inset * clone(Buffer const &, bool same_id = false) const {
|
||||
return new InsetBibtex(params(), same_id);
|
||||
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);
|
||||
///
|
||||
|
@ -221,11 +221,16 @@ string const getBasicLabel(string const & keyList, string const & after)
|
||||
} // anon namespace
|
||||
|
||||
|
||||
InsetCitation::InsetCitation(InsetCommandParams const & p, bool)
|
||||
InsetCitation::InsetCitation(InsetCommandParams const & p)
|
||||
: InsetCommand(p)
|
||||
{}
|
||||
|
||||
|
||||
// InsetCitation::InsetCitation(InsetCommandParams const & p, bool)
|
||||
// : InsetCommand(p, false)
|
||||
// {}
|
||||
|
||||
|
||||
InsetCitation::~InsetCitation()
|
||||
{
|
||||
InsetCommandMailer mailer("citation", *this);
|
||||
|
@ -21,14 +21,20 @@
|
||||
class InsetCitation : public InsetCommand {
|
||||
public:
|
||||
///
|
||||
InsetCitation(InsetCommandParams const &, bool same_id = false);
|
||||
InsetCitation(InsetCommandParams const &);
|
||||
///
|
||||
//InsetCitation(InsetCommandParams const &, bool same_id);
|
||||
///
|
||||
~InsetCitation();
|
||||
///
|
||||
Inset * clone(Buffer const &, bool same_id = false) const {
|
||||
return new InsetCitation(params(), same_id);
|
||||
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; }
|
||||
|
@ -56,8 +56,8 @@ InsetCollapsable::InsetCollapsable(BufferParams const & bp, bool collapsed)
|
||||
}
|
||||
|
||||
|
||||
InsetCollapsable::InsetCollapsable(InsetCollapsable const & in, bool same_id)
|
||||
: UpdatableInset(in, same_id), collapsed_(in.collapsed_),
|
||||
InsetCollapsable::InsetCollapsable(InsetCollapsable const & in)
|
||||
: UpdatableInset(in), 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),
|
||||
@ -66,11 +66,26 @@ InsetCollapsable::InsetCollapsable(InsetCollapsable const & in, bool same_id)
|
||||
#endif
|
||||
oldWidth(0), in_update(false), first_after_edit(false)
|
||||
{
|
||||
inset.init(&(in.inset), same_id);
|
||||
inset.init(&(in.inset));
|
||||
inset.setOwner(this);
|
||||
}
|
||||
|
||||
|
||||
// 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())) {
|
||||
|
@ -37,9 +37,11 @@ public:
|
||||
///
|
||||
static int const TEXT_TO_BOTTOM_OFFSET = 2;
|
||||
/// inset is initially collapsed if bool = true
|
||||
InsetCollapsable(BufferParams const &, bool = false);
|
||||
InsetCollapsable(BufferParams const &, bool collapsed = false);
|
||||
///
|
||||
InsetCollapsable(InsetCollapsable const & in, bool same_id = false);
|
||||
InsetCollapsable(InsetCollapsable const & in);
|
||||
///
|
||||
//InsetCollapsable(InsetCollapsable const & in, bool same_id);
|
||||
///
|
||||
void read(Buffer const *, LyXLex &);
|
||||
///
|
||||
|
@ -26,11 +26,16 @@
|
||||
using std::ostream;
|
||||
|
||||
|
||||
InsetCommand::InsetCommand(InsetCommandParams const & p, bool)
|
||||
InsetCommand::InsetCommand(InsetCommandParams const & p)
|
||||
: p_(p.getCmdName(), p.getContents(), p.getOptions())
|
||||
{}
|
||||
|
||||
|
||||
// InsetCommand::InsetCommand(InsetCommandParams const & p, bool)
|
||||
// : p_(p.getCmdName(), p.getContents(), p.getOptions())
|
||||
// {}
|
||||
|
||||
|
||||
void InsetCommand::setParams(InsetCommandParams const & p)
|
||||
{
|
||||
p_.setCmdName(p.getCmdName());
|
||||
|
@ -31,7 +31,10 @@ class InsetCommand : public InsetButton, boost::noncopyable {
|
||||
public:
|
||||
///
|
||||
explicit
|
||||
InsetCommand(InsetCommandParams const &, bool same_id = false);
|
||||
InsetCommand(InsetCommandParams const &);
|
||||
///
|
||||
//explicit
|
||||
//InsetCommand(InsetCommandParams const &, bool same_id);
|
||||
///
|
||||
void write(Buffer const *, std::ostream & os) const
|
||||
{ p_.write(os); }
|
||||
|
@ -35,17 +35,28 @@ InsetEnvironment::InsetEnvironment
|
||||
}
|
||||
|
||||
|
||||
InsetEnvironment::InsetEnvironment(InsetEnvironment const & in, bool same_id)
|
||||
: InsetText(in, same_id), layout_(in.layout_)
|
||||
InsetEnvironment::InsetEnvironment(InsetEnvironment const & in)
|
||||
: InsetText(in), layout_(in.layout_)
|
||||
{}
|
||||
|
||||
|
||||
Inset * InsetEnvironment::clone(Buffer const &, bool same_id) const
|
||||
// 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, same_id);
|
||||
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";
|
||||
|
@ -20,13 +20,17 @@ public:
|
||||
///
|
||||
InsetEnvironment(BufferParams const &, string const & name);
|
||||
///
|
||||
InsetEnvironment(InsetEnvironment const &, bool same_id = false);
|
||||
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 &, bool same_id = false) const;
|
||||
Inset * clone(Buffer const &) const;
|
||||
///
|
||||
//Inset * clone(Buffer const &, bool same_id) const;
|
||||
///
|
||||
Inset::Code lyxCode() const { return Inset::ENVIRONMENT_CODE; }
|
||||
///
|
||||
|
@ -28,11 +28,16 @@
|
||||
using std::ostream;
|
||||
|
||||
|
||||
InsetError::InsetError(string const & str, bool)
|
||||
InsetError::InsetError(string const & str)
|
||||
: contents(str)
|
||||
{}
|
||||
|
||||
|
||||
// InsetError::InsetError(string const & str, bool)
|
||||
// : contents(str)
|
||||
// {}
|
||||
|
||||
|
||||
InsetError::~InsetError()
|
||||
{
|
||||
Dialogs::hide("error", this);
|
||||
|
@ -24,7 +24,10 @@ class InsetError : public Inset {
|
||||
public:
|
||||
///
|
||||
explicit
|
||||
InsetError(string const &, bool same_id = false);
|
||||
InsetError(string const &);
|
||||
///
|
||||
//explicit
|
||||
//InsetError(string const &, bool same_id);
|
||||
///
|
||||
~InsetError();
|
||||
///
|
||||
@ -53,10 +56,14 @@ public:
|
||||
///
|
||||
EDITABLE editable() const { return IS_EDITABLE; }
|
||||
///
|
||||
Inset * clone(Buffer const &, bool same_id = false) const {
|
||||
return new InsetError(contents, same_id);
|
||||
Inset * clone(Buffer const &) const {
|
||||
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; };
|
||||
|
@ -63,19 +63,32 @@ InsetERT::InsetERT(BufferParams const & bp, bool collapsed)
|
||||
}
|
||||
|
||||
|
||||
InsetERT::InsetERT(InsetERT const & in, bool same_id)
|
||||
: InsetCollapsable(in, same_id), status_(in.status_)
|
||||
InsetERT::InsetERT(InsetERT const & in)
|
||||
: InsetCollapsable(in), status_(in.status_)
|
||||
{
|
||||
init();
|
||||
}
|
||||
|
||||
|
||||
Inset * InsetERT::clone(Buffer const &, bool same_id) const
|
||||
// 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), same_id);
|
||||
return new InsetERT(*const_cast<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)
|
||||
|
@ -38,9 +38,13 @@ public:
|
||||
///
|
||||
InsetERT(BufferParams const &, bool collapsed = false);
|
||||
///
|
||||
InsetERT(InsetERT const &, bool same_id = false);
|
||||
InsetERT(InsetERT const &);
|
||||
///
|
||||
Inset * clone(Buffer const &, bool same_id = false) 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);
|
||||
|
@ -223,17 +223,26 @@ void InsetExternal::validate(LaTeXFeatures & features) const
|
||||
}
|
||||
|
||||
|
||||
Inset * InsetExternal::clone(Buffer const &, bool same_id) const
|
||||
Inset * InsetExternal::clone(Buffer const &) const
|
||||
{
|
||||
InsetExternal * inset = new InsetExternal;
|
||||
inset->params_ = params_;
|
||||
inset->view_ = view_;
|
||||
if (same_id)
|
||||
inset->id_ = id_;
|
||||
return inset;
|
||||
}
|
||||
|
||||
|
||||
// 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;
|
||||
|
@ -69,7 +69,9 @@ public:
|
||||
virtual Inset::Code lyxCode() const { return EXTERNAL_CODE; }
|
||||
|
||||
///
|
||||
virtual Inset * clone(Buffer const &, bool same_id = false) const;
|
||||
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;
|
||||
|
@ -145,11 +145,16 @@ InsetFloat::InsetFloat(BufferParams const & bp, string const & type)
|
||||
}
|
||||
|
||||
|
||||
InsetFloat::InsetFloat(InsetFloat const & in, bool same_id)
|
||||
: InsetCollapsable(in, same_id), params_(in.params_)
|
||||
InsetFloat::InsetFloat(InsetFloat const & in)
|
||||
: InsetCollapsable(in), params_(in.params_)
|
||||
{}
|
||||
|
||||
|
||||
// InsetFloat::InsetFloat(InsetFloat const & in, bool same_id)
|
||||
// : InsetCollapsable(in, same_id), params_(in.params_)
|
||||
// {}
|
||||
|
||||
|
||||
InsetFloat::~InsetFloat()
|
||||
{
|
||||
InsetFloatMailer mailer(*this);
|
||||
@ -259,12 +264,18 @@ void InsetFloat::validate(LaTeXFeatures & features) const
|
||||
}
|
||||
|
||||
|
||||
Inset * InsetFloat::clone(Buffer const &, bool same_id) const
|
||||
Inset * InsetFloat::clone(Buffer const &) const
|
||||
{
|
||||
return new InsetFloat(*const_cast<InsetFloat *>(this), same_id);
|
||||
return new InsetFloat(*const_cast<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");
|
||||
|
@ -41,7 +41,9 @@ public:
|
||||
///
|
||||
InsetFloat(BufferParams const &, string const &);
|
||||
///
|
||||
InsetFloat(InsetFloat const &, bool same_id = false);
|
||||
InsetFloat(InsetFloat const &);
|
||||
///
|
||||
//InsetFloat(InsetFloat const &, bool same_id);
|
||||
///
|
||||
~InsetFloat();
|
||||
///
|
||||
@ -53,7 +55,9 @@ public:
|
||||
///
|
||||
void validate(LaTeXFeatures & features) const;
|
||||
///
|
||||
Inset * clone(Buffer const &, bool same_id = false) const;
|
||||
Inset * clone(Buffer const &) const;
|
||||
///
|
||||
//Inset * clone(Buffer const &, bool same_id) const;
|
||||
///
|
||||
Inset::Code lyxCode() const { return Inset::FLOAT_CODE; }
|
||||
///
|
||||
|
@ -26,10 +26,14 @@ public:
|
||||
///
|
||||
~InsetFloatList();
|
||||
///
|
||||
Inset * clone(Buffer const &, bool = false) const {
|
||||
Inset * clone(Buffer const &) const {
|
||||
return new InsetFloatList(getCmdName());
|
||||
}
|
||||
///
|
||||
//Inset * clone(Buffer const &, bool = false) const {
|
||||
// return new InsetFloatList(getCmdName());
|
||||
//}
|
||||
///
|
||||
dispatch_result localDispatch(FuncRequest const & cmd);
|
||||
///
|
||||
string const getScreenLabel(Buffer const *) const;
|
||||
|
@ -38,20 +38,34 @@ InsetFoot::InsetFoot(BufferParams const & bp)
|
||||
}
|
||||
|
||||
|
||||
InsetFoot::InsetFoot(InsetFoot const & in, bool same_id)
|
||||
: InsetFootlike(in, same_id)
|
||||
InsetFoot::InsetFoot(InsetFoot const & in)
|
||||
: InsetFootlike(in)
|
||||
{
|
||||
setLabel(_("foot"));
|
||||
setInsetName("Foot");
|
||||
}
|
||||
|
||||
|
||||
Inset * InsetFoot::clone(Buffer const &, bool same_id) const
|
||||
// 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), same_id);
|
||||
return new InsetFoot(*const_cast<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");
|
||||
|
@ -25,9 +25,13 @@ public:
|
||||
///
|
||||
InsetFoot(BufferParams const &);
|
||||
///
|
||||
InsetFoot(InsetFoot const &, bool same_id = false);
|
||||
InsetFoot(InsetFoot const &);
|
||||
///
|
||||
Inset * clone(Buffer const &, bool same_id = false) 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; }
|
||||
///
|
||||
|
@ -32,8 +32,8 @@ InsetFootlike::InsetFootlike(BufferParams const & bp)
|
||||
}
|
||||
|
||||
|
||||
InsetFootlike::InsetFootlike(InsetFootlike const & in, bool same_id)
|
||||
: InsetCollapsable(in, same_id)
|
||||
InsetFootlike::InsetFootlike(InsetFootlike const & in)
|
||||
: InsetCollapsable(in)
|
||||
{
|
||||
LyXFont font(LyXFont::ALL_SANE);
|
||||
font.decSize();
|
||||
@ -43,6 +43,17 @@ InsetFootlike::InsetFootlike(InsetFootlike const & in, bool same_id)
|
||||
}
|
||||
|
||||
|
||||
// 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";
|
||||
|
@ -22,7 +22,9 @@ public:
|
||||
///
|
||||
InsetFootlike(BufferParams const &);
|
||||
///
|
||||
InsetFootlike(InsetFootlike const &, bool same_id = false);
|
||||
InsetFootlike(InsetFootlike const &);
|
||||
///
|
||||
//InsetFootlike(InsetFootlike const &, bool same_id);
|
||||
///
|
||||
void write(Buffer const * buf, std::ostream & os) const;
|
||||
///
|
||||
|
@ -193,9 +193,8 @@ InsetGraphics::InsetGraphics()
|
||||
|
||||
|
||||
InsetGraphics::InsetGraphics(InsetGraphics const & ig,
|
||||
string const & filepath,
|
||||
bool same_id)
|
||||
: Inset(ig, same_id),
|
||||
string const & filepath)
|
||||
: Inset(ig),
|
||||
graphic_label(uniqueID()),
|
||||
cache_(new Cache(*this))
|
||||
{
|
||||
@ -203,12 +202,29 @@ InsetGraphics::InsetGraphics(InsetGraphics const & ig,
|
||||
}
|
||||
|
||||
|
||||
Inset * InsetGraphics::clone(Buffer const & buffer, bool same_id) const
|
||||
// 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(), same_id);
|
||||
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);
|
||||
|
@ -28,8 +28,10 @@ public:
|
||||
///
|
||||
InsetGraphics();
|
||||
///
|
||||
InsetGraphics(InsetGraphics const &, string const & filepath,
|
||||
bool same_id = false);
|
||||
InsetGraphics(InsetGraphics const &, string const & filepath);
|
||||
///
|
||||
//InsetGraphics(InsetGraphics const &, string const & filepath,
|
||||
// bool same_id);
|
||||
///
|
||||
~InsetGraphics();
|
||||
///
|
||||
@ -67,7 +69,9 @@ public:
|
||||
Inset::Code lyxCode() const { return Inset::GRAPHICS_CODE; }
|
||||
|
||||
///
|
||||
virtual Inset * clone(Buffer const &, bool same_id = false) const;
|
||||
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.
|
||||
|
@ -20,10 +20,14 @@ public:
|
||||
///
|
||||
InsetHFill();
|
||||
///
|
||||
virtual Inset * clone(Buffer const &, bool = false) const {
|
||||
virtual Inset * clone(Buffer const &) const {
|
||||
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; }
|
||||
|
@ -191,7 +191,7 @@ void InsetInclude::set(Params const & p)
|
||||
}
|
||||
|
||||
|
||||
Inset * InsetInclude::clone(Buffer const & buffer, bool) const
|
||||
Inset * InsetInclude::clone(Buffer const & buffer) const
|
||||
{
|
||||
Params p(params_);
|
||||
p.masterFilename_ = buffer.fileName();
|
||||
@ -200,6 +200,15 @@ Inset * InsetInclude::clone(Buffer const & buffer, bool) const
|
||||
}
|
||||
|
||||
|
||||
// Inset * InsetInclude::clone(Buffer const & buffer, bool) const
|
||||
// {
|
||||
// Params p(params_);
|
||||
// p.masterFilename_ = buffer.fileName();
|
||||
|
||||
// return new InsetInclude(p);
|
||||
// }
|
||||
|
||||
|
||||
void InsetInclude::write(Buffer const *, ostream & os) const
|
||||
{
|
||||
os << "Include " << params_.cparams.getCommand() << '\n'
|
||||
|
@ -74,7 +74,9 @@ public:
|
||||
void set(Params const & params);
|
||||
|
||||
///
|
||||
virtual Inset * clone(Buffer const &, bool same_id = false) const;
|
||||
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
|
||||
|
@ -21,11 +21,16 @@
|
||||
|
||||
using std::ostream;
|
||||
|
||||
InsetIndex::InsetIndex(InsetCommandParams const & p, bool)
|
||||
InsetIndex::InsetIndex(InsetCommandParams const & p)
|
||||
: InsetCommand(p)
|
||||
{}
|
||||
|
||||
|
||||
// InsetIndex::InsetIndex(InsetCommandParams const & p, bool)
|
||||
// : InsetCommand(p, false)
|
||||
// {}
|
||||
|
||||
|
||||
InsetIndex::~InsetIndex()
|
||||
{
|
||||
InsetCommandMailer mailer("index", *this);
|
||||
@ -67,11 +72,16 @@ Inset::Code InsetIndex::lyxCode() const
|
||||
|
||||
|
||||
|
||||
InsetPrintIndex::InsetPrintIndex(InsetCommandParams const & p, bool)
|
||||
InsetPrintIndex::InsetPrintIndex(InsetCommandParams const & p)
|
||||
: InsetCommand(p)
|
||||
{}
|
||||
|
||||
|
||||
// InsetPrintIndex::InsetPrintIndex(InsetCommandParams const & p, bool)
|
||||
// : InsetCommand(p, false)
|
||||
// {}
|
||||
|
||||
|
||||
InsetPrintIndex::~InsetPrintIndex()
|
||||
{}
|
||||
|
||||
|
@ -22,14 +22,20 @@ struct LaTeXFeatures;
|
||||
class InsetIndex : public InsetCommand {
|
||||
public:
|
||||
///
|
||||
InsetIndex(InsetCommandParams const &, bool same_id = false);
|
||||
InsetIndex(InsetCommandParams const &);
|
||||
///
|
||||
//InsetIndex(InsetCommandParams const &, bool same_id);
|
||||
///
|
||||
~InsetIndex();
|
||||
///
|
||||
virtual Inset * clone(Buffer const &, bool same_id = false) const {
|
||||
return new InsetIndex(params(), same_id);
|
||||
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;
|
||||
@ -45,14 +51,20 @@ public:
|
||||
class InsetPrintIndex : public InsetCommand {
|
||||
public:
|
||||
///
|
||||
InsetPrintIndex(InsetCommandParams const &, bool same_id = false);
|
||||
InsetPrintIndex(InsetCommandParams const &);
|
||||
///
|
||||
//InsetPrintIndex(InsetCommandParams const &, bool same_id);
|
||||
///
|
||||
~InsetPrintIndex();
|
||||
///
|
||||
Inset * clone(Buffer const &, bool same_id = false) const {
|
||||
return new InsetPrintIndex(params(), same_id);
|
||||
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;
|
||||
|
@ -27,11 +27,16 @@ using std::vector;
|
||||
using std::pair;
|
||||
|
||||
|
||||
InsetLabel::InsetLabel(InsetCommandParams const & p, bool)
|
||||
InsetLabel::InsetLabel(InsetCommandParams const & p)
|
||||
: InsetCommand(p)
|
||||
{}
|
||||
|
||||
|
||||
// InsetLabel::InsetLabel(InsetCommandParams const & p, bool)
|
||||
// : InsetCommand(p, false)
|
||||
// {}
|
||||
|
||||
|
||||
InsetLabel::~InsetLabel()
|
||||
{
|
||||
InsetCommandMailer mailer("label", *this);
|
||||
|
@ -18,14 +18,20 @@
|
||||
class InsetLabel : public InsetCommand {
|
||||
public:
|
||||
///
|
||||
InsetLabel(InsetCommandParams const &, bool same_id = false);
|
||||
InsetLabel(InsetCommandParams const &);
|
||||
///
|
||||
//InsetLabel(InsetCommandParams const &, bool same_id);
|
||||
///
|
||||
~InsetLabel();
|
||||
///
|
||||
virtual Inset * clone(Buffer const &, bool same_id = false) const {
|
||||
return new InsetLabel(params(), same_id);
|
||||
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(); }
|
||||
|
@ -656,12 +656,18 @@ bool InsetLatexAccent::directWrite() const
|
||||
}
|
||||
|
||||
|
||||
Inset * InsetLatexAccent::clone(Buffer const &, bool) const
|
||||
Inset * InsetLatexAccent::clone(Buffer const &) const
|
||||
{
|
||||
return new InsetLatexAccent(contents);
|
||||
}
|
||||
|
||||
|
||||
// Inset * InsetLatexAccent::clone(Buffer const &, bool) const
|
||||
// {
|
||||
// return new InsetLatexAccent(contents);
|
||||
// }
|
||||
|
||||
|
||||
Inset::Code InsetLatexAccent::lyxCode() const
|
||||
{
|
||||
return Inset::ACCENT_CODE;
|
||||
|
@ -60,7 +60,9 @@ public:
|
||||
///
|
||||
bool directWrite() const;
|
||||
///
|
||||
virtual Inset * clone(Buffer const &, bool same_id = false) const;
|
||||
virtual Inset * clone(Buffer const &) const;
|
||||
///
|
||||
//virtual Inset * clone(Buffer const &, bool same_id) const;
|
||||
///
|
||||
Inset::Code lyxCode()const;
|
||||
///
|
||||
|
@ -33,20 +33,34 @@ InsetMarginal::InsetMarginal(BufferParams const & bp)
|
||||
}
|
||||
|
||||
|
||||
InsetMarginal::InsetMarginal(InsetMarginal const & in, bool same_id)
|
||||
: InsetFootlike(in, same_id)
|
||||
InsetMarginal::InsetMarginal(InsetMarginal const & in)
|
||||
: InsetFootlike(in)
|
||||
{
|
||||
setLabel(_("margin"));
|
||||
setInsetName("Marginal");
|
||||
}
|
||||
|
||||
|
||||
Inset * InsetMarginal::clone(Buffer const &, bool same_id) const
|
||||
// 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), same_id);
|
||||
return new InsetMarginal(*const_cast<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");
|
||||
|
@ -24,9 +24,13 @@ public:
|
||||
///
|
||||
InsetMarginal(BufferParams const &);
|
||||
///
|
||||
InsetMarginal(InsetMarginal const &, bool same_id = false);
|
||||
InsetMarginal(InsetMarginal const &);
|
||||
///
|
||||
Inset * clone(Buffer const &, bool same_id = false) 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; }
|
||||
///
|
||||
|
@ -88,17 +88,28 @@ InsetMinipage::InsetMinipage(BufferParams const & bp)
|
||||
}
|
||||
|
||||
|
||||
InsetMinipage::InsetMinipage(InsetMinipage const & in, bool same_id)
|
||||
: InsetCollapsable(in, same_id), params_(in.params_)
|
||||
InsetMinipage::InsetMinipage(InsetMinipage const & in)
|
||||
: InsetCollapsable(in), params_(in.params_)
|
||||
{}
|
||||
|
||||
|
||||
Inset * InsetMinipage::clone(Buffer const &, bool same_id) const
|
||||
// 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), same_id);
|
||||
return new InsetMinipage(*const_cast<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);
|
||||
|
@ -56,7 +56,9 @@ public:
|
||||
///
|
||||
InsetMinipage(BufferParams const &);
|
||||
///
|
||||
InsetMinipage(InsetMinipage const &, bool same_id = false);
|
||||
InsetMinipage(InsetMinipage const &);
|
||||
///
|
||||
//InsetMinipage(InsetMinipage const &, bool same_id);
|
||||
///
|
||||
~InsetMinipage();
|
||||
///
|
||||
@ -66,7 +68,9 @@ public:
|
||||
///
|
||||
void read(Buffer const * buf, LyXLex & lex);
|
||||
///
|
||||
Inset * clone(Buffer const &, bool same_id = false) const;
|
||||
Inset * clone(Buffer const &) const;
|
||||
///
|
||||
//Inset * clone(Buffer const &, bool same_id) const;
|
||||
///
|
||||
void dimension(BufferView *, LyXFont const &, Dimension &) const;
|
||||
///
|
||||
|
@ -20,10 +20,15 @@ public:
|
||||
|
||||
InsetNewline() {}
|
||||
|
||||
virtual Inset * clone(Buffer const &, bool = false) const {
|
||||
virtual Inset * clone(Buffer const &) const {
|
||||
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;
|
||||
|
@ -46,19 +46,32 @@ InsetNote::InsetNote(BufferParams const & bp)
|
||||
}
|
||||
|
||||
|
||||
InsetNote::InsetNote(InsetNote const & in, bool same_id)
|
||||
: InsetCollapsable(in, same_id)
|
||||
InsetNote::InsetNote(InsetNote const & in)
|
||||
: InsetCollapsable(in)
|
||||
{
|
||||
init();
|
||||
}
|
||||
|
||||
|
||||
Inset * InsetNote::clone(Buffer const &, bool same_id) const
|
||||
// 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), same_id);
|
||||
return new InsetNote(*const_cast<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");
|
||||
|
@ -23,9 +23,13 @@ public:
|
||||
///
|
||||
InsetNote(BufferParams const &);
|
||||
///
|
||||
InsetNote(InsetNote const &, bool same_id = false);
|
||||
InsetNote(InsetNote const &);
|
||||
///
|
||||
Inset * clone(Buffer const &, bool same_id = false) const;
|
||||
//InsetNote(InsetNote const &, bool same_id);
|
||||
///
|
||||
Inset * clone(Buffer const &) const;
|
||||
///
|
||||
//Inset * clone(Buffer const &, bool same_id) const;
|
||||
///
|
||||
string const editMessage() const;
|
||||
///
|
||||
|
@ -37,8 +37,8 @@ InsetOptArg::InsetOptArg(BufferParams const & ins)
|
||||
}
|
||||
|
||||
|
||||
InsetOptArg::InsetOptArg(InsetOptArg const & in, bool same_id)
|
||||
: InsetCollapsable(in, same_id)
|
||||
InsetOptArg::InsetOptArg(InsetOptArg const & in)
|
||||
: InsetCollapsable(in)
|
||||
{
|
||||
LyXFont font(LyXFont::ALL_SANE);
|
||||
font.setColor(LColor::collapsable);
|
||||
@ -47,12 +47,28 @@ InsetOptArg::InsetOptArg(InsetOptArg const & in, bool same_id)
|
||||
}
|
||||
|
||||
|
||||
Inset * InsetOptArg::clone(Buffer const &, bool same_id) const
|
||||
// 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, same_id);
|
||||
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");
|
||||
|
@ -25,10 +25,13 @@ class InsetOptArg : public InsetCollapsable {
|
||||
public:
|
||||
InsetOptArg(BufferParams const &);
|
||||
|
||||
InsetOptArg(InsetOptArg const &, bool same_id = false);
|
||||
InsetOptArg(InsetOptArg const &);
|
||||
//InsetOptArg(InsetOptArg const &, bool same_id);
|
||||
|
||||
/// make a duplicate of this inset
|
||||
Inset * clone(Buffer const &, bool same_id = false) const;
|
||||
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; }
|
||||
|
@ -27,7 +27,7 @@
|
||||
using std::ostream;
|
||||
|
||||
|
||||
InsetParent::InsetParent(InsetCommandParams const & p, Buffer const & bf, bool)
|
||||
InsetParent::InsetParent(InsetCommandParams const & p, Buffer const & bf)
|
||||
: InsetCommand(p)
|
||||
{
|
||||
string const fn = p.getContents();
|
||||
@ -35,6 +35,14 @@ InsetParent::InsetParent(InsetCommandParams const & p, Buffer const & bf, bool)
|
||||
}
|
||||
|
||||
|
||||
// InsetParent::InsetParent(InsetCommandParams const & p, Buffer const & bf, bool)
|
||||
// : InsetCommand(p, false)
|
||||
// {
|
||||
// string const fn = p.getContents();
|
||||
// setContents(MakeAbsPath(fn, bf.filePath()));
|
||||
// }
|
||||
|
||||
|
||||
string const InsetParent::getScreenLabel(Buffer const *) const
|
||||
{
|
||||
return bformat(_("Parent: %1$s"), getContents());
|
||||
|
@ -25,12 +25,18 @@ class Buffer;
|
||||
class InsetParent : public InsetCommand {
|
||||
public:
|
||||
///
|
||||
InsetParent(InsetCommandParams const &, Buffer const &, bool same_id = false);
|
||||
InsetParent(InsetCommandParams const &, Buffer const &);
|
||||
///
|
||||
virtual Inset * clone(Buffer const & buffer, bool same_id = false) const {
|
||||
return new InsetParent(params(), buffer, same_id);
|
||||
//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;
|
||||
|
@ -351,12 +351,18 @@ void InsetQuotes::validate(LaTeXFeatures & features) const
|
||||
}
|
||||
|
||||
|
||||
Inset * InsetQuotes::clone(Buffer const &, bool) const
|
||||
Inset * InsetQuotes::clone(Buffer const &) const
|
||||
{
|
||||
return new InsetQuotes(language_, side_, times_);
|
||||
}
|
||||
|
||||
|
||||
// Inset * InsetQuotes::clone(Buffer const &, bool) const
|
||||
// {
|
||||
// return new InsetQuotes(language_, side_, times_);
|
||||
// }
|
||||
|
||||
|
||||
Inset::Code InsetQuotes::lyxCode() const
|
||||
{
|
||||
return Inset::QUOTE_CODE;
|
||||
|
@ -68,7 +68,9 @@ public:
|
||||
/// Create the right quote inset after character c
|
||||
InsetQuotes(char c, BufferParams const & params);
|
||||
///
|
||||
Inset * clone(Buffer const &, bool same_id = false) const;
|
||||
Inset * clone(Buffer const &) const;
|
||||
///
|
||||
//Inset * clone(Buffer const &, bool same_id) const;
|
||||
|
||||
///
|
||||
void dimension(BufferView *, LyXFont const &, Dimension &) const;
|
||||
|
@ -23,11 +23,16 @@
|
||||
|
||||
using std::ostream;
|
||||
|
||||
InsetRef::InsetRef(InsetCommandParams const & p, Buffer const & buf, bool)
|
||||
InsetRef::InsetRef(InsetCommandParams const & p, Buffer const & buf)
|
||||
: InsetCommand(p), isLatex(buf.isLatex())
|
||||
{}
|
||||
|
||||
|
||||
// InsetRef::InsetRef(InsetCommandParams const & p, Buffer const & buf, bool)
|
||||
// : InsetCommand(p, false), isLatex(buf.isLatex())
|
||||
// {}
|
||||
|
||||
|
||||
InsetRef::~InsetRef()
|
||||
{
|
||||
InsetCommandMailer("ref", *this).hideDialog();
|
||||
|
@ -36,14 +36,20 @@ public:
|
||||
static string const & getName(int type);
|
||||
|
||||
///
|
||||
InsetRef(InsetCommandParams const &, Buffer const &, bool same_id = false);
|
||||
InsetRef(InsetCommandParams const &, Buffer const &);
|
||||
///
|
||||
//InsetRef(InsetCommandParams const &, Buffer const &, bool same_id);
|
||||
///
|
||||
~InsetRef();
|
||||
///
|
||||
virtual Inset * clone(Buffer const & buffer, bool same_id = false) const {
|
||||
return new InsetRef(params(), buffer, same_id);
|
||||
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;
|
||||
|
@ -250,12 +250,18 @@ int InsetSpace::docbook(Buffer const *, ostream & os, bool) const
|
||||
}
|
||||
|
||||
|
||||
Inset * InsetSpace::clone(Buffer const &, bool) const
|
||||
Inset * InsetSpace::clone(Buffer const &) const
|
||||
{
|
||||
return new InsetSpace(kind_);
|
||||
}
|
||||
|
||||
|
||||
// Inset * InsetSpace::clone(Buffer const &, bool) const
|
||||
// {
|
||||
// return new InsetSpace(kind_);
|
||||
// }
|
||||
|
||||
|
||||
bool InsetSpace::isChar() const
|
||||
{
|
||||
return true;
|
||||
|
@ -70,7 +70,9 @@ public:
|
||||
///
|
||||
int docbook(Buffer const *, std::ostream &, bool mixcont) const;
|
||||
///
|
||||
virtual Inset * clone(Buffer const &, bool same_id = false) const;
|
||||
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
|
||||
|
@ -244,12 +244,18 @@ int InsetSpecialChar::docbook(Buffer const *, ostream & os, bool) const
|
||||
}
|
||||
|
||||
|
||||
Inset * InsetSpecialChar::clone(Buffer const &, bool) const
|
||||
Inset * InsetSpecialChar::clone(Buffer const &) const
|
||||
{
|
||||
return new InsetSpecialChar(kind_);
|
||||
}
|
||||
|
||||
|
||||
// Inset * InsetSpecialChar::clone(Buffer const &, bool) const
|
||||
// {
|
||||
// return new InsetSpecialChar(kind_);
|
||||
// }
|
||||
|
||||
|
||||
void InsetSpecialChar::validate(LaTeXFeatures & features) const
|
||||
{
|
||||
if (kind_ == MENU_SEPARATOR) {
|
||||
|
@ -63,7 +63,9 @@ public:
|
||||
///
|
||||
int docbook(Buffer const *, std::ostream &, bool mixcont) const;
|
||||
///
|
||||
virtual Inset * clone(Buffer const &, bool same_id = false) const;
|
||||
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
|
||||
|
@ -174,12 +174,11 @@ InsetTabular::InsetTabular(Buffer const & buf, int rows, int columns)
|
||||
}
|
||||
|
||||
|
||||
InsetTabular::InsetTabular(InsetTabular const & tab, Buffer const & buf,
|
||||
bool same_id)
|
||||
: UpdatableInset(tab, same_id), buffer(&buf)
|
||||
InsetTabular::InsetTabular(InsetTabular const & tab, Buffer const & buf)
|
||||
: UpdatableInset(tab), buffer(&buf)
|
||||
{
|
||||
tabular.reset(new LyXTabular(buf.params,
|
||||
this, *(tab.tabular), same_id));
|
||||
this, *(tab.tabular)));
|
||||
the_locking_inset = 0;
|
||||
old_locking_inset = 0;
|
||||
locked = false;
|
||||
@ -194,6 +193,26 @@ 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);
|
||||
@ -201,12 +220,18 @@ InsetTabular::~InsetTabular()
|
||||
}
|
||||
|
||||
|
||||
Inset * InsetTabular::clone(Buffer const & buf, bool same_id) const
|
||||
Inset * InsetTabular::clone(Buffer const & buf) const
|
||||
{
|
||||
return new InsetTabular(*this, buf, same_id);
|
||||
return new InsetTabular(*this, buf);
|
||||
}
|
||||
|
||||
|
||||
// Inset * InsetTabular::clone(Buffer const & buf, bool same_id) const
|
||||
// {
|
||||
// return new InsetTabular(*this, buf, same_id);
|
||||
// }
|
||||
|
||||
|
||||
BufferView * InsetTabular::view() const
|
||||
{
|
||||
return buffer->getUser();
|
||||
|
@ -76,11 +76,15 @@ public:
|
||||
///
|
||||
InsetTabular(Buffer const &, int rows = 1, int columns = 1);
|
||||
///
|
||||
InsetTabular(InsetTabular const &, Buffer const &, bool same_id = false);
|
||||
InsetTabular(InsetTabular const &, Buffer const &);
|
||||
///
|
||||
//InsetTabular(InsetTabular const &, Buffer const &, bool same_id);
|
||||
///
|
||||
~InsetTabular();
|
||||
///
|
||||
Inset * clone(Buffer const &, bool same_id = false) const;
|
||||
Inset * clone(Buffer const &) const;
|
||||
///
|
||||
//Inset * clone(Buffer const &, bool same_id) const;
|
||||
///
|
||||
void read(Buffer const *, LyXLex &);
|
||||
///
|
||||
|
@ -143,18 +143,26 @@ InsetText::InsetText(BufferParams const & bp)
|
||||
paragraphs.begin()->layout(bp.getLyXTextClass().defaultLayout());
|
||||
if (bp.tracking_changes)
|
||||
paragraphs.begin()->trackChanges();
|
||||
init();
|
||||
init(0);
|
||||
}
|
||||
|
||||
|
||||
InsetText::InsetText(InsetText const & in, bool same_id)
|
||||
: UpdatableInset(in, same_id), lt(0), in_update(false), do_resize(0),
|
||||
InsetText::InsetText(InsetText const & in)
|
||||
: UpdatableInset(in), lt(0), in_update(false), do_resize(0),
|
||||
do_reinit(false)
|
||||
{
|
||||
init(&in, same_id);
|
||||
init(&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);
|
||||
@ -162,15 +170,13 @@ InsetText & InsetText::operator=(InsetText const & it)
|
||||
}
|
||||
|
||||
|
||||
void InsetText::init(InsetText const * ins, bool same_id)
|
||||
void InsetText::init(InsetText const * ins)
|
||||
{
|
||||
if (ins) {
|
||||
setParagraphData(ins->paragraphs, same_id);
|
||||
setParagraphData(ins->paragraphs);
|
||||
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));
|
||||
@ -195,6 +201,39 @@ void InsetText::init(InsetText const * ins, bool same_id)
|
||||
}
|
||||
|
||||
|
||||
// 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();
|
||||
@ -226,12 +265,18 @@ void InsetText::clear(bool just_mark_erased)
|
||||
}
|
||||
|
||||
|
||||
Inset * InsetText::clone(Buffer const &, bool same_id) const
|
||||
Inset * InsetText::clone(Buffer const &) const
|
||||
{
|
||||
return new InsetText(*this, same_id);
|
||||
return new InsetText(*this);
|
||||
}
|
||||
|
||||
|
||||
// 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";
|
||||
@ -1940,28 +1985,12 @@ int InsetText::getMaxWidth(BufferView * bv, UpdatableInset const * inset) const
|
||||
}
|
||||
|
||||
|
||||
void InsetText::setParagraphData(ParagraphList const & plist, bool same_id)
|
||||
void InsetText::setParagraphData(ParagraphList const & plist)
|
||||
{
|
||||
// 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();
|
||||
@ -1973,13 +2002,52 @@ void InsetText::setParagraphData(ParagraphList const & plist, bool same_id)
|
||||
Paragraph & tmp = paragraphs.back();
|
||||
tmp.setInsetOwner(this);
|
||||
}
|
||||
}
|
||||
|
||||
reinitLyXText();
|
||||
need_update = INIT;
|
||||
}
|
||||
|
||||
|
||||
// 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();
|
||||
|
@ -73,11 +73,16 @@ public:
|
||||
InsetText(BufferParams const &);
|
||||
///
|
||||
explicit
|
||||
InsetText(InsetText const &, bool same_id = false);
|
||||
InsetText(InsetText const &);
|
||||
///
|
||||
//explicit
|
||||
//InsetText(InsetText const &, bool same_id);
|
||||
///
|
||||
~InsetText();
|
||||
///
|
||||
Inset * clone(Buffer const &, bool same_id = false) const;
|
||||
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
|
||||
@ -147,11 +152,15 @@ public:
|
||||
///
|
||||
int getMaxWidth(BufferView *, UpdatableInset const *) const;
|
||||
///
|
||||
void init(InsetText const * ins = 0, bool same_id = false);
|
||||
void init(InsetText const * ins);
|
||||
///
|
||||
//void init(InsetText const * ins, bool same_id);
|
||||
///
|
||||
void writeParagraphData(Buffer const *, std::ostream &) const;
|
||||
///
|
||||
void setParagraphData(ParagraphList const &, bool same_id = false);
|
||||
void setParagraphData(ParagraphList const &);
|
||||
///
|
||||
//void setParagraphData(ParagraphList const &, bool same_id);
|
||||
///
|
||||
void setText(string const &, LyXFont const &);
|
||||
///
|
||||
|
@ -25,7 +25,9 @@ public:
|
||||
///
|
||||
void write(Buffer const * buf, std::ostream & os) const;
|
||||
///
|
||||
virtual Inset * clone(Buffer const &, bool same_id = false) const;
|
||||
virtual Inset * clone(Buffer const &) const;
|
||||
///
|
||||
//virtual Inset * clone(Buffer const &, bool same_id) const;
|
||||
///
|
||||
Inset::Code lyxCode() const { return Inset::THEOREM_CODE; }
|
||||
///
|
||||
|
@ -23,11 +23,16 @@ using std::vector;
|
||||
using std::ostream;
|
||||
|
||||
|
||||
InsetTOC::InsetTOC(InsetCommandParams const & p, bool same_id)
|
||||
: InsetCommand(p, same_id)
|
||||
InsetTOC::InsetTOC(InsetCommandParams const & p)
|
||||
: InsetCommand(p)
|
||||
{}
|
||||
|
||||
|
||||
// InsetTOC::InsetTOC(InsetCommandParams const & p, bool same_id)
|
||||
// : InsetCommand(p, same_id)
|
||||
// {}
|
||||
|
||||
|
||||
InsetTOC::~InsetTOC()
|
||||
{
|
||||
InsetCommandMailer mailer("toc", *this);
|
||||
|
@ -20,14 +20,20 @@
|
||||
class InsetTOC : public InsetCommand {
|
||||
public:
|
||||
///
|
||||
InsetTOC(InsetCommandParams const &, bool same_id = false);
|
||||
InsetTOC(InsetCommandParams const &);
|
||||
///
|
||||
//InsetTOC(InsetCommandParams const &, bool same_id);
|
||||
///
|
||||
~InsetTOC();
|
||||
///
|
||||
virtual Inset * clone(Buffer const &, bool same_id = false) const {
|
||||
return new InsetTOC(params(), same_id);
|
||||
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;
|
||||
|
@ -24,11 +24,16 @@
|
||||
using std::ostream;
|
||||
|
||||
|
||||
InsetUrl::InsetUrl(InsetCommandParams const & p, bool)
|
||||
InsetUrl::InsetUrl(InsetCommandParams const & p)
|
||||
: InsetCommand(p)
|
||||
{}
|
||||
|
||||
|
||||
// InsetUrl::InsetUrl(InsetCommandParams const & p, bool)
|
||||
// : InsetCommand(p, false)
|
||||
// {}
|
||||
|
||||
|
||||
InsetUrl::~InsetUrl()
|
||||
{
|
||||
InsetCommandMailer("url", *this).hideDialog();
|
||||
|
@ -23,14 +23,21 @@ class InsetUrl : public InsetCommand {
|
||||
public:
|
||||
///
|
||||
explicit
|
||||
InsetUrl(InsetCommandParams const &, bool same_id = false);
|
||||
InsetUrl(InsetCommandParams const &);
|
||||
///
|
||||
//explicit
|
||||
//InsetUrl(InsetCommandParams const &, bool same_id);
|
||||
///
|
||||
~InsetUrl();
|
||||
///
|
||||
virtual Inset * clone(Buffer const &, bool same_id = false) const {
|
||||
return new InsetUrl(params(), same_id);
|
||||
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; }
|
||||
|
@ -75,11 +75,16 @@ InsetWrap::InsetWrap(BufferParams const & bp, string const & type)
|
||||
}
|
||||
|
||||
|
||||
InsetWrap::InsetWrap(InsetWrap const & in, bool same_id)
|
||||
: InsetCollapsable(in, same_id), params_(in.params_)
|
||||
InsetWrap::InsetWrap(InsetWrap const & in)
|
||||
: InsetCollapsable(in), params_(in.params_)
|
||||
{}
|
||||
|
||||
|
||||
// InsetWrap::InsetWrap(InsetWrap const & in, bool same_id)
|
||||
// : InsetCollapsable(in, same_id), params_(in.params_)
|
||||
// {}
|
||||
|
||||
|
||||
InsetWrap::~InsetWrap()
|
||||
{
|
||||
InsetWrapMailer mailer(*this);
|
||||
@ -180,12 +185,18 @@ void InsetWrap::validate(LaTeXFeatures & features) const
|
||||
}
|
||||
|
||||
|
||||
Inset * InsetWrap::clone(Buffer const &, bool same_id) const
|
||||
Inset * InsetWrap::clone(Buffer const &) const
|
||||
{
|
||||
return new InsetWrap(*const_cast<InsetWrap *>(this), same_id);
|
||||
return new InsetWrap(*const_cast<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");
|
||||
|
@ -39,7 +39,9 @@ public:
|
||||
///
|
||||
InsetWrap(BufferParams const &, string const &);
|
||||
///
|
||||
InsetWrap(InsetWrap const &, bool same_id = false);
|
||||
InsetWrap(InsetWrap const &);
|
||||
///
|
||||
//InsetWrap(InsetWrap const &, bool same_id);
|
||||
///
|
||||
~InsetWrap();
|
||||
///
|
||||
@ -51,7 +53,9 @@ public:
|
||||
///
|
||||
void validate(LaTeXFeatures & features) const;
|
||||
///
|
||||
Inset * clone(Buffer const &, bool same_id = false) const;
|
||||
Inset * clone(Buffer const &) const;
|
||||
///
|
||||
//Inset * clone(Buffer const &, bool same_id) const;
|
||||
///
|
||||
Inset::Code lyxCode() const { return Inset::WRAP_CODE; }
|
||||
///
|
||||
|
@ -30,11 +30,16 @@ UpdatableInset::UpdatableInset()
|
||||
{}
|
||||
|
||||
|
||||
UpdatableInset::UpdatableInset(UpdatableInset const & in, bool same_id)
|
||||
: Inset(in, same_id), block_drawing_(false)
|
||||
UpdatableInset::UpdatableInset(UpdatableInset const & in)
|
||||
: Inset(in), block_drawing_(false)
|
||||
{}
|
||||
|
||||
|
||||
// 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;
|
||||
|
@ -49,7 +49,9 @@ public:
|
||||
///
|
||||
UpdatableInset();
|
||||
///
|
||||
UpdatableInset(UpdatableInset const & in, bool same_id = false);
|
||||
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.
|
||||
|
@ -1,3 +1,6 @@
|
||||
2003-05-26 Lars Gullik Bjønnes <larsbj@gullik.net>
|
||||
|
||||
* remove same_id from function signatures, adjust
|
||||
|
||||
2003-05-19 André Pönitz <poenitz@gmx.net>
|
||||
|
||||
|
@ -114,12 +114,18 @@ InsetFormula::~InsetFormula()
|
||||
{}
|
||||
|
||||
|
||||
Inset * InsetFormula::clone(Buffer const &, bool) const
|
||||
Inset * InsetFormula::clone(Buffer const &) const
|
||||
{
|
||||
return new InsetFormula(*this);
|
||||
}
|
||||
|
||||
|
||||
// Inset * InsetFormula::clone(Buffer const &, bool) const
|
||||
// {
|
||||
// return new InsetFormula(*this);
|
||||
// }
|
||||
|
||||
|
||||
void InsetFormula::write(Buffer const *, ostream & os) const
|
||||
{
|
||||
WriteStream wi(os, false, false);
|
||||
@ -331,4 +337,3 @@ string const InsetFormula::PreviewImpl::latexString() const
|
||||
parent().par_->write(wi);
|
||||
return STRCONV(ls.str());
|
||||
}
|
||||
|
||||
|
@ -54,7 +54,9 @@ public:
|
||||
int docbook(Buffer const *, std::ostream &, bool mixcont) const;
|
||||
|
||||
///
|
||||
Inset * clone(Buffer const &, bool same_id = false) const;
|
||||
Inset * clone(Buffer const &) const;
|
||||
///
|
||||
//Inset * clone(Buffer const &, bool same_id) const;
|
||||
///
|
||||
void validate(LaTeXFeatures & features) const;
|
||||
///
|
||||
|
@ -30,7 +30,9 @@ public:
|
||||
///
|
||||
InsetFormulaBase();
|
||||
///
|
||||
Inset * clone(Buffer const &, bool same_id = false) const = 0;
|
||||
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
|
||||
|
@ -66,12 +66,18 @@ InsetFormulaMacro::InsetFormulaMacro(string const & s)
|
||||
}
|
||||
|
||||
|
||||
Inset * InsetFormulaMacro::clone(Buffer const &, bool) const
|
||||
Inset * InsetFormulaMacro::clone(Buffer const &) const
|
||||
{
|
||||
return new InsetFormulaMacro(*this);
|
||||
}
|
||||
|
||||
|
||||
// Inset * InsetFormulaMacro::clone(Buffer const &, bool) const
|
||||
// {
|
||||
// return new InsetFormulaMacro(*this);
|
||||
// }
|
||||
|
||||
|
||||
void InsetFormulaMacro::write(Buffer const *, ostream & os) const
|
||||
{
|
||||
os << "FormulaMacro ";
|
||||
|
@ -52,7 +52,9 @@ public:
|
||||
int docbook(Buffer const *, std::ostream &, bool mixcont) const;
|
||||
|
||||
///
|
||||
Inset * clone(Buffer const &, bool same_id = false) const;
|
||||
Inset * clone(Buffer const &) const;
|
||||
///
|
||||
//Inset * clone(Buffer const &, bool same_id) const;
|
||||
///
|
||||
Inset::Code lyxCode() const;
|
||||
///
|
||||
|
@ -99,7 +99,7 @@ Paragraph::Paragraph(Paragraph const & lp)
|
||||
InsetList::iterator it = insetlist.begin();
|
||||
InsetList::iterator end = insetlist.end();
|
||||
for (; it != end; ++it) {
|
||||
it.setInset(it.getInset()->clone(**buffer_, false));
|
||||
it.setInset(it.getInset()->clone(**buffer_));
|
||||
// tell the new inset who is the boss now
|
||||
it.getInset()->parOwner(this);
|
||||
}
|
||||
|
@ -117,23 +117,11 @@ LyXTabular::LyXTabular(BufferParams const & bp,
|
||||
|
||||
|
||||
LyXTabular::LyXTabular(BufferParams const & bp,
|
||||
InsetTabular * inset, LyXTabular const & lt,
|
||||
bool same_id)
|
||||
InsetTabular * inset, LyXTabular const & lt)
|
||||
{
|
||||
owner_ = inset;
|
||||
cur_cell = -1;
|
||||
Init(bp, lt.rows_, lt.columns_, <);
|
||||
// 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)
|
||||
@ -143,6 +131,33 @@ 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_, <);
|
||||
// // 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;
|
||||
@ -177,9 +192,9 @@ LyXTabular & LyXTabular::operator=(LyXTabular const & lt)
|
||||
|
||||
|
||||
LyXTabular * LyXTabular::clone(BufferParams const & bp,
|
||||
InsetTabular * inset, bool same_id)
|
||||
InsetTabular * inset)
|
||||
{
|
||||
LyXTabular * result = new LyXTabular(bp, inset, *this, same_id);
|
||||
LyXTabular * result = new LyXTabular(bp, inset, *this);
|
||||
#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!
|
||||
@ -194,6 +209,24 @@ 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)
|
||||
|
@ -180,15 +180,20 @@ public:
|
||||
InsetTabular *, int columns_arg, int rows_arg);
|
||||
///
|
||||
LyXTabular(BufferParams const &,
|
||||
InsetTabular *, LyXTabular const &, bool same_id = false);
|
||||
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 *, bool same_id = false);
|
||||
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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user