]> git.lyx.org Git - features.git/commitdiff
add warning make controllers compile and remove some alomost unused functions, commen...
authorLars Gullik Bjønnes <larsbj@gullik.org>
Thu, 22 May 2003 16:10:34 +0000 (16:10 +0000)
committerLars Gullik Bjønnes <larsbj@gullik.org>
Thu, 22 May 2003 16:10:34 +0000 (16:10 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7004 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/controllers/ViewBase.h
src/insets/ChangeLog
src/insets/insettext.C
src/insets/insettext.h
src/undo_funcs.C

index 50781ae6bafd9e0088e7dbd64954d849c412796b..bcb279f8ad9b034eb0bfeb0f21eb5872ece3440e 100644 (file)
@@ -15,6 +15,8 @@
 class ControlButtons;
 class ButtonController;
 
+#include "LString.h"
+
 #include <boost/utility.hpp>
 
 class ViewBase : boost::noncopyable {
index d521b0c03772056f0e77bb89b3e8ffad3469fa40..76fcd35ff6befb49f41f1bc004de9b900c4b3c55 100644 (file)
@@ -4,6 +4,8 @@
 
 2003-05-22  Lars Gullik Bjønnes  <larsbj@gullik.net>
 
+       * insettext.[Ch] (paragraph): delete unused function
+
        * insetfloat.C (addToToc): parlist simplfication
 
 2003-05-20  Jürgen Spitzmüller  <j.spitzmueller@gmx.de>
index 539e6f1f7773948196a4e44c99770249d6e3877d..250e0f9e5e142b9baa7545a18af297f6ba98e73a 100644 (file)
@@ -2346,24 +2346,6 @@ LyXCursor const & InsetText::cursor(BufferView * bv) const
 }
 
 
-void InsetText::paragraph(Paragraph * p)
-{
-       // GENERAL COMMENT: We don't have to free the old paragraphs as the
-       // caller of this function has to take care of it. This IS important
-       // as we could have to insert a paragraph before this one and just
-       // link the actual to a new ones next and set it with this function
-       // and are done!
-       paragraphs.set(p);
-       // set ourself as owner for all the paragraphs inserted!
-       for_each(paragraphs.begin(), paragraphs.end(),
-                boost::bind(&Paragraph::setInsetOwner, _1, this));
-
-       reinitLyXText();
-       // redraw myself when asked for
-       need_update = INIT;
-}
-
-
 Inset * InsetText::getInsetFromID(int id_arg) const
 {
        if (id_arg == id())
index 06054ba37325dc5227cb6ff7886c182a2d4edf7c..45e80b730ef0e12712656057787ad3537bef21e5 100644 (file)
@@ -196,8 +196,6 @@ public:
        ///
        LyXCursor const & cursor(BufferView *) const;
        ///
-       void paragraph(Paragraph *);
-       ///
        bool allowSpellcheck() const { return true; }
        ///
        WordLangTuple const
index 85b81d4f4a5bb62ee330fbed74982f3c79d9000b..03235aeebb5436792e41d005e427435c1b1b5ae4 100644 (file)
@@ -98,7 +98,7 @@ bool textHandleUndo(BufferView * bv, Undo & undo)
                t->setCursorIntern(undoParagraphs(bv, num).begin(), 0);
        }
 
-       // Set the right(new) inset-owner of the paragraph if there is any. 
+       // Set the right(new) inset-owner of the paragraph if there is any.
        if (!undo.pars.empty()) {
                Inset * in = 0;
                if (before != end)
@@ -123,7 +123,7 @@ bool textHandleUndo(BufferView * bv, Undo & undo)
                }
                // this surprisingly fills the undo! (Andre')
                size_t par = 0;
-               //while (deletepar && deletepar != *behind) 
+               //while (deletepar && deletepar != *behind)
                while (deletepar != *behind) {
                        deletelist.push_back(&*deletepar);
                        ++deletepar;
@@ -160,9 +160,11 @@ bool textHandleUndo(BufferView * bv, Undo & undo)
                        int id = undoParagraphs(bv, undo.number_of_inset_id).front().id();
                        ParIterator op = bv->buffer()->getParFromID(id);
                        if (op != end && op->inInset()) {
-                               static_cast<InsetText*>(op->inInset())->paragraph(undopar);
+#warning FIXME reimplementaion needed here
+                               //static_cast<InsetText*>(op->inInset())->paragraph(undopar);
                        } else {
-                               bv->buffer()->paragraphs.set(undopar);
+#warning FIXME reimplementation needed here
+                               //bv->buffer()->paragraphs.set(undopar);
                        }
                }
        } else {
@@ -173,9 +175,11 @@ bool textHandleUndo(BufferView * bv, Undo & undo)
                        int id = undoParagraphs(bv, undo.number_of_inset_id).front().id();
                        ParIterator op = bv->buffer()->getParFromID(id);
                        if (op != end && op->inInset()) {
-                               static_cast<InsetText*>(op->inInset())->paragraph(&**behind);
+#warning FIXME reimplementation needed here
+                               //static_cast<InsetText*>(op->inInset())->paragraph(&**behind);
                        } else {
-                               bv->buffer()->paragraphs.set(&**behind);
+#warning FIXME reimplementation needed here
+                               //bv->buffer()->paragraphs.set(&**behind);
                        }
                        undopar = &**behind;
                }
@@ -336,12 +340,12 @@ bool createUndo(BufferView * bv, Undo::undo_kind kind,
        if (kind == Undo::EDIT) {
                for (size_t i = 0, n = undo_pars.size(); i < n; ++i)
                        undo_pars[i]->clearContents();
-       }               
+       }
 
        int cursor_par = undoCursor(bv).par()->id();
        int cursor_pos = undoCursor(bv).pos();
 
-       //lyxerr << "createUndo: inset_id: " << inset_id << "  before_number: " 
+       //lyxerr << "createUndo: inset_id: " << inset_id << "  before_number: "
        //      << before_number << "  behind_number: " << behind_number << "\n";
        u.reset(new Undo(kind, inset_id,
                before_number, behind_number,