mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 19:25:39 +00:00
Use dummy Buffer * parameters to make Jean-Marc's compiler happy
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2793 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
207bc5e3f4
commit
f5f9c46c35
@ -88,40 +88,40 @@ Inset * InsetFormula::clone(Buffer const &, bool) const
|
||||
}
|
||||
|
||||
|
||||
void InsetFormula::write(ostream & os) const
|
||||
void InsetFormula::write(Buffer const * buf, ostream & os) const
|
||||
{
|
||||
os << "Formula ";
|
||||
latex(os, false, false);
|
||||
latex(buf, os, false, false);
|
||||
}
|
||||
|
||||
|
||||
int InsetFormula::latex(ostream & os, bool fragile, bool) const
|
||||
int InsetFormula::latex(Buffer const *, ostream & os, bool fragile, bool) const
|
||||
{
|
||||
par_->write(os, fragile);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
int InsetFormula::ascii(ostream & os, int) const
|
||||
int InsetFormula::ascii(Buffer const *, ostream & os, int) const
|
||||
{
|
||||
par_->write(os, false);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
int InsetFormula::linuxdoc(ostream & os) const
|
||||
int InsetFormula::linuxdoc(Buffer const * buf, ostream & os) const
|
||||
{
|
||||
return ascii(os, 0);
|
||||
return ascii(buf, os, 0);
|
||||
}
|
||||
|
||||
|
||||
int InsetFormula::docbook(ostream & os) const
|
||||
int InsetFormula::docbook(Buffer const * buf, ostream & os) const
|
||||
{
|
||||
return ascii(os, 0);
|
||||
return ascii(buf, os, 0);
|
||||
}
|
||||
|
||||
|
||||
void InsetFormula::read(LyXLex & lex)
|
||||
void InsetFormula::read(Buffer const *, LyXLex & lex)
|
||||
{
|
||||
par(mathed_parse_normal(lex));
|
||||
metrics();
|
||||
|
@ -53,17 +53,17 @@ public:
|
||||
void metrics() const;
|
||||
|
||||
///
|
||||
void write(std::ostream &) const;
|
||||
void write(Buffer const *, std::ostream &) const;
|
||||
///
|
||||
void read(LyXLex & lex);
|
||||
void read(Buffer const *, LyXLex & lex);
|
||||
///
|
||||
int latex(std::ostream &, bool fragile, bool free_spc) const;
|
||||
int latex(Buffer const *, std::ostream &, bool fragile, bool free_spc) const;
|
||||
///
|
||||
int ascii(std::ostream &, int linelen) const;
|
||||
int ascii(Buffer const *, std::ostream &, int linelen) const;
|
||||
///
|
||||
int linuxdoc(std::ostream &) const;
|
||||
int linuxdoc(Buffer const *, std::ostream &) const;
|
||||
///
|
||||
int docbook(std::ostream &) const;
|
||||
int docbook(Buffer const *, std::ostream &) const;
|
||||
|
||||
///
|
||||
Inset * clone(Buffer const &, bool same_id = false) const;
|
||||
|
@ -110,44 +110,6 @@ InsetFormulaBase::InsetFormulaBase()
|
||||
}
|
||||
|
||||
|
||||
void InsetFormulaBase::read(Buffer const *, LyXLex & lex)
|
||||
{
|
||||
read(lex);
|
||||
}
|
||||
|
||||
|
||||
void InsetFormulaBase::write(Buffer const *, ostream & os) const
|
||||
{
|
||||
write(os);
|
||||
}
|
||||
|
||||
|
||||
int InsetFormulaBase::latex(Buffer const *, ostream & os,
|
||||
bool fragile, bool spacing) const
|
||||
{
|
||||
return latex(os, fragile, spacing);
|
||||
}
|
||||
|
||||
|
||||
int InsetFormulaBase::ascii(Buffer const *, ostream & os, int spacing) const
|
||||
{
|
||||
return ascii(os, spacing);
|
||||
}
|
||||
|
||||
|
||||
int InsetFormulaBase::linuxdoc(Buffer const *, ostream & os) const
|
||||
{
|
||||
return linuxdoc(os);
|
||||
}
|
||||
|
||||
|
||||
int InsetFormulaBase::docbook(Buffer const *, ostream & os) const
|
||||
{
|
||||
return docbook(os);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Check if uses AMS macros
|
||||
void InsetFormulaBase::validate(LaTeXFeatures &) const
|
||||
{}
|
||||
@ -726,15 +688,15 @@ void mathDispatchCreation(BufferView * bv, string const & arg, bool display)
|
||||
|
||||
InsetFormulaBase * f;
|
||||
if (sel.empty()) {
|
||||
f = new InsetFormula;
|
||||
if (openNewInset(bv, f)) {
|
||||
// don't do that also for LFUN_MATH_MODE unless you want end up with
|
||||
// always changing to mathrm when opening an inlined inset
|
||||
// -- I really hate "LyXfunc overloading"...
|
||||
if (display)
|
||||
f->localDispatch(bv, LFUN_MATH_DISPLAY, string());
|
||||
f->localDispatch(bv, LFUN_INSERT_MATH, arg);
|
||||
}
|
||||
f = new InsetFormula;
|
||||
if (openNewInset(bv, f)) {
|
||||
// don't do that also for LFUN_MATH_MODE unless you want end up with
|
||||
// always changing to mathrm when opening an inlined inset
|
||||
// -- I really hate "LyXfunc overloading"...
|
||||
if (display)
|
||||
f->localDispatch(bv, LFUN_MATH_DISPLAY, string());
|
||||
f->localDispatch(bv, LFUN_INSERT_MATH, arg);
|
||||
}
|
||||
} else {
|
||||
// create a macro if we see "\\newcommand" somewhere, and an ordinary
|
||||
// formula otherwise
|
||||
|
@ -42,39 +42,9 @@ public:
|
||||
virtual int width(BufferView *, LyXFont const &) const = 0;
|
||||
///
|
||||
virtual void draw(BufferView *,LyXFont const &, int, float &, bool) const = 0;
|
||||
|
||||
/// These are just wrappers taking the unused Buffer * dummy parameter
|
||||
///
|
||||
virtual void write(Buffer const *, std::ostream &) const;
|
||||
///
|
||||
virtual void read(Buffer const *, LyXLex & lex);
|
||||
///
|
||||
virtual int latex(Buffer const *, std::ostream &,
|
||||
bool fragile, bool free_spc) const;
|
||||
///
|
||||
virtual int ascii(Buffer const *, std::ostream &, int linelen) const;
|
||||
///
|
||||
virtual int linuxdoc(Buffer const *, std::ostream &) const;
|
||||
///
|
||||
virtual int docbook(Buffer const *, std::ostream &) const;
|
||||
///
|
||||
virtual MathInsetTypes getType() const = 0;
|
||||
|
||||
protected:
|
||||
/// the actual functions don't use the Buffer * parameter
|
||||
///
|
||||
virtual void write(std::ostream &) const = 0;
|
||||
///
|
||||
virtual void read(LyXLex & lex) = 0;
|
||||
///
|
||||
virtual int latex(std::ostream &, bool fragile, bool free_spc) const = 0;
|
||||
///
|
||||
virtual int ascii(std::ostream &, int linelen) const = 0;
|
||||
///
|
||||
virtual int linuxdoc(std::ostream &) const = 0;
|
||||
///
|
||||
virtual int docbook(std::ostream &) const = 0;
|
||||
|
||||
public:
|
||||
///
|
||||
virtual void validate(LaTeXFeatures &) const;
|
||||
|
@ -72,40 +72,40 @@ Inset * InsetFormulaMacro::clone(Buffer const &, bool) const
|
||||
}
|
||||
|
||||
|
||||
void InsetFormulaMacro::write(ostream & os) const
|
||||
void InsetFormulaMacro::write(Buffer const *, ostream & os) const
|
||||
{
|
||||
os << "FormulaMacro ";
|
||||
tmacro().write(os, false);
|
||||
}
|
||||
|
||||
|
||||
int InsetFormulaMacro::latex(ostream & os, bool fragile,
|
||||
int InsetFormulaMacro::latex(Buffer const *, ostream & os, bool fragile,
|
||||
bool /*free_spacing*/) const
|
||||
{
|
||||
tmacro().write(os, fragile);
|
||||
return 2;
|
||||
}
|
||||
|
||||
int InsetFormulaMacro::ascii(ostream & os, int) const
|
||||
int InsetFormulaMacro::ascii(Buffer const *, ostream & os, int) const
|
||||
{
|
||||
tmacro().write(os, false);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int InsetFormulaMacro::linuxdoc(ostream & os) const
|
||||
int InsetFormulaMacro::linuxdoc(Buffer const * buf, ostream & os) const
|
||||
{
|
||||
return ascii(os, 0);
|
||||
return ascii(buf, os, 0);
|
||||
}
|
||||
|
||||
|
||||
int InsetFormulaMacro::docbook(ostream & os) const
|
||||
int InsetFormulaMacro::docbook(Buffer const * buf, ostream & os) const
|
||||
{
|
||||
return ascii(os, 0);
|
||||
return ascii(buf, os, 0);
|
||||
}
|
||||
|
||||
|
||||
void InsetFormulaMacro::read(LyXLex & lex)
|
||||
void InsetFormulaMacro::read(Buffer const *, LyXLex & lex)
|
||||
{
|
||||
MathMacroTemplate * t = mathed_parse_macro(lex);
|
||||
if (!t)
|
||||
|
@ -44,18 +44,20 @@ public:
|
||||
///
|
||||
int width(BufferView *, LyXFont const &) const;
|
||||
///
|
||||
void draw(BufferView *,LyXFont const &, int, float &, bool) const;
|
||||
void draw(BufferView *, LyXFont const &, int, float &, bool) const;
|
||||
|
||||
///
|
||||
void read(LyXLex & lex);
|
||||
void read(Buffer const *, LyXLex & lex);
|
||||
///
|
||||
int ascii(std::ostream &, int linelen) const;
|
||||
void write(Buffer const *, std::ostream & os) const;
|
||||
///
|
||||
int latex(std::ostream & os, bool fragile, bool free_spc) const;
|
||||
int ascii(Buffer const *, std::ostream &, int linelen) const;
|
||||
///
|
||||
int linuxdoc(std::ostream & os) const;
|
||||
int latex(Buffer const *, std::ostream & os, bool fragile, bool free_spc) const;
|
||||
///
|
||||
int docbook(std::ostream &) const;
|
||||
int linuxdoc(Buffer const *, std::ostream & os) const;
|
||||
///
|
||||
int docbook(Buffer const *, std::ostream &) const;
|
||||
|
||||
///
|
||||
Inset * clone(Buffer const &, bool same_id = false) const;
|
||||
@ -74,8 +76,6 @@ private:
|
||||
MathMacroTemplate const & tmacro() const;
|
||||
/// prefix in inset
|
||||
string prefix() const;
|
||||
///
|
||||
void write(std::ostream & os) const;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -169,7 +169,7 @@ MathInset * MathCursor::parInset(int i) const
|
||||
}
|
||||
|
||||
|
||||
void MathCursor::dump(char const * what) const
|
||||
void MathCursor::dump(char const *) const
|
||||
{
|
||||
#if 0
|
||||
lyxerr << "MC: " << what << "\n";
|
||||
|
Loading…
Reference in New Issue
Block a user