From eec568d8700b4c1b59956673e15b47c429643468 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Thu, 20 Sep 2001 10:16:24 +0000 Subject: [PATCH] fix free memory read when pasting + some typos git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2776 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/BufferView2.C | 2 +- src/BufferView_pimpl.C | 4 ++-- src/ChangeLog | 10 ++++++++++ src/insets/insetfloatlist.C | 2 +- src/layout.C | 2 +- src/lyx_cb.C | 2 +- src/text2.C | 4 +--- 7 files changed, 17 insertions(+), 9 deletions(-) diff --git a/src/BufferView2.C b/src/BufferView2.C index b58b1c3ca6..6226a7edaf 100644 --- a/src/BufferView2.C +++ b/src/BufferView2.C @@ -231,7 +231,7 @@ void BufferView::menuUndo() beforeChange(text); update(text, BufferView::SELECT|BufferView::FITCUR); if (!textUndo(this)) - owner()->message(_("No forther undo information")); + owner()->message(_("No further undo information")); else update(text, BufferView::SELECT|BufferView::FITCUR|BufferView::CHANGE); setState(); diff --git a/src/BufferView_pimpl.C b/src/BufferView_pimpl.C index eb645466b8..ee68b85a97 100644 --- a/src/BufferView_pimpl.C +++ b/src/BufferView_pimpl.C @@ -2738,7 +2738,7 @@ bool BufferView::Pimpl::Dispatch(kb_action action, string const & argument) if (floatList.typeExist(argument)) { insertAndEditInset(new InsetFloat(argument)); } else { - lyxerr << "Non-existant float type: " + lyxerr << "Non-existent float type: " << argument << endl; } break; @@ -2754,7 +2754,7 @@ bool BufferView::Pimpl::Dispatch(kb_action action, string const & argument) else delete new_inset; } else { - lyxerr << "Non-existant float type: " + lyxerr << "Non-existent float type: " << argument << endl; } diff --git a/src/ChangeLog b/src/ChangeLog index ea98b1d651..3ba82da392 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,13 @@ +2001-09-20 Michael Schmitt + + * several files: fix typos in user-visible strings + +2001-09-18 Jean-Marc Lasgouttes + + * text2.C (pasteSelection): do not set the selection, since it + will be cleared later. Actually, the intent was to fix the way the + selection was set, but I figured rmoving the code was just as good. + 2001-09-19 Dekel Tsur * FontLoader.C (available): Check if font is available without diff --git a/src/insets/insetfloatlist.C b/src/insets/insetfloatlist.C index 2e50cf80e3..b10e2b5a69 100644 --- a/src/insets/insetfloatlist.C +++ b/src/insets/insetfloatlist.C @@ -19,7 +19,7 @@ string const InsetFloatList::getScreenLabel(Buffer const *) const string const res = guiName + _(" List"); return res; } - return _("ERROR nonexistant float type!"); + return _("ERROR: Nonexistent float type!"); } diff --git a/src/layout.C b/src/layout.C index 8f4dfffdd5..b4fb05f733 100644 --- a/src/layout.C +++ b/src/layout.C @@ -1431,7 +1431,7 @@ bool LyXTextClassList::Read () lyxerr << "LyXTextClassList::Read: no textclasses found!" << endl; WriteAlert(_("LyX wasn't able to find any layout description!"), - _("Check the contents of the file \"textclass.lst\""), + _("Check the contents of the file \"textclass.lst\""), _("Sorry, has to exit :-(")); return false; } diff --git a/src/lyx_cb.C b/src/lyx_cb.C index 1306b2bddf..a49b202dc8 100644 --- a/src/lyx_cb.C +++ b/src/lyx_cb.C @@ -358,7 +358,7 @@ void AutoSave(BufferView * bv) // It is dangerous to do this in the child, // but safe in the parent, so... if (pid == -1) - bv->owner()->message(_("Autosave Failed!")); + bv->owner()->message(_("Autosave failed!")); } } if (pid == 0) { // we are the child so... diff --git a/src/text2.C b/src/text2.C index 526f671a7b..caaa887447 100644 --- a/src/text2.C +++ b/src/text2.C @@ -1839,8 +1839,8 @@ void LyXText::pasteSelection(BufferView * bview) Paragraph * endpar; Paragraph * actpar = cursor.par(); - int pos = cursor.pos(); + CutAndPaste::pasteSelection(&actpar, &endpar, pos, bview->buffer()->params.textclass); @@ -1849,9 +1849,7 @@ void LyXText::pasteSelection(BufferView * bview) setCursor(bview, cursor.par(), cursor.pos()); clearSelection(); - selection.cursor = cursor; setCursor(bview, actpar, pos); - setSelection(bview); updateCounters(bview, cursor.row()); } -- 2.39.5