From 622e505857c6b92532c93af9afc530916fa6d1d8 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Thu, 18 Oct 2001 16:17:46 +0000 Subject: [PATCH] small cleanups from andre git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2896 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/lyxtext.h | 4 ++-- src/text2.C | 20 +++++++++----------- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/src/lyxtext.h b/src/lyxtext.h index 29c250f052..bf353d06d7 100644 --- a/src/lyxtext.h +++ b/src/lyxtext.h @@ -662,9 +662,9 @@ public: /// Paragraph * ownerParagraph() const; // - Paragraph * ownerParagraph(Paragraph *) const; + void ownerParagraph(Paragraph *) const; // set it searching first for the right owner using the paragraph id - Paragraph * ownerParagraph(int id, Paragraph *) const; + void ownerParagraph(int id, Paragraph *) const; }; diff --git a/src/text2.C b/src/text2.C index 5b7a9cce1f..c3c0be6f3a 100644 --- a/src/text2.C +++ b/src/text2.C @@ -1137,8 +1137,7 @@ void LyXText::toggleFree(BufferView * bview, } -string -LyXText::getStringToIndex(BufferView * bview) +string LyXText::getStringToIndex(BufferView * bview) { string idxstring; @@ -1170,8 +1169,8 @@ LyXText::getStringToIndex(BufferView * bview) return idxstring; } -Paragraph::size_type -LyXText::beginningOfMainBody(Buffer const * buf, + +Paragraph::size_type LyXText::beginningOfMainBody(Buffer const * buf, Paragraph const * par) const { if (textclasslist.Style(buf->params.textclass, @@ -1193,7 +1192,7 @@ void LyXText::setParagraph(BufferView * bview, bool pagebreak_top, bool pagebreak_bottom, VSpace const & space_top, VSpace const & space_bottom, - Spacing const & spacing, + Spacing const & spacing, LyXAlignment align, string labelwidthstring, bool noindent) @@ -2070,7 +2069,7 @@ bool LyXText::updateInset(BufferView * bview, Inset * inset) { // first check the current paragraph int pos = cursor.par()->getPositionOfInset(inset); - if (pos != -1){ + if (pos != -1) { checkParagraph(bview, cursor.par(), pos); return true; } @@ -2080,7 +2079,7 @@ bool LyXText::updateInset(BufferView * bview, Inset * inset) Paragraph * par = firstParagraph(); do { pos = par->getPositionOfInset(inset); - if (pos != -1){ + if (pos != -1) { checkParagraph(bview, par, pos); return true; } @@ -2576,17 +2575,17 @@ Paragraph * LyXText::ownerParagraph() const } -Paragraph * LyXText::ownerParagraph(Paragraph * p) const +void LyXText::ownerParagraph(Paragraph * p) const { if (inset_owner) { inset_owner->paragraph(p); } else { bv_owner->buffer()->paragraph = p; } - return 0; } -Paragraph * LyXText::ownerParagraph(int id, Paragraph * p) const + +void LyXText::ownerParagraph(int id, Paragraph * p) const { Paragraph * op = bv_owner->buffer()->getParFromID(id); if (op && op->inInset()) { @@ -2598,7 +2597,6 @@ Paragraph * LyXText::ownerParagraph(int id, Paragraph * p) const bv_owner->buffer()->paragraph = p; } } - return 0; }