From 107c91ace993ca1f1df72aa83ca46eb2d3e3b88c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Lars=20Gullik=20Bj=C3=B8nnes?= Date: Thu, 1 May 2003 13:04:16 +0000 Subject: [PATCH] =?utf8?q?2003-05-01=20=20Lars=20Gullik=20Bj=EF=BF=BDnnes?= =?utf8?q?=20=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit * CutAndPaste.C (pasteSelection): remove some unneeded code. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6908 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/ChangeLog | 5 +++++ src/CutAndPaste.C | 12 +++++------- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 8baac884a9..1612d5ed99 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,8 +1,13 @@ +2003-05-01 Lars Gullik Bjønnes + + * CutAndPaste.C (pasteSelection): remove some unneeded code. + 2003-05-01 Lars Gullik Bjønnes * CutAndPaste.C (resetOwnerAndChanges): new helper functor (copySelection): clean up a bit. (pasteSelection): use make_pair + (pasteSelection): remove some unneeded code. * ParagraphList.C (ParagraphList): implement copy constructor (operator=): implement, base on copy constructor. diff --git a/src/CutAndPaste.C b/src/CutAndPaste.C index fea5382d1b..78025d7f5d 100644 --- a/src/CutAndPaste.C +++ b/src/CutAndPaste.C @@ -218,9 +218,6 @@ CutAndPaste::pasteSelection(ParagraphList & pars, // new environment and set also another font if that is required ParagraphList::iterator tmpbuf = paragraphs.begin(); int depth_delta = pit->params().depth() - tmpbuf->params().depth(); - // Temporary set *par as previous of tmpbuf as we might have - // to realize the font. - tmpbuf->previous(&*pit); // make sure there is no class difference #warning current_view used here @@ -253,7 +250,11 @@ CutAndPaste::pasteSelection(ParagraphList & pars, tmpbuf->erase(i--); } } else { +#if 0 LyXFont f1 = tmpbuf->getFont(current_view->buffer()->params, i, outerFont(tmpbuf, pars)); +#else + LyXFont f1 = tmpbuf->getFont(current_view->buffer()->params, i, outerFont(pit, pars)); +#endif LyXFont f2 = f1; if (!pit->checkInsertChar(f1)) { tmpbuf->erase(i--); @@ -264,9 +265,6 @@ CutAndPaste::pasteSelection(ParagraphList & pars, } } - // now reset it to 0 - paragraphs.begin()->previous(0); - // make the buf exactly the same layout than // the cursor paragraph paragraphs.begin()->makeSameLayout(*pit); @@ -283,7 +281,7 @@ CutAndPaste::pasteSelection(ParagraphList & pars, // if necessary if (pit->size() > pos || !pit->next()) { breakParagraphConservative(current_view->buffer()->params, - pars, &*pit, pos); + pars, pit, pos); paste_the_end = true; } // set the end for redoing later -- 2.39.5