]> git.lyx.org Git - features.git/commitdiff
* src/mathed/InsetMath.[Ch]: implement plaintext() in a smarter way by
authorMichael Schmitt <michael.schmitt@teststep.org>
Tue, 20 Feb 2007 18:19:31 +0000 (18:19 +0000)
committerMichael Schmitt <michael.schmitt@teststep.org>
Tue, 20 Feb 2007 18:19:31 +0000 (18:19 +0000)
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
src/mathed/InsetMath.h

index 2a6d4462a43b9dc5432e719dd8af726445e56432..c88d0e3659309d234ded6ecccfcca8101146e094 100644 (file)
@@ -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() << "] ";
index 0a4bfbc03f93ebe85525f636617405743565c7c6..90b8aabb09443e16ddb42564fce220fe2f07aa4c 100644 (file)
@@ -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;