X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2Finsetlabel.C;h=0973ad239cd1b419a570cc4609693deaf86241a3;hb=3c8aba3b556871fb1100a2f98cd93d5d4e3f70c9;hp=2ebb685295e86b4ca01490d5b20c2308b010f4aa;hpb=0eccdd1c3613e5170deb77b22174dd0afde833e9;p=lyx.git diff --git a/src/insets/insetlabel.C b/src/insets/insetlabel.C index 2ebb685295..0973ad239c 100644 --- a/src/insets/insetlabel.C +++ b/src/insets/insetlabel.C @@ -4,9 +4,9 @@ * LyX, The Document Processor * * Copyright 1995 Matthias Ettrich - * Copyright 1995-1999 The LyX Team. + * Copyright 1995-2000 The LyX Team. * - * ======================================================*/ + * ====================================================== */ #include @@ -15,6 +15,9 @@ #endif #include "insetlabel.h" +#include "support/LOstream.h" + +using std::ostream; /* Label. Used to insert a label automatically */ @@ -25,15 +28,9 @@ InsetLabel::InsetLabel(string const & cmd) } -InsetLabel::~InsetLabel() +Inset * InsetLabel::Clone() const { -} - - -Inset* InsetLabel::Clone() -{ - InsetLabel *result = new InsetLabel(getCommand()); - return result; + return new InsetLabel(getCommand()); } @@ -48,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 += "