From 260e97342e0234c4687f5e6b83975a552620fb7a Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Mon, 16 Jun 2003 14:21:52 +0000 Subject: [PATCH] compilation fix; audit and fix calls to cutSelection git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7174 a592a061-630c-0410-9148-cb99ea01b6c8 --- po/POTFILES.in | 1 + src/ChangeLog | 31 ++++++++++++++++++++++--------- src/insets/ChangeLog | 3 +++ src/insets/insettext.C | 2 +- src/iterators.C | 6 +++--- src/mathed/ChangeLog | 3 +++ src/mathed/formulabase.C | 2 +- src/text3.C | 10 +++++----- 8 files changed, 39 insertions(+), 19 deletions(-) diff --git a/po/POTFILES.in b/po/POTFILES.in index 0a6686e7f2..fcc49c6744 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -56,6 +56,7 @@ src/frontends/qt2/QGraphics.C src/frontends/qt2/QInclude.C src/frontends/qt2/QLPrintDialog.C src/frontends/qt2/QLog.C +src/frontends/qt2/QMath.C src/frontends/qt2/QMathDialog.C src/frontends/qt2/QMathMatrixDialog.C src/frontends/qt2/QMinipage.C diff --git a/src/ChangeLog b/src/ChangeLog index fb04b213ca..7dc0eb2d0d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,14 @@ +2003-06-16 Jean-Marc Lasgouttes + + * iterators.C (operator++, ParPosition): reintroduce some + const_cast for the benefit of older compilers. + +2003-06-13 Jean-Marc Lasgouttes + + * text3.C (dispatch): do not modify clipboard when doing + LFUN_BACKSPACE, LFUN_BACKSPACE_SKIP, LFUN_DELETE or + LFUN_DELETE_SKIP on a selection selection + 2003-06-16 André Pönitz * BufferView.C: @@ -2997,24 +3008,26 @@ * lyxtext.h: * text.C: implement accept/rejectChange() - * lyxtext.h: - * text.C: paint changebars. Paint new/deleted text in the chosen colours. - Strike through deleted text. + * lyxtext.h: + * text.C: paint changebars. Paint new/deleted text in the chosen + colours. Strike through deleted text. * paragraph.h: * paragraph.C: * paragraph_pimpl.h: - * paragraph_pimpl.C: output change markers in .lyx and .tex. Pass in the current change - to the insert functions. Rework erase to mark text as deleted, adding - an eraseIntern() and a range-based erase(). Implement - per-paragraph change lookup and accept/reject. + * paragraph_pimpl.C: output change markers in .lyx and .tex. Pass + in the current change to the insert functions. Rework erase to + mark text as deleted, adding an eraseIntern() and a range-based + erase(). Implement per-paragraph change lookup and + accept/reject. * paragraph_funcs.C: Fixup paste for change tracking. * tabular.C: mark added row/columns as new. - * text.C: fix rowLast() to never return -1. Don't allow spellchecking of deleted - text. Track transpose changes. Don't allow paragraph break or merge where appropriate. + * text.C: fix rowLast() to never return -1. Don't allow + spellchecking of deleted text. Track transpose changes. Don't + allow paragraph break or merge where appropriate. * text2.C: leave cursor at end of selection after a cut. diff --git a/src/insets/ChangeLog b/src/insets/ChangeLog index 9cc27c1b7b..bc7d3b7bbf 100644 --- a/src/insets/ChangeLog +++ b/src/insets/ChangeLog @@ -1,3 +1,6 @@ +2003-06-13 Jean-Marc Lasgouttes + + * insettext.C (localDispatch): fix call to cutSelection for LFUN_CUT 2003-06-16 André Pönitz diff --git a/src/insets/insettext.C b/src/insets/insettext.C index 897fe7ec61..027049eac0 100644 --- a/src/insets/insettext.C +++ b/src/insets/insettext.C @@ -1208,7 +1208,7 @@ Inset::RESULT InsetText::localDispatch(FuncRequest const & cmd) } case LFUN_CUT: { - lt->cutSelection(bv); + lt->cutSelection(true, true); updwhat = CURSOR_PAR; updflag = true; break; diff --git a/src/iterators.C b/src/iterators.C index 5865272ff1..d7b0d74ed2 100644 --- a/src/iterators.C +++ b/src/iterators.C @@ -47,7 +47,7 @@ public: ParPosition::ParPosition(ParagraphList::iterator p, ParagraphList const & pl) : pit(p), plist(&pl) { - if (p != pl.end()) { + if (p != const_cast(pl).end()) { it.reset(p->insetlist.begin()); } } @@ -129,7 +129,7 @@ ParIterator & ParIterator::operator++() } // Try to go to the next paragarph - if (next(p.pit) != p.plist->end() + if (next(p.pit) != const_cast(p.plist)->end() || pimpl_->positions.size() == 1) { ++p.pit; p.index.reset(); @@ -253,7 +253,7 @@ ParConstIterator & ParConstIterator::operator++() } // Try to go to the next paragarph - if (next(p.pit) != p.plist->end() + if (next(p.pit) != const_cast(p.plist)->end() || pimpl_->positions.size() == 1) { ++p.pit; p.index.reset(); diff --git a/src/mathed/ChangeLog b/src/mathed/ChangeLog index be5e2bfd17..48b93ec128 100644 --- a/src/mathed/ChangeLog +++ b/src/mathed/ChangeLog @@ -1,3 +1,6 @@ +2003-06-13 Jean-Marc Lasgouttes + + * formulabase.C (mathDispatchCreation): fix call to cutSelection 2003-06-16 André Pönitz diff --git a/src/mathed/formulabase.C b/src/mathed/formulabase.C index 3f7f7f0af0..ae0d51d0f4 100644 --- a/src/mathed/formulabase.C +++ b/src/mathed/formulabase.C @@ -920,7 +920,7 @@ void mathDispatchCreation(FuncRequest const & cmd, bool display) f = new InsetFormula(sel); else f = new InsetFormulaMacro(sel); - bv->getLyXText()->cutSelection(bv); + bv->getLyXText()->cutSelection(true, false); openNewInset(bv, f); } cmd.message(N_("Math editor mode")); diff --git a/src/text3.C b/src/text3.C index 50f3498dc4..2b3496b90c 100644 --- a/src/text3.C +++ b/src/text3.C @@ -736,7 +736,7 @@ Inset::RESULT LyXText::dispatch(FuncRequest const & cmd) // just comment out the line below... } else { update(); - cutSelection(bv, true); + cutSelection(true, false); update(); } moveCursorUpdate(bv, false); @@ -777,7 +777,7 @@ Inset::RESULT LyXText::dispatch(FuncRequest const & cmd) } } else { update(); - cutSelection(bv, true); + cutSelection(true, false); } update(); break; @@ -794,7 +794,7 @@ Inset::RESULT LyXText::dispatch(FuncRequest const & cmd) } } else { update(); - cutSelection(bv, true); + cutSelection(true, false); update(); } bv->owner()->view_state_changed(); @@ -823,7 +823,7 @@ Inset::RESULT LyXText::dispatch(FuncRequest const & cmd) } } else { update(); - cutSelection(bv, true); + cutSelection(true, false); } update(); break; @@ -1034,7 +1034,7 @@ Inset::RESULT LyXText::dispatch(FuncRequest const & cmd) case LFUN_CUT: update(); - cutSelection(bv, true); + cutSelection(true, true); update(); cmd.message(_("Cut")); break; -- 2.39.2