]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetlabel.C
clear()->erase() ; lots of using directives for cxx
[lyx.git] / src / insets / insetlabel.C
index 629f2a90e780df58d90eba4c2cfff813e7fd1376..0973ad239cd1b419a570cc4609693deaf86241a3 100644 (file)
@@ -4,7 +4,7 @@
  *           LyX, The Document Processor
  *      
  *         Copyright 1995 Matthias Ettrich
- *          Copyright 1995-1999 The LyX Team.
+ *          Copyright 1995-2000 The LyX Team.
  *
  * ====================================================== */
 
@@ -15,6 +15,9 @@
 #endif
 
 #include "insetlabel.h"
+#include "support/LOstream.h"
+
+using std::ostream;
 
 /* Label. Used to insert a label automatically */
 
@@ -42,30 +45,31 @@ string InsetLabel::getLabel(int) const
        return contents;
 }
 
-int InsetLabel::Latex(FILE * file, signed char /*fragile*/)
+
+int InsetLabel::Latex(ostream & os,
+                     bool /*fragile*/, bool /*fs*/) const
 {
-       fprintf(file, "%s", escape(getCommand()).c_str());
+       os << escape(getCommand());
        return 0;
 }
 
-
-int InsetLabel::Latex(string & file, signed char /*fragile*/)
+int InsetLabel::Ascii(ostream & os) const
 {
-       file += escape(getCommand());
+       os << "<" << getContents()  << ">";
        return 0;
 }
 
 
-int InsetLabel::Linuxdoc(string & file)
+int InsetLabel::Linuxdoc(ostream & os) const
 {
-       file += "<label id=\"" + getContents() +"\" >";
+       os << "<label id=\"" << getContents() << "\" >";
        return 0;
 }
 
 
-int InsetLabel::DocBook(string & file)
+int InsetLabel::DocBook(ostream & os) const
 {
-       file += "<anchor id=\"" + getContents() +"\" >";
+       os << "<anchor id=\"" << getContents() << "\" >";
        return 0;
 }