mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-06 00:10:59 +00:00
003-04-30 Lars Gullik Bj�nnes <larsbj@gullik.net>
* text3.C (dispatch): do not convert iterator -> pointer * undo_funcs.C (setCursorParUndo): ditto * text_funcs.C (transposeChars): ditto * text2.C (setLayout): ws changes only * text.C (breakParagraph): do not convert iterator -> pointer (insertChar): ditto (acceptChange): ditto (rejectChange): ditto (changeCase): ditto (Delete): ditto (backspace): ditto * BufferView.C (lockedInsetStoreUndo): do not convert iterator -> pointer 2003-04-30 Lars Gullik Bj�nnes <larsbj@gullik.net> * insettext.C (setFont): do not convert iterator -> pointer * insettabular.C (localDispatch): do not convert iterator -> pointer (setFont): ditto (tabularFeatures): ditto git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6889 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
0a94135c65
commit
b7ba81d387
@ -812,8 +812,8 @@ void BufferView::lockedInsetStoreUndo(Undo::undo_kind kind)
|
||||
if (kind == Undo::EDIT) // in this case insets would not be stored!
|
||||
kind = Undo::FINISH;
|
||||
setUndo(this, kind,
|
||||
&*text->cursor.par(),
|
||||
text->cursor.par()->next());
|
||||
text->cursor.par(),
|
||||
boost::next(text->cursor.par()));
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,3 +1,22 @@
|
||||
2003-04-30 Lars Gullik Bjønnes <larsbj@gullik.net>
|
||||
|
||||
* text3.C (dispatch): do not convert iterator -> pointer
|
||||
* undo_funcs.C (setCursorParUndo): ditto
|
||||
* text_funcs.C (transposeChars): ditto
|
||||
|
||||
* text2.C (setLayout): ws changes only
|
||||
|
||||
* text.C (breakParagraph): do not convert iterator -> pointer
|
||||
(insertChar): ditto
|
||||
(acceptChange): ditto
|
||||
(rejectChange): ditto
|
||||
(changeCase): ditto
|
||||
(Delete): ditto
|
||||
(backspace): ditto
|
||||
|
||||
* BufferView.C (lockedInsetStoreUndo): do not convert iterator ->
|
||||
pointer
|
||||
|
||||
2003-04-29 Alfredo Braunstein <abraunst@libero.it>
|
||||
|
||||
* text3.C (gotoInset): YABG (yet another bad getChar)
|
||||
|
@ -1,3 +1,10 @@
|
||||
2003-04-30 Lars Gullik Bjønnes <larsbj@gullik.net>
|
||||
|
||||
* insettext.C (setFont): do not convert iterator -> pointer
|
||||
|
||||
* insettabular.C (localDispatch): do not convert iterator -> pointer
|
||||
(setFont): ditto
|
||||
(tabularFeatures): ditto
|
||||
|
||||
2003-04-29 André Pönitz <poenitz@gmx.net>
|
||||
|
||||
|
@ -1070,8 +1070,8 @@ Inset::RESULT InsetTabular::localDispatch(FuncRequest const & cmd)
|
||||
// no break here!
|
||||
case LFUN_DELETE:
|
||||
setUndo(bv, Undo::DELETE,
|
||||
&*bv->text->cursor.par(),
|
||||
&*boost::next(bv->text->cursor.par()));
|
||||
bv->text->cursor.par(),
|
||||
boost::next(bv->text->cursor.par()));
|
||||
cutSelection(bv->buffer()->params);
|
||||
updateLocal(bv, INIT);
|
||||
break;
|
||||
@ -1155,8 +1155,8 @@ Inset::RESULT InsetTabular::localDispatch(FuncRequest const & cmd)
|
||||
case LFUN_PASTE:
|
||||
if (hasPasteBuffer()) {
|
||||
setUndo(bv, Undo::INSERT,
|
||||
&*bv->text->cursor.par(),
|
||||
&*boost::next(bv->text->cursor.par()));
|
||||
bv->text->cursor.par(),
|
||||
boost::next(bv->text->cursor.par()));
|
||||
pasteSelection(bv);
|
||||
updateLocal(bv, INIT);
|
||||
break;
|
||||
@ -1684,8 +1684,8 @@ void InsetTabular::setFont(BufferView * bv, LyXFont const & font, bool tall,
|
||||
}
|
||||
if (hasSelection()) {
|
||||
setUndo(bv, Undo::EDIT,
|
||||
&*bv->text->cursor.par(),
|
||||
&*boost::next(bv->text->cursor.par()));
|
||||
bv->text->cursor.par(),
|
||||
boost::next(bv->text->cursor.par()));
|
||||
bool const frozen = undo_frozen;
|
||||
if (!frozen)
|
||||
freezeUndo();
|
||||
@ -1808,8 +1808,8 @@ void InsetTabular::tabularFeatures(BufferView * bv,
|
||||
sel_row_start = sel_row_end = tabular->row_of_cell(actcell);
|
||||
}
|
||||
setUndo(bv, Undo::FINISH,
|
||||
&*bv->text->cursor.par(),
|
||||
&*boost::next(bv->text->cursor.par()));
|
||||
bv->text->cursor.par(),
|
||||
boost::next(bv->text->cursor.par()));
|
||||
|
||||
int row = tabular->row_of_cell(actcell);
|
||||
int column = tabular->column_of_cell(actcell);
|
||||
|
@ -1189,7 +1189,7 @@ Inset::RESULT InsetText::localDispatch(FuncRequest const & ev)
|
||||
#if 0
|
||||
// This should not be needed here and is also WRONG!
|
||||
setUndo(bv, Undo::INSERT,
|
||||
lt->cursor.par(), lt->cursor.par()->next());
|
||||
lt->cursor.par(), boost::next(lt->cursor.par()));
|
||||
#endif
|
||||
bv->switchKeyMap();
|
||||
if (lyxrc.auto_region_delete) {
|
||||
@ -1951,7 +1951,7 @@ void InsetText::setFont(BufferView * bv, LyXFont const & font, bool toggleall,
|
||||
clear = true;
|
||||
}
|
||||
if (lt->selection.set()) {
|
||||
setUndo(bv, Undo::EDIT, &*lt->cursor.par(), &*boost::next(lt->cursor.par()));
|
||||
setUndo(bv, Undo::EDIT, lt->cursor.par(), boost::next(lt->cursor.par()));
|
||||
}
|
||||
if (selectall)
|
||||
selectAll(bv);
|
||||
|
20
src/text.C
20
src/text.C
@ -1457,7 +1457,7 @@ void LyXText::breakParagraph(ParagraphList & paragraphs, char keep_layout)
|
||||
&& !layout->keepempty)
|
||||
return;
|
||||
|
||||
setUndo(bv(), Undo::FINISH, &*cursor.par(), &*boost::next(cursor.par()));
|
||||
setUndo(bv(), Undo::FINISH, cursor.par(), boost::next(cursor.par()));
|
||||
|
||||
// Always break behind a space
|
||||
//
|
||||
@ -1562,7 +1562,7 @@ void LyXText::redoParagraph()
|
||||
// same Paragraph one to the right and make a rebreak
|
||||
void LyXText::insertChar(char c)
|
||||
{
|
||||
setUndo(bv(), Undo::INSERT, &*cursor.par(), &*boost::next(cursor.par()));
|
||||
setUndo(bv(), Undo::INSERT, cursor.par(), boost::next(cursor.par()));
|
||||
|
||||
// When the free-spacing option is set for the current layout,
|
||||
// disable the double-space checking
|
||||
@ -2114,7 +2114,7 @@ void LyXText::acceptChange()
|
||||
if (selection.start.par() == selection.end.par()) {
|
||||
LyXCursor & startc = selection.start;
|
||||
LyXCursor & endc = selection.end;
|
||||
setUndo(bv(), Undo::INSERT, &*startc.par(), &*boost::next(startc.par()));
|
||||
setUndo(bv(), Undo::INSERT, startc.par(), boost::next(startc.par()));
|
||||
startc.par()->acceptChange(startc.pos(), endc.pos());
|
||||
finishUndo();
|
||||
clearSelection();
|
||||
@ -2135,8 +2135,8 @@ void LyXText::rejectChange()
|
||||
if (selection.start.par() == selection.end.par()) {
|
||||
LyXCursor & startc = selection.start;
|
||||
LyXCursor & endc = selection.end;
|
||||
setUndo(bv(), Undo::INSERT, &*startc.par(),
|
||||
&*boost::next(startc.par()));
|
||||
setUndo(bv(), Undo::INSERT, startc.par(),
|
||||
boost::next(startc.par()));
|
||||
startc.par()->rejectChange(startc.pos(), endc.pos());
|
||||
finishUndo();
|
||||
clearSelection();
|
||||
@ -2352,7 +2352,7 @@ void LyXText::changeCase(LyXText::TextCase action)
|
||||
|
||||
lyx::Assert(from <= to);
|
||||
|
||||
setUndo(bv(), Undo::FINISH, &*from.par(), &*boost::next(to.par()));
|
||||
setUndo(bv(), Undo::FINISH, from.par(), boost::next(to.par()));
|
||||
|
||||
pos_type pos = from.pos();
|
||||
ParagraphList::iterator pit = from.par();
|
||||
@ -2423,7 +2423,7 @@ void LyXText::Delete()
|
||||
// to make sure undo gets the right cursor position
|
||||
cursor = old_cursor;
|
||||
setUndo(bv(), Undo::DELETE,
|
||||
&*cursor.par(), &*boost::next(cursor.par()));
|
||||
cursor.par(), boost::next(cursor.par()));
|
||||
cursor = tmpcursor;
|
||||
backspace();
|
||||
}
|
||||
@ -2481,8 +2481,8 @@ void LyXText::backspace()
|
||||
|
||||
if (cursor.par() != ownerParagraphs().begin()) {
|
||||
setUndo(bv(), Undo::DELETE,
|
||||
&*boost::prior(cursor.par()),
|
||||
&*boost::next(cursor.par()));
|
||||
boost::prior(cursor.par()),
|
||||
boost::next(cursor.par()));
|
||||
}
|
||||
|
||||
ParagraphList::iterator tmppit = cursor.par();
|
||||
@ -2549,7 +2549,7 @@ void LyXText::backspace()
|
||||
// this is the code for a normal backspace, not pasting
|
||||
// any paragraphs
|
||||
setUndo(bv(), Undo::DELETE,
|
||||
&*cursor.par(), &*boost::next(cursor.par()));
|
||||
cursor.par(), boost::next(cursor.par()));
|
||||
// We used to do cursorLeftIntern() here, but it is
|
||||
// not a good idea since it triggers the auto-delete
|
||||
// mechanism. So we do a cursorLeftIntern()-lite,
|
||||
|
@ -419,7 +419,7 @@ Inset::RESULT LyXText::dispatch(FuncRequest const & cmd)
|
||||
|
||||
for (; tmp != end; ++tmp) {
|
||||
if (tmp->params().startOfAppendix()) {
|
||||
setUndo(bv, Undo::EDIT, &*tmp, &*boost::next(tmp));
|
||||
setUndo(bv, Undo::EDIT, tmp, boost::next(tmp));
|
||||
tmp->params().startOfAppendix(false);
|
||||
int tmpy;
|
||||
setHeightOfRow(getRow(tmp, 0, tmpy));
|
||||
@ -427,7 +427,7 @@ Inset::RESULT LyXText::dispatch(FuncRequest const & cmd)
|
||||
}
|
||||
}
|
||||
|
||||
setUndo(bv, Undo::EDIT, &*pit, &*boost::next(pit));
|
||||
setUndo(bv, Undo::EDIT, pit, boost::next(pit));
|
||||
pit->params().startOfAppendix(start);
|
||||
|
||||
// we can set the refreshing parameters now
|
||||
|
@ -27,7 +27,7 @@ void transposeChars(LyXText & text, LyXCursor const & cursor)
|
||||
{
|
||||
ParagraphList::iterator tmppit = cursor.par();
|
||||
|
||||
setUndo(text.bv(), Undo::FINISH, &*tmppit, &*boost::next(tmppit));
|
||||
setUndo(text.bv(), Undo::FINISH, tmppit, boost::next(tmppit));
|
||||
|
||||
pos_type tmppos = cursor.pos();
|
||||
|
||||
|
@ -466,6 +466,6 @@ void setRedo(BufferView * bv, Undo::undo_kind kind,
|
||||
|
||||
void setCursorParUndo(BufferView * bv)
|
||||
{
|
||||
setUndo(bv, Undo::FINISH, &*bv->text->cursor.par(),
|
||||
bv->text->cursor.par()->next());
|
||||
setUndo(bv, Undo::FINISH, bv->text->cursor.par(),
|
||||
boost::next(bv->text->cursor.par()));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user