#include "debug.h"
#include "LaTeXFeatures.h"
-InsetSpecialChar::InsetSpecialChar()
-{
-}
-
-
InsetSpecialChar::InsetSpecialChar(Kind k)
: kind(k)
-{
-}
-
-
-InsetSpecialChar::~InsetSpecialChar()
-{
-}
+{}
int InsetSpecialChar::Ascent(LyXFont const & font) const
// In lyxf3 this will be just LaTeX
-void InsetSpecialChar::Write(FILE * file)
+void InsetSpecialChar::Write(ostream & os)
{
string command;
switch (kind) {
case LDOTS: command = "\\ldots{}"; break;
case MENU_SEPARATOR: command = "\\menuseparator"; break;
}
- fprintf(file, "\\SpecialChar %s\n", command.c_str());
+ os << "\\SpecialChar " << command << "\n";
}
}
-int InsetSpecialChar::Latex(FILE * file, signed char /*fragile*/)
+int InsetSpecialChar::Latex(ostream & os, signed char /*fragile*/)
{
string command;
signed char dummy = 0;
Latex(command, dummy);
- fprintf(file, "%s", command.c_str());
+ os << command;
return 0;
}
}
-Inset * InsetSpecialChar::Clone()
+Inset * InsetSpecialChar::Clone() const
{
- InsetSpecialChar * result = new InsetSpecialChar(kind);
- return result;
+ return new InsetSpecialChar(kind);
}