From 4ab1692eec2e98fb77d007998e53092021e4c356 Mon Sep 17 00:00:00 2001 From: Michael Schmitt Date: Tue, 20 Feb 2007 18:19:31 +0000 Subject: [PATCH] * src/mathed/InsetMath.[Ch]: implement plaintext() in a smarter way by outputting "[math]" rather than nothing git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17278 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/mathed/InsetMath.C | 10 ++++++++++ src/mathed/InsetMath.h | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/mathed/InsetMath.C b/src/mathed/InsetMath.C index 2a6d4462a4..c88d0e3659 100644 --- a/src/mathed/InsetMath.C +++ b/src/mathed/InsetMath.C @@ -14,6 +14,7 @@ #include "InsetMath.h" #include "MathData.h" #include "MathStream.h" +#include "gettext.h" #include "debug.h" #include "support/lstrings.h" @@ -81,6 +82,15 @@ void InsetMath::write(WriteStream & os) const } +int InsetMath::plaintext(Buffer const &, odocstream & os, + OutputParams const &) const +{ + docstring str = _("math"); + os << "[" << str << "]"; + return 2 + str.size(); +} + + void InsetMath::normalize(NormalStream & os) const { os << '[' << name() << "] "; diff --git a/src/mathed/InsetMath.h b/src/mathed/InsetMath.h index 0a4bfbc03f..90b8aabb09 100644 --- a/src/mathed/InsetMath.h +++ b/src/mathed/InsetMath.h @@ -184,7 +184,7 @@ public: /// plain text output in ucs4 encoding int plaintext(Buffer const &, odocstream &, - OutputParams const &) const { return 0; }; + OutputParams const &) const; /// dump content to stderr for debugging virtual void dump() const; -- 2.39.2