Store an InsetBase & in MailInset.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6420 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Angus Leeming 2003-03-10 13:33:39 +00:00
parent f791a6c4d1
commit a6a948feb1
14 changed files with 36 additions and 20 deletions

View File

@ -177,7 +177,7 @@ Converter::Impl::Impl(string const & from_file, string const & to_file_base,
// The command needed to run the conversion process
// We create a dummy command for ease of understanding of the
// list of forked processes.
// Note that 'sh ' is absolutely essential, or execvp will fail.
// Note: 'sh ' is absolutely essential, or execvp will fail.
script_command_ = "sh " + script_file_ + ' ' +
OnlyFilename(from_file) + ' ' + to_format;
}

View File

@ -1,3 +1,18 @@
2003-03-10 Angus Leeming <leeming@lyx.org>
* inset.h, insetbase.h: move cache() and view() into InsetBase.
* insetcommand.h (inset):
* insetert.h (inset):
* insetexternal.h (inset):
* insetfloat.h (inset):
* insetgraphics.h (inset):
* insetinclude.h (inset):
* insetminipage.h (inset):
* insettabular.h (inset):
* insetwrap.h (inset):
* mailinset.h (inset): return an InsetBase &, not an Inset &.
2003-03-10 Angus Leeming <leeming@lyx.org>
* insetcommand.C (string2params):

View File

@ -24,7 +24,6 @@
#include "support/types.h"
class LyXFont;
class BufferView;
class Buffer;
class Painter;
class LyXText;
@ -337,10 +336,6 @@ public:
* defaults to empty.
*/
virtual void generatePreview() const {}
///
virtual void cache(BufferView *) const {}
///
virtual BufferView * view() const { return 0; }
protected:
///

View File

@ -14,6 +14,7 @@
#include <vector>
class BufferView;
class FuncRequest;
/** Dispatch result codes
@ -64,6 +65,11 @@ public:
///
virtual ~InsetBase() {}
/// Methods to cache and retrieve a cached BufferView.
virtual void cache(BufferView *) const {}
///
virtual BufferView * view() const { return 0; }
};
#endif

View File

@ -84,7 +84,7 @@ public:
///
InsetCommandMailer(string const & name, InsetCommand & inset);
///
virtual Inset & inset() const { return inset_; }
virtual InsetBase & inset() const { return inset_; }
///
virtual string const & name() const { return name_; }
///

View File

@ -159,7 +159,7 @@ public:
///
InsetERTMailer(InsetERT & inset);
///
virtual Inset & inset() const { return inset_; }
virtual InsetBase & inset() const { return inset_; }
///
virtual string const & name() const { return name_; }
///

View File

@ -131,7 +131,7 @@ public:
///
InsetExternalMailer(InsetExternal & inset);
///
virtual Inset & inset() const { return inset_; }
virtual InsetBase & inset() const { return inset_; }
///
virtual string const & name() const { return name_; }
///

View File

@ -100,7 +100,7 @@ public:
///
InsetFloatMailer(InsetFloat & inset);
///
virtual Inset & inset() const { return inset_; }
virtual InsetBase & inset() const { return inset_; }
///
virtual string const & name() const { return name_; }
///

View File

@ -134,7 +134,7 @@ public:
///
InsetGraphicsMailer(InsetGraphics & inset);
///
virtual Inset & inset() const { return inset_; }
virtual InsetBase & inset() const { return inset_; }
///
virtual string const & name() const { return name_; }
///

View File

@ -156,7 +156,7 @@ public:
///
InsetIncludeMailer(InsetInclude & inset);
///
virtual Inset & inset() const { return inset_; }
virtual InsetBase & inset() const { return inset_; }
///
virtual string const & name() const { return name_; }
///

View File

@ -126,7 +126,7 @@ public:
///
InsetMinipageMailer(InsetMinipage & inset);
///
virtual Inset & inset() const { return inset_; }
virtual InsetBase & inset() const { return inset_; }
///
virtual string const & name() const { return name_; }
///

View File

@ -377,7 +377,7 @@ public:
///
InsetTabularMailer(InsetTabular & inset);
///
virtual Inset & inset() const { return inset_; }
virtual InsetBase & inset() const { return inset_; }
///
virtual string const & name() const { return name_; }
///

View File

@ -97,7 +97,7 @@ public:
///
InsetWrapMailer(InsetWrap & inset);
///
virtual Inset & inset() const { return inset_; }
virtual InsetBase & inset() const { return inset_; }
///
virtual string const & name() const { return name_; }
///

View File

@ -16,7 +16,7 @@
#include "LString.h"
class Inset;
class InsetBase;
class MailInset {
@ -34,7 +34,7 @@ public:
protected:
///
virtual Inset & inset() const = 0;
virtual InsetBase & inset() const = 0;
///
virtual string const & name() const = 0;
};