X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2Finsetmarginal.C;h=e46838c06e78c61dfc7da8acfdb42cf864a29c29;hb=5603df4a5b7e511b31026c9a4f8f55b2b10fde57;hp=babd19772ff9d1323086415bf8b8a9ed1a54ff7a;hpb=b9288969ec06caa3d7b1e9d4eb7937c1e029b44f;p=lyx.git diff --git a/src/insets/insetmarginal.C b/src/insets/insetmarginal.C index babd19772f..e46838c06e 100644 --- a/src/insets/insetmarginal.C +++ b/src/insets/insetmarginal.C @@ -1,29 +1,26 @@ -/* This file is part of - * ====================================================== - * - * LyX, The Document Processor - * - * Copyright 1998 The LyX Team. +/** + * \file insetmarginal.C + * This file is part of LyX, the document processor. + * Licence details can be found in the file COPYING. * - * ====================================================== + * \author Jürgen Vigna + * \author Lars Gullik Bjønnes + * + * Full author contact details are available in file CREDITS. */ #include -#ifdef __GNUG__ -#pragma implementation -#endif - #include "insetmarginal.h" + #include "gettext.h" -#include "lyxfont.h" -#include "BufferView.h" -#include "lyxtext.h" -#include "insets/insettext.h" -#include "support/LOstream.h" -#include "debug.h" +#include "paragraph.h" + +#include "support/std_ostream.h" +using std::string; +using std::auto_ptr; using std::ostream; @@ -35,17 +32,17 @@ InsetMarginal::InsetMarginal(BufferParams const & bp) } -InsetMarginal::InsetMarginal(InsetMarginal const & in, bool same_id) - : InsetFootlike(in, same_id) +InsetMarginal::InsetMarginal(InsetMarginal const & in) + : InsetFootlike(in) { setLabel(_("margin")); setInsetName("Marginal"); } -Inset * InsetMarginal::clone(Buffer const &, bool same_id) const +auto_ptr InsetMarginal::clone() const { - return new InsetMarginal(*const_cast(this), same_id); + return auto_ptr(new InsetMarginal(*this)); } @@ -55,13 +52,11 @@ string const InsetMarginal::editMessage() const } -int InsetMarginal::latex(Buffer const * buf, - ostream & os, bool fragile, bool fp) const +int InsetMarginal::latex(Buffer const & buf, ostream & os, + OutputParams const & runparams) const { os << "%\n\\marginpar{"; - - int const i = inset.latex(buf, os, fragile, fp); + int const i = InsetText::latex(buf, os, runparams); os << "%\n}"; - return i + 2; }