mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-23 02:14:50 +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>
|
2002-08-21 Lars Gullik Bjønnes <larsbj@birdstep.com>
|
||||||
|
|
||||||
* insettext.C (collapseParagraphs): pasteParagraph now in global
|
* 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
|
* \author Martin Vermeer <martin.vermeer@hut.fi>
|
||||||
*
|
*/
|
||||||
* Copyright 1995 Matthias Ettrich
|
|
||||||
* Copyright 1995-2001 The LyX Team.
|
|
||||||
*
|
|
||||||
* ====================================================== */
|
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
@ -19,7 +17,7 @@
|
|||||||
#include "insetoptarg.h"
|
#include "insetoptarg.h"
|
||||||
#include "support/LOstream.h"
|
#include "support/LOstream.h"
|
||||||
#include "frontends/Alert.h"
|
#include "frontends/Alert.h"
|
||||||
#include "support/lstrings.h" //frontStrip, strip
|
#include "support/lstrings.h" // frontStrip, strip
|
||||||
#include "lyxtext.h"
|
#include "lyxtext.h"
|
||||||
#include "buffer.h"
|
#include "buffer.h"
|
||||||
#include "gettext.h"
|
#include "gettext.h"
|
||||||
@ -30,49 +28,51 @@ using std::ostream;
|
|||||||
using std::vector;
|
using std::vector;
|
||||||
using std::pair;
|
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)
|
InsetOptArg::InsetOptArg(BufferParams const & ins)
|
||||||
: InsetCollapsable(ins, true)
|
: InsetCollapsable(ins, true)
|
||||||
{
|
{
|
||||||
LyXFont font(LyXFont::ALL_SANE);
|
LyXFont font(LyXFont::ALL_SANE);
|
||||||
font.setColor(LColor::collapsable);
|
font.setColor(LColor::collapsable);
|
||||||
setLabelFont(font);
|
setLabelFont(font);
|
||||||
setLabel(_("opt"));
|
setLabel(_("opt"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
InsetOptArg::InsetOptArg(InsetOptArg const & in, bool same_id)
|
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);
|
font.setColor(LColor::collapsable);
|
||||||
setLabelFont(font);
|
setLabelFont(font);
|
||||||
setLabel(_("opt"));
|
setLabel(_("opt"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Inset * InsetOptArg::clone(Buffer const &, bool same_id) const
|
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
|
string const InsetOptArg::editMessage() const
|
||||||
{
|
{
|
||||||
return _("Opened Optional Argument Inset");
|
return _("Opened Optional Argument Inset");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void InsetOptArg::write(Buffer const * buf, ostream & os) const
|
void InsetOptArg::write(Buffer const * buf, ostream & os) const
|
||||||
{
|
{
|
||||||
os << "OptArg" << "\n";
|
os << "OptArg" << "\n";
|
||||||
InsetCollapsable::write(buf, os);
|
InsetCollapsable::write(buf, os);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int InsetOptArg::latex(Buffer const *, ostream &, bool, bool) const
|
int InsetOptArg::latex(Buffer const *, ostream &, bool, bool) const
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int InsetOptArg::latexOptional(Buffer const * buf, ostream & os,
|
int InsetOptArg::latexOptional(Buffer const * buf, ostream & os,
|
||||||
bool, bool fp) const
|
bool, bool fp) const
|
||||||
{
|
{
|
||||||
@ -81,4 +81,3 @@ int InsetOptArg::latexOptional(Buffer const * buf, ostream & os,
|
|||||||
os << ']';
|
os << ']';
|
||||||
return i + 2;
|
return i + 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,13 +1,11 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
/* This file is part of*
|
/**
|
||||||
* ======================================================
|
* \file insetoptarg.h
|
||||||
|
* Copyright 2002 the LyX Team
|
||||||
|
* Read the file COPYING
|
||||||
*
|
*
|
||||||
* LyX, The Document Processor
|
* \author Martin Vermeer <martin.vermeer@hut.fi>
|
||||||
*
|
*/
|
||||||
* Copyright 1995 Matthias Ettrich
|
|
||||||
* Copyright 1995-2001 The LyX Team
|
|
||||||
*
|
|
||||||
* ====================================================== */
|
|
||||||
|
|
||||||
#ifndef INSETOPTARG_H
|
#ifndef INSETOPTARG_H
|
||||||
#define INSETOPTARG_H
|
#define INSETOPTARG_H
|
||||||
@ -19,27 +17,34 @@
|
|||||||
#include "insettext.h"
|
#include "insettext.h"
|
||||||
#include "insetcollapsable.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 {
|
class InsetOptArg : public InsetCollapsable {
|
||||||
public:
|
public:
|
||||||
InsetOptArg(BufferParams const &);
|
InsetOptArg(BufferParams const &);
|
||||||
///
|
|
||||||
InsetOptArg(InsetOptArg const &, bool same_id = false);
|
InsetOptArg(InsetOptArg const &, bool same_id = false);
|
||||||
|
|
||||||
|
/// make a duplicate of this inset
|
||||||
Inset * clone(Buffer const &, bool same_id = false) const;
|
Inset * clone(Buffer const &, bool same_id = false) const;
|
||||||
///
|
|
||||||
|
/// this inset is editable
|
||||||
EDITABLE editable() const { return IS_EDITABLE; }
|
EDITABLE editable() const { return IS_EDITABLE; }
|
||||||
///
|
/// code of the inset
|
||||||
Inset::Code lyxCode() const { return Inset::OPTARG_CODE; }
|
Inset::Code lyxCode() const { return Inset::OPTARG_CODE; }
|
||||||
///
|
/// return an message upon editing
|
||||||
string const editMessage() const;
|
string const editMessage() const;
|
||||||
|
|
||||||
/// Standard LaTeX output -- short-circuited
|
/// Standard LaTeX output -- short-circuited
|
||||||
int latex(Buffer const *, std::ostream &,
|
int latex(Buffer const *, std::ostream &,
|
||||||
bool fragile, bool fp) const;
|
bool fragile, bool fp) const;
|
||||||
/// Outputting the optional parameter of a LaTeX command
|
/// 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;
|
bool fragile, bool fp) const;
|
||||||
///
|
/// Write out tothe .lyx file
|
||||||
void write(Buffer const * buf, ostream & os) const;
|
void write(Buffer const * buf, ostream & os) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif // INSETOPTARG_H
|
||||||
|
Loading…
Reference in New Issue
Block a user