move plaintext() implementation to MathMacroTemplate.C;

support localization


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17338 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Michael Schmitt 2007-02-25 09:27:11 +00:00
parent 914e698b8d
commit d6c60193d6
2 changed files with 12 additions and 3 deletions

View File

@ -219,6 +219,16 @@ void MathMacroTemplate::write(WriteStream & os) const
}
int MathMacroTemplate::plaintext(Buffer const &, odocstream & os,
OutputParams const &) const
{
static docstring const str = '[' + _("math macro") + ']';
os << str;
return str.size();
}
MacroData MathMacroTemplate::asMacroData() const
{
return MacroData(asString(cell(0)), numargs(), asString(cell(1)), std::string());

View File

@ -45,9 +45,8 @@ public:
///
void write(WriteStream & os) const;
///
int plaintext(Buffer const &, odocstream & os,
OutputParams const &) const
{ os << "[math macro]"; return 12; }
int plaintext(Buffer const &, odocstream &,
OutputParams const &) const;
/// Number of arguments
int numargs() const;