Jean-Marc Lasgouttes wrote:
> Juergen> Can I commit it if I rename it asString?
>
> Yes.
Thanks (thank God there are frontends like KFileRename nowadays). Attached is
the patch with the renames for the record. I'll shove it it now.
Jürgen
Index: paragraph.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/paragraph.C,v
retrieving revision 1.416
diff -p -u -r1.416 paragraph.C
--- paragraph.C 17 Nov 2005 08:41:56 -0000 1.416
+++ paragraph.C 25 Nov 2005 12:02:49 -0000
@@ -1598,7 +1598,7 @@ string const Paragraph::asString(Buffer
if (IsPrintable(c))
os << c;
else if (c == META_INSET)
- getInset(i)->plaintext(buffer, os, runparams);
+ getInset(i)->asString(buffer, os, runparams);
}
return os.str();
Index: insets/insetbase.h
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetbase.h,v
retrieving revision 1.61
diff -p -u -r1.61 insetbase.h
--- insets/insetbase.h 17 Nov 2005 08:41:53 -0000 1.61
+++ insets/insetbase.h 25 Nov 2005 12:02:52 -0000
@@ -191,6 +191,9 @@ public:
/// docbook output
virtual int docbook(Buffer const &, std::ostream & os,
OutputParams const &) const;
+ /// the string that is passed to the TOC
+ virtual int asString(Buffer const &, std::ostream &,
+ OutputParams const &) const { return 0; };
/** This enum indicates by which means the inset can be modified:
- NOT_EDITABLE: the inset's content can not be modified at all
Index: insets/insetcharstyle.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetcharstyle.C,v
retrieving revision 1.38
diff -p -u -r1.38 insetcharstyle.C
--- insets/insetcharstyle.C 2 Nov 2005 13:54:33 -0000 1.38
+++ insets/insetcharstyle.C 25 Nov 2005 12:02:53 -0000
@@ -316,6 +316,13 @@ int InsetCharStyle::plaintext(Buffer con
}
+int InsetCharStyle::asString(Buffer const & buf, ostream & os,
+ OutputParams const & op) const
+{
+ return plaintext(buf, os, op);
+}
+
+
void InsetCharStyle::validate(LaTeXFeatures & features) const
{
// Force inclusion of preamble snippet in layout file
Index: insets/insetcharstyle.h
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetcharstyle.h,v
retrieving revision 1.15
diff -p -u -r1.15 insetcharstyle.h
--- insets/insetcharstyle.h 10 Sep 2005 06:51:54 -0000 1.15
+++ insets/insetcharstyle.h 25 Nov 2005 12:02:53 -0000
@@ -80,6 +80,9 @@ public:
///
int plaintext(Buffer const &, std::ostream &,
OutputParams const &) const;
+ /// the string that is passed to the TOC
+ virtual int asString(Buffer const &, std::ostream & os,
+ OutputParams const &) const;
///
void validate(LaTeXFeatures &) const;
Index: insets/insetcite.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetcite.C,v
retrieving revision 1.88
diff -p -u -r1.88 insetcite.C
--- insets/insetcite.C 26 Oct 2004 21:16:44 -0000 1.88
+++ insets/insetcite.C 25 Nov 2005 12:02:53 -0000
@@ -353,6 +353,13 @@ int InsetCitation::docbook(Buffer const
}
+int InsetCitation::asString(Buffer const & buf, ostream & os,
+ OutputParams const & op) const
+{
+ return plaintext(buf, os, op);
+}
+
+
// Have to overwrite the default InsetCommand method in order to check that
// the \cite command is valid. Eg, the user has natbib enabled, inputs some
// citations and then changes his mind, turning natbib support off. The output
Index: insets/insetcite.h
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetcite.h,v
retrieving revision 1.56
diff -p -u -r1.56 insetcite.h
--- insets/insetcite.h 19 Jan 2005 15:03:30 -0000 1.56
+++ insets/insetcite.h 25 Nov 2005 12:02:53 -0000
@@ -38,6 +38,9 @@ public:
///
int docbook(Buffer const &, std::ostream &,
OutputParams const &) const;
+ /// the string that is passed to the TOC
+ virtual int asString(Buffer const &, std::ostream & os,
+ OutputParams const &) const;
///
void validate(LaTeXFeatures &) const;
Index: insets/insetlatexaccent.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetlatexaccent.C,v
retrieving revision 1.96
diff -p -u -r1.96 insetlatexaccent.C
--- insets/insetlatexaccent.C 17 May 2005 11:11:45 -0000 1.96
+++ insets/insetlatexaccent.C 25 Nov 2005 12:02:54 -0000
@@ -601,6 +601,13 @@ int InsetLatexAccent::docbook(Buffer con
}
+int InsetLatexAccent::asString(Buffer const & buf, ostream & os,
+ OutputParams const & op) const
+{
+ return plaintext(buf, os, op);
+}
+
+
bool InsetLatexAccent::directWrite() const
{
return true;
Index: insets/insetlatexaccent.h
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetlatexaccent.h,v
retrieving revision 1.69
diff -p -u -r1.69 insetlatexaccent.h
--- insets/insetlatexaccent.h 17 May 2005 11:11:45 -0000 1.69
+++ insets/insetlatexaccent.h 25 Nov 2005 12:02:55 -0000
@@ -57,6 +57,9 @@ public:
///
int docbook(Buffer const &, std::ostream &,
OutputParams const &) const;
+ /// the string that is passed to the TOC
+ virtual int asString(Buffer const &, std::ostream & os,
+ OutputParams const &) const;
///
bool directWrite() const;
///
Index: insets/insetquotes.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetquotes.C,v
retrieving revision 1.122
diff -p -u -r1.122 insetquotes.C
--- insets/insetquotes.C 9 Sep 2005 11:04:53 -0000 1.122
+++ insets/insetquotes.C 25 Nov 2005 12:02:55 -0000
@@ -330,6 +330,13 @@ int InsetQuotes::docbook(Buffer const &,
}
+int InsetQuotes::asString(Buffer const & buf, ostream & os,
+ OutputParams const & op) const
+{
+ return plaintext(buf, os, op);
+}
+
+
void InsetQuotes::validate(LaTeXFeatures & features) const
{
bool const use_babel = features.useBabel();
Index: insets/insetquotes.h
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetquotes.h,v
retrieving revision 1.63
diff -p -u -r1.63 insetquotes.h
--- insets/insetquotes.h 19 Jan 2005 15:03:31 -0000 1.63
+++ insets/insetquotes.h 25 Nov 2005 12:02:56 -0000
@@ -93,6 +93,11 @@ public:
///
int docbook(Buffer const &, std::ostream &,
OutputParams const &) const;
+
+ /// the string that is passed to the TOC
+ virtual int asString(Buffer const &, std::ostream & os,
+ OutputParams const &) const;
+
///
void validate(LaTeXFeatures &) const;
///
Index: insets/insetref.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetref.C,v
retrieving revision 1.94
diff -p -u -r1.94 insetref.C
--- insets/insetref.C 8 May 2005 10:02:38 -0000 1.94
+++ insets/insetref.C 25 Nov 2005 12:02:56 -0000
@@ -127,6 +127,13 @@ int InsetRef::docbook(Buffer const & buf
}
+int InsetRef::asString(Buffer const & buf, ostream & os,
+ OutputParams const & op) const
+{
+ return plaintext(buf, os, op);
+}
+
+
void InsetRef::validate(LaTeXFeatures & features) const
{
if (getCmdName() == "vref" || getCmdName() == "vpageref")
Index: insets/insetref.h
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetref.h,v
retrieving revision 1.68
diff -p -u -r1.68 insetref.h
--- insets/insetref.h 25 Nov 2004 19:13:05 -0000 1.68
+++ insets/insetref.h 25 Nov 2005 12:02:56 -0000
@@ -55,6 +55,9 @@ public:
///
int docbook(Buffer const &, std::ostream &,
OutputParams const &) const;
+ /// the string that is passed to the TOC
+ virtual int asString(Buffer const &, std::ostream & os,
+ OutputParams const &) const;
///
void validate(LaTeXFeatures & features) const;
protected:
Index: insets/insetspace.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetspace.C,v
retrieving revision 1.26
diff -p -u -r1.26 insetspace.C
--- insets/insetspace.C 28 Sep 2005 09:40:49 -0000 1.26
+++ insets/insetspace.C 25 Nov 2005 12:02:56 -0000
@@ -254,6 +254,13 @@ int InsetSpace::docbook(Buffer const &,
}
+int InsetSpace::asString(Buffer const & buf, ostream & os,
+ OutputParams const & op) const
+{
+ return plaintext(buf, os, op);
+}
+
+
auto_ptr<InsetBase> InsetSpace::doClone() const
{
return auto_ptr<InsetBase>(new InsetSpace(kind_));
Index: insets/insetspace.h
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetspace.h,v
retrieving revision 1.25
diff -p -u -r1.25 insetspace.h
--- insets/insetspace.h 19 Jan 2005 15:03:31 -0000 1.25
+++ insets/insetspace.h 25 Nov 2005 12:02:56 -0000
@@ -72,6 +72,9 @@ public:
///
int docbook(Buffer const &, std::ostream &,
OutputParams const &) const;
+ /// the string that is passed to the TOC
+ virtual int asString(Buffer const &, std::ostream & os,
+ OutputParams const &) const;
///
InsetBase::Code lyxCode() const { return InsetBase::SPACE_CODE; }
/// We don't need \begin_inset and \end_inset
Index: insets/insetspecialchar.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetspecialchar.C,v
retrieving revision 1.84
diff -p -u -r1.84 insetspecialchar.C
--- insets/insetspecialchar.C 23 Nov 2004 23:04:48 -0000 1.84
+++ insets/insetspecialchar.C 25 Nov 2005 12:02:57 -0000
@@ -243,6 +243,13 @@ int InsetSpecialChar::docbook(Buffer con
}
+int InsetSpecialChar::asString(Buffer const & buf, ostream & os,
+ OutputParams const & op) const
+{
+ return plaintext(buf, os, op);
+}
+
+
auto_ptr<InsetBase> InsetSpecialChar::doClone() const
{
return auto_ptr<InsetBase>(new InsetSpecialChar(kind_));
Index: insets/insetspecialchar.h
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetspecialchar.h,v
retrieving revision 1.67
diff -p -u -r1.67 insetspecialchar.h
--- insets/insetspecialchar.h 19 Jan 2005 15:03:31 -0000 1.67
+++ insets/insetspecialchar.h 25 Nov 2005 12:02:57 -0000
@@ -64,6 +64,9 @@ public:
///
int docbook(Buffer const &, std::ostream &,
OutputParams const &) const;
+ /// the string that is passed to the TOC
+ virtual int asString(Buffer const &, std::ostream & os,
+ OutputParams const &) const;
///
InsetBase::Code lyxCode() const { return InsetBase::SPECIALCHAR_CODE; }
/// We don't need \begin_inset and \end_inset
Index: insets/inseturl.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/inseturl.C,v
retrieving revision 1.75
diff -p -u -r1.75 inseturl.C
--- insets/inseturl.C 11 Dec 2003 15:23:15 -0000 1.75
+++ insets/inseturl.C 25 Nov 2005 12:02:57 -0000
@@ -100,6 +100,13 @@ int InsetUrl::docbook(Buffer const &, os
}
+int InsetUrl::asString(Buffer const & buf, ostream & os,
+ OutputParams const & op) const
+{
+ return plaintext(buf, os, op);
+}
+
+
void InsetUrl::validate(LaTeXFeatures & features) const
{
features.require("url");
Index: insets/inseturl.h
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/inseturl.h,v
retrieving revision 1.69
diff -p -u -r1.69 inseturl.h
--- insets/inseturl.h 18 Jan 2005 14:15:56 -0000 1.69
+++ insets/inseturl.h 25 Nov 2005 12:02:57 -0000
@@ -46,6 +46,9 @@ public:
///
int docbook(Buffer const &, std::ostream &,
OutputParams const &) const;
+ /// the string that is passed to the TOC
+ virtual int asString(Buffer const &, std::ostream & os,
+ OutputParams const &) const;
private:
virtual std::auto_ptr<InsetBase> doClone() const {
return std::auto_ptr<InsetBase>(new InsetUrl(params()));
Index: mathed/math_hullinset.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_hullinset.C,v
retrieving revision 1.181
diff -p -u -r1.181 math_hullinset.C
--- mathed/math_hullinset.C 22 Nov 2005 13:52:25 -0000 1.181
+++ mathed/math_hullinset.C 25 Nov 2005 12:02:59 -0000
@@ -1473,3 +1473,10 @@ int MathHullInset::docbook(Buffer const
ms << ETag(name.c_str());
return ms.line() + res;
}
+
+
+int MathHullInset::asString(Buffer const & buf, ostream & os,
+ OutputParams const & op) const
+{
+ return plaintext(buf, os, op);
+}
Index: mathed/math_hullinset.h
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_hullinset.h,v
retrieving revision 1.64
diff -p -u -r1.64 math_hullinset.h
--- mathed/math_hullinset.h 14 Oct 2005 10:50:22 -0000 1.64
+++ mathed/math_hullinset.h 25 Nov 2005 12:02:59 -0000
@@ -108,6 +108,9 @@ public:
///
int docbook(Buffer const &, std::ostream &,
OutputParams const &) const;
+ /// the string that is passed to the TOC
+ virtual int asString(Buffer const &, std::ostream & os,
+ OutputParams const &) const;
/// get notification when the cursor leaves this inset
void notifyCursorLeaves(LCursor & cur);