implement missing doClone methods

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9670 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Georg Baum 2005-02-23 12:01:50 +00:00
parent b4a67d4598
commit 4029fc8836
8 changed files with 37 additions and 4 deletions

View File

@ -1,3 +1,7 @@
2005-02-23 Georg Baum <Georg.Baum@post.rwth-aachen.de>
* insetcaption.[Ch] (doClone): implement
2005-02-22 Georg Baum <Georg.Baum@post.rwth-aachen.de> 2005-02-22 Georg Baum <Georg.Baum@post.rwth-aachen.de>
* insetgraphics.C (prepareFile): handle non-existing files * insetgraphics.C (prepareFile): handle non-existing files

View File

@ -34,6 +34,7 @@
using lyx::support::bformat; using lyx::support::bformat;
using std::auto_ptr;
using std::endl; using std::endl;
using std::string; using std::string;
using std::ostream; using std::ostream;
@ -138,7 +139,7 @@ int InsetCaption::latex(Buffer const & buf, ostream & os,
int InsetCaption::plaintext(Buffer const & /*buf*/,ostream & /*os*/, int InsetCaption::plaintext(Buffer const & /*buf*/,ostream & /*os*/,
OutputParams const & /*runparams*/) const OutputParams const & /*runparams*/) const
{ {
// FIX: Implement me! // FIXME: Implement me!
return 0; return 0;
} }
@ -152,3 +153,9 @@ int InsetCaption::docbook(Buffer const & buf, ostream & os,
os << "</title>\n"; os << "</title>\n";
return ret; return ret;
} }
auto_ptr<InsetBase> InsetCaption::doClone() const
{
return auto_ptr<InsetBase>(new InsetCaption(*this));
}

View File

@ -42,6 +42,9 @@ public:
/// ///
int docbook(Buffer const & buf, std::ostream & os, int docbook(Buffer const & buf, std::ostream & os,
OutputParams const & runparams) const; OutputParams const & runparams) const;
private:
///
virtual std::auto_ptr<InsetBase> doClone() const;
}; };

View File

@ -1,3 +1,9 @@
2005-02-23 Georg Baum <Georg.Baum@post.rwth-aachen.de>
* math_parinset.[Ch] (doClone): Implement, avoids triggering the
assert in InsetBase::clone()
* ref_inset.[Ch] (clone): rename to doClone
2005-02-14 Angus Leeming <leeming@lyx.org> 2005-02-14 Angus Leeming <leeming@lyx.org>
* math_rootinset.C (idxUpDown): Silence an MSVC compiler warning * math_rootinset.C (idxUpDown): Silence an MSVC compiler warning

View File

@ -16,6 +16,9 @@
#include "support/std_ostream.h" #include "support/std_ostream.h"
using std::auto_ptr;
MathParInset::MathParInset(MathArray const & ar) MathParInset::MathParInset(MathArray const & ar)
{ {
cells_[0] = ar; cells_[0] = ar;
@ -48,3 +51,9 @@ void MathParInset::infoize(std::ostream & os) const
{ {
os << "Type: Paragraph "; os << "Type: Paragraph ";
} }
auto_ptr<InsetBase> MathParInset::doClone() const
{
return auto_ptr<InsetBase>(new MathParInset(*this));
}

View File

@ -31,6 +31,9 @@ public:
void infoize(std::ostream & os) const; void infoize(std::ostream & os) const;
/// ///
void write(WriteStream & os) const; void write(WriteStream & os) const;
private:
///
virtual std::auto_ptr<InsetBase> doClone() const;
}; };
#endif #endif

View File

@ -44,7 +44,7 @@ RefInset::RefInset(string const & data)
{} {}
auto_ptr<InsetBase> RefInset::clone() const auto_ptr<InsetBase> RefInset::doClone() const
{ {
return auto_ptr<InsetBase>(new RefInset(*this)); return auto_ptr<InsetBase>(new RefInset(*this));
} }

View File

@ -24,8 +24,6 @@ public:
/// ///
explicit RefInset(std::string const & data); explicit RefInset(std::string const & data);
/// ///
virtual std::auto_ptr<InsetBase> clone() const;
///
//void write(WriteStream & os) const; //void write(WriteStream & os) const;
/// ///
void infoize(std::ostream & os) const; void infoize(std::ostream & os) const;
@ -61,6 +59,9 @@ public:
static std::string const & getName(int type); static std::string const & getName(int type);
protected: protected:
virtual void doDispatch(LCursor & cur, FuncRequest & cmd); virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
private:
///
virtual std::auto_ptr<InsetBase> doClone() const;
}; };
#endif #endif