From d6c60193d63ec807f496a5902109d37dafe81cb4 Mon Sep 17 00:00:00 2001 From: Michael Schmitt Date: Sun, 25 Feb 2007 09:27:11 +0000 Subject: [PATCH] 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 --- src/mathed/MathMacroTemplate.C | 10 ++++++++++ src/mathed/MathMacroTemplate.h | 5 ++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/mathed/MathMacroTemplate.C b/src/mathed/MathMacroTemplate.C index a78756f337..2f6f8b4e79 100644 --- a/src/mathed/MathMacroTemplate.C +++ b/src/mathed/MathMacroTemplate.C @@ -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()); diff --git a/src/mathed/MathMacroTemplate.h b/src/mathed/MathMacroTemplate.h index cf46734618..34029c00bd 100644 --- a/src/mathed/MathMacroTemplate.h +++ b/src/mathed/MathMacroTemplate.h @@ -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; -- 2.39.5