From 99f3ca194ec4bc927cc6685cb5316b46bbe54ae0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20P=C3=B6nitz?= Date: Fri, 15 Jul 2005 22:19:49 +0000 Subject: [PATCH] remove InsetText::updateLocal. Was neither missed nor active for a while now git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10230 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/insets/ChangeLog | 8 +++++-- src/insets/insettext.C | 49 ++---------------------------------------- src/insets/insettext.h | 5 ++--- 3 files changed, 10 insertions(+), 52 deletions(-) diff --git a/src/insets/ChangeLog b/src/insets/ChangeLog index 35572547bf..c6da67c6d8 100644 --- a/src/insets/ChangeLog +++ b/src/insets/ChangeLog @@ -1,3 +1,8 @@ + +2005-07-15 André Pönitz + + * insettext.[Ch] (updateLocal): remove. Has been disabled for a while. + 2005-07-15 André Pönitz * Makefile.am: @@ -13,8 +18,7 @@ 2005-07-15 André Pönitz * insetcollapsable.[Ch]: - * updatableinset.[Ch]: (scroll, setScroll) - sanitize things + * updatableinset.[Ch] (scroll, setScroll): sanitize things 2005-07-14 Angus Leeming diff --git a/src/insets/insettext.C b/src/insets/insettext.C index 62c29c2d89..89b01b12d5 100644 --- a/src/insets/insettext.C +++ b/src/insets/insettext.C @@ -45,7 +45,6 @@ #include "frontends/Alert.h" #include "frontends/font_metrics.h" -#include "frontends/LyXView.h" #include "frontends/Painter.h" #include "support/lyxalgo.h" // lyx::count @@ -228,41 +227,6 @@ void InsetText::clearInset(Painter & pain, int x, int y) const } -void InsetText::updateLocal(LCursor & cur) -{ - if (!text_.autoBreakRows_ && paragraphs().size() > 1) { - // collapse paragraphs - while (paragraphs().size() > 1) { - ParagraphList::iterator const first = paragraphs().begin(); - ParagraphList::iterator second = first; - ++second; - size_t const first_par_size = first->size(); - - if (!first->empty() && - !second->empty() && - !first->isSeparator(first_par_size - 1)) { - first->insertChar(first_par_size, ' '); - } - - cur.clearSelection(); - mergeParagraph(cur.buffer().params(), paragraphs(), 0); - } - } - - if (!cur.selection()) - cur.resetAnchor(); - - LyXView * lv = cur.bv().owner(); - lv->view_state_changed(); - lv->updateMenubar(); - lv->updateToolbars(); - if (old_pit != cur.pit()) { - lv->setLayout(text_.getPar(cur.pit()).layout()->name()); - old_pit = cur.pit(); - } -} - - string const InsetText::editMessage() const { return _("Opened Text Inset"); @@ -279,11 +243,6 @@ void InsetText::edit(LCursor & cur, bool left) text_.setCursor(cur.top(), pit, pos); cur.clearSelection(); finishUndo(); -#ifdef WITH_WARNINGS -#warning can someone check if/when this is needed? -#endif -//Andre? -// updateLocal(cur); } @@ -291,8 +250,6 @@ InsetBase * InsetText::editXY(LCursor & cur, int x, int y) { old_pit = -1; return text_.editXY(cur, x, y); - //sanitizeEmptyText(cur.bv()); - //updateLocal(cur); } @@ -392,12 +349,10 @@ void InsetText::markNew(bool track_changes) ParagraphList::iterator pit = paragraphs().begin(); ParagraphList::iterator end = paragraphs().end(); for (; pit != end; ++pit) { - if (track_changes) { + if (track_changes) pit->trackChanges(); - } else { - // no-op when not tracking + else // no-op when not tracking pit->cleanChanges(); - } } } diff --git a/src/insets/insettext.h b/src/insets/insettext.h index 1699154fc2..0d2f18a986 100644 --- a/src/insets/insettext.h +++ b/src/insets/insettext.h @@ -144,11 +144,10 @@ public: protected: /// virtual void doDispatch(LCursor & cur, FuncRequest & cmd); -private: - virtual std::auto_ptr doClone() const; +private: /// - void updateLocal(LCursor &); + virtual std::auto_ptr doClone() const; /// void init(); ///