]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetlist.C
some reindentation, revert workarea xpos++, constify, remove all traces of LyXParagra...
[lyx.git] / src / insets / insetlist.C
index 640b3cb5f1fa6dd1dc30d297ae108b9bcf241d9c..d9199c3567e6fd245f190d3381a3134938c7c09b 100644 (file)
 #include "gettext.h"
 #include "lyxfont.h"
 #include "BufferView.h"
-#include "Painter.h"
 #include "lyxtext.h"
+#include "insets/insettext.h"
 #include "support/LOstream.h"
+#include "debug.h"
 
 using std::ostream;
 using std::endl;
@@ -56,17 +57,17 @@ void InsetList::Write(Buffer const * buf, ostream & os) const
 }
 
 
-Inset * InsetList::Clone() const
+Inset * InsetList::Clone(Buffer const &) const
 {
        InsetList * result = new InsetList;
-       result->init(this);
+       result->inset.init(&inset);
        
        result->collapsed = collapsed;
        return result;
 }
 
 
-char const * InsetList::EditMessage() const
+string const InsetList::EditMessage() const
 {
        return _("Opened List Inset");
 }
@@ -77,35 +78,18 @@ int InsetList::Latex(Buffer const * buf,
 {
        os << "\\footnote{%\n";
        
-       int i = InsetText::Latex(buf, os, fragile, fp);
+       int i = inset.Latex(buf, os, fragile, fp);
        os << "}%\n";
        
        return i + 2;
 }
 
 
-bool InsetList::InsertInset(BufferView * bv, Inset * inset)
+bool InsetList::InsertInsetAllowed(Inset * in) const
 {
-       if (!InsertInsetAllowed(inset))
-               return false;
-       
-       return InsetText::InsertInset(bv, inset);
-}
-
-
-bool InsetList::InsertInsetAllowed(Inset * inset) const
-{
-       if ((inset->LyxCode() == Inset::FOOT_CODE) ||
-           (inset->LyxCode() == Inset::MARGIN_CODE)) {
+       if ((in->LyxCode() == Inset::FOOT_CODE) ||
+           (in->LyxCode() == Inset::MARGIN_CODE)) {
                return false;
        }
        return true;
 }
-
-
-LyXFont InsetList::GetDrawFont(BufferView * bv,LyXParagraph * p, int pos) const
-{
-       LyXFont fn = getLyXText(bv)->GetFont(bv->buffer(), p, pos);
-       fn.decSize().decSize();
-       return fn;
-}