]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetref.C
clear()->erase() ; lots of using directives for cxx
[lyx.git] / src / insets / insetref.C
index bd0fa93757b74553131b9556ce25789e4eb18bb5..0df28abc6d3d3b5dc56c5d2ee2aefedff12dae1e 100644 (file)
@@ -16,6 +16,8 @@
 #include "commandtags.h"
 #include "gettext.h"
 
+using std::ostream;
+
 extern BufferView * current_view;
 
 
@@ -67,7 +69,8 @@ string InsetRef::getScreenLabel() const
 }
 
 
-int InsetRef::Latex(ostream & os, signed char /*fragile*/) const
+int InsetRef::Latex(ostream & os,
+                   bool /*fragile*/, bool /*fs*/) const
 {
        if(getOptions().empty())
                os << escape(getCommand());
@@ -81,36 +84,25 @@ int InsetRef::Latex(ostream & os, signed char /*fragile*/) const
 }
 
 
-#ifndef USE_OSTREAM_ONLY
-int InsetRef::Latex(string & file, signed char /*fragile*/) const
+int InsetRef::Ascii(ostream & os) const
 {
-       if(getOptions().empty())
-               file += escape(getCommand());
-       else {
-               string ns;
-               InsetCommand clone = InsetCommand(getCmdName(),
-                                                 getContents(), ns);
-               file += escape(clone.getCommand());
-       }
+       os << "[" << getContents() << "]";
        return 0;
 }
-#endif
 
 
-int InsetRef::Linuxdoc(string & file) const
+int InsetRef::Linuxdoc(ostream & os) const
 {
-       file += "<ref id=\"" + getContents()
-               + "\" name=\""+ getOptions() +"\" >" ;
-
+       os << "<ref id=\"" << getContents()
+          << "\" name=\"" << getOptions() << "\" >";
        return 0;
 }
 
 
-int InsetRef::DocBook(string & file) const
+int InsetRef::DocBook(ostream & os) const
 {
-       file += "<link linkend=\"" + getContents()
-               + "\">"+ getOptions() +"</link>" ;
-
+       os << "<link linkend=\"" << getContents()
+          << "\">" << getOptions() << "</link>";
        return 0;
 }