src/output_plaintext.C
src/paragraph.C
src/rowpainter.C
-src/support/globbing.C
+src/support/filefilterlist.C
src/support/path_defines.C.in
src/text.C
src/text2.C
class ErrorList;
class FuncRequest;
class FuncStatus;
-class InsetOld;
class Language;
class LCursor;
class LyXText;
+2004-11-25 Lars Gullik Bjonnes <larsbj@gullik.net>
+
+ * rename a lot of InsetOld to InsetBase
+
2004-11-25 Angus Leeming <leeming@lyx.org>
* BufferView_pimpl.C:
* FuncStatus.C (message): new methods. Used to provide an error
message indicating why a command is disabled.
(clear, |=, FuncStatus): update for message.
-
+
2004-11-23 Georg Baum <Georg.Baum@post.rwth-aachen.de>
* lyxfunc.C (dispatch): always call sendDispatchMessage
-
+
2004-11-24 Alfredo Braunstein <abraunst@lyx.org>
* BufferView.C:
(rowstruct): use initialization
(columnstruct): use initialization
(ltType): use initialization
-
- * lyxlength.h (swap): new function
- * LColor.[Ch] (operator=): use the common semantics
+ * lyxlength.h (swap): new function
+
+ * LColor.[Ch] (operator=): use the common semantics
2004-11-22 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
for (; lit != eit; ++lit) {
switch (lit->inset->lyxCode()) {
- case InsetOld::TABULAR_CODE: {
+ case InsetBase::TABULAR_CODE: {
InsetTabular * it = static_cast<InsetTabular*>(lit->inset);
it->buffer(&buffer);
break;
}
for (InsetIterator it = inset_iterator_begin(inset()); it; ++it) {
- if (it->lyxCode() == InsetOld::BIBTEX_CODE) {
+ if (it->lyxCode() == InsetBase::BIBTEX_CODE) {
InsetBibtex const & inset =
dynamic_cast<InsetBibtex const &>(*it);
inset.fillWithBibKeys(*this, keys);
- } else if (it->lyxCode() == InsetOld::INCLUDE_CODE) {
+ } else if (it->lyxCode() == InsetBase::INCLUDE_CODE) {
InsetInclude const & inset =
dynamic_cast<InsetInclude const &>(*it);
inset.fillWithBibKeys(*this, keys);
- } else if (it->lyxCode() == InsetOld::BIBITEM_CODE) {
+ } else if (it->lyxCode() == InsetBase::BIBITEM_CODE) {
InsetBibitem const & inset =
dynamic_cast<InsetBibitem const &>(*it);
string const key = inset.getContents();
+2004-11-25 Lars Gullik Bjonnes <larsbj@gullik.net>
+
+ * rename a lot of InsetOld to InsetBase
+
2004-11-20 Lars Gullik Bjonnes <larsbj@gullik.net>
* GraphicsCache.C: include <map> to fix compilation with boost
- 1.32.0
+ 1.32.0
2004-11-09 Georg Baum <Georg.Baum@post.rwth-aachen.de>
#include <boost/scoped_ptr.hpp>
#include <boost/signal.hpp>
-class InsetOld;
-
namespace lyx {
namespace graphics {
#include <boost/scoped_ptr.hpp>
#include <string>
-class InsetOld;
-
namespace lyx {
namespace graphics {
InsetIterator const end = inset_iterator_end(inset);
for (; it != end; ++it)
- if (it->lyxCode() == InsetOld::MATHMACRO_CODE)
+ if (it->lyxCode() == InsetBase::MATHMACRO_CODE)
it->latex(buffer_, os, runparams);
// All equation lables appear as "(#)" + preview.sty's rendering of
+2004-11-25 Lars Gullik Bjonnes <larsbj@gullik.net>
+
+ * rename a lot of InsetOld to InsetBase
+
2004-11-25 Alfredo Braunstein <abraunst@lyx.org>
* insettabular.C:
private:
InsetOld & operator=(InsetOld const &) const;
-
+
///
std::string name_;
/** We store the LColor::color value as an int to get LColor.h out
};
-/** \c InsetOld_code is a wrapper for InsetOld::Code.
+/** \c InsetBase_code is a wrapper for InsetBase::Code.
* It can be forward-declared and passed as a function argument without
* having to expose inset.h.
*/
-class InsetOld_code {
+class InsetBase_code {
InsetBase::Code val_;
public:
- InsetOld_code(InsetBase::Code val) : val_(val) {}
+ InsetBase_code(InsetBase::Code val) : val_(val) {}
operator InsetBase::Code() const { return val_; }
};
/** This is not quite the correct place for this enum. I think
the correct would be to let each subclass of Inset declare
- its own enum code. Actually the notion of an InsetOld::Code
+ its own enum code. Actually the notion of an InsetBase::Code
should be avoided, but I am not sure how this could be done
in a cleaner way. */
enum Code {
///
EDITABLE editable() const { return IS_EDITABLE; }
///
- InsetOld::Code lyxCode() const { return InsetOld::BIBITEM_CODE; }
+ InsetBase::Code lyxCode() const { return InsetBase::BIBITEM_CODE; }
/// keep .lyx format compatible
bool directWrite() const { return true; }
///
///
EDITABLE editable() const { return IS_EDITABLE; }
///
- InsetOld::Code lyxCode() const { return InsetOld::BIBTEX_CODE; }
+ InsetBase::Code lyxCode() const { return InsetBase::BIBTEX_CODE; }
///
bool display() const { return true; }
///
///
std::string const editMessage() const;
///
- InsetOld::Code lyxCode() const { return InsetOld::BOX_CODE; }
+ InsetBase::Code lyxCode() const { return InsetBase::BOX_CODE; }
///
void write(Buffer const &, std::ostream &) const;
///
///
std::string const editMessage() const;
///
- InsetOld::Code lyxCode() const { return InsetOld::BRANCH_CODE; }
+ InsetBase::Code lyxCode() const { return InsetBase::BRANCH_CODE; }
///
void write(Buffer const &, std::ostream &) const;
///
// See if we can find the name of the float this caption
// belongs to.
#if 0
- InsetOld * i1 = owner();
- InsetOld * i2 = i1 ? i1->owner() : 0;
+ InsetBase * i1 = owner();
+ InsetBase * i2 = i1 ? i1->owner() : 0;
string type;
if (i2->lyxCode() == FLOAT_CODE)
#ifdef WITH_WARNINGS
///
virtual bool display() const;
///
- virtual InsetOld::Code lyxCode() const;
+ virtual InsetBase::Code lyxCode() const;
///
virtual std::string const editMessage() const;
///
inline
-InsetOld::Code InsetCaption::lyxCode() const
+InsetBase::Code InsetCaption::lyxCode() const
{
return CAPTION_CODE;
}
///
std::string const editMessage() const;
///
- InsetOld::Code lyxCode() const { return InsetOld::CHARSTYLE_CODE; }
+ InsetBase::Code lyxCode() const { return InsetBase::CHARSTYLE_CODE; }
///
void write(Buffer const &, std::ostream &) const;
///
///
EDITABLE editable() const { return IS_EDITABLE; }
///
- InsetOld::Code lyxCode() const { return InsetOld::CITE_CODE; }
+ InsetBase::Code lyxCode() const { return InsetBase::CITE_CODE; }
///
int plaintext(Buffer const &, std::ostream &, OutputParams const &) const;
///
}
-InsetOld::EDITABLE InsetCollapsable::editable() const
+InsetBase::EDITABLE InsetCollapsable::editable() const
{
return status_ != Collapsed ? HIGHLY_EDITABLE : IS_EDITABLE;
}
}
default:
- InsetOld::doDispatch(cur, cmd);
+ InsetBase::doDispatch(cur, cmd);
break;
}
virtual int docbook(Buffer const &, std::ostream &,
OutputParams const & runparams) const;
///
- InsetOld::Code lyxCode() const { return InsetOld::NO_CODE; }
+ InsetBase::Code lyxCode() const { return InsetBase::NO_CODE; }
///
InsetCommandParams const & params() const { return p_; }
///
void read(Buffer const & buf, LyXLex & lex);
///
- InsetOld::Code lyxCode() const { return InsetOld::ENVIRONMENT_CODE; }
+ InsetBase::Code lyxCode() const { return InsetBase::ENVIRONMENT_CODE; }
///
int latex(Buffer const &, std::ostream &,
OutputParams const &) const;
///
std::string const editMessage() const;
///
- InsetOld::EDITABLE editable() const { return HIGHLY_EDITABLE; }
+ InsetBase::EDITABLE editable() const { return HIGHLY_EDITABLE; }
///
bool isTextInset() const { return true; }
///
}
-bool InsetERT::insetAllowed(InsetOld::Code code) const
+bool InsetERT::insetAllowed(InsetBase::Code code) const
{
- return code == InsetOld::NEWLINE_CODE;
+ return code == InsetBase::NEWLINE_CODE;
}
///
~InsetERT();
///
- InsetOld::Code lyxCode() const { return InsetOld::ERT_CODE; }
+ InsetBase::Code lyxCode() const { return InsetBase::ERT_CODE; }
///
void write(Buffer const & buf, std::ostream & os) const;
///
std::string const editMessage() const;
///
- bool insetAllowed(InsetOld::Code code) const;
+ bool insetAllowed(InsetBase::Code code) const;
///
int latex(Buffer const &, std::ostream &,
OutputParams const &) const;
break;
default:
- InsetOld::doDispatch(cur, cmd);
+ InsetBase::doDispatch(cur, cmd);
}
}
///
virtual ~InsetExternal();
///
- virtual InsetOld::Code lyxCode() const { return EXTERNAL_CODE; }
+ virtual InsetBase::Code lyxCode() const { return EXTERNAL_CODE; }
///
virtual EDITABLE editable() const { return IS_EDITABLE; }
}
-bool InsetFloat::insetAllowed(InsetOld::Code code) const
+bool InsetFloat::insetAllowed(InsetBase::Code code) const
{
- return code != InsetOld::FLOAT_CODE
- && code != InsetOld::FOOT_CODE
- && code != InsetOld::MARGIN_CODE;
+ return code != InsetBase::FLOAT_CODE
+ && code != InsetBase::FOOT_CODE
+ && code != InsetBase::MARGIN_CODE;
}
///
void validate(LaTeXFeatures & features) const;
///
- InsetOld::Code lyxCode() const { return InsetOld::FLOAT_CODE; }
+ InsetBase::Code lyxCode() const { return InsetBase::FLOAT_CODE; }
///
int latex(Buffer const &, std::ostream &,
OutputParams const &) const;
///
std::string const editMessage() const;
///
- bool insetAllowed(InsetOld::Code) const;
+ bool insetAllowed(InsetBase::Code) const;
/** returns true if, when outputing LaTeX, font changes should
be closed before generating this inset. This is needed for
insets that may contain several paragraphs */
}
-InsetOld::Code InsetFloatList::lyxCode() const
+InsetBase::Code InsetFloatList::lyxCode() const
{
- return InsetOld::FLOAT_LIST_CODE;
+ return InsetBase::FLOAT_LIST_CODE;
}
///
EDITABLE editable() const { return IS_EDITABLE; }
///
- InsetOld::Code lyxCode() const;
+ InsetBase::Code lyxCode() const;
///
bool display() const { return true; }
///
///
InsetFoot(BufferParams const &);
///
- InsetOld::Code lyxCode() const { return InsetOld::FOOT_CODE; }
+ InsetBase::Code lyxCode() const { return InsetBase::FOOT_CODE; }
///
int latex(Buffer const &, std::ostream &,
OutputParams const &) const;
}
-bool InsetFootlike::insetAllowed(InsetOld::Code code) const
+bool InsetFootlike::insetAllowed(InsetBase::Code code) const
{
- if (code == InsetOld::FOOT_CODE || code == InsetOld::MARGIN_CODE
- || code == InsetOld::FLOAT_CODE)
+ if (code == InsetBase::FOOT_CODE || code == InsetBase::MARGIN_CODE
+ || code == InsetBase::FLOAT_CODE)
return false;
return InsetCollapsable::insetAllowed(code);
}
///
void write(Buffer const & buf, std::ostream & os) const;
///
- bool insetAllowed(InsetOld::Code) const;
+ bool insetAllowed(InsetBase::Code) const;
/** returns true if, when outputing LaTeX, font changes should
be closed before generating this inset. This is needed for
insets that may contain several paragraphs */
break;
default:
- InsetOld::doDispatch(cur, cmd);
+ InsetBase::doDispatch(cur, cmd);
break;
}
}
}
-InsetOld::EDITABLE InsetGraphics::editable() const
+InsetBase::EDITABLE InsetGraphics::editable() const
{
return IS_EDITABLE;
}
void validate(LaTeXFeatures & features) const;
/// returns LyX code associated with the inset. Used for TOC, ...)
- InsetOld::Code lyxCode() const { return InsetOld::GRAPHICS_CODE; }
+ InsetBase::Code lyxCode() const { return InsetBase::GRAPHICS_CODE; }
/** Set the inset parameters, used by the GUIndependent dialog.
Return true of new params are different from what was so far.
///
std::string const getScreenLabel(Buffer const &) const;
///
- InsetOld::Code lyxCode() const { return InsetOld::HFILL_CODE; }
+ InsetBase::Code lyxCode() const { return InsetBase::HFILL_CODE; }
///
int latex(Buffer const &, std::ostream &,
OutputParams const &) const;
break;
default:
- InsetOld::doDispatch(cur, cmd);
+ InsetBase::doDispatch(cur, cmd);
break;
}
}
InsetCommandParams const & params(void) const;
///
- InsetOld::Code lyxCode() const { return InsetOld::INCLUDE_CODE; }
+ InsetBase::Code lyxCode() const { return InsetBase::INCLUDE_CODE; }
/** Fills \c list
* \param buffer the Buffer containing this inset.
* \param list the list of labels in the child buffer.
}
-InsetOld::Code InsetIndex::lyxCode() const
+InsetBase::Code InsetIndex::lyxCode() const
{
- return InsetOld::INDEX_CODE;
+ return InsetBase::INDEX_CODE;
}
}
-InsetOld::Code InsetPrintIndex::lyxCode() const
+InsetBase::Code InsetPrintIndex::lyxCode() const
{
- return InsetOld::INDEX_PRINT_CODE;
+ return InsetBase::INDEX_PRINT_CODE;
}
///
EDITABLE editable() const { return IS_EDITABLE; }
///
- InsetOld::Code lyxCode() const;
+ InsetBase::Code lyxCode() const;
///
int docbook(Buffer const &, std::ostream &,
OutputParams const &) const;
///
EDITABLE editable() const { return NOT_EDITABLE; }
///
- InsetOld::Code lyxCode() const;
+ InsetBase::Code lyxCode() const;
///
bool display() const { return true; }
///
///
EDITABLE editable() const { return IS_EDITABLE; }
///
- InsetOld::Code lyxCode() const { return InsetOld::LABEL_CODE; }
+ InsetBase::Code lyxCode() const { return InsetBase::LABEL_CODE; }
/// Appends \c list with this label
void getLabelList(Buffer const &, std::vector<std::string> & list) const;
///
}
-InsetOld::Code InsetLatexAccent::lyxCode() const
+InsetBase::Code InsetLatexAccent::lyxCode() const
{
- return InsetOld::ACCENT_CODE;
+ return InsetBase::ACCENT_CODE;
}
///
bool directWrite() const;
///
- InsetOld::Code lyxCode()const;
+ InsetBase::Code lyxCode()const;
///
inline bool canDisplay();
// should this inset be handled like a normal charater
InsetLine() {}
- InsetOld::Code lyxCode() const { return InsetOld::LINE_CODE; }
+ InsetBase::Code lyxCode() const { return InsetBase::LINE_CODE; }
void metrics(MetricsInfo &, Dimension &) const;
///
InsetMarginal(BufferParams const &);
///
- InsetOld::Code lyxCode() const { return InsetOld::MARGIN_CODE; }
+ InsetBase::Code lyxCode() const { return InsetBase::MARGIN_CODE; }
///
int latex(Buffer const &, std::ostream &,
OutputParams const &) const;
InsetNewline() {}
- InsetOld::Code lyxCode() const { return InsetOld::NEWLINE_CODE; }
+ InsetBase::Code lyxCode() const { return InsetBase::NEWLINE_CODE; }
void metrics(MetricsInfo &, Dimension &) const;
///
std::string const editMessage() const;
///
- InsetOld::Code lyxCode() const { return InsetOld::NOTE_CODE; }
+ InsetBase::Code lyxCode() const { return InsetBase::NOTE_CODE; }
///
void write(Buffer const &, std::ostream &) const;
///
InsetOptArg(BufferParams const &);
/// code of the inset
- InsetOld::Code lyxCode() const { return InsetOld::OPTARG_CODE; }
+ InsetBase::Code lyxCode() const { return InsetBase::OPTARG_CODE; }
/// return an message upon editing
std::string const editMessage() const;
InsetPagebreak() {}
- InsetOld::Code lyxCode() const { return InsetOld::LINE_CODE; }
+ InsetBase::Code lyxCode() const { return InsetBase::LINE_CODE; }
void metrics(MetricsInfo &, Dimension &) const;
}
-InsetOld::Code InsetQuotes::lyxCode() const
+InsetBase::Code InsetQuotes::lyxCode() const
{
- return InsetOld::QUOTE_CODE;
+ return InsetBase::QUOTE_CODE;
}
///
void validate(LaTeXFeatures &) const;
///
- InsetOld::Code lyxCode() const;
+ InsetBase::Code lyxCode() const;
// should this inset be handled like a normal character
bool isChar() const { return true; }
///
EDITABLE editable() const { return IS_EDITABLE; }
///
- InsetOld::Code lyxCode() const { return InsetOld::REF_CODE; }
+ InsetBase::Code lyxCode() const { return InsetBase::REF_CODE; }
///
bool display() const { return false; }
///
int docbook(Buffer const &, std::ostream &,
OutputParams const &) const;
///
- InsetOld::Code lyxCode() const { return InsetOld::SPACE_CODE; }
+ InsetBase::Code lyxCode() const { return InsetBase::SPACE_CODE; }
/// We don't need \begin_inset and \end_inset
bool directWrite() const { return true; }
int docbook(Buffer const &, std::ostream &,
OutputParams const &) const;
///
- InsetOld::Code lyxCode() const { return InsetOld::SPECIALCHAR_CODE; }
+ InsetBase::Code lyxCode() const { return InsetBase::SPECIALCHAR_CODE; }
/// We don't need \begin_inset and \end_inset
bool directWrite() const { return true; }
///
OutputParams const & runparams) const
{
int ret = 0;
- InsetOld * master = 0;
+ InsetBase * master = 0;
#ifdef WITH_WARNINGS
#warning Why not pass a proper DocIterator here?
// if the table is inside a float it doesn't need the informaltable
// wrapper. Search for it.
for (master = owner(); master; master = master->owner())
- if (master->lyxCode() == InsetOld::FLOAT_CODE)
+ if (master->lyxCode() == InsetBase::FLOAT_CODE)
break;
#endif
}
-InsetOld::Code InsetTOC::lyxCode() const
+InsetBase::Code InsetTOC::lyxCode() const
{
if (getCmdName() == "tableofcontents")
- return InsetOld::TOC_CODE;
- return InsetOld::NO_CODE;
+ return InsetBase::TOC_CODE;
+ return InsetBase::NO_CODE;
}
///
EDITABLE editable() const { return IS_EDITABLE; }
///
- InsetOld::Code lyxCode() const;
+ InsetBase::Code lyxCode() const;
///
bool display() const { return true; }
///
explicit
InsetUrl(InsetCommandParams const &);
///
- InsetOld::Code lyxCode() const { return InsetOld::URL_CODE; }
+ InsetBase::Code lyxCode() const { return InsetBase::URL_CODE; }
///
void validate(LaTeXFeatures &) const;
///
break;
default:
- InsetOld::doDispatch(cur, cmd);
+ InsetBase::doDispatch(cur, cmd);
break;
}
}
}
-bool InsetWrap::insetAllowed(InsetOld::Code code) const
+bool InsetWrap::insetAllowed(InsetBase::Code code) const
{
switch(code) {
case FLOAT_CODE:
///
void validate(LaTeXFeatures & features) const;
///
- InsetOld::Code lyxCode() const { return InsetOld::WRAP_CODE; }
+ InsetBase::Code lyxCode() const { return InsetBase::WRAP_CODE; }
///
int latex(Buffer const &, std::ostream &,
OutputParams const &) const;
///
std::string const editMessage() const;
///
- bool insetAllowed(InsetOld::Code) const;
+ bool insetAllowed(InsetBase::Code) const;
///
void addToToc(lyx::toc::TocList &, Buffer const &) const;
///
// An updatable inset is highly editable by definition
-InsetOld::EDITABLE UpdatableInset::editable() const
+InsetBase::EDITABLE UpdatableInset::editable() const
{
return HIGHLY_EDITABLE;
}
break;
default:
- InsetOld::dispatch(cur, cmd);
+ InsetBase::dispatch(cur, cmd);
}
}
if (!inset)
break;
- InsetOld::Code code = inset->lyxCode();
+ InsetBase::Code code = inset->lyxCode();
switch (code) {
- case InsetOld::TABULAR_CODE:
+ case InsetBase::TABULAR_CODE:
enable = cmd.argument == "tabular";
break;
- case InsetOld::ERT_CODE:
+ case InsetBase::ERT_CODE:
enable = cmd.argument == "ert";
break;
- case InsetOld::FLOAT_CODE:
+ case InsetBase::FLOAT_CODE:
enable = cmd.argument == "float";
break;
- case InsetOld::WRAP_CODE:
+ case InsetBase::WRAP_CODE:
enable = cmd.argument == "wrap";
break;
- case InsetOld::NOTE_CODE:
+ case InsetBase::NOTE_CODE:
enable = cmd.argument == "note";
break;
- case InsetOld::BRANCH_CODE:
+ case InsetBase::BRANCH_CODE:
enable = cmd.argument == "branch";
break;
- case InsetOld::BOX_CODE:
+ case InsetBase::BOX_CODE:
enable = cmd.argument == "box";
break;
default:
enable = Exporter::IsExportable(*buf, "dvi")
&& lyxrc.print_command != "none";
else if (name == "character")
- enable = cur.inset().lyxCode() != InsetOld::ERT_CODE;
+ enable = cur.inset().lyxCode() != InsetBase::ERT_CODE;
else if (name == "vclog")
enable = buf->lyxvc().inUse();
else if (name == "latexlog")
class CursorSlice;
class Dimension;
class InsetBase;
-class InsetOld_code;
+class InsetBase_code;
class FuncRequest;
class FuncStatus;
class LColor_color;
/// Find next inset of some specified type.
bool gotoNextInset(LCursor & cur,
- std::vector<InsetOld_code> const & codes,
+ std::vector<InsetBase_code> const & codes,
std::string const & contents = std::string());
///
void gotoInset(LCursor & cur,
- std::vector<InsetOld_code> const & codes, bool same_content);
+ std::vector<InsetBase_code> const & codes, bool same_content);
///
- void gotoInset(LCursor & cur, InsetOld_code code, bool same_content);
+ void gotoInset(LCursor & cur, InsetBase_code code, bool same_content);
/// current text width
int width() const;
// treat <toc> as a special case for compatibility with old code
if (!pit->empty() && pit->isInset(0)) {
InsetBase const * inset = pit->getInset(0);
- if (inset->lyxCode() == InsetOld::TOC_CODE) {
+ if (inset->lyxCode() == InsetBase::TOC_CODE) {
string const temp = "toc";
sgml::openTag(os, temp);
continue;
}
-bool Paragraph::insetAllowed(InsetOld_code code)
+bool Paragraph::insetAllowed(InsetBase_code code)
{
return !pimpl_->inset_owner || pimpl_->inset_owner->insetAllowed(code);
}
class Counters;
class InsetBase;
class InsetBibitem;
-class InsetOld_code;
+class InsetBase_code;
class Language;
class LaTeXFeatures;
class OutputParams;
void insertInset(lyx::pos_type pos, InsetBase * inset,
LyXFont const &, Change change = Change(Change::INSERTED));
///
- bool insetAllowed(InsetOld_code code);
+ bool insetAllowed(InsetBase_code code);
///
InsetBase * getInset(lyx::pos_type pos);
///
}
bool LyXText::gotoNextInset(LCursor & cur,
- vector<InsetOld_code> const & codes, string const & contents)
+ vector<InsetBase_code> const & codes, string const & contents)
{
BOOST_ASSERT(this == cur.text());
pit_type end = paragraphs().size();
void LyXText::gotoInset(LCursor & cur,
- vector<InsetOld_code> const & codes, bool same_content)
+ vector<InsetBase_code> const & codes, bool same_content)
{
cur.clearSelection();
}
-void LyXText::gotoInset(LCursor & cur, InsetOld_code code, bool same_content)
+void LyXText::gotoInset(LCursor & cur, InsetBase_code code, bool same_content)
{
- gotoInset(cur, vector<InsetOld_code>(1, code), same_content);
+ gotoInset(cur, vector<InsetBase_code>(1, code), same_content);
}
break;
case LFUN_REFERENCE_GOTO: {
- vector<InsetOld_code> tmp;
+ vector<InsetBase_code> tmp;
tmp.push_back(InsetBase::LABEL_CODE);
tmp.push_back(InsetBase::REF_CODE);
gotoInset(cur, tmp, true);
break;
case LFUN_INSET_OPTARG:
- enable = numberOfOptArgs(cur.paragraph())
+ enable = numberOfOptArgs(cur.paragraph())
< cur.paragraph().layout()->optionalargs;
break;
#if 0
// the functions which insert insets
- InsetOld::Code code = InsetOld::NO_CODE;
+ InsetBase::Code code = InsetBase::NO_CODE;
switch (cmd.action) {
case LFUN_DIALOG_SHOW_NEW_INSET:
if (cmd.argument == "bibitem")
- code = InsetOld::BIBITEM_CODE;
+ code = InsetBase::BIBITEM_CODE;
else if (cmd.argument == "bibtex")
- code = InsetOld::BIBTEX_CODE;
+ code = InsetBase::BIBTEX_CODE;
else if (cmd.argument == "box")
- code = InsetOld::BOX_CODE;
+ code = InsetBase::BOX_CODE;
else if (cmd.argument == "branch")
- code = InsetOld::BRANCH_CODE;
+ code = InsetBase::BRANCH_CODE;
else if (cmd.argument == "citation")
- code = InsetOld::CITE_CODE;
+ code = InsetBase::CITE_CODE;
else if (cmd.argument == "ert")
- code = InsetOld::ERT_CODE;
+ code = InsetBase::ERT_CODE;
else if (cmd.argument == "external")
- code = InsetOld::EXTERNAL_CODE;
+ code = InsetBase::EXTERNAL_CODE;
else if (cmd.argument == "float")
- code = InsetOld::FLOAT_CODE;
+ code = InsetBase::FLOAT_CODE;
else if (cmd.argument == "graphics")
- code = InsetOld::GRAPHICS_CODE;
+ code = InsetBase::GRAPHICS_CODE;
else if (cmd.argument == "include")
- code = InsetOld::INCLUDE_CODE;
+ code = InsetBase::INCLUDE_CODE;
else if (cmd.argument == "index")
- code = InsetOld::INDEX_CODE;
+ code = InsetBase::INDEX_CODE;
else if (cmd.argument == "label")
- code = InsetOld::LABEL_CODE;
+ code = InsetBase::LABEL_CODE;
else if (cmd.argument == "note")
- code = InsetOld::NOTE_CODE;
+ code = InsetBase::NOTE_CODE;
else if (cmd.argument == "ref")
- code = InsetOld::REF_CODE;
+ code = InsetBase::REF_CODE;
else if (cmd.argument == "toc")
- code = InsetOld::TOC_CODE;
+ code = InsetBase::TOC_CODE;
else if (cmd.argument == "url")
- code = InsetOld::URL_CODE;
+ code = InsetBase::URL_CODE;
else if (cmd.argument == "vspace")
- code = InsetOld::VSPACE_CODE;
+ code = InsetBase::VSPACE_CODE;
else if (cmd.argument == "wrap")
- code = InsetOld::WRAP_CODE;
+ code = InsetBase::WRAP_CODE;
break;
case LFUN_INSET_ERT:
- code = InsetOld::ERT_CODE;
+ code = InsetBase::ERT_CODE;
break;
case LFUN_INSET_FOOTNOTE:
- code = InsetOld::FOOT_CODE;
+ code = InsetBase::FOOT_CODE;
break;
case LFUN_TABULAR_INSERT:
- code = InsetOld::TABULAR_CODE;
+ code = InsetBase::TABULAR_CODE;
break;
case LFUN_INSET_MARGINAL:
- code = InsetOld::MARGIN_CODE;
+ code = InsetBase::MARGIN_CODE;
break;
case LFUN_INSET_FLOAT:
case LFUN_INSET_WIDE_FLOAT:
- code = InsetOld::FLOAT_CODE;
+ code = InsetBase::FLOAT_CODE;
break;
case LFUN_INSET_WRAP:
- code = InsetOld::WRAP_CODE;
+ code = InsetBase::WRAP_CODE;
break;
case LFUN_FLOAT_LIST:
- code = InsetOld::FLOAT_LIST_CODE;
+ code = InsetBase::FLOAT_LIST_CODE;
break;
#if 0
case LFUN_INSET_LIST:
- code = InsetOld::LIST_CODE;
+ code = InsetBase::LIST_CODE;
break;
case LFUN_INSET_THEOREM:
- code = InsetOld::THEOREM_CODE;
+ code = InsetBase::THEOREM_CODE;
break;
#endif
case LFUN_INSET_CAPTION:
- code = InsetOld::CAPTION_CODE;
+ code = InsetBase::CAPTION_CODE;
break;
case LFUN_INSERT_NOTE:
- code = InsetOld::NOTE_CODE;
+ code = InsetBase::NOTE_CODE;
break;
case LFUN_INSERT_CHARSTYLE:
- code = InsetOld::CHARSTYLE_CODE;
+ code = InsetBase::CHARSTYLE_CODE;
if (buf->params().getLyXTextClass().charstyles().empty())
enable = false;
break;
case LFUN_INSERT_BOX:
- code = InsetOld::BOX_CODE;
+ code = InsetBase::BOX_CODE;
break;
case LFUN_INSERT_BRANCH:
- code = InsetOld::BRANCH_CODE;
+ code = InsetBase::BRANCH_CODE;
if (buf->params().branchlist().empty())
enable = false;
break;
case LFUN_INSERT_LABEL:
- code = InsetOld::LABEL_CODE;
+ code = InsetBase::LABEL_CODE;
break;
case LFUN_INSET_OPTARG:
- code = InsetOld::OPTARG_CODE;
+ code = InsetBase::OPTARG_CODE;
break;
case LFUN_ENVIRONMENT_INSERT:
- code = InsetOld::BOX_CODE;
+ code = InsetBase::BOX_CODE;
break;
case LFUN_INDEX_INSERT:
- code = InsetOld::INDEX_CODE;
+ code = InsetBase::INDEX_CODE;
break;
case LFUN_INDEX_PRINT:
- code = InsetOld::INDEX_PRINT_CODE;
+ code = InsetBase::INDEX_PRINT_CODE;
break;
case LFUN_TOC_INSERT:
- code = InsetOld::TOC_CODE;
+ code = InsetBase::TOC_CODE;
break;
case LFUN_HTMLURL:
case LFUN_URL:
- code = InsetOld::URL_CODE;
+ code = InsetBase::URL_CODE;
break;
case LFUN_QUOTE:
// always allow this, since we will inset a raw quote
case LFUN_MENU_SEPARATOR:
case LFUN_LDOTS:
case LFUN_END_OF_SENTENCE:
- code = InsetOld::SPECIALCHAR_CODE;
+ code = InsetBase::SPECIALCHAR_CODE;
break;
case LFUN_SPACE_INSERT:
// slight hack: we know this is allowed in math mode
if (cur.inTexted())
- code = InsetOld::SPACE_CODE;
+ code = InsetBase::SPACE_CODE;
break;
case LFUN_INSET_DIALOG_SHOW: {
InsetBase * inset = cur.nextInset();
enable = inset;
if (inset) {
code = inset->lyxCode();
- if (!(code == InsetOld::INCLUDE_CODE
- || code == InsetOld::BIBTEX_CODE
- || code == InsetOld::FLOAT_LIST_CODE
- || code == InsetOld::TOC_CODE))
+ if (!(code == InsetBase::INCLUDE_CODE
+ || code == InsetBase::BIBTEX_CODE
+ || code == InsetBase::FLOAT_LIST_CODE
+ || code == InsetBase::TOC_CODE))
enable = false;
}
break;
break;
}
- if (code != InsetOld::NO_CODE
+ if (code != InsetBase::NO_CODE
&& (cur.empty() || !cur.inset().insetAllowed(code)))
enable = false;
InsetList::const_iterator it = pit->insetlist.begin();
InsetList::const_iterator end = pit->insetlist.end();
for (; it != end; ++it) {
- if (it->inset->lyxCode() == InsetOld::FLOAT_CODE) {
+ if (it->inset->lyxCode() == InsetBase::FLOAT_CODE) {
static_cast<InsetFloat*>(it->inset)
->addToToc(toclist, buf);
- } else if (it->inset->lyxCode() == InsetOld::WRAP_CODE) {
+ } else if (it->inset->lyxCode() == InsetBase::WRAP_CODE) {
static_cast<InsetWrap*>(it->inset)
->addToToc(toclist, buf);
}