#include "commandtags.h"
#include "gettext.h"
+using std::ostream;
+
extern BufferView * current_view;
}
-void InsetRef::Edit(int, int)
+void InsetRef::Edit(BufferView * bv, int, int, unsigned int)
{
- current_view->owner()->getLyXFunc()
- ->Dispatch(LFUN_REFGOTO, getContents().c_str());
+ bv->owner()->getLyXFunc()->
+ Dispatch(LFUN_REFGOTO, getContents().c_str());
}
}
-int InsetRef::Latex(ostream & os, signed char /*fragile*/)
+int InsetRef::Latex(ostream & os,
+ bool /*fragile*/, bool /*fs*/) const
{
if(getOptions().empty())
os << escape(getCommand());
}
-int InsetRef::Latex(string & file, signed char /*fragile*/)
+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;
}
-int InsetRef::Linuxdoc(string & file)
+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)
+int InsetRef::DocBook(ostream & os) const
{
- file += "<link linkend=\"" + getContents()
- + "\">"+ getOptions() +"</link>" ;
-
+ os << "<link linkend=\"" << getContents()
+ << "\">" << getOptions() << "</link>";
return 0;
}