... to sanity.
This renames 'fullRebreak' to 'partialRebreak' as it partially rebreaks the
text and creates a new 'fullRebreak' that fully rebreaks the text and hides
some internals from InsetERT and InsetMinipage.
I made sure no occurence was missed.
I'll take the liberty to commit this shortly.
Andre'
--
Those who desire to give up Freedom in order to gain Security, will not have,
nor do they deserve, either one. (T. Jefferson or B. Franklin or both...)
Index: BufferView.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/BufferView.C,v
retrieving revision 1.164
diff -u -p -r1.164 BufferView.C
--- BufferView.C 24 Jun 2003 21:43:24 -0000 1.164
+++ BufferView.C 27 Jun 2003 09:31:03 -0000
@@ -636,7 +636,7 @@ bool BufferView::ChangeInsets(Inset::Cod
text->setCursorIntern(it.pit(), 0);
text->redoParagraphs(text->cursor,
boost::next(text->cursor.par()));
- text->fullRebreak();
+ text->partialRebreak();
}
}
}
Index: BufferView_pimpl.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/BufferView_pimpl.C,v
retrieving revision 1.381
diff -u -p -r1.381 BufferView_pimpl.C
--- BufferView_pimpl.C 27 Jun 2003 08:38:35 -0000 1.381
+++ BufferView_pimpl.C 27 Jun 2003 09:31:03 -0000
@@ -617,7 +617,7 @@ void BufferView::Pimpl::update(LyXText *
text->selection.cursor = text->cursor;
}
- text->fullRebreak();
+ text->partialRebreak();
if (text->inset_owner) {
text->inset_owner->setUpdateStatus(bv_, InsetText::NONE);
@@ -636,7 +636,7 @@ void BufferView::Pimpl::update(BufferVie
text->selection.cursor = text->cursor;
}
- text->fullRebreak();
+ text->partialRebreak();
if (text->inset_owner) {
text->inset_owner->setUpdateStatus(bv_, InsetText::NONE);
Index: lyxtext.h
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/lyxtext.h,v
retrieving revision 1.178
diff -u -p -r1.178 lyxtext.h
--- lyxtext.h 27 Jun 2003 08:38:37 -0000 1.178
+++ lyxtext.h 27 Jun 2003 09:31:04 -0000
@@ -180,7 +180,9 @@ public:
///
void insertInset(Inset * inset);
- /// Completes the insertion with a full rebreak
+ /// Completes the insertion with a rebreak from 'need_break_row' on
+ void partialRebreak();
+ /// a full rebreak of the whole text
void fullRebreak();
///
Index: text2.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/text2.C,v
retrieving revision 1.374
diff -u -p -r1.374 text2.C
--- text2.C 27 Jun 2003 08:38:39 -0000 1.374
+++ text2.C 27 Jun 2003 09:31:04 -0000
@@ -724,6 +724,14 @@ void LyXText::redoParagraphs(LyXCursor c
void LyXText::fullRebreak()
{
+ need_break_row = rows().begin();
+ partialRebreak();
+ setCursorIntern(cursor.par(), cursor.pos());
+}
+
+
+void LyXText::partialRebreak()
+{
if (rows().empty()) {
init(bv());
return;
Index: text3.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/text3.C,v
retrieving revision 1.83
diff -u -p -r1.83 text3.C
--- text3.C 27 Jun 2003 08:38:39 -0000 1.83
+++ text3.C 27 Jun 2003 09:31:04 -0000
@@ -1393,7 +1393,7 @@ Inset::RESULT LyXText::dispatch(FuncRequ
// Clear the selection
bv->screen().toggleSelection(bv->text, bv);
bv->text->clearSelection();
- bv->text->fullRebreak();
+ bv->text->partialRebreak();
bv->update();
bv->updateScrollbar();
Index: textcursor.h
===================================================================
RCS file: textcursor.h
diff -N textcursor.h
Index: insets/insetert.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetert.C,v
retrieving revision 1.132
diff -u -p -r1.132 insetert.C
--- insets/insetert.C 18 Jun 2003 17:43:49 -0000 1.132
+++ insets/insetert.C 27 Jun 2003 09:31:04 -0000
@@ -452,10 +452,7 @@ Inset::RESULT InsetERT::localDispatch(Fu
* Open (needfullrow) to Inlined (only the space
* taken by the text).
*/
- LyXText * t = inset.getLyXText(cmd.view());
- t->need_break_row = t->rows().begin();
- t->fullRebreak();
- t->setCursorIntern(t->cursor.par(), t->cursor.pos());
+ inset.getLyXText(cmd.view())->fullRebreak();
inset.update(cmd.view(), true);
bv->updateInset(this);
result = DISPATCHED;
Index: insets/insetminipage.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetminipage.C,v
retrieving revision 1.78
diff -u -p -r1.78 insetminipage.C
--- insets/insetminipage.C 16 Jun 2003 11:49:31 -0000 1.78
+++ insets/insetminipage.C 27 Jun 2003 09:31:04 -0000
@@ -118,11 +118,8 @@ dispatch_result InsetMinipage::localDisp
/* FIXME: I refuse to believe we have to live
* with ugliness like this ... */
- LyXText * t = inset.getLyXText(cmd.view());
- t->need_break_row = t->rows().begin();
- t->fullRebreak();
+ inset.getLyXText(cmd.view())->fullRebreak();
inset.update(cmd.view(), true);
- t->setCursorIntern(t->cursor.par(), t->cursor.pos());
cmd.view()->updateInset(this);
return DISPATCHED;
}
Index: insets/insettext.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insettext.C,v
retrieving revision 1.412
diff -u -p -r1.412 insettext.C
--- insets/insettext.C 27 Jun 2003 08:38:41 -0000 1.412
+++ insets/insettext.C 27 Jun 2003 09:31:04 -0000
@@ -524,7 +524,7 @@ void InsetText::updateLocal(BufferView *
lt = getLyXText(bv);
clear = true;
}
- lt->fullRebreak();
+ lt->partialRebreak();
setUpdateStatus(bv, what);
bool flag = mark_dirty ||
(((need_update != CURSOR) && (need_update != NONE)) ||