From 686f1e276f013e2dc56e3025798c7131bef173f5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Lars=20Gullik=20Bj=C3=B8nnes?= Date: Thu, 25 Nov 2004 19:13:07 +0000 Subject: [PATCH] InsetOld -> InsetBase renaming git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9310 a592a061-630c-0410-9148-cb99ea01b6c8 --- po/POTFILES.in | 2 +- src/BufferView.h | 1 - src/ChangeLog | 14 +++-- src/CutAndPaste.C | 2 +- src/buffer.C | 6 +- src/graphics/ChangeLog | 6 +- src/graphics/GraphicsLoader.h | 2 - src/graphics/PreviewImage.h | 2 - src/graphics/PreviewLoader.C | 2 +- src/insets/ChangeLog | 4 ++ src/insets/inset.h | 8 +-- src/insets/insetbase.h | 2 +- src/insets/insetbibitem.h | 2 +- src/insets/insetbibtex.h | 2 +- src/insets/insetbox.h | 2 +- src/insets/insetbranch.h | 2 +- src/insets/insetcaption.C | 4 +- src/insets/insetcaption.h | 4 +- src/insets/insetcharstyle.h | 2 +- src/insets/insetcite.h | 2 +- src/insets/insetcollapsable.C | 2 +- src/insets/insetcommand.C | 2 +- src/insets/insetcommand.h | 2 +- src/insets/insetenv.h | 4 +- src/insets/insetert.C | 4 +- src/insets/insetert.h | 4 +- src/insets/insetexternal.C | 2 +- src/insets/insetexternal.h | 2 +- src/insets/insetfloat.C | 8 +-- src/insets/insetfloat.h | 4 +- src/insets/insetfloatlist.C | 4 +- src/insets/insetfloatlist.h | 2 +- src/insets/insetfoot.h | 2 +- src/insets/insetfootlike.C | 6 +- src/insets/insetfootlike.h | 2 +- src/insets/insetgraphics.C | 4 +- src/insets/insetgraphics.h | 2 +- src/insets/insethfill.h | 2 +- src/insets/insetinclude.C | 2 +- src/insets/insetinclude.h | 2 +- src/insets/insetindex.C | 8 +-- src/insets/insetindex.h | 4 +- src/insets/insetlabel.h | 2 +- src/insets/insetlatexaccent.C | 4 +- src/insets/insetlatexaccent.h | 2 +- src/insets/insetline.h | 2 +- src/insets/insetmarginal.h | 2 +- src/insets/insetnewline.h | 2 +- src/insets/insetnote.h | 2 +- src/insets/insetoptarg.h | 2 +- src/insets/insetpagebreak.h | 2 +- src/insets/insetquotes.C | 4 +- src/insets/insetquotes.h | 2 +- src/insets/insetref.h | 2 +- src/insets/insetspace.h | 2 +- src/insets/insetspecialchar.h | 2 +- src/insets/insettabular.C | 4 +- src/insets/insettoc.C | 6 +- src/insets/insettoc.h | 2 +- src/insets/inseturl.h | 2 +- src/insets/insetvspace.C | 2 +- src/insets/insetwrap.C | 2 +- src/insets/insetwrap.h | 4 +- src/insets/updatableinset.C | 4 +- src/lyxfunc.C | 18 +++--- src/lyxtext.h | 8 +-- src/output_linuxdoc.C | 2 +- src/paragraph.C | 2 +- src/paragraph.h | 4 +- src/text3.C | 106 +++++++++++++++++----------------- src/toc.C | 4 +- 71 files changed, 177 insertions(+), 170 deletions(-) diff --git a/po/POTFILES.in b/po/POTFILES.in index 8cd4ed3c54..ac0de77129 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -203,7 +203,7 @@ src/output_linuxdoc.C 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 diff --git a/src/BufferView.h b/src/BufferView.h index 5ffe593d67..a3be74981d 100644 --- a/src/BufferView.h +++ b/src/BufferView.h @@ -27,7 +27,6 @@ class DocIterator; class ErrorList; class FuncRequest; class FuncStatus; -class InsetOld; class Language; class LCursor; class LyXText; diff --git a/src/ChangeLog b/src/ChangeLog index 861fdf51a5..e53f1bb657 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2004-11-25 Lars Gullik Bjonnes + + * rename a lot of InsetOld to InsetBase + 2004-11-25 Angus Leeming * BufferView_pimpl.C: @@ -13,11 +17,11 @@ * 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 * lyxfunc.C (dispatch): always call sendDispatchMessage - + 2004-11-24 Alfredo Braunstein * BufferView.C: @@ -47,11 +51,11 @@ (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 diff --git a/src/CutAndPaste.C b/src/CutAndPaste.C index ab771cd516..125d173778 100644 --- a/src/CutAndPaste.C +++ b/src/CutAndPaste.C @@ -168,7 +168,7 @@ pasteSelectionHelper(Buffer const & buffer, ParagraphList & pars, for (; lit != eit; ++lit) { switch (lit->inset->lyxCode()) { - case InsetOld::TABULAR_CODE: { + case InsetBase::TABULAR_CODE: { InsetTabular * it = static_cast(lit->inset); it->buffer(&buffer); break; diff --git a/src/buffer.C b/src/buffer.C index 3c96aae934..21740256db 100644 --- a/src/buffer.C +++ b/src/buffer.C @@ -1254,15 +1254,15 @@ void Buffer::fillWithBibKeys(std::vector > & keys) } 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(*it); inset.fillWithBibKeys(*this, keys); - } else if (it->lyxCode() == InsetOld::INCLUDE_CODE) { + } else if (it->lyxCode() == InsetBase::INCLUDE_CODE) { InsetInclude const & inset = dynamic_cast(*it); inset.fillWithBibKeys(*this, keys); - } else if (it->lyxCode() == InsetOld::BIBITEM_CODE) { + } else if (it->lyxCode() == InsetBase::BIBITEM_CODE) { InsetBibitem const & inset = dynamic_cast(*it); string const key = inset.getContents(); diff --git a/src/graphics/ChangeLog b/src/graphics/ChangeLog index 7018b7f107..3b95657fe1 100644 --- a/src/graphics/ChangeLog +++ b/src/graphics/ChangeLog @@ -1,7 +1,11 @@ +2004-11-25 Lars Gullik Bjonnes + + * rename a lot of InsetOld to InsetBase + 2004-11-20 Lars Gullik Bjonnes * GraphicsCache.C: include to fix compilation with boost - 1.32.0 + 1.32.0 2004-11-09 Georg Baum diff --git a/src/graphics/GraphicsLoader.h b/src/graphics/GraphicsLoader.h index 79174aef95..ab3d686c24 100644 --- a/src/graphics/GraphicsLoader.h +++ b/src/graphics/GraphicsLoader.h @@ -29,8 +29,6 @@ #include #include -class InsetOld; - namespace lyx { namespace graphics { diff --git a/src/graphics/PreviewImage.h b/src/graphics/PreviewImage.h index 3e4bdcd471..c4de71bfc8 100644 --- a/src/graphics/PreviewImage.h +++ b/src/graphics/PreviewImage.h @@ -15,8 +15,6 @@ #include #include -class InsetOld; - namespace lyx { namespace graphics { diff --git a/src/graphics/PreviewLoader.C b/src/graphics/PreviewLoader.C index 453f431487..9b8b084ae2 100644 --- a/src/graphics/PreviewLoader.C +++ b/src/graphics/PreviewLoader.C @@ -608,7 +608,7 @@ void PreviewLoader::Impl::dumpPreamble(ostream & os) const 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 diff --git a/src/insets/ChangeLog b/src/insets/ChangeLog index 1f14ea3005..055606d8b2 100644 --- a/src/insets/ChangeLog +++ b/src/insets/ChangeLog @@ -1,3 +1,7 @@ +2004-11-25 Lars Gullik Bjonnes + + * rename a lot of InsetOld to InsetBase + 2004-11-25 Alfredo Braunstein * insettabular.C: diff --git a/src/insets/inset.h b/src/insets/inset.h index 11fd79bfe1..aa817aa3d5 100644 --- a/src/insets/inset.h +++ b/src/insets/inset.h @@ -65,7 +65,7 @@ protected: private: InsetOld & operator=(InsetOld const &) const; - + /// std::string name_; /** We store the LColor::color value as an int to get LColor.h out @@ -75,14 +75,14 @@ private: }; -/** \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_; } }; diff --git a/src/insets/insetbase.h b/src/insets/insetbase.h index 90a17044e9..ea7d00df1d 100644 --- a/src/insets/insetbase.h +++ b/src/insets/insetbase.h @@ -208,7 +208,7 @@ public: /** 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 { diff --git a/src/insets/insetbibitem.h b/src/insets/insetbibitem.h index df192ae503..b2ef83f0c0 100644 --- a/src/insets/insetbibitem.h +++ b/src/insets/insetbibitem.h @@ -35,7 +35,7 @@ public: /// 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; } /// diff --git a/src/insets/insetbibtex.h b/src/insets/insetbibtex.h index f2148395a0..4daf8f589f 100644 --- a/src/insets/insetbibtex.h +++ b/src/insets/insetbibtex.h @@ -27,7 +27,7 @@ public: /// 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; } /// diff --git a/src/insets/insetbox.h b/src/insets/insetbox.h index a15b0c5366..7781a53eaf 100644 --- a/src/insets/insetbox.h +++ b/src/insets/insetbox.h @@ -61,7 +61,7 @@ public: /// 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; /// diff --git a/src/insets/insetbranch.h b/src/insets/insetbranch.h index 9d5d3cd48c..5c3c1ea5f3 100644 --- a/src/insets/insetbranch.h +++ b/src/insets/insetbranch.h @@ -42,7 +42,7 @@ public: /// 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; /// diff --git a/src/insets/insetcaption.C b/src/insets/insetcaption.C index cf1d9965b0..72e83e4bff 100644 --- a/src/insets/insetcaption.C +++ b/src/insets/insetcaption.C @@ -88,8 +88,8 @@ void InsetCaption::draw(PainterInfo & pi, int x, int y) 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 diff --git a/src/insets/insetcaption.h b/src/insets/insetcaption.h index 40f906cfaf..6d81c579f6 100644 --- a/src/insets/insetcaption.h +++ b/src/insets/insetcaption.h @@ -28,7 +28,7 @@ public: /// virtual bool display() const; /// - virtual InsetOld::Code lyxCode() const; + virtual InsetBase::Code lyxCode() const; /// virtual std::string const editMessage() const; /// @@ -53,7 +53,7 @@ bool InsetCaption::display() const inline -InsetOld::Code InsetCaption::lyxCode() const +InsetBase::Code InsetCaption::lyxCode() const { return CAPTION_CODE; } diff --git a/src/insets/insetcharstyle.h b/src/insets/insetcharstyle.h index ae06acf1b8..0c98356e39 100644 --- a/src/insets/insetcharstyle.h +++ b/src/insets/insetcharstyle.h @@ -47,7 +47,7 @@ public: /// 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; /// diff --git a/src/insets/insetcite.h b/src/insets/insetcite.h index aa2b742ffe..2371d226f5 100644 --- a/src/insets/insetcite.h +++ b/src/insets/insetcite.h @@ -29,7 +29,7 @@ public: /// 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; /// diff --git a/src/insets/insetcollapsable.C b/src/insets/insetcollapsable.C index 52d6723e16..513c9766bd 100644 --- a/src/insets/insetcollapsable.C +++ b/src/insets/insetcollapsable.C @@ -192,7 +192,7 @@ void InsetCollapsable::draw(PainterInfo & pi, int x, int y) const } -InsetOld::EDITABLE InsetCollapsable::editable() const +InsetBase::EDITABLE InsetCollapsable::editable() const { return status_ != Collapsed ? HIGHLY_EDITABLE : IS_EDITABLE; } diff --git a/src/insets/insetcommand.C b/src/insets/insetcommand.C index bc4d9bf7fa..4d351abc66 100644 --- a/src/insets/insetcommand.C +++ b/src/insets/insetcommand.C @@ -129,7 +129,7 @@ void InsetCommand::doDispatch(LCursor & cur, FuncRequest & cmd) } default: - InsetOld::doDispatch(cur, cmd); + InsetBase::doDispatch(cur, cmd); break; } diff --git a/src/insets/insetcommand.h b/src/insets/insetcommand.h index 3848a76a40..27e37e05e8 100644 --- a/src/insets/insetcommand.h +++ b/src/insets/insetcommand.h @@ -59,7 +59,7 @@ public: 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_; } diff --git a/src/insets/insetenv.h b/src/insets/insetenv.h index 3385a4cda0..aeeb992c63 100644 --- a/src/insets/insetenv.h +++ b/src/insets/insetenv.h @@ -25,14 +25,14 @@ public: /// 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; } /// diff --git a/src/insets/insetert.C b/src/insets/insetert.C index d81362a134..74871aaa2d 100644 --- a/src/insets/insetert.C +++ b/src/insets/insetert.C @@ -263,9 +263,9 @@ void InsetERT::setButtonLabel() } -bool InsetERT::insetAllowed(InsetOld::Code code) const +bool InsetERT::insetAllowed(InsetBase::Code code) const { - return code == InsetOld::NEWLINE_CODE; + return code == InsetBase::NEWLINE_CODE; } diff --git a/src/insets/insetert.h b/src/insets/insetert.h index 40b9e139a2..0252453d10 100644 --- a/src/insets/insetert.h +++ b/src/insets/insetert.h @@ -37,13 +37,13 @@ public: /// ~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; diff --git a/src/insets/insetexternal.C b/src/insets/insetexternal.C index 15e572ac83..2fb4e943e7 100644 --- a/src/insets/insetexternal.C +++ b/src/insets/insetexternal.C @@ -462,7 +462,7 @@ void InsetExternal::doDispatch(LCursor & cur, FuncRequest & cmd) break; default: - InsetOld::doDispatch(cur, cmd); + InsetBase::doDispatch(cur, cmd); } } diff --git a/src/insets/insetexternal.h b/src/insets/insetexternal.h index 3a68c55d1c..6389031d43 100644 --- a/src/insets/insetexternal.h +++ b/src/insets/insetexternal.h @@ -107,7 +107,7 @@ public: /// 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; } diff --git a/src/insets/insetfloat.C b/src/insets/insetfloat.C index 87c8482532..cf506c945c 100644 --- a/src/insets/insetfloat.C +++ b/src/insets/insetfloat.C @@ -381,11 +381,11 @@ int InsetFloat::docbook(Buffer const & buf, ostream & os, } -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; } diff --git a/src/insets/insetfloat.h b/src/insets/insetfloat.h index 1bb48f78af..c0ac941410 100644 --- a/src/insets/insetfloat.h +++ b/src/insets/insetfloat.h @@ -51,7 +51,7 @@ public: /// 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; @@ -64,7 +64,7 @@ public: /// 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 */ diff --git a/src/insets/insetfloatlist.C b/src/insets/insetfloatlist.C index 54d5f67a0d..14850a8347 100644 --- a/src/insets/insetfloatlist.C +++ b/src/insets/insetfloatlist.C @@ -57,9 +57,9 @@ string const InsetFloatList::getScreenLabel(Buffer const & buf) const } -InsetOld::Code InsetFloatList::lyxCode() const +InsetBase::Code InsetFloatList::lyxCode() const { - return InsetOld::FLOAT_LIST_CODE; + return InsetBase::FLOAT_LIST_CODE; } diff --git a/src/insets/insetfloatlist.h b/src/insets/insetfloatlist.h index c257013f7c..4a7aaa317d 100644 --- a/src/insets/insetfloatlist.h +++ b/src/insets/insetfloatlist.h @@ -28,7 +28,7 @@ public: /// EDITABLE editable() const { return IS_EDITABLE; } /// - InsetOld::Code lyxCode() const; + InsetBase::Code lyxCode() const; /// bool display() const { return true; } /// diff --git a/src/insets/insetfoot.h b/src/insets/insetfoot.h index 821b7c5141..dfcfed3b63 100644 --- a/src/insets/insetfoot.h +++ b/src/insets/insetfoot.h @@ -23,7 +23,7 @@ public: /// 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; diff --git a/src/insets/insetfootlike.C b/src/insets/insetfootlike.C index 4ceb2efe41..19cea62904 100644 --- a/src/insets/insetfootlike.C +++ b/src/insets/insetfootlike.C @@ -49,10 +49,10 @@ void InsetFootlike::write(Buffer const & buf, ostream & os) 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); } diff --git a/src/insets/insetfootlike.h b/src/insets/insetfootlike.h index 31387e47da..0a7fd2c025 100644 --- a/src/insets/insetfootlike.h +++ b/src/insets/insetfootlike.h @@ -26,7 +26,7 @@ public: /// 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 */ diff --git a/src/insets/insetgraphics.C b/src/insets/insetgraphics.C index bed26acef7..453c9891d5 100644 --- a/src/insets/insetgraphics.C +++ b/src/insets/insetgraphics.C @@ -210,7 +210,7 @@ void InsetGraphics::doDispatch(LCursor & cur, FuncRequest & cmd) break; default: - InsetOld::doDispatch(cur, cmd); + InsetBase::doDispatch(cur, cmd); break; } } @@ -236,7 +236,7 @@ void InsetGraphics::draw(PainterInfo & pi, int x, int y) const } -InsetOld::EDITABLE InsetGraphics::editable() const +InsetBase::EDITABLE InsetGraphics::editable() const { return IS_EDITABLE; } diff --git a/src/insets/insetgraphics.h b/src/insets/insetgraphics.h index 0fe0c6daff..8cc3128880 100644 --- a/src/insets/insetgraphics.h +++ b/src/insets/insetgraphics.h @@ -61,7 +61,7 @@ public: 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. diff --git a/src/insets/insethfill.h b/src/insets/insethfill.h index 3a670743a3..c0a26174d6 100644 --- a/src/insets/insethfill.h +++ b/src/insets/insethfill.h @@ -24,7 +24,7 @@ public: /// 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; diff --git a/src/insets/insetinclude.C b/src/insets/insetinclude.C index c1278f01a8..bd11f6874b 100644 --- a/src/insets/insetinclude.C +++ b/src/insets/insetinclude.C @@ -143,7 +143,7 @@ void InsetInclude::doDispatch(LCursor & cur, FuncRequest & cmd) break; default: - InsetOld::doDispatch(cur, cmd); + InsetBase::doDispatch(cur, cmd); break; } } diff --git a/src/insets/insetinclude.h b/src/insets/insetinclude.h index 028a05f2f2..6f93350fff 100644 --- a/src/insets/insetinclude.h +++ b/src/insets/insetinclude.h @@ -41,7 +41,7 @@ public: 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. diff --git a/src/insets/insetindex.C b/src/insets/insetindex.C index 2cbee02a34..04b954e99f 100644 --- a/src/insets/insetindex.C +++ b/src/insets/insetindex.C @@ -49,9 +49,9 @@ int InsetIndex::docbook(Buffer const &, ostream & os, } -InsetOld::Code InsetIndex::lyxCode() const +InsetBase::Code InsetIndex::lyxCode() const { - return InsetOld::INDEX_CODE; + return InsetBase::INDEX_CODE; } @@ -78,7 +78,7 @@ void InsetPrintIndex::validate(LaTeXFeatures & features) const } -InsetOld::Code InsetPrintIndex::lyxCode() const +InsetBase::Code InsetPrintIndex::lyxCode() const { - return InsetOld::INDEX_PRINT_CODE; + return InsetBase::INDEX_PRINT_CODE; } diff --git a/src/insets/insetindex.h b/src/insets/insetindex.h index 78842a281a..2346dc11ed 100644 --- a/src/insets/insetindex.h +++ b/src/insets/insetindex.h @@ -28,7 +28,7 @@ public: /// EDITABLE editable() const { return IS_EDITABLE; } /// - InsetOld::Code lyxCode() const; + InsetBase::Code lyxCode() const; /// int docbook(Buffer const &, std::ostream &, OutputParams const &) const; @@ -48,7 +48,7 @@ public: /// EDITABLE editable() const { return NOT_EDITABLE; } /// - InsetOld::Code lyxCode() const; + InsetBase::Code lyxCode() const; /// bool display() const { return true; } /// diff --git a/src/insets/insetlabel.h b/src/insets/insetlabel.h index e0aecd27ef..d76859c82b 100644 --- a/src/insets/insetlabel.h +++ b/src/insets/insetlabel.h @@ -23,7 +23,7 @@ public: /// 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 & list) const; /// diff --git a/src/insets/insetlatexaccent.C b/src/insets/insetlatexaccent.C index 33f6d6ad58..2462b18807 100644 --- a/src/insets/insetlatexaccent.C +++ b/src/insets/insetlatexaccent.C @@ -640,9 +640,9 @@ bool InsetLatexAccent::directWrite() const } -InsetOld::Code InsetLatexAccent::lyxCode() const +InsetBase::Code InsetLatexAccent::lyxCode() const { - return InsetOld::ACCENT_CODE; + return InsetBase::ACCENT_CODE; } diff --git a/src/insets/insetlatexaccent.h b/src/insets/insetlatexaccent.h index 854fdb5f78..c5a726054f 100644 --- a/src/insets/insetlatexaccent.h +++ b/src/insets/insetlatexaccent.h @@ -60,7 +60,7 @@ public: /// bool directWrite() const; /// - InsetOld::Code lyxCode()const; + InsetBase::Code lyxCode()const; /// inline bool canDisplay(); // should this inset be handled like a normal charater diff --git a/src/insets/insetline.h b/src/insets/insetline.h index 504854f8af..c9751a31a1 100644 --- a/src/insets/insetline.h +++ b/src/insets/insetline.h @@ -20,7 +20,7 @@ public: InsetLine() {} - InsetOld::Code lyxCode() const { return InsetOld::LINE_CODE; } + InsetBase::Code lyxCode() const { return InsetBase::LINE_CODE; } void metrics(MetricsInfo &, Dimension &) const; diff --git a/src/insets/insetmarginal.h b/src/insets/insetmarginal.h index 36d395d409..9b841f9442 100644 --- a/src/insets/insetmarginal.h +++ b/src/insets/insetmarginal.h @@ -24,7 +24,7 @@ public: /// 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; diff --git a/src/insets/insetnewline.h b/src/insets/insetnewline.h index 8f9589c7af..bd6988e9cc 100644 --- a/src/insets/insetnewline.h +++ b/src/insets/insetnewline.h @@ -20,7 +20,7 @@ public: InsetNewline() {} - InsetOld::Code lyxCode() const { return InsetOld::NEWLINE_CODE; } + InsetBase::Code lyxCode() const { return InsetBase::NEWLINE_CODE; } void metrics(MetricsInfo &, Dimension &) const; diff --git a/src/insets/insetnote.h b/src/insets/insetnote.h index 5f4a34040a..880f1a34aa 100644 --- a/src/insets/insetnote.h +++ b/src/insets/insetnote.h @@ -44,7 +44,7 @@ public: /// 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; /// diff --git a/src/insets/insetoptarg.h b/src/insets/insetoptarg.h index 2dc95bc471..90aaf963b1 100644 --- a/src/insets/insetoptarg.h +++ b/src/insets/insetoptarg.h @@ -25,7 +25,7 @@ public: 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; diff --git a/src/insets/insetpagebreak.h b/src/insets/insetpagebreak.h index ca0440cdeb..02e26948f2 100644 --- a/src/insets/insetpagebreak.h +++ b/src/insets/insetpagebreak.h @@ -20,7 +20,7 @@ public: InsetPagebreak() {} - InsetOld::Code lyxCode() const { return InsetOld::LINE_CODE; } + InsetBase::Code lyxCode() const { return InsetBase::LINE_CODE; } void metrics(MetricsInfo &, Dimension &) const; diff --git a/src/insets/insetquotes.C b/src/insets/insetquotes.C index 3b548cd69d..03a96c50f3 100644 --- a/src/insets/insetquotes.C +++ b/src/insets/insetquotes.C @@ -371,7 +371,7 @@ auto_ptr InsetQuotes::doClone() const } -InsetOld::Code InsetQuotes::lyxCode() const +InsetBase::Code InsetQuotes::lyxCode() const { - return InsetOld::QUOTE_CODE; + return InsetBase::QUOTE_CODE; } diff --git a/src/insets/insetquotes.h b/src/insets/insetquotes.h index c88dfeb8bf..2392de037e 100644 --- a/src/insets/insetquotes.h +++ b/src/insets/insetquotes.h @@ -96,7 +96,7 @@ public: /// 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; } diff --git a/src/insets/insetref.h b/src/insets/insetref.h index 8ae06c9e54..0311730dbc 100644 --- a/src/insets/insetref.h +++ b/src/insets/insetref.h @@ -40,7 +40,7 @@ public: /// 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; } /// diff --git a/src/insets/insetspace.h b/src/insets/insetspace.h index cd9d813f86..671687b5ea 100644 --- a/src/insets/insetspace.h +++ b/src/insets/insetspace.h @@ -73,7 +73,7 @@ public: 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; } diff --git a/src/insets/insetspecialchar.h b/src/insets/insetspecialchar.h index 6f6c607518..38a47f6dcd 100644 --- a/src/insets/insetspecialchar.h +++ b/src/insets/insetspecialchar.h @@ -65,7 +65,7 @@ public: 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; } /// diff --git a/src/insets/insettabular.C b/src/insets/insettabular.C index 60c7359409..69ee7e05d5 100644 --- a/src/insets/insettabular.C +++ b/src/insets/insettabular.C @@ -911,7 +911,7 @@ int InsetTabular::docbook(Buffer const & buf, ostream & os, OutputParams const & runparams) const { int ret = 0; - InsetOld * master = 0; + InsetBase * master = 0; #ifdef WITH_WARNINGS #warning Why not pass a proper DocIterator here? @@ -920,7 +920,7 @@ int InsetTabular::docbook(Buffer const & buf, ostream & os, // 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 diff --git a/src/insets/insettoc.C b/src/insets/insettoc.C index c109646a39..512c9e96d7 100644 --- a/src/insets/insettoc.C +++ b/src/insets/insettoc.C @@ -44,11 +44,11 @@ string const InsetTOC::getScreenLabel(Buffer const &) const } -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; } diff --git a/src/insets/insettoc.h b/src/insets/insettoc.h index 2adb8a4472..c30cf2f777 100644 --- a/src/insets/insettoc.h +++ b/src/insets/insettoc.h @@ -25,7 +25,7 @@ public: /// EDITABLE editable() const { return IS_EDITABLE; } /// - InsetOld::Code lyxCode() const; + InsetBase::Code lyxCode() const; /// bool display() const { return true; } /// diff --git a/src/insets/inseturl.h b/src/insets/inseturl.h index 24f55a846c..d4fa9878dd 100644 --- a/src/insets/inseturl.h +++ b/src/insets/inseturl.h @@ -25,7 +25,7 @@ public: explicit InsetUrl(InsetCommandParams const &); /// - InsetOld::Code lyxCode() const { return InsetOld::URL_CODE; } + InsetBase::Code lyxCode() const { return InsetBase::URL_CODE; } /// void validate(LaTeXFeatures &) const; /// diff --git a/src/insets/insetvspace.C b/src/insets/insetvspace.C index c6596972fa..147bd0ae80 100644 --- a/src/insets/insetvspace.C +++ b/src/insets/insetvspace.C @@ -74,7 +74,7 @@ void InsetVSpace::doDispatch(LCursor & cur, FuncRequest & cmd) break; default: - InsetOld::doDispatch(cur, cmd); + InsetBase::doDispatch(cur, cmd); break; } } diff --git a/src/insets/insetwrap.C b/src/insets/insetwrap.C index 66d8ae29e9..3b3a82c1c8 100644 --- a/src/insets/insetwrap.C +++ b/src/insets/insetwrap.C @@ -204,7 +204,7 @@ int InsetWrap::docbook(Buffer const & buf, ostream & os, } -bool InsetWrap::insetAllowed(InsetOld::Code code) const +bool InsetWrap::insetAllowed(InsetBase::Code code) const { switch(code) { case FLOAT_CODE: diff --git a/src/insets/insetwrap.h b/src/insets/insetwrap.h index 1acd4acc21..42f0c79936 100644 --- a/src/insets/insetwrap.h +++ b/src/insets/insetwrap.h @@ -47,7 +47,7 @@ public: /// 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; @@ -57,7 +57,7 @@ public: /// std::string const editMessage() const; /// - bool insetAllowed(InsetOld::Code) const; + bool insetAllowed(InsetBase::Code) const; /// void addToToc(lyx::toc::TocList &, Buffer const &) const; /// diff --git a/src/insets/updatableinset.C b/src/insets/updatableinset.C index a989682a68..5b71e4ef33 100644 --- a/src/insets/updatableinset.C +++ b/src/insets/updatableinset.C @@ -33,7 +33,7 @@ using lyx::support::strToInt; // An updatable inset is highly editable by definition -InsetOld::EDITABLE UpdatableInset::editable() const +InsetBase::EDITABLE UpdatableInset::editable() const { return HIGHLY_EDITABLE; } @@ -106,7 +106,7 @@ void UpdatableInset::doDispatch(LCursor & cur, FuncRequest & cmd) break; default: - InsetOld::dispatch(cur, cmd); + InsetBase::dispatch(cur, cmd); } } diff --git a/src/lyxfunc.C b/src/lyxfunc.C index 5596079293..51bc8e0725 100644 --- a/src/lyxfunc.C +++ b/src/lyxfunc.C @@ -396,27 +396,27 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & cmd) const 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: @@ -437,7 +437,7 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & cmd) const 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") diff --git a/src/lyxtext.h b/src/lyxtext.h index 85e36504e6..cf5eac0009 100644 --- a/src/lyxtext.h +++ b/src/lyxtext.h @@ -30,7 +30,7 @@ class BufferView; class CursorSlice; class Dimension; class InsetBase; -class InsetOld_code; +class InsetBase_code; class FuncRequest; class FuncStatus; class LColor_color; @@ -255,13 +255,13 @@ public: /// Find next inset of some specified type. bool gotoNextInset(LCursor & cur, - std::vector const & codes, + std::vector const & codes, std::string const & contents = std::string()); /// void gotoInset(LCursor & cur, - std::vector const & codes, bool same_content); + std::vector 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; diff --git a/src/output_linuxdoc.C b/src/output_linuxdoc.C index 89958ab061..72cc66a88b 100644 --- a/src/output_linuxdoc.C +++ b/src/output_linuxdoc.C @@ -45,7 +45,7 @@ void linuxdocParagraphs(Buffer const & buf, // treat 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; diff --git a/src/paragraph.C b/src/paragraph.C index 946c8e03c9..8ddf5b65e5 100644 --- a/src/paragraph.C +++ b/src/paragraph.C @@ -306,7 +306,7 @@ void Paragraph::insertInset(pos_type pos, InsetBase * inset, } -bool Paragraph::insetAllowed(InsetOld_code code) +bool Paragraph::insetAllowed(InsetBase_code code) { return !pimpl_->inset_owner || pimpl_->inset_owner->insetAllowed(code); } diff --git a/src/paragraph.h b/src/paragraph.h index 2a464d6a27..017ec832d0 100644 --- a/src/paragraph.h +++ b/src/paragraph.h @@ -35,7 +35,7 @@ class BufferView; class Counters; class InsetBase; class InsetBibitem; -class InsetOld_code; +class InsetBase_code; class Language; class LaTeXFeatures; class OutputParams; @@ -319,7 +319,7 @@ public: 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); /// diff --git a/src/text3.C b/src/text3.C index 1dca70f68e..ff52582f73 100644 --- a/src/text3.C +++ b/src/text3.C @@ -185,7 +185,7 @@ string const freefont2string() } bool LyXText::gotoNextInset(LCursor & cur, - vector const & codes, string const & contents) + vector const & codes, string const & contents) { BOOST_ASSERT(this == cur.text()); pit_type end = paragraphs().size(); @@ -218,7 +218,7 @@ bool LyXText::gotoNextInset(LCursor & cur, void LyXText::gotoInset(LCursor & cur, - vector const & codes, bool same_content) + vector const & codes, bool same_content) { cur.clearSelection(); @@ -249,9 +249,9 @@ void LyXText::gotoInset(LCursor & cur, } -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(1, code), same_content); + gotoInset(cur, vector(1, code), same_content); } @@ -981,7 +981,7 @@ void LyXText::dispatch(LCursor & cur, FuncRequest & cmd) break; case LFUN_REFERENCE_GOTO: { - vector tmp; + vector tmp; tmp.push_back(InsetBase::LABEL_CODE); tmp.push_back(InsetBase::REF_CODE); gotoInset(cur, tmp, true); @@ -1594,7 +1594,7 @@ bool LyXText::getStatus(LCursor & cur, FuncRequest const & cmd, break; case LFUN_INSET_OPTARG: - enable = numberOfOptArgs(cur.paragraph()) + enable = numberOfOptArgs(cur.paragraph()) < cur.paragraph().layout()->optionalargs; break; @@ -1604,117 +1604,117 @@ bool LyXText::getStatus(LCursor & cur, FuncRequest const & cmd, #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 @@ -1726,22 +1726,22 @@ bool LyXText::getStatus(LCursor & cur, FuncRequest const & cmd, 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; @@ -1750,7 +1750,7 @@ bool LyXText::getStatus(LCursor & cur, FuncRequest const & cmd, break; } - if (code != InsetOld::NO_CODE + if (code != InsetBase::NO_CODE && (cur.empty() || !cur.inset().insetAllowed(code))) enable = false; diff --git a/src/toc.C b/src/toc.C index d18c4b0387..9e06fc52ea 100644 --- a/src/toc.C +++ b/src/toc.C @@ -86,10 +86,10 @@ TocList const getTocList(Buffer const & buf) 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(it->inset) ->addToToc(toclist, buf); - } else if (it->inset->lyxCode() == InsetOld::WRAP_CODE) { + } else if (it->inset->lyxCode() == InsetBase::WRAP_CODE) { static_cast(it->inset) ->addToToc(toclist, buf); } -- 2.39.2