mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 18:08:10 +00:00
pedantic cleanup
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5091 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
74a633f71f
commit
91ba9e6f91
@ -1,3 +1,8 @@
|
||||
2002-08-24 John Levon <levon@movementarian.org>
|
||||
|
||||
* insetoptarg.h:
|
||||
* insetoptarg.C: ws, pedantry ...
|
||||
|
||||
2002-08-21 Lars Gullik Bjønnes <larsbj@birdstep.com>
|
||||
|
||||
* insettext.C (collapseParagraphs): pasteParagraph now in global
|
||||
|
@ -1,12 +1,10 @@
|
||||
/* This file is part of
|
||||
* ======================================================
|
||||
/**
|
||||
* \file insetoptarg.C
|
||||
* Copyright 2002 the LyX Team
|
||||
* Read the file COPYING
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
*
|
||||
* Copyright 1995 Matthias Ettrich
|
||||
* Copyright 1995-2001 The LyX Team.
|
||||
*
|
||||
* ====================================================== */
|
||||
* \author Martin Vermeer <martin.vermeer@hut.fi>
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@ -19,7 +17,7 @@
|
||||
#include "insetoptarg.h"
|
||||
#include "support/LOstream.h"
|
||||
#include "frontends/Alert.h"
|
||||
#include "support/lstrings.h" //frontStrip, strip
|
||||
#include "support/lstrings.h" // frontStrip, strip
|
||||
#include "lyxtext.h"
|
||||
#include "buffer.h"
|
||||
#include "gettext.h"
|
||||
@ -30,49 +28,51 @@ using std::ostream;
|
||||
using std::vector;
|
||||
using std::pair;
|
||||
|
||||
/* OptArg. Used to insert a short version of sectioning header etc.
|
||||
* automatically, or other optional LaTeX arguments */
|
||||
|
||||
|
||||
InsetOptArg::InsetOptArg(BufferParams const & ins)
|
||||
: InsetCollapsable(ins, true)
|
||||
{
|
||||
LyXFont font(LyXFont::ALL_SANE);
|
||||
LyXFont font(LyXFont::ALL_SANE);
|
||||
font.setColor(LColor::collapsable);
|
||||
setLabelFont(font);
|
||||
setLabel(_("opt"));
|
||||
}
|
||||
|
||||
|
||||
InsetOptArg::InsetOptArg(InsetOptArg const & in, bool same_id)
|
||||
: InsetCollapsable(in, same_id)
|
||||
: InsetCollapsable(in, same_id)
|
||||
{
|
||||
LyXFont font(LyXFont::ALL_SANE);
|
||||
LyXFont font(LyXFont::ALL_SANE);
|
||||
font.setColor(LColor::collapsable);
|
||||
setLabelFont(font);
|
||||
setLabel(_("opt"));
|
||||
}
|
||||
|
||||
|
||||
Inset * InsetOptArg::clone(Buffer const &, bool same_id) const
|
||||
{
|
||||
return new InsetOptArg(*this, same_id);
|
||||
return new InsetOptArg(*this, same_id);
|
||||
}
|
||||
|
||||
|
||||
string const InsetOptArg::editMessage() const
|
||||
{
|
||||
return _("Opened Optional Argument Inset");
|
||||
}
|
||||
|
||||
|
||||
void InsetOptArg::write(Buffer const * buf, ostream & os) const
|
||||
{
|
||||
os << "OptArg" << "\n";
|
||||
InsetCollapsable::write(buf, os);
|
||||
}
|
||||
|
||||
|
||||
int InsetOptArg::latex(Buffer const *, ostream &, bool, bool) const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int InsetOptArg::latexOptional(Buffer const * buf, ostream & os,
|
||||
bool, bool fp) const
|
||||
{
|
||||
@ -81,4 +81,3 @@ int InsetOptArg::latexOptional(Buffer const * buf, ostream & os,
|
||||
os << ']';
|
||||
return i + 2;
|
||||
}
|
||||
|
||||
|
@ -1,13 +1,11 @@
|
||||
// -*- C++ -*-
|
||||
/* This file is part of*
|
||||
* ======================================================
|
||||
/**
|
||||
* \file insetoptarg.h
|
||||
* Copyright 2002 the LyX Team
|
||||
* Read the file COPYING
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
*
|
||||
* Copyright 1995 Matthias Ettrich
|
||||
* Copyright 1995-2001 The LyX Team
|
||||
*
|
||||
* ====================================================== */
|
||||
* \author Martin Vermeer <martin.vermeer@hut.fi>
|
||||
*/
|
||||
|
||||
#ifndef INSETOPTARG_H
|
||||
#define INSETOPTARG_H
|
||||
@ -19,27 +17,34 @@
|
||||
#include "insettext.h"
|
||||
#include "insetcollapsable.h"
|
||||
|
||||
/**
|
||||
* InsetOptArg. Used to insert a short version of sectioning header etc.
|
||||
* automatically, or other optional LaTeX arguments
|
||||
*/
|
||||
class InsetOptArg : public InsetCollapsable {
|
||||
public:
|
||||
InsetOptArg(BufferParams const &);
|
||||
///
|
||||
|
||||
InsetOptArg(InsetOptArg const &, bool same_id = false);
|
||||
|
||||
/// make a duplicate of this inset
|
||||
Inset * clone(Buffer const &, bool same_id = false) const;
|
||||
///
|
||||
|
||||
/// this inset is editable
|
||||
EDITABLE editable() const { return IS_EDITABLE; }
|
||||
///
|
||||
/// code of the inset
|
||||
Inset::Code lyxCode() const { return Inset::OPTARG_CODE; }
|
||||
///
|
||||
/// return an message upon editing
|
||||
string const editMessage() const;
|
||||
|
||||
/// Standard LaTeX output -- short-circuited
|
||||
int latex(Buffer const *, std::ostream &,
|
||||
int latex(Buffer const *, std::ostream &,
|
||||
bool fragile, bool fp) const;
|
||||
/// Outputting the optional parameter of a LaTeX command
|
||||
int latexOptional(Buffer const *, std::ostream &,
|
||||
int latexOptional(Buffer const *, std::ostream &,
|
||||
bool fragile, bool fp) const;
|
||||
///
|
||||
/// Write out tothe .lyx file
|
||||
void write(Buffer const * buf, ostream & os) const;
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif // INSETOPTARG_H
|
||||
|
Loading…
Reference in New Issue
Block a user